diff --git a/.ci/Jenkinsfile_flaky b/.ci/Jenkinsfile_flaky index 8121405e5ae24..370643789c2cd 100644 --- a/.ci/Jenkinsfile_flaky +++ b/.ci/Jenkinsfile_flaky @@ -4,7 +4,6 @@ library 'kibana-pipeline-library' kibanaLibrary.load() def TASK_PARAM = params.TASK ?: params.CI_GROUP - // Looks like 'oss:ciGroup:1', 'oss:firefoxSmoke' def JOB_PARTS = TASK_PARAM.split(':') def IS_XPACK = JOB_PARTS[0] == 'xpack' @@ -111,6 +110,8 @@ def getWorkerFromParams(isXpack, job, ciGroup) { return kibanaPipeline.scriptTaskDocker('Jest Integration Tests', 'test/scripts/test/jest_integration.sh') } else if (job == 'apiIntegration') { return kibanaPipeline.scriptTask('API Integration Tests', 'test/scripts/test/api_integration.sh') + } else if (job == 'pluginFunctional') { + return kibanaPipeline.functionalTestProcess('oss-pluginFunctional', './test/scripts/jenkins_plugin_functional.sh') } else { return kibanaPipeline.ossCiGroupProcess(ciGroup) } diff --git a/.eslintrc.js b/.eslintrc.js index a4ce657d523d9..22d0270a5b066 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1370,7 +1370,7 @@ module.exports = { { // Source files only - allow `any` in test/mock files files: ['x-pack/plugins/enterprise_search/**/*.{ts,tsx}'], - excludedFiles: ['x-pack/plugins/enterprise_search/**/*.{test,mock}.{ts,tsx}'], + excludedFiles: ['x-pack/plugins/enterprise_search/**/*.{test,mock,test_helper}.{ts,tsx}'], rules: { '@typescript-eslint/no-explicit-any': 'error', }, diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0cf5fc4e0dfd0..a017c79309a56 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -130,6 +130,8 @@ # ML team owns and maintains the transform plugin despite it living in the Data management section. /x-pack/plugins/transform/ @elastic/ml-ui +/x-pack/plugins/data_visualizer/ @elastic/ml-ui +/x-pack/plugins/file_upload/ @elastic/ml-ui /x-pack/test/accessibility/apps/transform.ts @elastic/ml-ui /x-pack/test/api_integration/apis/transform/ @elastic/ml-ui /x-pack/test/api_integration_basic/apis/transform/ @elastic/ml-ui @@ -306,28 +308,28 @@ /x-pack/plugins/enterprise_search/server/saved_objects/workplace_search/ @elastic/workplace-search-frontend # Stack Management -/src/plugins/dev_tools/ @elastic/kibana-stack-management -/src/plugins/console/ @elastic/kibana-stack-management -/src/plugins/es_ui_shared/ @elastic/kibana-stack-management -/x-pack/plugins/cross_cluster_replication/ @elastic/kibana-stack-management -/x-pack/plugins/index_lifecycle_management/ @elastic/kibana-stack-management -/x-pack/plugins/console_extensions/ @elastic/kibana-stack-management -/x-pack/plugins/grokdebugger/ @elastic/kibana-stack-management -/x-pack/plugins/index_management/ @elastic/kibana-stack-management -/x-pack/plugins/license_api_guard/ @elastic/kibana-stack-management -/x-pack/plugins/license_management/ @elastic/kibana-stack-management -/x-pack/plugins/painless_lab/ @elastic/kibana-stack-management -/x-pack/plugins/remote_clusters/ @elastic/kibana-stack-management -/x-pack/plugins/rollup/ @elastic/kibana-stack-management -/x-pack/plugins/searchprofiler/ @elastic/kibana-stack-management -/x-pack/plugins/snapshot_restore/ @elastic/kibana-stack-management -/x-pack/plugins/upgrade_assistant/ @elastic/kibana-stack-management -/x-pack/plugins/watcher/ @elastic/kibana-stack-management -/x-pack/plugins/ingest_pipelines/ @elastic/kibana-stack-management -/packages/kbn-ace/ @elastic/kibana-stack-management -/packages/kbn-monaco/ @elastic/kibana-stack-management -#CC# /x-pack/plugins/console_extensions/ @elastic/kibana-stack-management -#CC# /x-pack/plugins/cross_cluster_replication/ @elastic/kibana-stack-management +/src/plugins/dev_tools/ @elastic/kibana-stack-management +/src/plugins/console/ @elastic/kibana-stack-management +/src/plugins/es_ui_shared/ @elastic/kibana-stack-management +/x-pack/plugins/cross_cluster_replication/ @elastic/kibana-stack-management +/x-pack/plugins/index_lifecycle_management/ @elastic/kibana-stack-management +/x-pack/plugins/console_extensions/ @elastic/kibana-stack-management +/x-pack/plugins/grokdebugger/ @elastic/kibana-stack-management +/x-pack/plugins/index_management/ @elastic/kibana-stack-management +/x-pack/plugins/license_api_guard/ @elastic/kibana-stack-management +/x-pack/plugins/license_management/ @elastic/kibana-stack-management +/x-pack/plugins/painless_lab/ @elastic/kibana-stack-management +/x-pack/plugins/remote_clusters/ @elastic/kibana-stack-management +/x-pack/plugins/rollup/ @elastic/kibana-stack-management +/x-pack/plugins/searchprofiler/ @elastic/kibana-stack-management +/x-pack/plugins/snapshot_restore/ @elastic/kibana-stack-management +/x-pack/plugins/upgrade_assistant/ @elastic/kibana-stack-management +/x-pack/plugins/watcher/ @elastic/kibana-stack-management +/x-pack/plugins/ingest_pipelines/ @elastic/kibana-stack-management +/packages/kbn-ace/ @elastic/kibana-stack-management +/packages/kbn-monaco/ @elastic/kibana-stack-management +#CC# /x-pack/plugins/console_extensions/ @elastic/kibana-stack-management +#CC# /x-pack/plugins/cross_cluster_replication/ @elastic/kibana-stack-management # Security Solution /x-pack/test/endpoint_api_integration_no_ingest/ @elastic/security-solution diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index a5b27c67eaca1..0131bca3e6c50 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import actionsObj from './actions.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 116 | 0 | 116 | 7 | + ## Server ### Setup diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 5b0e69c14f58b..241b6b82598c3 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import advancedSettingsObj from './advanced_settings.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 23 | 0 | 22 | 1 | + ## Client ### Setup diff --git a/api_docs/alerting.json b/api_docs/alerting.json index 13a150d0af00d..979f444659c20 100644 --- a/api_docs/alerting.json +++ b/api_docs/alerting.json @@ -5,7 +5,42 @@ "functions": [], "interfaces": [], "enums": [], - "misc": [], + "misc": [ + { + "parentPluginId": "alerting", + "id": "def-public.AlertNavigationHandler", + "type": "Type", + "tags": [], + "label": "AlertNavigationHandler", + "description": [ + "\nReturns information that can be used to navigate to a specific page to view the given rule.\n" + ], + "signature": [ + "(alert: Pick<", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.Alert", + "text": "Alert" + }, + ", \"enabled\" | \"id\" | \"name\" | \"params\" | \"actions\" | \"tags\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"throttle\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">) => string | ", + { + "pluginId": "kibanaUtils", + "scope": "common", + "docId": "kibKibanaUtilsPluginApi", + "section": "def-common.JsonObject", + "text": "JsonObject" + } + ], + "source": { + "path": "x-pack/plugins/alerting/public/alert_navigation_registry/types.ts", + "lineNumber": 20 + }, + "deprecated": false, + "initialIsOpen": false + } + ], "objects": [], "setup": { "parentPluginId": "alerting", @@ -24,44 +59,58 @@ "parentPluginId": "alerting", "id": "def-public.PluginSetupContract.registerNavigation", "type": "Function", - "tags": [], + "tags": [ + "throws" + ], "label": "registerNavigation", - "description": [], + "description": [ + "\nRegister a customized view of the particular rule type. Stack Management provides a generic overview, but a developer can register a\ncustom navigation to provide the user an extra link to a more curated view. The alerting plugin doesn't actually do\nanything with this information, but it can be used by other plugins via the `getNavigation` functionality. Currently\nthe trigger_actions_ui plugin uses it to expose the link from the generic rule view in Stack Management.\n" + ], "signature": [ - "(consumer: string, alertType: string, handler: ", - "AlertNavigationHandler", + "(applicationId: string, ruleType: string, handler: ", + { + "pluginId": "alerting", + "scope": "public", + "docId": "kibAlertingPluginApi", + "section": "def-public.AlertNavigationHandler", + "text": "AlertNavigationHandler" + }, ") => void" ], "source": { "path": "x-pack/plugins/alerting/public/plugin.ts", - "lineNumber": 15 + "lineNumber": 30 }, "deprecated": false, "returnComment": [], "children": [ { "parentPluginId": "alerting", - "id": "def-public.consumer", + "id": "def-public.applicationId", "type": "string", "tags": [], - "label": "consumer", - "description": [], + "label": "applicationId", + "description": [ + "The application id that the user should be navigated to, to view a particular alert in a custom way." + ], "source": { "path": "x-pack/plugins/alerting/public/plugin.ts", - "lineNumber": 16 + "lineNumber": 31 }, "deprecated": false }, { "parentPluginId": "alerting", - "id": "def-public.alertType", + "id": "def-public.ruleType", "type": "string", "tags": [], - "label": "alertType", - "description": [], + "label": "ruleType", + "description": [ + "The rule type that has been registered with Alerting.Server.PluginSetupContract.registerType. If\nno such rule with that id exists, a warning is output to the console log. It used to throw an error, but that was temporarily moved\nbecause it was causing flaky test failures with https://github.com/elastic/kibana/issues/59229 and needs to be\ninvestigated more." + ], "source": { "path": "x-pack/plugins/alerting/public/plugin.ts", - "lineNumber": 17 + "lineNumber": 32 }, "deprecated": false }, @@ -71,7 +120,9 @@ "type": "Function", "tags": [], "label": "handler", - "description": [], + "description": [ + "The navigation handler should return either a relative URL, or a state object. This information can be used,\nin conjunction with the consumer id, to navigate the user to a custom URL to view a rule's details." + ], "signature": [ "(alert: Pick<", { @@ -81,15 +132,7 @@ "section": "def-common.Alert", "text": "Alert" }, - ", \"enabled\" | \"id\" | \"name\" | \"params\" | \"actions\" | \"tags\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"throttle\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">, alertType: ", - { - "pluginId": "alerting", - "scope": "common", - "docId": "kibAlertingPluginApi", - "section": "def-common.AlertType", - "text": "AlertType" - }, - "<\"default\", \"recovered\">) => string | ", + ", \"enabled\" | \"id\" | \"name\" | \"params\" | \"actions\" | \"tags\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"throttle\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">) => string | ", { "pluginId": "kibanaUtils", "scope": "common", @@ -100,7 +143,7 @@ ], "source": { "path": "x-pack/plugins/alerting/public/plugin.ts", - "lineNumber": 18 + "lineNumber": 33 }, "deprecated": false } @@ -112,29 +155,39 @@ "type": "Function", "tags": [], "label": "registerDefaultNavigation", - "description": [], + "description": [ + "\nRegister a customized view for all rule types. Stack Management provides a generic overview, but a developer can register a\ncustom navigation to provide the user an extra link to a more curated view. The alerting plugin doesn't actually do\nanything with this information, but it can be used by other plugins via the `getNavigation` functionality. Currently\nthe trigger_actions_ui plugin uses it to expose the link from the generic rule view in Stack Management.\n" + ], "signature": [ - "(consumer: string, handler: ", - "AlertNavigationHandler", + "(applicationId: string, handler: ", + { + "pluginId": "alerting", + "scope": "public", + "docId": "kibAlertingPluginApi", + "section": "def-public.AlertNavigationHandler", + "text": "AlertNavigationHandler" + }, ") => void" ], "source": { "path": "x-pack/plugins/alerting/public/plugin.ts", - "lineNumber": 20 + "lineNumber": 46 }, "deprecated": false, "returnComment": [], "children": [ { "parentPluginId": "alerting", - "id": "def-public.consumer", + "id": "def-public.applicationId", "type": "string", "tags": [], - "label": "consumer", - "description": [], + "label": "applicationId", + "description": [ + "The application id that the user should be navigated to, to view a particular alert in a custom way." + ], "source": { "path": "x-pack/plugins/alerting/public/plugin.ts", - "lineNumber": 20 + "lineNumber": 46 }, "deprecated": false }, @@ -144,7 +197,9 @@ "type": "Function", "tags": [], "label": "handler", - "description": [], + "description": [ + "The navigation handler should return either a relative URL, or a state object. This information can be used,\nin conjunction with the consumer id, to navigate the user to a custom URL to view a rule's details." + ], "signature": [ "(alert: Pick<", { @@ -154,15 +209,7 @@ "section": "def-common.Alert", "text": "Alert" }, - ", \"enabled\" | \"id\" | \"name\" | \"params\" | \"actions\" | \"tags\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"throttle\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">, alertType: ", - { - "pluginId": "alerting", - "scope": "common", - "docId": "kibAlertingPluginApi", - "section": "def-common.AlertType", - "text": "AlertType" - }, - "<\"default\", \"recovered\">) => string | ", + ", \"enabled\" | \"id\" | \"name\" | \"params\" | \"actions\" | \"tags\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"throttle\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">) => string | ", { "pluginId": "kibanaUtils", "scope": "common", @@ -173,7 +220,7 @@ ], "source": { "path": "x-pack/plugins/alerting/public/plugin.ts", - "lineNumber": 20 + "lineNumber": 46 }, "deprecated": false } @@ -192,7 +239,7 @@ "description": [], "source": { "path": "x-pack/plugins/alerting/public/plugin.ts", - "lineNumber": 22 + "lineNumber": 48 }, "deprecated": false, "children": [ @@ -224,7 +271,7 @@ ], "source": { "path": "x-pack/plugins/alerting/public/plugin.ts", - "lineNumber": 23 + "lineNumber": 49 }, "deprecated": false, "returnComment": [], @@ -238,7 +285,7 @@ "description": [], "source": { "path": "x-pack/plugins/alerting/public/plugin.ts", - "lineNumber": 23 + "lineNumber": 49 }, "deprecated": false } @@ -3857,7 +3904,7 @@ "label": "ReservedActionGroups", "description": [], "signature": [ - "\"recovered\" | RecoveryActionGroupId" + "RecoveryActionGroupId | \"recovered\"" ], "source": { "path": "x-pack/plugins/alerting/common/builtin_action_groups.ts", diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index a0294a02d9f10..c3c844148106f 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import alertingObj from './alerting.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 213 | 0 | 213 | 15 | + ## Client ### Setup @@ -19,6 +29,9 @@ import alertingObj from './alerting.json'; ### Start +### Consts, variables and types + + ## Server ### Functions diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index d037dc99e1a54..e2a4ee9e7ea7a 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import apmObj from './apm.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 37 | 0 | 37 | 30 | + ## Client ### Setup diff --git a/api_docs/apm_oss.mdx b/api_docs/apm_oss.mdx index 7370704001378..2a03249734f9c 100644 --- a/api_docs/apm_oss.mdx +++ b/api_docs/apm_oss.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import apmOssObj from './apm_oss.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 4 | 0 | 4 | 0 | + ## Server ### Setup diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index e6b648e38cdc3..d9727cb817e26 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import bannersObj from './banners.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 9 | 0 | 9 | 0 | + ## Common ### Interfaces diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index faf3d7eefc7f9..217e190831313 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import bfetchObj from './bfetch.json'; +Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back. + +Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 73 | 1 | 62 | 2 | + ## Client ### Start diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 75ac78d571bc9..9d8707ab778e6 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import canvasObj from './canvas.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 6 | 0 | 5 | 3 | + ## Client ### Setup diff --git a/api_docs/cases.json b/api_docs/cases.json index 2df1b04871273..cccf5de2710e2 100644 --- a/api_docs/cases.json +++ b/api_docs/cases.json @@ -34,21 +34,9 @@ "text": "CasesUiStart" }, ", ", - { - "pluginId": "cases", - "scope": "public", - "docId": "kibCasesPluginApi", - "section": "def-public.SetupPlugins", - "text": "SetupPlugins" - }, + "SetupPlugins", ", ", - { - "pluginId": "cases", - "scope": "public", - "docId": "kibCasesPluginApi", - "section": "def-public.StartPlugins", - "text": "StartPlugins" - }, + "StartPlugins", ">" ], "source": { @@ -117,13 +105,7 @@ "text": "CoreSetup" }, ", plugins: ", - { - "pluginId": "cases", - "scope": "public", - "docId": "kibCasesPluginApi", - "section": "def-public.SetupPlugins", - "text": "SetupPlugins" - }, + "SetupPlugins", ") => void" ], "source": { @@ -164,13 +146,7 @@ "label": "plugins", "description": [], "signature": [ - { - "pluginId": "cases", - "scope": "public", - "docId": "kibCasesPluginApi", - "section": "def-public.SetupPlugins", - "text": "SetupPlugins" - } + "SetupPlugins" ], "source": { "path": "x-pack/plugins/cases/public/plugin.ts", @@ -199,13 +175,7 @@ "text": "CoreStart" }, ", plugins: ", - { - "pluginId": "cases", - "scope": "public", - "docId": "kibCasesPluginApi", - "section": "def-public.StartPlugins", - "text": "StartPlugins" - }, + "StartPlugins", ") => ", { "pluginId": "cases", @@ -252,13 +222,7 @@ "label": "plugins", "description": [], "signature": [ - { - "pluginId": "cases", - "scope": "public", - "docId": "kibCasesPluginApi", - "section": "def-public.StartPlugins", - "text": "StartPlugins" - } + "StartPlugins" ], "source": { "path": "x-pack/plugins/cases/public/plugin.ts", @@ -296,30 +260,293 @@ "interfaces": [ { "parentPluginId": "cases", - "id": "def-public.Owner", + "id": "def-public.AllCasesProps", "type": "Interface", "tags": [], - "label": "Owner", + "label": "AllCasesProps", "description": [], + "signature": [ + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.AllCasesProps", + "text": "AllCasesProps" + }, + " extends ", + "Owner" + ], "source": { - "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 42 + "path": "x-pack/plugins/cases/public/components/all_cases/index.tsx", + "lineNumber": 13 }, "deprecated": false, "children": [ { "parentPluginId": "cases", - "id": "def-public.Owner.owner", + "id": "def-public.AllCasesProps.caseDetailsNavigation", + "type": "Object", + "tags": [], + "label": "caseDetailsNavigation", + "description": [], + "signature": [ + "CasesNavigation", + "<", + "CaseDetailsHrefSchema", + ", \"configurable\">" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/all_cases/index.tsx", + "lineNumber": 14 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-public.AllCasesProps.configureCasesNavigation", + "type": "Object", + "tags": [], + "label": "configureCasesNavigation", + "description": [], + "signature": [ + "CasesNavigation", + ", null>" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/all_cases/index.tsx", + "lineNumber": 15 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-public.AllCasesProps.createCaseNavigation", + "type": "Object", + "tags": [], + "label": "createCaseNavigation", + "description": [], + "signature": [ + "CasesNavigation", + ", null>" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/all_cases/index.tsx", + "lineNumber": 16 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-public.AllCasesProps.userCanCrud", + "type": "boolean", + "tags": [], + "label": "userCanCrud", + "description": [], + "source": { + "path": "x-pack/plugins/cases/public/components/all_cases/index.tsx", + "lineNumber": 17 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-public.AllCasesSelectorModalProps", + "type": "Interface", + "tags": [], + "label": "AllCasesSelectorModalProps", + "description": [], + "signature": [ + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.AllCasesSelectorModalProps", + "text": "AllCasesSelectorModalProps" + }, + " extends ", + "Owner" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/all_cases/selector_modal/index.tsx", + "lineNumber": 23 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "cases", + "id": "def-public.AllCasesSelectorModalProps.alertData", + "type": "Object", + "tags": [], + "label": "alertData", + "description": [], + "signature": [ + "Pick<{ type: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CommentType", + "text": "CommentType" + }, + ".alert | ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CommentType", + "text": "CommentType" + }, + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; }, \"index\" | \"rule\" | \"alertId\" | \"owner\"> | undefined" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/all_cases/selector_modal/index.tsx", + "lineNumber": 24 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-public.AllCasesSelectorModalProps.createCaseNavigation", + "type": "Object", + "tags": [], + "label": "createCaseNavigation", + "description": [], + "signature": [ + "CasesNavigation", + ", null>" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/all_cases/selector_modal/index.tsx", + "lineNumber": 25 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-public.AllCasesSelectorModalProps.hiddenStatuses", "type": "Array", "tags": [], - "label": "owner", + "label": "hiddenStatuses", "description": [], "signature": [ - "string[]" + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CaseStatusWithAllStatus", + "text": "CaseStatusWithAllStatus" + }, + "[] | undefined" ], "source": { - "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 43 + "path": "x-pack/plugins/cases/public/components/all_cases/selector_modal/index.tsx", + "lineNumber": 26 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-public.AllCasesSelectorModalProps.onRowClick", + "type": "Function", + "tags": [], + "label": "onRowClick", + "description": [], + "signature": [ + "(theCase?: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.Case", + "text": "Case" + }, + " | ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.SubCase", + "text": "SubCase" + }, + " | undefined) => void" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/all_cases/selector_modal/index.tsx", + "lineNumber": 27 + }, + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "cases", + "id": "def-public.theCase", + "type": "CompoundType", + "tags": [], + "label": "theCase", + "description": [], + "signature": [ + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.Case", + "text": "Case" + }, + " | ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.SubCase", + "text": "SubCase" + }, + " | undefined" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/all_cases/selector_modal/index.tsx", + "lineNumber": 27 + }, + "deprecated": false + } + ] + }, + { + "parentPluginId": "cases", + "id": "def-public.AllCasesSelectorModalProps.updateCase", + "type": "Function", + "tags": [], + "label": "updateCase", + "description": [], + "signature": [ + "((newCase: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.Case", + "text": "Case" + }, + ") => void) | undefined" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/all_cases/selector_modal/index.tsx", + "lineNumber": 28 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-public.AllCasesSelectorModalProps.userCanCrud", + "type": "boolean", + "tags": [], + "label": "userCanCrud", + "description": [], + "source": { + "path": "x-pack/plugins/cases/public/components/all_cases/selector_modal/index.tsx", + "lineNumber": 29 }, "deprecated": false } @@ -328,100 +555,389 @@ }, { "parentPluginId": "cases", - "id": "def-public.SetupPlugins", + "id": "def-public.CaseViewProps", "type": "Interface", "tags": [], - "label": "SetupPlugins", + "label": "CaseViewProps", "description": [], + "signature": [ + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.CaseViewProps", + "text": "CaseViewProps" + }, + " extends ", + "CaseViewComponentProps" + ], "source": { - "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 22 + "path": "x-pack/plugins/cases/public/components/case_view/index.tsx", + "lineNumber": 63 }, "deprecated": false, "children": [ { "parentPluginId": "cases", - "id": "def-public.SetupPlugins.security", + "id": "def-public.CaseViewProps.onCaseDataSuccess", + "type": "Function", + "tags": [], + "label": "onCaseDataSuccess", + "description": [], + "signature": [ + "((data: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.Case", + "text": "Case" + }, + ") => void) | undefined" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/case_view/index.tsx", + "lineNumber": 64 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-public.CaseViewProps.timelineIntegration", + "type": "Object", + "tags": [], + "label": "timelineIntegration", + "description": [], + "signature": [ + "CasesTimelineIntegration", + " | undefined" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/case_view/index.tsx", + "lineNumber": 65 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-public.ConfigureCasesProps", + "type": "Interface", + "tags": [], + "label": "ConfigureCasesProps", + "description": [], + "signature": [ + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.ConfigureCasesProps", + "text": "ConfigureCasesProps" + }, + " extends ", + "Owner" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/configure_cases/index.tsx", + "lineNumber": 55 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "cases", + "id": "def-public.ConfigureCasesProps.userCanCrud", + "type": "boolean", + "tags": [], + "label": "userCanCrud", + "description": [], + "source": { + "path": "x-pack/plugins/cases/public/components/configure_cases/index.tsx", + "lineNumber": 56 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-public.CreateCaseProps", + "type": "Interface", + "tags": [], + "label": "CreateCaseProps", + "description": [], + "signature": [ + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.CreateCaseProps", + "text": "CreateCaseProps" + }, + " extends ", + "Owner" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/create/index.tsx", + "lineNumber": 34 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "cases", + "id": "def-public.CreateCaseProps.afterCaseCreated", + "type": "Function", + "tags": [], + "label": "afterCaseCreated", + "description": [], + "signature": [ + "((theCase: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.Case", + "text": "Case" + }, + ", postComment: (args: PostComment) => Promise) => Promise) | undefined" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/create/index.tsx", + "lineNumber": 35 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-public.CreateCaseProps.caseType", + "type": "CompoundType", + "tags": [], + "label": "caseType", + "description": [], + "signature": [ + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CaseType", + "text": "CaseType" + }, + " | undefined" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/create/index.tsx", + "lineNumber": 36 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-public.CreateCaseProps.hideConnectorServiceNowSir", + "type": "CompoundType", + "tags": [], + "label": "hideConnectorServiceNowSir", + "description": [], + "signature": [ + "boolean | undefined" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/create/index.tsx", + "lineNumber": 37 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-public.CreateCaseProps.onCancel", + "type": "Function", + "tags": [], + "label": "onCancel", + "description": [], + "signature": [ + "() => void" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/create/index.tsx", + "lineNumber": 38 + }, + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "cases", + "id": "def-public.CreateCaseProps.onSuccess", + "type": "Function", + "tags": [], + "label": "onSuccess", + "description": [], + "signature": [ + "(theCase: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.Case", + "text": "Case" + }, + ") => Promise" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/create/index.tsx", + "lineNumber": 39 + }, + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "cases", + "id": "def-public.theCase", + "type": "Object", + "tags": [], + "label": "theCase", + "description": [], + "signature": [ + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.Case", + "text": "Case" + } + ], + "source": { + "path": "x-pack/plugins/cases/public/components/create/index.tsx", + "lineNumber": 39 + }, + "deprecated": false + } + ] + }, + { + "parentPluginId": "cases", + "id": "def-public.CreateCaseProps.timelineIntegration", + "type": "Object", + "tags": [], + "label": "timelineIntegration", + "description": [], + "signature": [ + "CasesTimelineIntegration", + " | undefined" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/create/index.tsx", + "lineNumber": 40 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-public.CreateCaseProps.withSteps", + "type": "CompoundType", + "tags": [], + "label": "withSteps", + "description": [], + "signature": [ + "boolean | undefined" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/create/index.tsx", + "lineNumber": 41 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-public.RecentCasesProps", + "type": "Interface", + "tags": [], + "label": "RecentCasesProps", + "description": [], + "signature": [ + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.RecentCasesProps", + "text": "RecentCasesProps" + }, + " extends ", + "Owner" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/recent_cases/index.tsx", + "lineNumber": 20 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "cases", + "id": "def-public.RecentCasesProps.allCasesNavigation", + "type": "Object", + "tags": [], + "label": "allCasesNavigation", + "description": [], + "signature": [ + "CasesNavigation", + ", null>" + ], + "source": { + "path": "x-pack/plugins/cases/public/components/recent_cases/index.tsx", + "lineNumber": 21 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-public.RecentCasesProps.caseDetailsNavigation", "type": "Object", "tags": [], - "label": "security", + "label": "caseDetailsNavigation", "description": [], "signature": [ - "{ authc: ", - "AuthenticationServiceSetup", - "; sessionTimeout: ", - "SessionTimeout", - "; license: Readonly<{ isLicenseAvailable: () => boolean; isEnabled: () => boolean; getType: () => \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; getFeatures: () => ", - "SecurityLicenseFeatures", - "; features$: ", - "Observable", + "CasesNavigation", "<", - "SecurityLicenseFeatures", - ">; }>; __legacyCompat: { logoutUrl: string; tenant: string; }; }" + "CaseDetailsHrefSchema", + ", \"configurable\">" ], "source": { - "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 23 + "path": "x-pack/plugins/cases/public/components/recent_cases/index.tsx", + "lineNumber": 22 }, "deprecated": false }, { "parentPluginId": "cases", - "id": "def-public.SetupPlugins.triggersActionsUi", + "id": "def-public.RecentCasesProps.createCaseNavigation", "type": "Object", "tags": [], - "label": "triggersActionsUi", + "label": "createCaseNavigation", "description": [], "signature": [ - { - "pluginId": "triggersActionsUi", - "scope": "public", - "docId": "kibTriggersActionsUiPluginApi", - "section": "def-public.TriggersAndActionsUIPublicPluginSetup", - "text": "TriggersAndActionsUIPublicPluginSetup" - } + "CasesNavigation", + ", null>" ], "source": { - "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 24 + "path": "x-pack/plugins/cases/public/components/recent_cases/index.tsx", + "lineNumber": 23 }, "deprecated": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "cases", - "id": "def-public.StartPlugins", - "type": "Interface", - "tags": [], - "label": "StartPlugins", - "description": [], - "source": { - "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 27 - }, - "deprecated": false, - "children": [ + }, { "parentPluginId": "cases", - "id": "def-public.StartPlugins.triggersActionsUi", - "type": "Object", + "id": "def-public.RecentCasesProps.maxCasesToShow", + "type": "number", "tags": [], - "label": "triggersActionsUi", + "label": "maxCasesToShow", "description": [], - "signature": [ - { - "pluginId": "triggersActionsUi", - "scope": "public", - "docId": "kibTriggersActionsUiPluginApi", - "section": "def-public.TriggersAndActionsUIPublicPluginStart", - "text": "TriggersAndActionsUIPublicPluginStart" - } - ], "source": { - "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 28 + "path": "x-pack/plugins/cases/public/components/recent_cases/index.tsx", + "lineNumber": 24 }, "deprecated": false } @@ -430,52 +946,7 @@ } ], "enums": [], - "misc": [ - { - "parentPluginId": "cases", - "id": "def-public.StartServices", - "type": "Type", - "tags": [], - "label": "StartServices", - "description": [ - "\nTODO: The extra security service is one that should be implemented in the kibana context of the consuming application.\nSecurity is needed for access to authc for the `useCurrentUser` hook. Security_Solution currently passes it via renderApp in public/plugin.tsx\nLeaving it out currently in lieu of RBAC changes" - ], - "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.CoreStart", - "text": "CoreStart" - }, - " & ", - { - "pluginId": "cases", - "scope": "public", - "docId": "kibCasesPluginApi", - "section": "def-public.StartPlugins", - "text": "StartPlugins" - }, - " & { security: { authc: ", - "AuthenticationServiceSetup", - "; sessionTimeout: ", - "SessionTimeout", - "; license: Readonly<{ isLicenseAvailable: () => boolean; isEnabled: () => boolean; getType: () => \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; getFeatures: () => ", - "SecurityLicenseFeatures", - "; features$: ", - "Observable", - "<", - "SecurityLicenseFeatures", - ">; }>; __legacyCompat: { logoutUrl: string; tenant: string; }; }; }" - ], - "source": { - "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 37 - }, - "deprecated": false, - "initialIsOpen": false - } - ], + "misc": [], "objects": [], "start": { "parentPluginId": "cases", @@ -496,20 +967,36 @@ "type": "Function", "tags": [], "label": "getAllCases", - "description": [], + "description": [ + "\nGet the all cases table" + ], "signature": [ "(props: ", - "AllCasesProps", + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.AllCasesProps", + "text": "AllCasesProps" + }, ") => React.ReactElement<", - "AllCasesProps", + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.AllCasesProps", + "text": "AllCasesProps" + }, ">" ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 47 + "lineNumber": 52 }, "deprecated": false, - "returnComment": [], + "returnComment": [ + "A react component that displays all cases" + ], "children": [ { "parentPluginId": "cases", @@ -517,13 +1004,21 @@ "type": "Object", "tags": [], "label": "props", - "description": [], - "signature": [ + "description": [ "AllCasesProps" ], + "signature": [ + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.AllCasesProps", + "text": "AllCasesProps" + } + ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 47 + "lineNumber": 52 }, "deprecated": false } @@ -535,20 +1030,36 @@ "type": "Function", "tags": [], "label": "getAllCasesSelectorModal", - "description": [], + "description": [ + "\nuse Modal hook for all cases selector" + ], "signature": [ "(props: ", - "AllCasesSelectorModalProps", + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.AllCasesSelectorModalProps", + "text": "AllCasesSelectorModalProps" + }, ") => React.ReactElement<", - "AllCasesSelectorModalProps", + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.AllCasesSelectorModalProps", + "text": "AllCasesSelectorModalProps" + }, ">" ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 48 + "lineNumber": 58 }, "deprecated": false, - "returnComment": [], + "returnComment": [ + "A react component that is a modal for selecting a case" + ], "children": [ { "parentPluginId": "cases", @@ -556,13 +1067,21 @@ "type": "Object", "tags": [], "label": "props", - "description": [], + "description": [ + "UseAllCasesSelectorModalProps" + ], "signature": [ - "AllCasesSelectorModalProps" + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.AllCasesSelectorModalProps", + "text": "AllCasesSelectorModalProps" + } ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 49 + "lineNumber": 59 }, "deprecated": false } @@ -574,20 +1093,36 @@ "type": "Function", "tags": [], "label": "getCaseView", - "description": [], + "description": [ + "\nGet the case view component" + ], "signature": [ "(props: ", - "CaseViewProps", + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.CaseViewProps", + "text": "CaseViewProps" + }, ") => React.ReactElement<", - "CaseViewProps", + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.CaseViewProps", + "text": "CaseViewProps" + }, ">" ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 51 + "lineNumber": 66 }, "deprecated": false, - "returnComment": [], + "returnComment": [ + "A react component for viewing a specific case" + ], "children": [ { "parentPluginId": "cases", @@ -595,13 +1130,21 @@ "type": "Object", "tags": [], "label": "props", - "description": [], - "signature": [ + "description": [ "CaseViewProps" ], + "signature": [ + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.CaseViewProps", + "text": "CaseViewProps" + } + ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 51 + "lineNumber": 66 }, "deprecated": false } @@ -613,20 +1156,36 @@ "type": "Function", "tags": [], "label": "getConfigureCases", - "description": [], + "description": [ + "\nGet the configure case component" + ], "signature": [ "(props: ", - "ConfigureCasesProps", + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.ConfigureCasesProps", + "text": "ConfigureCasesProps" + }, ") => React.ReactElement<", - "ConfigureCasesProps", + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.ConfigureCasesProps", + "text": "ConfigureCasesProps" + }, ">" ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 52 + "lineNumber": 72 }, "deprecated": false, - "returnComment": [], + "returnComment": [ + "A react component for configuring a specific case" + ], "children": [ { "parentPluginId": "cases", @@ -634,13 +1193,21 @@ "type": "Object", "tags": [], "label": "props", - "description": [], - "signature": [ + "description": [ "ConfigureCasesProps" ], + "signature": [ + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.ConfigureCasesProps", + "text": "ConfigureCasesProps" + } + ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 52 + "lineNumber": 72 }, "deprecated": false } @@ -652,20 +1219,36 @@ "type": "Function", "tags": [], "label": "getCreateCase", - "description": [], + "description": [ + "\nGet the create case form" + ], "signature": [ "(props: ", - "CreateCaseProps", + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.CreateCaseProps", + "text": "CreateCaseProps" + }, ") => React.ReactElement<", - "CreateCaseProps", + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.CreateCaseProps", + "text": "CreateCaseProps" + }, ">" ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 53 + "lineNumber": 78 }, "deprecated": false, - "returnComment": [], + "returnComment": [ + "A react component for creating a new case" + ], "children": [ { "parentPluginId": "cases", @@ -673,13 +1256,21 @@ "type": "Object", "tags": [], "label": "props", - "description": [], - "signature": [ + "description": [ "CreateCaseProps" ], + "signature": [ + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.CreateCaseProps", + "text": "CreateCaseProps" + } + ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 53 + "lineNumber": 78 }, "deprecated": false } @@ -691,20 +1282,36 @@ "type": "Function", "tags": [], "label": "getRecentCases", - "description": [], + "description": [ + "\nGet the recent cases component" + ], "signature": [ "(props: ", - "RecentCasesProps", + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.RecentCasesProps", + "text": "RecentCasesProps" + }, ") => React.ReactElement<", - "RecentCasesProps", + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.RecentCasesProps", + "text": "RecentCasesProps" + }, ">" ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 54 + "lineNumber": 84 }, "deprecated": false, - "returnComment": [], + "returnComment": [ + "A react component for showing recent cases" + ], "children": [ { "parentPluginId": "cases", @@ -712,13 +1319,21 @@ "type": "Object", "tags": [], "label": "props", - "description": [], - "signature": [ + "description": [ "RecentCasesProps" ], + "signature": [ + { + "pluginId": "cases", + "scope": "public", + "docId": "kibCasesPluginApi", + "section": "def-public.RecentCasesProps", + "text": "RecentCasesProps" + } + ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 54 + "lineNumber": 84 }, "deprecated": false } @@ -1041,7 +1656,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 53 + "lineNumber": 49 }, "deprecated": false, "children": [ @@ -1057,7 +1672,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 53 + "lineNumber": 49 }, "deprecated": false, "isRequired": true @@ -1080,7 +1695,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 59 + "lineNumber": 55 }, "deprecated": false, "children": [ @@ -1097,7 +1712,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 60 + "lineNumber": 56 }, "deprecated": false, "isRequired": true @@ -1114,7 +1729,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 61 + "lineNumber": 57 }, "deprecated": false, "isRequired": true @@ -1135,7 +1750,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 75 + "lineNumber": 71 }, "deprecated": false, "children": [ @@ -1151,7 +1766,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 76 + "lineNumber": 72 }, "deprecated": false, "isRequired": true @@ -1176,7 +1791,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 24 + "lineNumber": 20 }, "deprecated": true, "references": [], @@ -1193,7 +1808,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 24 + "lineNumber": 20 }, "deprecated": false, "isRequired": true @@ -1640,62 +2255,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "cases", - "id": "def-common.OmitProp", - "type": "Function", - "tags": [], - "label": "OmitProp", - "description": [], - "signature": [ - "(o: O, k: K) => Pick>" - ], - "source": { - "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 17 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-common.OmitProp.$1", - "type": "Uncategorized", - "tags": [], - "label": "o", - "description": [], - "signature": [ - "O" - ], - "source": { - "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 17 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "cases", - "id": "def-common.OmitProp.$2", - "type": "Uncategorized", - "tags": [], - "label": "k", - "description": [], - "signature": [ - "K" - ], - "source": { - "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 17 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "cases", "id": "def-common.throwErrors", @@ -1710,7 +2269,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 55 + "lineNumber": 51 }, "deprecated": false, "children": [ @@ -1726,7 +2285,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 55 + "lineNumber": 51 }, "deprecated": false, "isRequired": true @@ -5284,7 +5843,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; owner: string; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { mappings: { action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]; owner: string; } & { id: string; version: string; error: string | null; owner: string; })[]" + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { mappings: { action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]; owner: string; } & { id: string; version: string; error: string | null; owner: string; })[]" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", @@ -5341,7 +5900,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; owner: string; }" + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", @@ -5398,7 +5957,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; owner: string; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }" + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", @@ -5512,7 +6071,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; owner: string; }" + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", @@ -5569,7 +6128,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; owner: string; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { mappings: { action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]; owner: string; } & { id: string; version: string; error: string | null; owner: string; }" + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { mappings: { action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]; owner: string; } & { id: string; version: string; error: string | null; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", @@ -6200,7 +6759,7 @@ "label": "Comment", "description": [], "signature": [ - "({ comment: string; type: ", + "({ type: ", { "pluginId": "cases", "scope": "common", @@ -6208,7 +6767,15 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; owner: string; } & { associationType: ", + ".alert | ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CommentType", + "text": "CommentType" + }, + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6232,15 +6799,7 @@ "section": "def-common.ElasticUser", "text": "ElasticUser" }, - " | null; version: string; }) | ({ type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".alert | ", + " | null; version: string; }) | ({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -6248,7 +6807,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6395,7 +6954,7 @@ "label": "CommentPatchRequest", "description": [], "signature": [ - "({ comment: string; type: ", + "({ type: ", { "pluginId": "cases", "scope": "common", @@ -6403,7 +6962,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; owner: string; } & { id: string; version: string; }) | ({ type: ", + ".alert | ", { "pluginId": "cases", "scope": "common", @@ -6411,7 +6970,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".alert | ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { id: string; version: string; }) | ({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -6419,7 +6978,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { id: string; version: string; })" + ".user; owner: string; } & { id: string; version: string; })" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", @@ -6436,7 +6995,7 @@ "label": "CommentRequest", "description": [], "signature": [ - "{ comment: string; type: ", + "{ type: ", { "pluginId": "cases", "scope": "common", @@ -6444,7 +7003,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; owner: string; } | { type: ", + ".alert | ", { "pluginId": "cases", "scope": "common", @@ -6452,7 +7011,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".alert | ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } | { comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -6460,7 +7019,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; }" + ".user; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", @@ -7193,7 +7752,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; owner: string; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }, \"updated_at\" | \"owner\" | \"created_at\" | \"created_by\" | \"updated_by\" | \"closure_type\"> & { connector: ", + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }, \"updated_at\" | \"owner\" | \"created_at\" | \"created_by\" | \"updated_by\" | \"closure_type\"> & { connector: ", { "pluginId": "cases", "scope": "common", @@ -7365,6 +7924,40 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "cases", + "id": "def-common.MAX_CONCURRENT_SEARCHES", + "type": "number", + "tags": [], + "label": "MAX_CONCURRENT_SEARCHES", + "description": [], + "signature": [ + "10" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 97 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.MAX_DOCS_PER_PAGE", + "type": "number", + "tags": [], + "label": "MAX_DOCS_PER_PAGE", + "description": [], + "signature": [ + "10000" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 96 + }, + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "cases", "id": "def-common.MAX_GENERATED_ALERTS_PER_SUB_CASE", @@ -9371,6 +9964,8 @@ "<[", "IntersectionC", "<[", + "IntersectionC", + "<[", "TypeC", "<{ connector: ", "IntersectionC", @@ -9578,9 +10173,11 @@ "LiteralC", "<\"close-by-user\">, ", "LiteralC", - "<\"close-by-pushing\">]>; owner: ", + "<\"close-by-pushing\">]>; }>, ", + "TypeC", + "<{ owner: ", "StringC", - "; }>, ", + "; }>]>, ", "TypeC", "<{ created_at: ", "StringC", @@ -9707,6 +10304,8 @@ "label": "CaseConfigureAttributesRt", "description": [], "signature": [ + "IntersectionC", + "<[", "IntersectionC", "<[", "TypeC", @@ -9916,9 +10515,11 @@ "LiteralC", "<\"close-by-user\">, ", "LiteralC", - "<\"close-by-pushing\">]>; owner: ", + "<\"close-by-pushing\">]>; }>, ", + "TypeC", + "<{ owner: ", "StringC", - "; }>, ", + "; }>]>, ", "TypeC", "<{ created_at: ", "StringC", @@ -10025,6 +10626,8 @@ "<[", "IntersectionC", "<[", + "IntersectionC", + "<[", "TypeC", "<{ connector: ", "IntersectionC", @@ -10232,9 +10835,11 @@ "LiteralC", "<\"close-by-user\">, ", "LiteralC", - "<\"close-by-pushing\">]>; owner: ", + "<\"close-by-pushing\">]>; }>, ", + "TypeC", + "<{ owner: ", "StringC", - "; }>, ", + "; }>]>, ", "TypeC", "<{ created_at: ", "StringC", @@ -12734,7 +13339,7 @@ "IntersectionC", "<[", "PartialC", - ", ", "LiteralC", - "<\"close-by-pushing\">]>; owner: ", - "StringC", - "; }, \"connector\" | \"closure_type\">>, ", + "<\"close-by-pushing\">]>; }>, ", "TypeC", "<{ version: ", "StringC", @@ -12963,6 +13566,8 @@ "label": "CasesConfigureRequestRt", "description": [], "signature": [ + "IntersectionC", + "<[", "TypeC", "<{ connector: ", "IntersectionC", @@ -13170,9 +13775,11 @@ "LiteralC", "<\"close-by-user\">, ", "LiteralC", - "<\"close-by-pushing\">]>; owner: ", + "<\"close-by-pushing\">]>; }>, ", + "TypeC", + "<{ owner: ", "StringC", - "; }>" + "; }>]>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 20d371cbcdc6e..00714b3217fca 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import casesObj from './cases.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 406 | 0 | 381 | 13 | + ## Client ### Start @@ -22,9 +32,6 @@ import casesObj from './cases.json'; ### Interfaces -### Consts, variables and types - - ## Server ### Classes diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 1cbdb2f19a6fb..95d0bd527e631 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import chartsObj from './charts.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 190 | 2 | 159 | 1 | + ## Client ### Start diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index 4a61ce885f154..f9d44f9c8d08b 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import cloudObj from './cloud.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 20 | 0 | 20 | 0 | + ## Client ### Setup diff --git a/api_docs/console.mdx b/api_docs/console.mdx index 3514fa2697aaa..74a7fadf7a5c3 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import consoleObj from './console.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 2 | 0 | 2 | 0 | + ## Server ### Setup diff --git a/api_docs/core.json b/api_docs/core.json index 0f856afee51c5..a5466960dbd36 100644 --- a/api_docs/core.json +++ b/api_docs/core.json @@ -1112,7 +1112,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 203 + "lineNumber": 204 }, "deprecated": false, "children": [ @@ -1136,7 +1136,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 205 + "lineNumber": 206 }, "deprecated": false }, @@ -1160,7 +1160,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 207 + "lineNumber": 208 }, "deprecated": false }, @@ -1184,7 +1184,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 209 + "lineNumber": 210 }, "deprecated": false }, @@ -1208,7 +1208,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 211 + "lineNumber": 212 }, "deprecated": false }, @@ -1232,7 +1232,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 213 + "lineNumber": 214 }, "deprecated": false }, @@ -1252,7 +1252,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 220 + "lineNumber": 221 }, "deprecated": true, "references": [] @@ -1279,7 +1279,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 224 + "lineNumber": 225 }, "deprecated": false, "returnComment": [], @@ -1299,7 +1299,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 248 + "lineNumber": 249 }, "deprecated": false, "children": [ @@ -1323,7 +1323,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 250 + "lineNumber": 251 }, "deprecated": false }, @@ -1347,7 +1347,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 252 + "lineNumber": 253 }, "deprecated": false }, @@ -1371,7 +1371,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 254 + "lineNumber": 255 }, "deprecated": false }, @@ -1395,7 +1395,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 256 + "lineNumber": 257 }, "deprecated": false }, @@ -1419,7 +1419,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 258 + "lineNumber": 259 }, "deprecated": false }, @@ -1443,7 +1443,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 260 + "lineNumber": 261 }, "deprecated": false }, @@ -1467,7 +1467,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 262 + "lineNumber": 263 }, "deprecated": false }, @@ -1491,7 +1491,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 264 + "lineNumber": 265 }, "deprecated": false }, @@ -1515,7 +1515,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 266 + "lineNumber": 267 }, "deprecated": false }, @@ -1539,7 +1539,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 268 + "lineNumber": 269 }, "deprecated": false }, @@ -1563,7 +1563,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 270 + "lineNumber": 271 }, "deprecated": false }, @@ -1583,7 +1583,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 277 + "lineNumber": 278 }, "deprecated": true, "references": [ @@ -5501,7 +5501,7 @@ ], "signature": [ "Record | undefined" ], "source": { @@ -7427,7 +7427,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 234 + "lineNumber": 235 }, "deprecated": false, "initialIsOpen": false @@ -10981,7 +10981,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 472 + "lineNumber": 470 }, "deprecated": false, "children": [ @@ -11005,7 +11005,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 474 + "lineNumber": 472 }, "deprecated": false }, @@ -11029,7 +11029,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 476 + "lineNumber": 474 }, "deprecated": false }, @@ -11053,7 +11053,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 478 + "lineNumber": 476 }, "deprecated": false }, @@ -11086,7 +11086,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 480 + "lineNumber": 478 }, "deprecated": false }, @@ -11110,7 +11110,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 485 + "lineNumber": 483 }, "deprecated": false }, @@ -11134,7 +11134,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 487 + "lineNumber": 485 }, "deprecated": false }, @@ -11158,7 +11158,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 489 + "lineNumber": 487 }, "deprecated": false }, @@ -11182,7 +11182,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 491 + "lineNumber": 489 }, "deprecated": false }, @@ -11206,7 +11206,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 493 + "lineNumber": 491 }, "deprecated": false }, @@ -11230,7 +11230,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 495 + "lineNumber": 493 }, "deprecated": false }, @@ -11254,7 +11254,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 497 + "lineNumber": 495 }, "deprecated": false }, @@ -11280,7 +11280,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 499 + "lineNumber": 497 }, "deprecated": false, "returnComment": [], @@ -11300,7 +11300,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 520 + "lineNumber": 518 }, "deprecated": false, "children": [ @@ -11324,7 +11324,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 522 + "lineNumber": 520 }, "deprecated": false }, @@ -11348,7 +11348,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 524 + "lineNumber": 522 }, "deprecated": false }, @@ -11372,7 +11372,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 526 + "lineNumber": 524 }, "deprecated": false }, @@ -11396,7 +11396,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 528 + "lineNumber": 526 }, "deprecated": false }, @@ -11420,7 +11420,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 530 + "lineNumber": 528 }, "deprecated": false }, @@ -11444,7 +11444,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 532 + "lineNumber": 530 }, "deprecated": false } @@ -14152,7 +14152,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -15356,7 +15356,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -15384,7 +15384,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -16059,14 +16059,14 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/server/lib/telemetry/sender.ts", - "lineNumber": 447 + "lineNumber": 457 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/server/lib/telemetry/sender.ts", - "lineNumber": 466 + "lineNumber": 476 } }, { @@ -20463,7 +20463,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 439 + "lineNumber": 437 }, "deprecated": false, "children": [ @@ -20567,7 +20567,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 440 + "lineNumber": 438 }, "deprecated": false } @@ -22343,7 +22343,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -24056,7 +24056,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 510 + "lineNumber": 508 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/core.mdx b/api_docs/core.mdx index 77050dd72894a..31889ec1042b8 100644 --- a/api_docs/core.mdx +++ b/api_docs/core.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import coreObj from './core.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 2273 | 148 | 1052 | 26 | + ## Client ### Classes diff --git a/api_docs/core_application.json b/api_docs/core_application.json index c8a036fda242d..ab5fbe560172b 100644 --- a/api_docs/core_application.json +++ b/api_docs/core_application.json @@ -572,11 +572,18 @@ "section": "def-public.App", "text": "App" }, - "" + " extends ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreApplicationPluginApi", + "section": "def-public.AppNavOptions", + "text": "AppNavOptions" + } ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 79 + "lineNumber": 107 }, "deprecated": false, "children": [ @@ -591,7 +598,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 83 + "lineNumber": 111 }, "deprecated": false }, @@ -606,7 +613,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 88 + "lineNumber": 116 }, "deprecated": false }, @@ -625,7 +632,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 95 + "lineNumber": 123 }, "deprecated": false }, @@ -650,7 +657,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 101 + "lineNumber": 129 }, "deprecated": false }, @@ -675,7 +682,25 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 108 + "lineNumber": 136 + }, + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.App.searchable", + "type": "CompoundType", + "tags": [], + "label": "searchable", + "description": [ + "\nThe initial flag to determine if the application is searchable in the global search.\nDefaulting to `true` if `navLinkStatus` is `visible` or omitted." + ], + "signature": [ + "boolean | undefined" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 142 }, "deprecated": false }, @@ -693,7 +718,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 115 + "lineNumber": 149 }, "deprecated": false }, @@ -720,79 +745,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 149 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-public.App.order", - "type": "number", - "tags": [], - "label": "order", - "description": [ - "\nAn ordinal used to sort nav links relative to one another for display." - ], - "signature": [ - "number | undefined" - ], - "source": { - "path": "src/core/public/application/types.ts", - "lineNumber": 154 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-public.App.tooltip", - "type": "string", - "tags": [], - "label": "tooltip", - "description": [ - "\nA tooltip shown when hovering over app link." - ], - "signature": [ - "string | undefined" - ], - "source": { - "path": "src/core/public/application/types.ts", - "lineNumber": 159 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-public.App.euiIconType", - "type": "string", - "tags": [], - "label": "euiIconType", - "description": [ - "\nA EUI iconType that will be used for the app's icon. This icon\ntakes precendence over the `icon` property." - ], - "signature": [ - "string | undefined" - ], - "source": { - "path": "src/core/public/application/types.ts", - "lineNumber": 165 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-public.App.icon", - "type": "string", - "tags": [], - "label": "icon", - "description": [ - "\nA URL to an image file used as an icon. Used as a fallback\nif `euiIconType` is not provided." - ], - "signature": [ - "string | undefined" - ], - "source": { - "path": "src/core/public/application/types.ts", - "lineNumber": 171 + "lineNumber": 183 }, "deprecated": false }, @@ -812,7 +765,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 176 + "lineNumber": 188 }, "deprecated": false }, @@ -830,7 +783,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 182 + "lineNumber": 194 }, "deprecated": false }, @@ -872,7 +825,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 187 + "lineNumber": 199 }, "deprecated": false, "returnComment": [], @@ -896,7 +849,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 326 + "lineNumber": 346 }, "deprecated": false } @@ -916,7 +869,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 194 + "lineNumber": 206 }, "deprecated": false }, @@ -934,7 +887,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 212 + "lineNumber": 224 }, "deprecated": false }, @@ -952,7 +905,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 215 + "lineNumber": 227 }, "deprecated": false }, @@ -977,7 +930,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 254 + "lineNumber": 266 }, "deprecated": false } @@ -995,7 +948,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 552 + "lineNumber": 572 }, "deprecated": false, "children": [ @@ -1018,7 +971,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 553 + "lineNumber": 573 }, "deprecated": false }, @@ -1031,7 +984,7 @@ "description": [], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 554 + "lineNumber": 574 }, "deprecated": false }, @@ -1047,7 +1000,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 555 + "lineNumber": 575 }, "deprecated": false }, @@ -1063,7 +1016,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 556 + "lineNumber": 576 }, "deprecated": false } @@ -1081,7 +1034,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 540 + "lineNumber": 560 }, "deprecated": false, "children": [ @@ -1104,7 +1057,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 541 + "lineNumber": 561 }, "deprecated": false } @@ -1120,7 +1073,7 @@ "description": [], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 607 + "lineNumber": 628 }, "deprecated": false, "children": [ @@ -1146,7 +1099,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 613 + "lineNumber": 634 }, "deprecated": false, "children": [ @@ -1171,7 +1124,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 613 + "lineNumber": 634 }, "deprecated": false, "isRequired": true @@ -1203,7 +1156,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 642 + "lineNumber": 663 }, "deprecated": false, "children": [ @@ -1228,7 +1181,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 642 + "lineNumber": 663 }, "deprecated": false, "isRequired": true @@ -1248,7 +1201,7 @@ "description": [], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 683 + "lineNumber": 710 }, "deprecated": false, "children": [ @@ -1266,7 +1219,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 687 + "lineNumber": 714 }, "deprecated": false }, @@ -1293,7 +1246,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 696 + "lineNumber": 723 }, "deprecated": false }, @@ -1319,7 +1272,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 704 + "lineNumber": 731 }, "deprecated": false, "children": [ @@ -1335,7 +1288,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 704 + "lineNumber": 731 }, "deprecated": false, "isRequired": true @@ -1361,7 +1314,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 704 + "lineNumber": 731 }, "deprecated": false, "isRequired": false @@ -1383,7 +1336,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 742 + "lineNumber": 769 }, "deprecated": false, "children": [ @@ -1401,7 +1354,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 742 + "lineNumber": 769 }, "deprecated": false, "isRequired": true @@ -1423,7 +1376,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 756 + "lineNumber": 783 }, "deprecated": false, "children": [ @@ -1439,7 +1392,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 756 + "lineNumber": 783 }, "deprecated": false, "isRequired": true @@ -1453,7 +1406,7 @@ "description": [], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 756 + "lineNumber": 783 }, "deprecated": false, "children": [ @@ -1469,7 +1422,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 756 + "lineNumber": 783 }, "deprecated": false }, @@ -1485,7 +1438,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 756 + "lineNumber": 783 }, "deprecated": false } @@ -1509,7 +1462,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 761 + "lineNumber": 788 }, "deprecated": false } @@ -1535,7 +1488,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 336 + "lineNumber": 356 }, "deprecated": false, "children": [ @@ -1553,7 +1506,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 340 + "lineNumber": 360 }, "deprecated": false }, @@ -1578,7 +1531,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 386 + "lineNumber": 406 }, "deprecated": false }, @@ -1595,7 +1548,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 436 + "lineNumber": 456 }, "deprecated": true, "references": [ @@ -1702,7 +1655,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 471 + "lineNumber": 491 }, "deprecated": true, "references": [ @@ -1870,7 +1823,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 471 + "lineNumber": 491 }, "deprecated": false } @@ -1898,7 +1851,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 502 + "lineNumber": 522 }, "deprecated": false, "returnComment": [], @@ -1922,7 +1875,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 502 + "lineNumber": 522 }, "deprecated": false } @@ -1931,6 +1884,96 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "core", + "id": "def-public.AppNavOptions", + "type": "Interface", + "tags": [], + "label": "AppNavOptions", + "description": [ + "\nApp navigation menu options" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 73 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.AppNavOptions.order", + "type": "number", + "tags": [], + "label": "order", + "description": [ + "\nAn ordinal used to sort nav links relative to one another for display." + ], + "signature": [ + "number | undefined" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 77 + }, + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.AppNavOptions.tooltip", + "type": "string", + "tags": [], + "label": "tooltip", + "description": [ + "\nA tooltip shown when hovering over app link." + ], + "signature": [ + "string | undefined" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 82 + }, + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.AppNavOptions.euiIconType", + "type": "string", + "tags": [], + "label": "euiIconType", + "description": [ + "\nA EUI iconType that will be used for the app's icon. This icon\ntakes precendence over the `icon` property." + ], + "signature": [ + "string | undefined" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 88 + }, + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.AppNavOptions.icon", + "type": "string", + "tags": [], + "label": "icon", + "description": [ + "\nA URL to an image file used as an icon. Used as a fallback\nif `euiIconType` is not provided." + ], + "signature": [ + "string | undefined" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 94 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "core", "id": "def-public.NavigateToAppOptions", @@ -1942,10 +1985,28 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 661 + "lineNumber": 683 }, "deprecated": false, "children": [ + { + "parentPluginId": "core", + "id": "def-public.NavigateToAppOptions.deepLinkId", + "type": "string", + "tags": [], + "label": "deepLinkId", + "description": [ + "\noptional {@link App.deepLinks | deep link} id inside the application to navigate to.\nIf an additional {@link NavigateToAppOptions.path | path} is defined it will be appended to the deep link path." + ], + "signature": [ + "string | undefined" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 688 + }, + "deprecated": false + }, { "parentPluginId": "core", "id": "def-public.NavigateToAppOptions.path", @@ -1953,14 +2014,14 @@ "tags": [], "label": "path", "description": [ - "\noptional path inside application to deep link to.\nIf undefined, will use {@link App.defaultPath | the app's default path}` as default." + "\noptional path inside application to deep link to.\nIf undefined, will use {@link App.defaultPath | the app's default path} as default." ], "signature": [ "string | undefined" ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 666 + "lineNumber": 693 }, "deprecated": false }, @@ -1978,7 +2039,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 670 + "lineNumber": 697 }, "deprecated": false }, @@ -1996,7 +2057,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 674 + "lineNumber": 701 }, "deprecated": false }, @@ -2014,7 +2075,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 679 + "lineNumber": 706 }, "deprecated": false } @@ -2034,7 +2095,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 527 + "lineNumber": 547 }, "deprecated": false, "initialIsOpen": false @@ -2091,7 +2152,15 @@ "section": "def-public.AppNavLinkStatus", "text": "AppNavLinkStatus" }, - " | undefined; } & { path: string; deepLinks?: ", + " | undefined; searchable?: boolean | undefined; } & ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreApplicationPluginApi", + "section": "def-public.AppNavOptions", + "text": "AppNavOptions" + }, + " & { path: string; deepLinks?: ", { "pluginId": "core", "scope": "public", @@ -2107,7 +2176,15 @@ "section": "def-public.AppNavLinkStatus", "text": "AppNavLinkStatus" }, - " | undefined; } & { path?: string | undefined; deepLinks: ", + " | undefined; searchable?: boolean | undefined; } & ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreApplicationPluginApi", + "section": "def-public.AppNavOptions", + "text": "AppNavOptions" + }, + " & { path?: string | undefined; deepLinks: ", { "pluginId": "core", "scope": "public", @@ -2119,7 +2196,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 279 + "lineNumber": 292 }, "deprecated": false, "initialIsOpen": false @@ -2152,7 +2229,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 566 + "lineNumber": 586 }, "deprecated": false, "initialIsOpen": false @@ -2182,7 +2259,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 517 + "lineNumber": 537 }, "deprecated": true, "references": [ @@ -2290,7 +2367,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 325 + "lineNumber": 345 }, "deprecated": false, "initialIsOpen": false @@ -2309,7 +2386,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 333 + "lineNumber": 353 }, "deprecated": false, "initialIsOpen": false @@ -2340,7 +2417,7 @@ "section": "def-public.AppDeepLink", "text": "AppDeepLink" }, - "[] | undefined; navLinkStatus?: ", + "[] | undefined; searchable?: boolean | undefined; navLinkStatus?: ", { "pluginId": "core", "scope": "public", @@ -2383,11 +2460,11 @@ "section": "def-public.App", "text": "App" }, - ", \"status\" | \"deepLinks\" | \"navLinkStatus\" | \"defaultPath\" | \"tooltip\">> | undefined" + ", \"status\" | \"deepLinks\" | \"searchable\" | \"navLinkStatus\" | \"defaultPath\" | \"tooltip\">> | undefined" ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 74 + "lineNumber": 102 }, "deprecated": false, "initialIsOpen": false @@ -2410,7 +2487,7 @@ "section": "def-public.AppDeepLink", "text": "AppDeepLink" }, - ", \"title\" | \"id\" | \"path\"> & { deepLinks: ", + ", \"title\" | \"id\" | \"order\" | \"path\" | \"tooltip\" | \"euiIconType\" | \"icon\"> & { deepLinks: ", { "pluginId": "core", "scope": "public", @@ -2426,11 +2503,11 @@ "section": "def-public.AppNavLinkStatus", "text": "AppNavLinkStatus" }, - "; }" + "; searchable: boolean; }" ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 262 + "lineNumber": 274 }, "deprecated": false, "initialIsOpen": false @@ -2453,7 +2530,7 @@ "section": "def-public.App", "text": "App" }, - ", \"status\" | \"title\" | \"id\" | \"order\" | \"category\" | \"navLinkStatus\" | \"defaultPath\" | \"tooltip\" | \"euiIconType\" | \"icon\" | \"capabilities\" | \"chromeless\" | \"appRoute\" | \"exactRoute\"> & { status: ", + ", \"status\" | \"title\" | \"id\" | \"order\" | \"category\" | \"navLinkStatus\" | \"defaultPath\" | \"capabilities\" | \"chromeless\" | \"appRoute\" | \"exactRoute\" | \"tooltip\" | \"euiIconType\" | \"icon\"> & { status: ", { "pluginId": "core", "scope": "public", @@ -2477,11 +2554,11 @@ "section": "def-public.PublicAppDeepLinkInfo", "text": "PublicAppDeepLinkInfo" }, - "[]; }" + "[]; searchable: boolean; }" ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 308 + "lineNumber": 324 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/core_application.mdx b/api_docs/core_application.mdx index 76d2d95f21e05..ce16534334632 100644 --- a/api_docs/core_application.mdx +++ b/api_docs/core_application.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import coreApplicationObj from './core_application.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 2273 | 148 | 1052 | 26 | + ## Client ### Classes diff --git a/api_docs/core_chrome.json b/api_docs/core_chrome.json index fae65ff62c971..c84b06c235b48 100644 --- a/api_docs/core_chrome.json +++ b/api_docs/core_chrome.json @@ -965,14 +965,11 @@ "tags": [], "label": "url", "description": [ - "\nThe route used to open the {@link AppBase.defaultPath | default path } of an application.\nIf unset, `baseUrl` will be used instead." - ], - "signature": [ - "string | undefined" + "\nThe route used to open the default path and the deep links of an application." ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 39 + "lineNumber": 38 }, "deprecated": false }, @@ -990,7 +987,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 44 + "lineNumber": 43 }, "deprecated": false }, @@ -1008,7 +1005,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 49 + "lineNumber": 48 }, "deprecated": false }, @@ -1026,7 +1023,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 55 + "lineNumber": 54 }, "deprecated": false }, @@ -1044,7 +1041,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 61 + "lineNumber": 60 }, "deprecated": false }, @@ -1059,7 +1056,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 66 + "lineNumber": 65 }, "deprecated": false }, @@ -1077,7 +1074,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 75 + "lineNumber": 74 }, "deprecated": false }, @@ -1095,7 +1092,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 80 + "lineNumber": 79 }, "deprecated": false } diff --git a/api_docs/core_chrome.mdx b/api_docs/core_chrome.mdx index a9e100b79a91e..3fbc87ad30fff 100644 --- a/api_docs/core_chrome.mdx +++ b/api_docs/core_chrome.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import coreChromeObj from './core_chrome.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 2273 | 148 | 1052 | 26 | + ## Client ### Interfaces diff --git a/api_docs/core_http.mdx b/api_docs/core_http.mdx index ea545eb6d70de..4f15e1a1ce90c 100644 --- a/api_docs/core_http.mdx +++ b/api_docs/core_http.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import coreHttpObj from './core_http.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 2273 | 148 | 1052 | 26 | + ## Client ### Interfaces diff --git a/api_docs/core_saved_objects.json b/api_docs/core_saved_objects.json index 3590d38b0f826..bd7a9cb1ccb08 100644 --- a/api_docs/core_saved_objects.json +++ b/api_docs/core_saved_objects.json @@ -7575,7 +7575,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 697 + "lineNumber": 696 }, "deprecated": false, "children": [ @@ -7591,7 +7591,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 698 + "lineNumber": 697 }, "deprecated": false, "isRequired": true @@ -7614,7 +7614,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 699 + "lineNumber": 698 }, "deprecated": false, "isRequired": true @@ -7667,7 +7667,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 759 + "lineNumber": 758 }, "deprecated": false, "children": [ @@ -7689,7 +7689,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 760 + "lineNumber": 759 }, "deprecated": false, "isRequired": true @@ -7739,7 +7739,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 926 + "lineNumber": 925 }, "deprecated": false, "children": [ @@ -7764,7 +7764,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 927 + "lineNumber": 926 }, "deprecated": false, "isRequired": true @@ -7787,7 +7787,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 928 + "lineNumber": 927 }, "deprecated": false, "isRequired": true @@ -7823,7 +7823,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1013 + "lineNumber": 1012 }, "deprecated": false, "children": [ @@ -7839,7 +7839,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1014 + "lineNumber": 1013 }, "deprecated": false, "isRequired": true @@ -7856,7 +7856,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1015 + "lineNumber": 1014 }, "deprecated": false, "isRequired": true @@ -7879,7 +7879,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1016 + "lineNumber": 1015 }, "deprecated": false, "isRequired": true @@ -7921,7 +7921,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1055 + "lineNumber": 1054 }, "deprecated": false, "children": [ @@ -7937,7 +7937,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1056 + "lineNumber": 1055 }, "deprecated": false, "isRequired": true @@ -7954,7 +7954,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1057 + "lineNumber": 1056 }, "deprecated": false, "isRequired": true @@ -7977,7 +7977,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1058 + "lineNumber": 1057 }, "deprecated": false, "isRequired": true @@ -8021,7 +8021,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1185 + "lineNumber": 1184 }, "deprecated": false, "children": [ @@ -8037,7 +8037,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1186 + "lineNumber": 1185 }, "deprecated": false, "isRequired": true @@ -8054,7 +8054,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1187 + "lineNumber": 1186 }, "deprecated": false, "isRequired": true @@ -8071,7 +8071,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1188 + "lineNumber": 1187 }, "deprecated": false, "isRequired": true @@ -8095,7 +8095,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1189 + "lineNumber": 1188 }, "deprecated": false, "isRequired": true @@ -8141,7 +8141,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1283 + "lineNumber": 1282 }, "deprecated": false, "children": [ @@ -8166,7 +8166,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1284 + "lineNumber": 1283 }, "deprecated": false, "isRequired": true @@ -8190,7 +8190,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1285 + "lineNumber": 1284 }, "deprecated": false, "isRequired": false @@ -8236,7 +8236,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1307 + "lineNumber": 1306 }, "deprecated": false, "children": [ @@ -8259,7 +8259,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1308 + "lineNumber": 1307 }, "deprecated": false, "isRequired": true @@ -8276,7 +8276,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1309 + "lineNumber": 1308 }, "deprecated": false, "isRequired": true @@ -8293,7 +8293,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1310 + "lineNumber": 1309 }, "deprecated": false, "isRequired": true @@ -8317,7 +8317,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1311 + "lineNumber": 1310 }, "deprecated": false, "isRequired": false @@ -8366,7 +8366,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1334 + "lineNumber": 1333 }, "deprecated": false, "children": [ @@ -8391,7 +8391,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1335 + "lineNumber": 1334 }, "deprecated": false, "isRequired": true @@ -8414,7 +8414,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1336 + "lineNumber": 1335 }, "deprecated": false, "isRequired": true @@ -8454,7 +8454,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1551 + "lineNumber": 1550 }, "deprecated": false, "children": [ @@ -8470,7 +8470,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1552 + "lineNumber": 1551 }, "deprecated": false, "isRequired": true @@ -8487,7 +8487,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1553 + "lineNumber": 1552 }, "deprecated": false, "isRequired": true @@ -8510,7 +8510,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1554 + "lineNumber": 1553 }, "deprecated": false, "isRequired": true @@ -8550,7 +8550,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1662 + "lineNumber": 1661 }, "deprecated": false, "children": [ @@ -8568,7 +8568,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1663 + "lineNumber": 1662 }, "deprecated": false, "isRequired": true @@ -8587,7 +8587,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1664 + "lineNumber": 1663 }, "deprecated": false, "isRequired": true @@ -8614,7 +8614,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1665 + "lineNumber": 1664 }, "deprecated": false, "isRequired": true @@ -8640,7 +8640,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1666 + "lineNumber": 1665 }, "deprecated": false, "isRequired": true @@ -8683,7 +8683,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1822 + "lineNumber": 1821 }, "deprecated": false, "children": [ @@ -8699,7 +8699,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1823 + "lineNumber": 1822 }, "deprecated": false, "isRequired": true @@ -8722,7 +8722,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1824 + "lineNumber": 1823 }, "deprecated": false, "isRequired": true @@ -8762,7 +8762,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1895 + "lineNumber": 1890 }, "deprecated": false, "children": [ @@ -8778,7 +8778,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1896 + "lineNumber": 1891 }, "deprecated": false, "isRequired": true @@ -8804,7 +8804,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1897 + "lineNumber": 1892 }, "deprecated": false, "isRequired": false @@ -8852,7 +8852,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1951 + "lineNumber": 1946 }, "deprecated": false, "children": [ @@ -8876,7 +8876,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1952 + "lineNumber": 1947 }, "deprecated": false, "isRequired": true @@ -8900,7 +8900,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1953 + "lineNumber": 1948 }, "deprecated": false, "isRequired": false @@ -11724,207 +11724,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsComplexFieldMapping", - "type": "Interface", - "tags": [], - "label": "SavedObjectsComplexFieldMapping", - "description": [ - "\nSee {@link SavedObjectsFieldMapping} for documentation.\n" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 141 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsComplexFieldMapping.dynamic", - "type": "CompoundType", - "tags": [], - "label": "dynamic", - "description": [ - "\nThe dynamic property of the mapping, either `false` or `'strict'`. If\nunspecified `dynamic: 'strict'` will be inherited from the top-level\nindex mappings.\n\nNote: To limit the number of mapping fields Saved Object types should\n*never* use `dynamic: true`." - ], - "signature": [ - "false | \"strict\" | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 150 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsComplexFieldMapping.enabled", - "type": "CompoundType", - "tags": [], - "label": "enabled", - "description": [], - "signature": [ - "boolean | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 151 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsComplexFieldMapping.doc_values", - "type": "CompoundType", - "tags": [], - "label": "doc_values", - "description": [], - "signature": [ - "boolean | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 152 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsComplexFieldMapping.type", - "type": "string", - "tags": [], - "label": "type", - "description": [], - "signature": [ - "string | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 153 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsComplexFieldMapping.properties", - "type": "Object", - "tags": [], - "label": "properties", - "description": [], - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsMappingProperties", - "text": "SavedObjectsMappingProperties" - } - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 154 - }, - "deprecated": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsCoreFieldMapping", - "type": "Interface", - "tags": [], - "label": "SavedObjectsCoreFieldMapping", - "description": [ - "\nSee {@link SavedObjectsFieldMapping} for documentation.\n" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 123 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsCoreFieldMapping.type", - "type": "string", - "tags": [], - "label": "type", - "description": [], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 124 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsCoreFieldMapping.null_value", - "type": "CompoundType", - "tags": [], - "label": "null_value", - "description": [], - "signature": [ - "string | number | boolean | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 125 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsCoreFieldMapping.index", - "type": "CompoundType", - "tags": [], - "label": "index", - "description": [], - "signature": [ - "boolean | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 126 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsCoreFieldMapping.doc_values", - "type": "CompoundType", - "tags": [], - "label": "doc_values", - "description": [], - "signature": [ - "boolean | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 127 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsCoreFieldMapping.fields", - "type": "Object", - "tags": [], - "label": "fields", - "description": [], - "signature": [ - "{ [subfield: string]: { type: string; ignore_above?: number | undefined; }; } | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 128 - }, - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "core", "id": "def-server.SavedObjectsCreateOptions", @@ -12867,7 +12666,7 @@ ], "signature": [ "Record | undefined" ], "source": { @@ -14372,7 +14171,7 @@ ], "source": { "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 87 + "lineNumber": 88 }, "deprecated": false, "children": [ @@ -14388,7 +14187,7 @@ ], "source": { "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 88 + "lineNumber": 89 }, "deprecated": false } @@ -16944,7 +16743,7 @@ ], "source": { "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 36 + "lineNumber": 37 }, "deprecated": false, "children": [ @@ -16962,7 +16761,7 @@ ], "source": { "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 40 + "lineNumber": 41 }, "deprecated": false }, @@ -16986,7 +16785,7 @@ ], "source": { "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 42 + "lineNumber": 43 }, "deprecated": false } @@ -18404,7 +18203,7 @@ "description": [], "signature": [ "{ type: string | string[]; filter?: any; aggs?: Record | undefined; fields?: string[] | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | \"_doc\" | undefined; search?: string | undefined; searchFields?: string[] | undefined; rootSearchFields?: string[] | undefined; hasReference?: ", { "pluginId": "core", @@ -18473,25 +18272,81 @@ "\nDescribe a {@link SavedObjectsTypeMappingDefinition | saved object type mapping} field.\n\nPlease refer to {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html | elasticsearch documentation}\nFor the mapping documentation\n" ], "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsComplexFieldMapping", - "text": "SavedObjectsComplexFieldMapping" - }, - " | ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCoreFieldMapping", - "text": "SavedObjectsCoreFieldMapping" - } + "(", + "MappingFlattenedProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingJoinProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingPercolatorProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingRankFeatureProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingRankFeaturesProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingConstantKeywordProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingFieldAliasProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingHistogramProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingObjectProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingNestedProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingSearchAsYouTypeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingTextProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingBinaryProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingBooleanProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingDateProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingDateNanosProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingKeywordProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingNumberProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingLongRangeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingIpRangeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingIntegerRangeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingFloatRangeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingDoubleRangeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingDateRangeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingGeoPointProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingGeoShapeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingCompletionProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingGenericProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingIpProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingMurmur3HashProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingShapeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingTokenCountProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingVersionProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingWildcardProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingPointProperty", + " & { dynamic?: false | \"strict\" | undefined; })" ], "source": { "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 99 + "lineNumber": 100 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/core_saved_objects.mdx b/api_docs/core_saved_objects.mdx index d534853f7f29d..fd3f96e081c9e 100644 --- a/api_docs/core_saved_objects.mdx +++ b/api_docs/core_saved_objects.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import coreSavedObjectsObj from './core_saved_objects.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 2273 | 148 | 1052 | 26 | + ## Client ### Classes diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index bddd6f91796fc..de34ce88a77be 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import dashboardObj from './dashboard.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 145 | 1 | 133 | 9 | + ## Client ### Setup diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 1ef8820befc41..4af7f6f96cf23 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import dashboardEnhancedObj from './dashboard_enhanced.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 51 | 0 | 50 | 0 | + ## Client ### Setup diff --git a/api_docs/dashboard_mode.mdx b/api_docs/dashboard_mode.mdx index 2108754adbd5d..28b68e29bd5f2 100644 --- a/api_docs/dashboard_mode.mdx +++ b/api_docs/dashboard_mode.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import dashboardModeObj from './dashboard_mode.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 11 | 0 | 11 | 0 | + ## Server ### Classes diff --git a/api_docs/data.json b/api_docs/data.json index 75b5a3c98b778..993dcec522d5e 100644 --- a/api_docs/data.json +++ b/api_docs/data.json @@ -1306,7 +1306,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 76 + "lineNumber": 78 }, "deprecated": false, "children": [ @@ -1328,7 +1328,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 77 + "lineNumber": 79 }, "deprecated": false }, @@ -1351,7 +1351,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 78 + "lineNumber": 80 }, "deprecated": false }, @@ -1367,7 +1367,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 79 + "lineNumber": 81 }, "deprecated": false }, @@ -1383,7 +1383,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 80 + "lineNumber": 82 }, "deprecated": false }, @@ -1399,7 +1399,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 81 + "lineNumber": 83 }, "deprecated": false }, @@ -1422,7 +1422,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 85 + "lineNumber": 87 }, "deprecated": false }, @@ -1438,7 +1438,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 87 + "lineNumber": 89 }, "deprecated": false, "children": [ @@ -1460,7 +1460,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 88 + "lineNumber": 90 }, "deprecated": false, "isRequired": true @@ -1495,7 +1495,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 89 + "lineNumber": 91 }, "deprecated": false, "isRequired": true @@ -1518,7 +1518,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 90 + "lineNumber": 92 }, "deprecated": false, "isRequired": true @@ -1538,7 +1538,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 103 + "lineNumber": 105 }, "deprecated": false, "children": [ @@ -1554,7 +1554,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 103 + "lineNumber": 105 }, "deprecated": false, "isRequired": false @@ -1574,7 +1574,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 107 + "lineNumber": 109 }, "deprecated": false, "children": [ @@ -1590,7 +1590,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 107 + "lineNumber": 109 }, "deprecated": false, "isRequired": false @@ -1618,7 +1618,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 111 + "lineNumber": 113 }, "deprecated": false, "children": [ @@ -1640,7 +1640,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 111 + "lineNumber": 113 }, "deprecated": false, "isRequired": true @@ -1667,7 +1667,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 129 + "lineNumber": 131 }, "deprecated": false, "children": [ @@ -1683,7 +1683,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 129 + "lineNumber": 131 }, "deprecated": false, "isRequired": true @@ -1737,7 +1737,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 142 + "lineNumber": 144 }, "deprecated": false, "children": [ @@ -1771,7 +1771,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 143 + "lineNumber": 145 }, "deprecated": false, "isRequired": true @@ -1788,7 +1788,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 144 + "lineNumber": 146 }, "deprecated": false, "isRequired": true @@ -1818,7 +1818,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 185 + "lineNumber": 187 }, "deprecated": false, "children": [ @@ -1843,7 +1843,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 185 + "lineNumber": 187 }, "deprecated": false, "isRequired": true @@ -1863,7 +1863,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 197 + "lineNumber": 199 }, "deprecated": false, "children": [], @@ -1889,7 +1889,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 287 + "lineNumber": 289 }, "deprecated": false, "children": [], @@ -1914,7 +1914,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 291 + "lineNumber": 293 }, "deprecated": false, "children": [ @@ -1930,7 +1930,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 291 + "lineNumber": 293 }, "deprecated": false, "isRequired": true @@ -1958,7 +1958,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 295 + "lineNumber": 297 }, "deprecated": false, "children": [ @@ -1974,7 +1974,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 295 + "lineNumber": 297 }, "deprecated": false, "isRequired": true @@ -2002,7 +2002,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 299 + "lineNumber": 301 }, "deprecated": false, "children": [ @@ -2018,7 +2018,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 299 + "lineNumber": 301 }, "deprecated": false, "isRequired": true @@ -2046,7 +2046,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 303 + "lineNumber": 305 }, "deprecated": false, "children": [ @@ -2062,7 +2062,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 303 + "lineNumber": 305 }, "deprecated": false, "isRequired": true @@ -2090,7 +2090,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 307 + "lineNumber": 309 }, "deprecated": false, "children": [ @@ -2106,7 +2106,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 307 + "lineNumber": 309 }, "deprecated": false, "isRequired": true @@ -2134,7 +2134,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 311 + "lineNumber": 313 }, "deprecated": false, "children": [ @@ -2150,7 +2150,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 311 + "lineNumber": 313 }, "deprecated": false, "isRequired": true @@ -2178,7 +2178,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 315 + "lineNumber": 317 }, "deprecated": false, "children": [], @@ -2196,7 +2196,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 329 + "lineNumber": 331 }, "deprecated": false, "children": [], @@ -2214,7 +2214,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 344 + "lineNumber": 346 }, "deprecated": false, "children": [], @@ -2232,7 +2232,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 351 + "lineNumber": 353 }, "deprecated": false, "children": [], @@ -2258,7 +2258,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 355 + "lineNumber": 357 }, "deprecated": false, "children": [ @@ -2274,7 +2274,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 355 + "lineNumber": 357 }, "deprecated": false, "isRequired": false @@ -2310,7 +2310,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 408 + "lineNumber": 410 }, "deprecated": false, "children": [ @@ -2333,7 +2333,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 408 + "lineNumber": 410 }, "deprecated": false, "isRequired": true @@ -2361,7 +2361,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 427 + "lineNumber": 429 }, "deprecated": false, "children": [ @@ -2377,7 +2377,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 427 + "lineNumber": 429 }, "deprecated": false, "isRequired": true @@ -2409,7 +2409,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 442 + "lineNumber": 444 }, "deprecated": false, "children": [], @@ -2439,7 +2439,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 456 + "lineNumber": 458 }, "deprecated": false, "children": [ @@ -2457,7 +2457,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 456 + "lineNumber": 458 }, "deprecated": false, "isRequired": true @@ -2493,7 +2493,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 465 + "lineNumber": 467 }, "deprecated": false, "children": [ @@ -2517,7 +2517,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 465 + "lineNumber": 467 }, "deprecated": false, "isRequired": true @@ -2541,7 +2541,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 465 + "lineNumber": 467 }, "deprecated": false, "isRequired": false @@ -4359,7 +4359,7 @@ "plugin": "indexPatternManagement", "link": { "path": "src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx", - "lineNumber": 777 + "lineNumber": 778 } } ], @@ -5422,14 +5422,14 @@ { "parentPluginId": "data", "id": "def-public.IndexPatternField.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [ "\nScript field language" ], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/index_pattern_field.ts", @@ -5440,12 +5440,12 @@ { "parentPluginId": "data", "id": "def-public.IndexPatternField.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/index_pattern_field.ts", @@ -5732,7 +5732,7 @@ "label": "toJSON", "description": [], "signature": [ - "() => { count: number; script: string | undefined; lang: string | undefined; conflictDescriptions: Record | undefined; name: string; type: string; esTypes: string[] | undefined; scripted: boolean; searchable: boolean; aggregatable: boolean; readFromDocValues: boolean; subType: ", + "() => { count: number; script: string | undefined; lang: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; conflictDescriptions: Record | undefined; name: string; type: string; esTypes: string[] | undefined; scripted: boolean; searchable: boolean; aggregatable: boolean; readFromDocValues: boolean; subType: ", { "pluginId": "data", "scope": "common", @@ -12344,34 +12344,6 @@ "lineNumber": 222 } }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts", - "lineNumber": 11 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts", - "lineNumber": 16 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx", - "lineNumber": 25 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx", - "lineNumber": 162 - } - }, { "plugin": "infra", "link": { @@ -12848,6 +12820,20 @@ "lineNumber": 11 } }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts", + "lineNumber": 11 + } + }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts", + "lineNumber": 16 + } + }, { "plugin": "ml", "link": { @@ -13230,28 +13216,28 @@ "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 140 + "lineNumber": 141 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 249 + "lineNumber": 250 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 289 + "lineNumber": 290 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 331 + "lineNumber": 332 } }, { @@ -14155,12 +14141,12 @@ { "parentPluginId": "data", "id": "def-public.IFieldType.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/types.ts", @@ -15759,20 +15745,6 @@ "lineNumber": 11 } }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx", - "lineNumber": 25 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx", - "lineNumber": 28 - } - }, { "plugin": "infra", "link": { @@ -16382,48 +16354,6 @@ "lineNumber": 57 } }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts", - "lineNumber": 14 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts", - "lineNumber": 27 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts", - "lineNumber": 213 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts", - "lineNumber": 234 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/actions.ts", - "lineNumber": 12 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/actions.ts", - "lineNumber": 17 - } - }, { "plugin": "observability", "link": { @@ -16645,14 +16575,14 @@ "plugin": "transform", "link": { "path": "x-pack/plugins/transform/server/routes/api/transforms.ts", - "lineNumber": 62 + "lineNumber": 63 } }, { "plugin": "transform", "link": { "path": "x-pack/plugins/transform/server/routes/api/transforms.ts", - "lineNumber": 404 + "lineNumber": 405 } }, { @@ -21078,7 +21008,7 @@ "section": "def-common.PhraseFilterMeta", "text": "PhraseFilterMeta" }, - "; script?: { script: { source?: any; lang?: string | undefined; params: any; }; } | undefined; }" + "; script?: { script: { source?: any; lang?: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; params: any; }; } | undefined; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", @@ -21167,7 +21097,9 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; script?: { script: { params: any; lang: string; source: any; }; } | undefined; match_all?: any; }" + "; script?: { script: { params: any; lang: ", + "ScriptLanguage", + "; source: any; }; } | undefined; match_all?: any; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/range_filter.ts", @@ -22511,7 +22443,7 @@ "section": "def-common.PhraseFilterMeta", "text": "PhraseFilterMeta" }, - "; script?: { script: { source?: any; lang?: string | undefined; params: any; }; } | undefined; }" + "; script?: { script: { source?: any; lang?: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; params: any; }; } | undefined; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", @@ -22569,7 +22501,7 @@ "section": "def-common.PhraseFilterMeta", "text": "PhraseFilterMeta" }, - "; script?: { script: { source?: any; lang?: string | undefined; params: any; }; } | undefined; }" + "; script?: { script: { source?: any; lang?: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; params: any; }; } | undefined; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", @@ -23249,7 +23181,9 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; script?: { script: { params: any; lang: string; source: any; }; } | undefined; match_all?: any; }" + "; script?: { script: { params: any; lang: ", + "ScriptLanguage", + "; source: any; }; } | undefined; match_all?: any; }" ], "source": { "path": "src/plugins/data/public/query/timefilter/lib/change_time_filter.ts", @@ -23322,7 +23256,9 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; script?: { script: { params: any; lang: string; source: any; }; } | undefined; match_all?: any; }" + "; script?: { script: { params: any; lang: ", + "ScriptLanguage", + "; source: any; }; } | undefined; match_all?: any; }" ], "source": { "path": "src/plugins/data/public/query/timefilter/lib/change_time_filter.ts", @@ -28001,7 +27937,7 @@ "plugin": "indexPatternManagement", "link": { "path": "src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx", - "lineNumber": 777 + "lineNumber": 778 } } ], @@ -34340,34 +34276,6 @@ "lineNumber": 222 } }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts", - "lineNumber": 11 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts", - "lineNumber": 16 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx", - "lineNumber": 25 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx", - "lineNumber": 162 - } - }, { "plugin": "infra", "link": { @@ -34844,6 +34752,20 @@ "lineNumber": 11 } }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts", + "lineNumber": 11 + } + }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts", + "lineNumber": 16 + } + }, { "plugin": "ml", "link": { @@ -35226,28 +35148,28 @@ "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 140 + "lineNumber": 141 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 249 + "lineNumber": 250 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 289 + "lineNumber": 290 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 331 + "lineNumber": 332 } }, { @@ -36151,12 +36073,12 @@ { "parentPluginId": "data", "id": "def-server.IFieldType.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/types.ts", @@ -43858,7 +43780,7 @@ "section": "def-common.IFieldType", "text": "IFieldType" }, - ", value: string) => { script: { source: string; lang: string | undefined; params: { value: any; }; }; }" + ", value: string) => { script: { source: string; lang: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; params: { value: any; }; }; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", @@ -44036,7 +43958,7 @@ "section": "def-common.RangeFilterParams", "text": "RangeFilterParams" }, - ") => { script: { source: string; params: { from?: string | number | undefined; to?: string | number | undefined; gt?: string | number | undefined; lt?: string | number | undefined; gte?: string | number | undefined; lte?: string | number | undefined; format?: string | number | undefined; }; lang: string | undefined; }; }" + ") => { script: { source: string; params: { from?: string | number | undefined; to?: string | number | undefined; gt?: string | number | undefined; lt?: string | number | undefined; gte?: string | number | undefined; lte?: string | number | undefined; format?: string | number | undefined; }; lang: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; }; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/range_filter.ts", @@ -46796,7 +46718,7 @@ "section": "def-common.PhraseFilterMeta", "text": "PhraseFilterMeta" }, - "; script?: { script: { source?: any; lang?: string | undefined; params: any; }; } | undefined; }" + "; script?: { script: { source?: any; lang?: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; params: any; }; } | undefined; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", @@ -46965,7 +46887,9 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; script?: { script: { params: any; lang: string; source: any; }; } | undefined; match_all?: any; }" + "; script?: { script: { params: any; lang: ", + "ScriptLanguage", + "; source: any; }; } | undefined; match_all?: any; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/range_filter.ts", diff --git a/api_docs/data.mdx b/api_docs/data.mdx index f585b23a16a0c..bd48fb09df8b3 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import dataObj from './data.json'; +Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. + +Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3809 | 107 | 3257 | 75 | + ## Client ### Setup diff --git a/api_docs/data_autocomplete.mdx b/api_docs/data_autocomplete.mdx index c2231648ac905..7d18feb2140dd 100644 --- a/api_docs/data_autocomplete.mdx +++ b/api_docs/data_autocomplete.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import dataAutocompleteObj from './data_autocomplete.json'; +Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. + +Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3809 | 107 | 3257 | 75 | + ## Client ### Interfaces diff --git a/api_docs/data_enhanced.mdx b/api_docs/data_enhanced.mdx index 07a00b908e7b2..1e6709794d3c4 100644 --- a/api_docs/data_enhanced.mdx +++ b/api_docs/data_enhanced.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import dataEnhancedObj from './data_enhanced.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 16 | 0 | 16 | 2 | + ## Client ### Start diff --git a/api_docs/data_field_formats.mdx b/api_docs/data_field_formats.mdx index faeba4ac56454..c13562eba142d 100644 --- a/api_docs/data_field_formats.mdx +++ b/api_docs/data_field_formats.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import dataFieldFormatsObj from './data_field_formats.json'; +Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. + +Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3809 | 107 | 3257 | 75 | + ## Client ### Consts, variables and types diff --git a/api_docs/data_index_patterns.json b/api_docs/data_index_patterns.json index 0a74a65fb4d34..056442ee29d66 100644 --- a/api_docs/data_index_patterns.json +++ b/api_docs/data_index_patterns.json @@ -1795,7 +1795,7 @@ "plugin": "indexPatternManagement", "link": { "path": "src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx", - "lineNumber": 777 + "lineNumber": 778 } } ], @@ -2858,14 +2858,14 @@ { "parentPluginId": "data", "id": "def-common.IndexPatternField.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [ "\nScript field language" ], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/index_pattern_field.ts", @@ -2876,12 +2876,12 @@ { "parentPluginId": "data", "id": "def-common.IndexPatternField.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/index_pattern_field.ts", @@ -3168,7 +3168,7 @@ "label": "toJSON", "description": [], "signature": [ - "() => { count: number; script: string | undefined; lang: string | undefined; conflictDescriptions: Record | undefined; name: string; type: string; esTypes: string[] | undefined; scripted: boolean; searchable: boolean; aggregatable: boolean; readFromDocValues: boolean; subType: ", + "() => { count: number; script: string | undefined; lang: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; conflictDescriptions: Record | undefined; name: string; type: string; esTypes: string[] | undefined; scripted: boolean; searchable: boolean; aggregatable: boolean; readFromDocValues: boolean; subType: ", { "pluginId": "data", "scope": "common", @@ -4876,14 +4876,14 @@ { "parentPluginId": "data", "id": "def-common.FieldSpec.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [ "\nScripted field langauge\nPainless is the only valid scripted field language" ], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/types.ts", @@ -5191,12 +5191,12 @@ { "parentPluginId": "data", "id": "def-common.FieldSpecExportFmt.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/types.ts", @@ -6117,34 +6117,6 @@ "lineNumber": 222 } }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts", - "lineNumber": 11 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts", - "lineNumber": 16 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx", - "lineNumber": 25 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx", - "lineNumber": 162 - } - }, { "plugin": "infra", "link": { @@ -6621,6 +6593,20 @@ "lineNumber": 11 } }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts", + "lineNumber": 11 + } + }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts", + "lineNumber": 16 + } + }, { "plugin": "ml", "link": { @@ -7003,28 +6989,28 @@ "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 140 + "lineNumber": 141 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 249 + "lineNumber": 250 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 289 + "lineNumber": 290 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 331 + "lineNumber": 332 } }, { @@ -7928,12 +7914,12 @@ { "parentPluginId": "data", "id": "def-common.IFieldType.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/types.ts", @@ -9532,20 +9518,6 @@ "lineNumber": 11 } }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx", - "lineNumber": 25 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx", - "lineNumber": 28 - } - }, { "plugin": "infra", "link": { @@ -10155,48 +10127,6 @@ "lineNumber": 57 } }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts", - "lineNumber": 14 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts", - "lineNumber": 27 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts", - "lineNumber": 213 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts", - "lineNumber": 234 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/actions.ts", - "lineNumber": 12 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/actions.ts", - "lineNumber": 17 - } - }, { "plugin": "observability", "link": { @@ -10418,14 +10348,14 @@ "plugin": "transform", "link": { "path": "x-pack/plugins/transform/server/routes/api/transforms.ts", - "lineNumber": 62 + "lineNumber": 63 } }, { "plugin": "transform", "link": { "path": "x-pack/plugins/transform/server/routes/api/transforms.ts", - "lineNumber": 404 + "lineNumber": 405 } }, { diff --git a/api_docs/data_index_patterns.mdx b/api_docs/data_index_patterns.mdx index df226467aefdc..8313619594a75 100644 --- a/api_docs/data_index_patterns.mdx +++ b/api_docs/data_index_patterns.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import dataIndexPatternsObj from './data_index_patterns.json'; +Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. + +Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3809 | 107 | 3257 | 75 | + ## Server ### Functions diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index ae804971a4319..751cd14dc7c5b 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import dataQueryObj from './data_query.json'; +Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. + +Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3809 | 107 | 3257 | 75 | + ## Client ### Functions diff --git a/api_docs/data_search.json b/api_docs/data_search.json index 81fa9660d32fe..99c04298c27cb 100644 --- a/api_docs/data_search.json +++ b/api_docs/data_search.json @@ -1447,12 +1447,12 @@ { "parentPluginId": "data", "id": "def-public.Reason.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/public/search/errors/types.ts", @@ -2820,7 +2820,7 @@ "description": [], "signature": [ "{ filter?: any; aggs?: Record | undefined; fields?: string[] | undefined; searchAfter?: string[] | undefined; page?: number | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | \"_doc\" | undefined; search?: string | undefined; searchFields?: string[] | undefined; rootSearchFields?: string[] | undefined; hasReference?: ", { "pluginId": "core", @@ -5459,7 +5459,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 76 + "lineNumber": 78 }, "deprecated": false, "children": [ @@ -5481,7 +5481,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 77 + "lineNumber": 79 }, "deprecated": false }, @@ -5504,7 +5504,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 78 + "lineNumber": 80 }, "deprecated": false }, @@ -5520,7 +5520,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 79 + "lineNumber": 81 }, "deprecated": false }, @@ -5536,7 +5536,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 80 + "lineNumber": 82 }, "deprecated": false }, @@ -5552,7 +5552,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 81 + "lineNumber": 83 }, "deprecated": false }, @@ -5575,7 +5575,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 85 + "lineNumber": 87 }, "deprecated": false }, @@ -5591,7 +5591,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 87 + "lineNumber": 89 }, "deprecated": false, "children": [ @@ -5613,7 +5613,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 88 + "lineNumber": 90 }, "deprecated": false, "isRequired": true @@ -5648,7 +5648,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 89 + "lineNumber": 91 }, "deprecated": false, "isRequired": true @@ -5671,7 +5671,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 90 + "lineNumber": 92 }, "deprecated": false, "isRequired": true @@ -5691,7 +5691,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 103 + "lineNumber": 105 }, "deprecated": false, "children": [ @@ -5707,7 +5707,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 103 + "lineNumber": 105 }, "deprecated": false, "isRequired": false @@ -5727,7 +5727,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 107 + "lineNumber": 109 }, "deprecated": false, "children": [ @@ -5743,7 +5743,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 107 + "lineNumber": 109 }, "deprecated": false, "isRequired": false @@ -5771,7 +5771,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 111 + "lineNumber": 113 }, "deprecated": false, "children": [ @@ -5793,7 +5793,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 111 + "lineNumber": 113 }, "deprecated": false, "isRequired": true @@ -5820,7 +5820,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 129 + "lineNumber": 131 }, "deprecated": false, "children": [ @@ -5836,7 +5836,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 129 + "lineNumber": 131 }, "deprecated": false, "isRequired": true @@ -5890,7 +5890,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 142 + "lineNumber": 144 }, "deprecated": false, "children": [ @@ -5924,7 +5924,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 143 + "lineNumber": 145 }, "deprecated": false, "isRequired": true @@ -5941,7 +5941,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 144 + "lineNumber": 146 }, "deprecated": false, "isRequired": true @@ -5971,7 +5971,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 185 + "lineNumber": 187 }, "deprecated": false, "children": [ @@ -5996,7 +5996,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 185 + "lineNumber": 187 }, "deprecated": false, "isRequired": true @@ -6016,7 +6016,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 197 + "lineNumber": 199 }, "deprecated": false, "children": [], @@ -6042,7 +6042,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 287 + "lineNumber": 289 }, "deprecated": false, "children": [], @@ -6067,7 +6067,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 291 + "lineNumber": 293 }, "deprecated": false, "children": [ @@ -6083,7 +6083,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 291 + "lineNumber": 293 }, "deprecated": false, "isRequired": true @@ -6111,7 +6111,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 295 + "lineNumber": 297 }, "deprecated": false, "children": [ @@ -6127,7 +6127,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 295 + "lineNumber": 297 }, "deprecated": false, "isRequired": true @@ -6155,7 +6155,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 299 + "lineNumber": 301 }, "deprecated": false, "children": [ @@ -6171,7 +6171,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 299 + "lineNumber": 301 }, "deprecated": false, "isRequired": true @@ -6199,7 +6199,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 303 + "lineNumber": 305 }, "deprecated": false, "children": [ @@ -6215,7 +6215,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 303 + "lineNumber": 305 }, "deprecated": false, "isRequired": true @@ -6243,7 +6243,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 307 + "lineNumber": 309 }, "deprecated": false, "children": [ @@ -6259,7 +6259,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 307 + "lineNumber": 309 }, "deprecated": false, "isRequired": true @@ -6287,7 +6287,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 311 + "lineNumber": 313 }, "deprecated": false, "children": [ @@ -6303,7 +6303,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 311 + "lineNumber": 313 }, "deprecated": false, "isRequired": true @@ -6331,7 +6331,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 315 + "lineNumber": 317 }, "deprecated": false, "children": [], @@ -6349,7 +6349,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 329 + "lineNumber": 331 }, "deprecated": false, "children": [], @@ -6367,7 +6367,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 344 + "lineNumber": 346 }, "deprecated": false, "children": [], @@ -6385,7 +6385,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 351 + "lineNumber": 353 }, "deprecated": false, "children": [], @@ -6411,7 +6411,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 355 + "lineNumber": 357 }, "deprecated": false, "children": [ @@ -6427,7 +6427,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 355 + "lineNumber": 357 }, "deprecated": false, "isRequired": false @@ -6463,7 +6463,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 408 + "lineNumber": 410 }, "deprecated": false, "children": [ @@ -6486,7 +6486,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 408 + "lineNumber": 410 }, "deprecated": false, "isRequired": true @@ -6514,7 +6514,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 427 + "lineNumber": 429 }, "deprecated": false, "children": [ @@ -6530,7 +6530,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 427 + "lineNumber": 429 }, "deprecated": false, "isRequired": true @@ -6562,7 +6562,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 442 + "lineNumber": 444 }, "deprecated": false, "children": [], @@ -6592,7 +6592,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 456 + "lineNumber": 458 }, "deprecated": false, "children": [ @@ -6610,7 +6610,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 456 + "lineNumber": 458 }, "deprecated": false, "isRequired": true @@ -6646,7 +6646,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 465 + "lineNumber": 467 }, "deprecated": false, "children": [ @@ -6670,7 +6670,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 465 + "lineNumber": 467 }, "deprecated": false, "isRequired": true @@ -6694,7 +6694,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 465 + "lineNumber": 467 }, "deprecated": false, "isRequired": false @@ -24860,7 +24860,7 @@ "label": "reason", "description": [], "signature": [ - "{ caused_by: { reason: string; type: string; }; reason: string; lang?: string | undefined; script?: string | undefined; script_stack?: string[] | undefined; type: string; }" + "{ caused_by: { reason: string; type: string; }; reason: string; lang?: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; script?: string | undefined; script_stack?: string[] | undefined; type: string; }" ], "source": { "path": "src/plugins/data/common/search/search_source/types.ts", @@ -27106,69 +27106,69 @@ "description": [], "signature": [ "(", - "CompositeBucketKeys", + "AggregationsCompositeBucketKeys", " & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | ({ [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; } & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | (", - "DateHistogramBucketKeys", + "AggregationsDateHistogramBucketKeys", " & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | ({ [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; } & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | (", - "FiltersBucketItemKeys", + "AggregationsFiltersBucketItemKeys", " & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | ({ [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; } & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | (", - "IpRangeBucketKeys", + "AggregationsIpRangeBucketKeys", " & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | ({ [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; } & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | (", - "RangeBucketKeys", + "AggregationsRangeBucketKeys", " & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | ({ [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; } & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | ({ [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; } & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | (", - "RareTermsBucketKeys", + "AggregationsRareTermsBucketKeys", " & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | ({ [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; } & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | (", - "SignificantTermsBucketKeys", + "AggregationsSignificantTermsBucketKeys", " & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | ({ [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; } & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; }) | (", - "KeyedBucketKeys", + "AggregationsKeyedBucketKeys", " & { [property: string]: ", - "Aggregate", + "AggregationsAggregate", "; })" ], "source": { diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 370bd2ffd101e..d07be7dfc62aa 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import dataSearchObj from './data_search.json'; +Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. + +Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3809 | 107 | 3257 | 75 | + ## Client ### Functions diff --git a/api_docs/data_ui.mdx b/api_docs/data_ui.mdx index 9eedffdce76f6..c31b561bd4c80 100644 --- a/api_docs/data_ui.mdx +++ b/api_docs/data_ui.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import dataUiObj from './data_ui.json'; +Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. + +Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3809 | 107 | 3257 | 75 | + ## Client ### Functions diff --git a/api_docs/data_visualizer.json b/api_docs/data_visualizer.json new file mode 100644 index 0000000000000..c965a0a5923ac --- /dev/null +++ b/api_docs/data_visualizer.json @@ -0,0 +1,1002 @@ +{ + "id": "dataVisualizer", + "client": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-public.IndexDataVisualizerViewProps", + "type": "Interface", + "tags": [], + "label": "IndexDataVisualizerViewProps", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx", + "lineNumber": 119 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-public.IndexDataVisualizerViewProps.currentIndexPattern", + "type": "Object", + "tags": [], + "label": "currentIndexPattern", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataIndexPatternsPluginApi", + "section": "def-common.IndexPattern", + "text": "IndexPattern" + } + ], + "source": { + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx", + "lineNumber": 120 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-public.IndexDataVisualizerViewProps.currentSavedSearch", + "type": "CompoundType", + "tags": [], + "label": "currentSavedSearch", + "description": [], + "signature": [ + { + "pluginId": "dataVisualizer", + "scope": "common", + "docId": "kibDataVisualizerPluginApi", + "section": "def-common.SavedSearchSavedObject", + "text": "SavedSearchSavedObject" + }, + " | null" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx", + "lineNumber": 121 + }, + "deprecated": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [], + "start": { + "parentPluginId": "dataVisualizer", + "id": "def-public.DataVisualizerPluginStart", + "type": "Type", + "tags": [], + "label": "DataVisualizerPluginStart", + "description": [], + "signature": [ + "{ getFileDataVisualizerComponent: () => Promise>; getIndexDataVisualizerComponent: () => Promise>; getMaxBytesFormatted: () => string; }" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/public/plugin.ts", + "lineNumber": 38 + }, + "deprecated": false, + "lifecycle": "start", + "initialIsOpen": true + } + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState", + "type": "Interface", + "tags": [], + "label": "DataVisualizerTableState", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/index.ts", + "lineNumber": 19 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.pageSize", + "type": "number", + "tags": [], + "label": "pageSize", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/index.ts", + "lineNumber": 20 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.pageIndex", + "type": "number", + "tags": [], + "label": "pageIndex", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/index.ts", + "lineNumber": 21 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.sortField", + "type": "string", + "tags": [], + "label": "sortField", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/index.ts", + "lineNumber": 22 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.sortDirection", + "type": "string", + "tags": [], + "label": "sortDirection", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/index.ts", + "lineNumber": 23 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.visibleFieldTypes", + "type": "Array", + "tags": [], + "label": "visibleFieldTypes", + "description": [], + "signature": [ + "string[]" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/index.ts", + "lineNumber": 24 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.visibleFieldNames", + "type": "Array", + "tags": [], + "label": "visibleFieldNames", + "description": [], + "signature": [ + "string[]" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/index.ts", + "lineNumber": 25 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.showDistributions", + "type": "boolean", + "tags": [], + "label": "showDistributions", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/index.ts", + "lineNumber": 26 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DocumentCountBuckets", + "type": "Interface", + "tags": [], + "label": "DocumentCountBuckets", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 22 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DocumentCountBuckets.Unnamed", + "type": "Any", + "tags": [], + "label": "Unnamed", + "description": [], + "signature": [ + "any" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 23 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DocumentCounts", + "type": "Interface", + "tags": [], + "label": "DocumentCounts", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 26 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DocumentCounts.buckets", + "type": "Object", + "tags": [], + "label": "buckets", + "description": [], + "signature": [ + { + "pluginId": "dataVisualizer", + "scope": "common", + "docId": "kibDataVisualizerPluginApi", + "section": "def-common.DocumentCountBuckets", + "text": "DocumentCountBuckets" + }, + " | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 27 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DocumentCounts.interval", + "type": "number", + "tags": [], + "label": "interval", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 28 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldRequestConfig", + "type": "Interface", + "tags": [], + "label": "FieldRequestConfig", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 16 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldRequestConfig.fieldName", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [], + "signature": [ + "string | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 17 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldRequestConfig.type", + "type": "CompoundType", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"number\" | \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"unknown\"" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 18 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldRequestConfig.cardinality", + "type": "number", + "tags": [], + "label": "cardinality", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 19 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats", + "type": "Interface", + "tags": [], + "label": "FieldVisStats", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 31 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.cardinality", + "type": "number", + "tags": [], + "label": "cardinality", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 32 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.count", + "type": "number", + "tags": [], + "label": "count", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 33 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.sampleCount", + "type": "number", + "tags": [], + "label": "sampleCount", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 34 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.trueCount", + "type": "number", + "tags": [], + "label": "trueCount", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 35 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.falseCount", + "type": "number", + "tags": [], + "label": "falseCount", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 36 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.earliest", + "type": "number", + "tags": [], + "label": "earliest", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 37 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.latest", + "type": "number", + "tags": [], + "label": "latest", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 38 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.documentCounts", + "type": "Object", + "tags": [], + "label": "documentCounts", + "description": [], + "signature": [ + "{ buckets?: ", + { + "pluginId": "dataVisualizer", + "scope": "common", + "docId": "kibDataVisualizerPluginApi", + "section": "def-common.DocumentCountBuckets", + "text": "DocumentCountBuckets" + }, + " | undefined; interval?: number | undefined; } | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 39 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.avg", + "type": "number", + "tags": [], + "label": "avg", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 43 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.distribution", + "type": "Object", + "tags": [], + "label": "distribution", + "description": [], + "signature": [ + "{ percentiles: ", + { + "pluginId": "dataVisualizer", + "scope": "common", + "docId": "kibDataVisualizerPluginApi", + "section": "def-common.Percentile", + "text": "Percentile" + }, + "[]; maxPercentile: number; minPercentile: 0; } | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 44 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.fieldName", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [], + "signature": [ + "string | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 49 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.isTopValuesSampled", + "type": "CompoundType", + "tags": [], + "label": "isTopValuesSampled", + "description": [], + "signature": [ + "boolean | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 50 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.max", + "type": "number", + "tags": [], + "label": "max", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 51 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.median", + "type": "number", + "tags": [], + "label": "median", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 52 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.min", + "type": "number", + "tags": [], + "label": "min", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 53 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.topValues", + "type": "Array", + "tags": [], + "label": "topValues", + "description": [], + "signature": [ + "{ key: React.ReactText; doc_count: number; }[] | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 54 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.topValuesSampleSize", + "type": "number", + "tags": [], + "label": "topValuesSampleSize", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 55 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.topValuesSamplerShardSize", + "type": "number", + "tags": [], + "label": "topValuesSamplerShardSize", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 56 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.examples", + "type": "Array", + "tags": [], + "label": "examples", + "description": [], + "signature": [ + "(string | object)[] | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 57 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.timeRangeEarliest", + "type": "number", + "tags": [], + "label": "timeRangeEarliest", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 58 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FieldVisStats.timeRangeLatest", + "type": "number", + "tags": [], + "label": "timeRangeLatest", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 59 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.Percentile", + "type": "Interface", + "tags": [], + "label": "Percentile", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 10 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-common.Percentile.percent", + "type": "number", + "tags": [], + "label": "percent", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 11 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.Percentile.minValue", + "type": "number", + "tags": [], + "label": "minValue", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 12 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.Percentile.maxValue", + "type": "number", + "tags": [], + "label": "maxValue", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", + "lineNumber": 13 + }, + "deprecated": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-common.ABSOLUTE_MAX_FILE_SIZE_BYTES", + "type": "number", + "tags": [], + "label": "ABSOLUTE_MAX_FILE_SIZE_BYTES", + "description": [], + "signature": [ + "1073741274" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 14 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FILE_SIZE_DISPLAY_FORMAT", + "type": "string", + "tags": [], + "label": "FILE_SIZE_DISPLAY_FORMAT", + "description": [], + "signature": [ + "\"0,0.[0] b\"" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 15 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.INDEX_META_DATA_CREATED_BY", + "type": "string", + "tags": [], + "label": "INDEX_META_DATA_CREATED_BY", + "description": [], + "signature": [ + "\"file-data-visualizer\"" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 19 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.InputData", + "type": "Type", + "tags": [], + "label": "InputData", + "description": [], + "signature": [ + "any[]" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/index.ts", + "lineNumber": 17 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.JobFieldType", + "type": "Type", + "tags": [], + "label": "JobFieldType", + "description": [], + "signature": [ + "\"number\" | \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"unknown\"" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/job_field_type.ts", + "lineNumber": 9 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.MAX_FILE_SIZE", + "type": "string", + "tags": [], + "label": "MAX_FILE_SIZE", + "description": [], + "signature": [ + "\"100MB\"" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 11 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.MAX_FILE_SIZE_BYTES", + "type": "number", + "tags": [], + "label": "MAX_FILE_SIZE_BYTES", + "description": [], + "signature": [ + "104857600" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 12 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.MB", + "type": "number", + "tags": [], + "label": "MB", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 10 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.OMIT_FIELDS", + "type": "Array", + "tags": [], + "label": "OMIT_FIELDS", + "description": [], + "signature": [ + "string[]" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 33 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.SavedSearchSavedObject", + "type": "Type", + "tags": [], + "label": "SavedSearchSavedObject", + "description": [], + "signature": [ + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SimpleSavedObject", + "text": "SimpleSavedObject" + }, + "" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types/index.ts", + "lineNumber": 29 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.UI_SETTING_MAX_FILE_SIZE", + "type": "string", + "tags": [], + "label": "UI_SETTING_MAX_FILE_SIZE", + "description": [], + "signature": [ + "\"fileUpload:maxFileSize\"" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 8 + }, + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-common.JOB_FIELD_TYPES", + "type": "Object", + "tags": [], + "label": "JOB_FIELD_TYPES", + "description": [], + "signature": [ + "{ readonly BOOLEAN: \"boolean\"; readonly DATE: \"date\"; readonly GEO_POINT: \"geo_point\"; readonly GEO_SHAPE: \"geo_shape\"; readonly IP: \"ip\"; readonly KEYWORD: \"keyword\"; readonly NUMBER: \"number\"; readonly TEXT: \"text\"; readonly UNKNOWN: \"unknown\"; }" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 21 + }, + "deprecated": false, + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx new file mode 100644 index 0000000000000..384fd07bd1176 --- /dev/null +++ b/api_docs/data_visualizer.mdx @@ -0,0 +1,42 @@ +--- +id: kibDataVisualizerPluginApi +slug: /kibana-dev-docs/dataVisualizerPluginApi +title: dataVisualizer +image: https://source.unsplash.com/400x175/?github +summary: API docs for the dataVisualizer plugin +date: 2020-11-16 +tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- + +import dataVisualizerObj from './data_visualizer.json'; + + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 59 | 1 | 59 | 0 | + +## Client + +### Start + + +### Interfaces + + +## Common + +### Objects + + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/deprecations.mdx b/api_docs/deprecations.mdx index 36acb26d4b991..74dae7faf838a 100644 --- a/api_docs/deprecations.mdx +++ b/api_docs/deprecations.mdx @@ -111,6 +111,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [clone_panel_action.tsx#L14](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#L14) | - | | | [clone_panel_action.tsx#L98](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#L98) | - | | | [clone_panel_action.tsx#L126](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#L126) | - | +| | [use_dashboard_state_manager.ts#L23](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts#L23) | - | +| | [use_dashboard_state_manager.ts#L35](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts#L35) | - | @@ -127,8 +129,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [search_embeddable.ts#L23](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L23) | - | | | [search_embeddable.ts#L59](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L59) | - | | | [kibana_services.ts#L104](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/kibana_services.ts#L104) | - | -| | [search_embeddable.ts#L23](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L23) | - | -| | [search_embeddable.ts#L59](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L59) | - | | | [kibana_services.ts#L101](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/kibana_services.ts#L101) | - | | | [create_doc_table_react.tsx#L15](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/angular/doc_table/create_doc_table_react.tsx#L15) | - | | | [create_doc_table_react.tsx#L25](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/angular/doc_table/create_doc_table_react.tsx#L25) | - | @@ -137,8 +137,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [kibana_services.ts#L104](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/kibana_services.ts#L104) | - | | | [search_embeddable.ts#L23](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L23) | - | | | [search_embeddable.ts#L59](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L59) | - | -| | [on_save_search.tsx#L11](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/top_nav/on_save_search.tsx#L11) | - | -| | [on_save_search.tsx#L133](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/top_nav/on_save_search.tsx#L133) | - | +| | [on_save_search.tsx#L11](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.tsx#L11) | - | +| | [on_save_search.tsx#L133](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.tsx#L133) | - | | | [saved_searches.ts#L10](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/saved_searches.ts#L10) | - | | | [saved_searches.ts#L20](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/saved_searches.ts#L20) | - | | | [plugin.tsx#L33](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/plugin.tsx#L33) | - | @@ -153,7 +153,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| | | [attribute_service.tsx#L13](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#L13) | - | -| | [attribute_service.tsx#L165](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#L165) | - | +| | [attribute_service.tsx#L167](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#L167) | - | @@ -189,7 +189,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [query_bar.tsx#L30](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#L30) | - | | | [query_bar.tsx#L38](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#L38) | - | | | [plugin.ts#L14](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#L14) | - | -| | [plugin.ts#L190](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#L190) | - | +| | [plugin.ts#L189](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#L189) | - | | | [plugin.d.ts#L2](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/target/types/server/plugin.d.ts#L2) | - | | | [plugin.d.ts#L84](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/target/types/server/plugin.d.ts#L84) | - | @@ -228,18 +228,18 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| -| | [plugin.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/plugin.ts#L12) | 7.16 | -| | [plugin.ts#L38](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/plugin.ts#L38) | 7.16 | +| | [plugin.ts#L14](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/plugin.ts#L14) | 7.16 | +| | [plugin.ts#L42](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/plugin.ts#L42) | 7.16 | | | [types.ts#L9](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L9) | 7.16 | -| | [types.ts#L39](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L39) | 7.16 | +| | [types.ts#L40](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L40) | 7.16 | | | [types.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L1) | 7.16 | -| | [types.d.ts#L24](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L24) | 7.16 | +| | [types.d.ts#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L25) | 7.16 | | | [types.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L10) | 7.16 | -| | [types.ts#L42](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L42) | 7.16 | -| | [types.ts#L49](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L49) | 7.16 | +| | [types.ts#L43](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L43) | 7.16 | +| | [types.ts#L50](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L50) | 7.16 | | | [types.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L1) | 7.16 | -| | [types.d.ts#L26](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L26) | 7.16 | -| | [types.d.ts#L32](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L32) | 7.16 | +| | [types.d.ts#L27](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L27) | 7.16 | +| | [types.d.ts#L33](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L33) | 7.16 | @@ -578,6 +578,11 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [custom_metric_form.d.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.d.ts#L8) | - | | | [index.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/public/pages/metrics/inventory_view/components/waffle/metric_control/index.d.ts#L1) | - | | | [index.d.ts#L9](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/public/pages/metrics/inventory_view/components/waffle/metric_control/index.d.ts#L9) | - | +| | [log_entry_categories_analysis.ts#L9](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts#L9) | 7.16 | +| | [log_entry_categories_analysis.ts#L139](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts#L139) | 7.16 | +| | [log_entry_categories_analysis.ts#L405](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts#L405) | 7.16 | +| | [log_entry_categories_analysis.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/server/lib/log_analysis/log_entry_categories_analysis.d.ts#L1) | 7.16 | +| | [log_entry_categories_analysis.d.ts#L58](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/server/lib/log_analysis/log_entry_categories_analysis.d.ts#L58) | 7.16 | @@ -587,8 +592,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | ---------------|-----------|-----------| | | [embeddable.tsx#L14](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.tsx#L14) | - | | | [embeddable.tsx#L85](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.tsx#L85) | - | -| | [index.tsx#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx#L25) | - | -| | [index.tsx#L102](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx#L102) | - | | | [field_item.tsx#L47](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx#L47) | - | | | [field_item.tsx#L172](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx#L172) | - | | | [datapanel.tsx#L42](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx#L42) | - | @@ -603,10 +606,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [types.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/types.ts#L8) | - | | | [types.ts#L57](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/types.ts#L57) | - | | | [field_stats.ts#L11](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L11) | - | -| | [field_stats.ts#L140](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L140) | - | -| | [field_stats.ts#L249](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L249) | - | -| | [field_stats.ts#L289](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L289) | - | -| | [field_stats.ts#L331](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L331) | - | +| | [field_stats.ts#L139](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L139) | - | +| | [field_stats.ts#L248](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L248) | - | +| | [field_stats.ts#L287](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L287) | - | +| | [field_stats.ts#L329](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L329) | - | | | [types.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/indexpattern_datasource/types.d.ts#L1) | - | | | [types.d.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/indexpattern_datasource/types.d.ts#L22) | - | | | [field_stats.d.ts#L3](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#L3) | - | @@ -618,10 +621,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [types.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/types.ts#L8) | - | | | [types.ts#L57](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/types.ts#L57) | - | | | [field_stats.ts#L11](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L11) | - | -| | [field_stats.ts#L140](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L140) | - | -| | [field_stats.ts#L249](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L249) | - | -| | [field_stats.ts#L289](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L289) | - | -| | [field_stats.ts#L331](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L331) | - | +| | [field_stats.ts#L139](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L139) | - | +| | [field_stats.ts#L248](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L248) | - | +| | [field_stats.ts#L287](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L287) | - | +| | [field_stats.ts#L329](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L329) | - | | | [types.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/indexpattern_datasource/types.d.ts#L1) | - | | | [types.d.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/indexpattern_datasource/types.d.ts#L22) | - | | | [field_stats.d.ts#L3](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#L3) | - | @@ -630,8 +633,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [field_stats.d.ts#L9](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#L9) | - | | | [embeddable.tsx#L14](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.tsx#L14) | - | | | [embeddable.tsx#L85](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.tsx#L85) | - | -| | [index.tsx#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx#L25) | - | -| | [index.tsx#L102](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx#L102) | - | | | [field_item.tsx#L47](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx#L47) | - | | | [field_item.tsx#L172](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx#L172) | - | | | [datapanel.tsx#L42](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx#L42) | - | @@ -646,10 +647,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [types.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/types.ts#L8) | - | | | [types.ts#L57](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/types.ts#L57) | - | | | [field_stats.ts#L11](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L11) | - | -| | [field_stats.ts#L140](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L140) | - | -| | [field_stats.ts#L249](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L249) | - | -| | [field_stats.ts#L289](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L289) | - | -| | [field_stats.ts#L331](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L331) | - | +| | [field_stats.ts#L139](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L139) | - | +| | [field_stats.ts#L248](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L248) | - | +| | [field_stats.ts#L287](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L287) | - | +| | [field_stats.ts#L329](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L329) | - | | | [types.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/indexpattern_datasource/types.d.ts#L1) | - | | | [types.d.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/indexpattern_datasource/types.d.ts#L22) | - | | | [field_stats.d.ts#L3](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#L3) | - | @@ -935,7 +936,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| | | [types.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L8) | - | -| | [types.ts#L44](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L44) | - | +| | [types.ts#L45](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L45) | - | | | [es_doc_field.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/es_doc_field.ts#L12) | - | | | [es_doc_field.ts#L45](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/es_doc_field.ts#L45) | - | | | [es_source.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts#L10) | - | @@ -1125,7 +1126,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [get_docvalue_source_fields.test.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/get_docvalue_source_fields.test.ts#L10) | - | | | [get_docvalue_source_fields.test.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/get_docvalue_source_fields.test.ts#L12) | - | | | [types.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L8) | - | -| | [types.ts#L44](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L44) | - | +| | [types.ts#L45](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L45) | - | | | [es_doc_field.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/es_doc_field.ts#L12) | - | | | [es_doc_field.ts#L45](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/es_doc_field.ts#L45) | - | | | [es_source.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts#L10) | - | @@ -1250,8 +1251,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [utils.d.ts#L37](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/utils.d.ts#L37) | - | | | [edit_utils.d.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts#L8) | - | | | [edit_utils.d.ts#L11](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts#L11) | - | -| | [actions_panel.tsx#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx#L25) | - | -| | [actions_panel.tsx#L28](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx#L28) | - | | | [new_job_utils.ts#L11](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.ts#L11) | - | | | [new_job_utils.ts#L34](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.ts#L34) | - | | | [exploration_query_bar.tsx#L14](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx#L14) | - | @@ -1260,12 +1259,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [editor.tsx#L62](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.tsx#L62) | - | | | [custom_urls.tsx#L40](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx#L40) | - | | | [custom_urls.tsx#L57](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx#L57) | - | -| | [lens_utils.ts#L14](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts#L14) | - | -| | [lens_utils.ts#L27](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts#L27) | - | -| | [lens_utils.ts#L213](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts#L213) | - | -| | [lens_utils.ts#L234](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts#L234) | - | -| | [actions.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/actions.ts#L12) | - | -| | [actions.ts#L17](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/actions.ts#L17) | - | | | [explorer_query_bar.tsx#L17](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx#L17) | - | | | [explorer_query_bar.tsx#L31](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx#L31) | - | | | [explorer_query_bar.tsx#L100](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx#L100) | - | @@ -1275,8 +1268,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [common.ts#L222](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_grid/common.ts#L222) | - | | | [field_types_utils.ts#L11](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.ts#L11) | - | | | [field_types_utils.ts#L16](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.ts#L16) | - | -| | [page.tsx#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx#L25) | - | -| | [page.tsx#L162](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx#L162) | - | | | [field_types_utils.test.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#L8) | - | | | [field_types_utils.test.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#L19) | - | | | [field_types_utils.test.ts#L40](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#L40) | - | @@ -1286,8 +1277,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [common.ts#L222](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_grid/common.ts#L222) | - | | | [field_types_utils.ts#L11](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.ts#L11) | - | | | [field_types_utils.ts#L16](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.ts#L16) | - | -| | [page.tsx#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx#L25) | - | -| | [page.tsx#L162](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx#L162) | - | | | [field_types_utils.test.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#L8) | - | | | [field_types_utils.test.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#L19) | - | | | [field_types_utils.test.ts#L40](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#L40) | - | @@ -1316,8 +1305,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [utils.d.ts#L37](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/utils.d.ts#L37) | - | | | [edit_utils.d.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts#L8) | - | | | [edit_utils.d.ts#L11](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts#L11) | - | -| | [actions_panel.tsx#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx#L25) | - | -| | [actions_panel.tsx#L28](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx#L28) | - | | | [new_job_utils.ts#L11](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.ts#L11) | - | | | [new_job_utils.ts#L34](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.ts#L34) | - | | | [exploration_query_bar.tsx#L14](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx#L14) | - | @@ -1326,12 +1313,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [editor.tsx#L62](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.tsx#L62) | - | | | [custom_urls.tsx#L40](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx#L40) | - | | | [custom_urls.tsx#L57](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx#L57) | - | -| | [lens_utils.ts#L14](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts#L14) | - | -| | [lens_utils.ts#L27](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts#L27) | - | -| | [lens_utils.ts#L213](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts#L213) | - | -| | [lens_utils.ts#L234](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts#L234) | - | -| | [actions.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/actions.ts#L12) | - | -| | [actions.ts#L17](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_row/action_menu/actions.ts#L17) | - | | | [explorer_query_bar.tsx#L17](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx#L17) | - | | | [explorer_query_bar.tsx#L31](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx#L31) | - | | | [explorer_query_bar.tsx#L100](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx#L100) | - | @@ -1341,8 +1322,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [common.ts#L222](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_grid/common.ts#L222) | - | | | [field_types_utils.ts#L11](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.ts#L11) | - | | | [field_types_utils.ts#L16](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.ts#L16) | - | -| | [page.tsx#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx#L25) | - | -| | [page.tsx#L162](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx#L162) | - | | | [field_types_utils.test.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#L8) | - | | | [field_types_utils.test.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#L19) | - | | | [field_types_utils.test.ts#L40](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#L40) | - | @@ -1382,7 +1361,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [static_globals.ts#L43](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/static_globals.ts#L43) | 7.16 | | | [plugin.ts#L18](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/plugin.ts#L18) | 7.16 | | | [plugin.ts#L74](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/plugin.ts#L74) | 7.16 | -| | [plugin.ts#L284](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/plugin.ts#L284) | 7.16 | +| | [plugin.ts#L279](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/plugin.ts#L279) | 7.16 | | | [types.d.ts#L2](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/server/types.d.ts#L2) | 7.16 | | | [types.d.ts#L47](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/server/types.d.ts#L47) | 7.16 | | | [plugin.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/server/plugin.d.ts#L1) | 7.16 | @@ -1471,22 +1450,22 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| -| | [types.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L19) | - | -| | [types.ts#L104](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L104) | - | +| | [types.ts#L18](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L18) | - | +| | [types.ts#L95](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L95) | - | | | [utils.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L10) | - | | | [utils.ts#L53](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L53) | - | | | [utils.ts#L61](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L61) | - | | | [utils.ts#L69](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L69) | - | | | [default_configs.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#L19) | - | -| | [default_configs.ts#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#L25) | - | -| | [types.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L19) | - | -| | [types.ts#L104](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L104) | - | +| | [default_configs.ts#L24](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#L24) | - | +| | [types.ts#L18](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L18) | - | +| | [types.ts#L95](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L95) | - | | | [utils.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L10) | - | | | [utils.ts#L53](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L53) | - | | | [utils.ts#L61](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L61) | - | | | [utils.ts#L69](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L69) | - | | | [default_configs.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#L19) | - | -| | [default_configs.ts#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#L25) | - | +| | [default_configs.ts#L24](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#L24) | - | @@ -1562,9 +1541,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| -| | [types.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L22) | - | -| | [types.ts#L72](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L72) | - | -| | [action.ts#L20](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#L20) | - | +| | [types.ts#L21](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L21) | - | +| | [types.ts#L66](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L66) | - | +| | [action.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#L19) | - | | | [action.ts#L100](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#L100) | - | | | [index.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#L8) | - | | | [index.ts#L86](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#L86) | - | @@ -1601,9 +1580,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [types.ts#L41](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/network/pages/details/types.ts#L41) | - | | | [index.tsx#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx#L12) | - | | | [index.tsx#L34](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx#L34) | - | -| | [middleware.ts#L48](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L48) | - | -| | [middleware.ts#L64](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L64) | - | -| | [middleware.ts#L69](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L69) | - | +| | [middleware.ts#L44](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L44) | - | +| | [middleware.ts#L60](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L60) | - | +| | [middleware.ts#L65](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L65) | - | | | [types.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts#L12) | - | | | [types.ts#L28](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts#L28) | - | | | [index.tsx#L15](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.tsx#L15) | - | @@ -1658,8 +1637,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [use_field_value_autocomplete.ts#L31](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/autocomplete/hooks/use_field_value_autocomplete.ts#L31) | - | | | [field_value_match.tsx#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/autocomplete/field_value_match.tsx#L19) | - | | | [field_value_match.tsx#L30](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/autocomplete/field_value_match.tsx#L30) | - | -| | [query.ts#L13](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts#L13) | - | -| | [query.ts#L52](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts#L52) | - | | | [model.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts#L8) | - | | | [model.ts#L30](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts#L30) | - | | | [index.tsx#L33](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx#L33) | - | @@ -1776,9 +1753,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [index.tsx#L242](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx#L242) | - | | | [index.tsx#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/autocomplete_field/index.tsx#L12) | - | | | [index.tsx#L35](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/autocomplete_field/index.tsx#L35) | - | -| | [types.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L22) | - | -| | [types.ts#L72](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L72) | - | -| | [action.ts#L20](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#L20) | - | +| | [types.ts#L21](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L21) | - | +| | [types.ts#L66](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L66) | - | +| | [action.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#L19) | - | | | [action.ts#L100](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#L100) | - | | | [index.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#L8) | - | | | [index.ts#L86](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#L86) | - | @@ -1815,9 +1792,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [types.ts#L41](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/network/pages/details/types.ts#L41) | - | | | [index.tsx#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx#L12) | - | | | [index.tsx#L34](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx#L34) | - | -| | [middleware.ts#L48](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L48) | - | -| | [middleware.ts#L64](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L64) | - | -| | [middleware.ts#L69](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L69) | - | +| | [middleware.ts#L44](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L44) | - | +| | [middleware.ts#L60](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L60) | - | +| | [middleware.ts#L65](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L65) | - | | | [types.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts#L12) | - | | | [types.ts#L28](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts#L28) | - | | | [index.tsx#L15](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.tsx#L15) | - | @@ -1872,8 +1849,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [use_field_value_autocomplete.ts#L31](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/autocomplete/hooks/use_field_value_autocomplete.ts#L31) | - | | | [field_value_match.tsx#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/autocomplete/field_value_match.tsx#L19) | - | | | [field_value_match.tsx#L30](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/autocomplete/field_value_match.tsx#L30) | - | -| | [query.ts#L13](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts#L13) | - | -| | [query.ts#L52](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts#L52) | - | | | [model.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts#L8) | - | | | [model.ts#L30](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts#L30) | - | | | [index.tsx#L33](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx#L33) | - | @@ -1948,8 +1923,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [app.tsx#L33](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/app.tsx#L33) | - | | | [app.tsx#L73](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/app.tsx#L73) | - | | | [sender.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts#L10) | 7.16 | -| | [sender.ts#L447](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts#L447) | 7.16 | -| | [sender.ts#L466](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts#L466) | 7.16 | +| | [sender.ts#L457](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts#L457) | 7.16 | +| | [sender.ts#L476](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts#L476) | 7.16 | | | [types.ts#L55](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/types.ts#L55) | 7.16 | | | [types.ts#L111](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/types.ts#L111) | 7.16 | @@ -2069,12 +2044,12 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | ---------------|-----------|-----------| | | [es_index_service.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/services/es_index_service.ts#L10) | - | | | [es_index_service.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/services/es_index_service.ts#L22) | - | -| | [transforms.ts#L62](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L62) | - | -| | [transforms.ts#L404](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L404) | - | +| | [transforms.ts#L63](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L63) | - | +| | [transforms.ts#L405](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L405) | - | | | [es_index_service.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/services/es_index_service.ts#L10) | - | | | [es_index_service.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/services/es_index_service.ts#L22) | - | -| | [transforms.ts#L62](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L62) | - | -| | [transforms.ts#L404](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L404) | - | +| | [transforms.ts#L63](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L63) | - | +| | [transforms.ts#L405](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L405) | - | diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 63abb581b1d3e..89d67f54866f2 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import devToolsObj from './dev_tools.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 10 | 0 | 8 | 2 | + ## Client ### Setup diff --git a/api_docs/discover.json b/api_docs/discover.json index 3ded38e306768..48ed4d51abc67 100644 --- a/api_docs/discover.json +++ b/api_docs/discover.json @@ -56,7 +56,7 @@ "description": [], "signature": [ "() => Promise" ], "source": { diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index b5f6cefde7cc4..d4720530b5848 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import discoverObj from './discover.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 64 | 0 | 51 | 6 | + ## Client ### Setup diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 06037e1190c0d..fb8842cd56bfe 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import discoverEnhancedObj from './discover_enhanced.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 39 | 0 | 37 | 2 | + ## Client ### Classes diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index eafc8543b7ce1..46a877be6ac24 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import embeddableObj from './embeddable.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 449 | 4 | 379 | 3 | + ## Client ### Setup diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 58800f0e7d343..8680c6807bbca 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import embeddableEnhancedObj from './embeddable_enhanced.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 14 | 0 | 14 | 0 | + ## Client ### Setup diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 654427d83c359..e152ec4aec9a8 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import encryptedSavedObjectsObj from './encrypted_saved_objects.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 30 | 0 | 28 | 3 | + ## Server ### Setup diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 1f9dfaae078f4..8156918dcefe4 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import enterpriseSearchObj from './enterprise_search.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 2 | 0 | 2 | 0 | + ## Server ### Objects diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 2fd04e135e3fd..e317299f0b48a 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import esUiSharedObj from './es_ui_shared.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 88 | 4 | 86 | 1 | + ## Client ### Objects diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 6948a63cf85c9..409d6ad6d21c2 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import eventLogObj from './event_log.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 70 | 0 | 70 | 4 | + ## Server ### Setup diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index a57e91bf2a333..e0544d866766e 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import expressionsObj from './expressions.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 1871 | 57 | 1444 | 5 | + ## Client ### Setup diff --git a/api_docs/features.mdx b/api_docs/features.mdx index 99776f6930159..377945d852ddd 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import featuresObj from './features.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 215 | 0 | 97 | 2 | + ## Client ### Setup diff --git a/api_docs/file_data_visualizer.json b/api_docs/file_data_visualizer.json deleted file mode 100644 index 31b2c6bf5b673..0000000000000 --- a/api_docs/file_data_visualizer.json +++ /dev/null @@ -1,328 +0,0 @@ -{ - "id": "fileDataVisualizer", - "client": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [], - "start": { - "parentPluginId": "fileDataVisualizer", - "id": "def-public.FileDataVisualizerPluginStart", - "type": "Type", - "tags": [], - "label": "FileDataVisualizerPluginStart", - "description": [], - "signature": [ - "{ getFileDataVisualizerComponent: () => Promise>; getMaxBytesFormatted: () => string; }" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/public/plugin.ts", - "lineNumber": 36 - }, - "deprecated": false, - "lifecycle": "start", - "initialIsOpen": true - } - }, - "server": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { - "classes": [], - "functions": [], - "interfaces": [ - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState", - "type": "Interface", - "tags": [], - "label": "DataVisualizerTableState", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 14 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.pageSize", - "type": "number", - "tags": [], - "label": "pageSize", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 15 - }, - "deprecated": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.pageIndex", - "type": "number", - "tags": [], - "label": "pageIndex", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 16 - }, - "deprecated": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.sortField", - "type": "string", - "tags": [], - "label": "sortField", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 17 - }, - "deprecated": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.sortDirection", - "type": "string", - "tags": [], - "label": "sortDirection", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 18 - }, - "deprecated": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.visibleFieldTypes", - "type": "Array", - "tags": [], - "label": "visibleFieldTypes", - "description": [], - "signature": [ - "string[]" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 19 - }, - "deprecated": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.visibleFieldNames", - "type": "Array", - "tags": [], - "label": "visibleFieldNames", - "description": [], - "signature": [ - "string[]" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 20 - }, - "deprecated": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.showDistributions", - "type": "boolean", - "tags": [], - "label": "showDistributions", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 21 - }, - "deprecated": false - } - ], - "initialIsOpen": false - } - ], - "enums": [], - "misc": [ - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.ABSOLUTE_MAX_FILE_SIZE_BYTES", - "type": "number", - "tags": [], - "label": "ABSOLUTE_MAX_FILE_SIZE_BYTES", - "description": [], - "signature": [ - "1073741274" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 14 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.FILE_SIZE_DISPLAY_FORMAT", - "type": "string", - "tags": [], - "label": "FILE_SIZE_DISPLAY_FORMAT", - "description": [], - "signature": [ - "\"0,0.[0] b\"" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 15 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.INDEX_META_DATA_CREATED_BY", - "type": "string", - "tags": [], - "label": "INDEX_META_DATA_CREATED_BY", - "description": [], - "signature": [ - "\"file-data-visualizer\"" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 19 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.InputData", - "type": "Type", - "tags": [], - "label": "InputData", - "description": [], - "signature": [ - "any[]" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 10 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.JobFieldType", - "type": "Type", - "tags": [], - "label": "JobFieldType", - "description": [], - "signature": [ - "\"number\" | \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"unknown\"" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 12 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.MAX_FILE_SIZE", - "type": "string", - "tags": [], - "label": "MAX_FILE_SIZE", - "description": [], - "signature": [ - "\"100MB\"" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 11 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.MAX_FILE_SIZE_BYTES", - "type": "number", - "tags": [], - "label": "MAX_FILE_SIZE_BYTES", - "description": [], - "signature": [ - "104857600" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 12 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.MB", - "type": "number", - "tags": [], - "label": "MB", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 10 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.UI_SETTING_MAX_FILE_SIZE", - "type": "string", - "tags": [], - "label": "UI_SETTING_MAX_FILE_SIZE", - "description": [], - "signature": [ - "\"fileUpload:maxFileSize\"" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 8 - }, - "deprecated": false, - "initialIsOpen": false - } - ], - "objects": [ - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.JOB_FIELD_TYPES", - "type": "Object", - "tags": [], - "label": "JOB_FIELD_TYPES", - "description": [], - "signature": [ - "{ readonly BOOLEAN: \"boolean\"; readonly DATE: \"date\"; readonly GEO_POINT: \"geo_point\"; readonly GEO_SHAPE: \"geo_shape\"; readonly IP: \"ip\"; readonly KEYWORD: \"keyword\"; readonly NUMBER: \"number\"; readonly TEXT: \"text\"; readonly UNKNOWN: \"unknown\"; }" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 21 - }, - "deprecated": false, - "initialIsOpen": false - } - ] - } -} \ No newline at end of file diff --git a/api_docs/file_data_visualizer.mdx b/api_docs/file_data_visualizer.mdx deleted file mode 100644 index 07d4fc76d448a..0000000000000 --- a/api_docs/file_data_visualizer.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -id: kibFileDataVisualizerPluginApi -slug: /kibana-dev-docs/fileDataVisualizerPluginApi -title: fileDataVisualizer -image: https://source.unsplash.com/400x175/?github -summary: API docs for the fileDataVisualizer plugin -date: 2020-11-16 -tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileDataVisualizer'] -warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. ---- - -import fileDataVisualizerObj from './file_data_visualizer.json'; - -## Client - -### Start - - -## Common - -### Objects - - -### Interfaces - - -### Consts, variables and types - - diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index aa4af1121e118..acd0ed52e4182 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import fileUploadObj from './file_upload.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 128 | 4 | 128 | 1 | + ## Client ### Start diff --git a/api_docs/fleet.json b/api_docs/fleet.json index ea4d3db538f39..bb7e899062640 100644 --- a/api_docs/fleet.json +++ b/api_docs/fleet.json @@ -3721,7 +3721,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -3966,7 +3966,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -4801,7 +4801,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/services/package_policy.ts", - "lineNumber": 655 + "lineNumber": 656 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 1388184f7a948..2113069fe47e0 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import fleetObj from './fleet.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 1071 | 15 | 981 | 8 | + ## Client ### Setup diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 2e88a252eb35d..041b9aba8ec7c 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import globalSearchObj from './global_search.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 68 | 0 | 14 | 5 | + ## Client ### Setup diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 0a8bac237b045..23c58467b6a98 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import homeObj from './home.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 89 | 0 | 65 | 5 | + ## Client ### Setup diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index f6aff00be5c61..a16206ad3d361 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import indexLifecycleManagementObj from './index_lifecycle_management.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 5 | 0 | 5 | 0 | + ## Client ### Interfaces diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 0f22d279f7ecf..9190012ac0b29 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import indexManagementObj from './index_management.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 162 | 12 | 157 | 3 | + ## Client ### Functions diff --git a/api_docs/index_pattern_field_editor.mdx b/api_docs/index_pattern_field_editor.mdx index 7c057e8706f7d..1627a18e66724 100644 --- a/api_docs/index_pattern_field_editor.mdx +++ b/api_docs/index_pattern_field_editor.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import indexPatternFieldEditorObj from './index_pattern_field_editor.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 31 | 1 | 29 | 4 | + ## Client ### Start diff --git a/api_docs/index_pattern_management.mdx b/api_docs/index_pattern_management.mdx index b74d3a7262870..7d82efb213ff1 100644 --- a/api_docs/index_pattern_management.mdx +++ b/api_docs/index_pattern_management.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import indexPatternManagementObj from './index_pattern_management.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 46 | 0 | 46 | 4 | + ## Client ### Setup diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index 83eb998262864..0a13dcdfb5bcc 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import infraObj from './infra.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 23 | 0 | 20 | 4 | + ## Client ### Objects diff --git a/api_docs/ingest_pipelines.mdx b/api_docs/ingest_pipelines.mdx index eb56280c5b4ae..25bdbceda4ead 100644 --- a/api_docs/ingest_pipelines.mdx +++ b/api_docs/ingest_pipelines.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import ingestPipelinesObj from './ingest_pipelines.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 9 | 0 | 9 | 4 | + ## Client ### Classes diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 1fe62ba63e26e..d69ef22ce788a 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import inspectorObj from './inspector.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 101 | 6 | 78 | 4 | + ## Client ### Setup diff --git a/api_docs/kibana_legacy.mdx b/api_docs/kibana_legacy.mdx index 208cb8013d063..5cd9244f0ea57 100644 --- a/api_docs/kibana_legacy.mdx +++ b/api_docs/kibana_legacy.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import kibanaLegacyObj from './kibana_legacy.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 93 | 3 | 85 | 1 | + ## Client ### Functions diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index f4a5cf71d6a3d..da356108593a1 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import kibanaReactObj from './kibana_react.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 245 | 1 | 216 | 4 | + ## Client ### Objects diff --git a/api_docs/kibana_utils.json b/api_docs/kibana_utils.json index 66eefa9097bfb..99296f3235f0f 100644 --- a/api_docs/kibana_utils.json +++ b/api_docs/kibana_utils.json @@ -3805,7 +3805,7 @@ "description": [], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 704 + "lineNumber": 731 }, "deprecated": false }, @@ -3828,7 +3828,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 704 + "lineNumber": 731 }, "deprecated": false } diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 9a9001af4b1f0..a76992e0bc2b8 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import kibanaUtilsObj from './kibana_utils.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 551 | 5 | 373 | 8 | + ## Client ### Objects diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 8e9369253c2e3..8c47be1b5897c 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import lensObj from './lens.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 172 | 0 | 161 | 16 | + ## Client ### Interfaces diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index d11b92e9bbc14..a2859cc03f877 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import licenseApiGuardObj from './license_api_guard.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 8 | 0 | 8 | 0 | + ## Server ### Classes diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index 8fde04390ebf0..b198e83acebf3 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import licenseManagementObj from './license_management.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3 | 0 | 3 | 0 | + ## Client ### Setup diff --git a/api_docs/licensing.json b/api_docs/licensing.json index 11832f60ee412..862a00e65215f 100644 --- a/api_docs/licensing.json +++ b/api_docs/licensing.json @@ -381,7 +381,7 @@ "\nThe state of checking the results of a license type meeting the license minimum." ], "signature": [ - "\"valid\" | \"invalid\" | \"expired\" | \"unavailable\"" + "\"valid\" | \"invalid\" | \"unavailable\" | \"expired\"" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -839,7 +839,7 @@ "label": "LicenseCheckState", "description": [], "signature": [ - "\"valid\" | \"invalid\" | \"expired\" | \"unavailable\"" + "\"valid\" | \"invalid\" | \"unavailable\" | \"expired\"" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -987,7 +987,7 @@ "plugin": "security", "link": { "path": "x-pack/plugins/security/public/plugin.tsx", - "lineNumber": 82 + "lineNumber": 84 } }, { @@ -2414,7 +2414,7 @@ "\nThe state of checking the results of a license type meeting the license minimum." ], "signature": [ - "\"valid\" | \"invalid\" | \"expired\" | \"unavailable\"" + "\"valid\" | \"invalid\" | \"unavailable\" | \"expired\"" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -2947,7 +2947,7 @@ "label": "LicenseCheckState", "description": [], "signature": [ - "\"valid\" | \"invalid\" | \"expired\" | \"unavailable\"" + "\"valid\" | \"invalid\" | \"unavailable\" | \"expired\"" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -3074,7 +3074,7 @@ "plugin": "security", "link": { "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 225 + "lineNumber": 229 } }, { diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 695734b79f493..af26b10762d27 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import licensingObj from './licensing.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 120 | 0 | 44 | 8 | + ## Client ### Setup diff --git a/api_docs/lists.json b/api_docs/lists.json index 71974dd9fe205..061227499d67f 100644 --- a/api_docs/lists.json +++ b/api_docs/lists.json @@ -467,7 +467,7 @@ "signature": [ "({ itemId, id, namespaceType, }: ", "GetExceptionListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", @@ -569,7 +569,7 @@ "signature": [ "({ comments, description, entries, itemId, meta, name, osTypes, tags, type, }: ", "CreateEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", @@ -609,7 +609,7 @@ "signature": [ "({ _version, comments, description, entries, id, itemId, meta, name, osTypes, tags, type, }: ", "UpdateEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", @@ -649,7 +649,7 @@ "signature": [ "({ itemId, id, }: ", "GetEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", @@ -807,7 +807,7 @@ "section": "def-server.CreateExceptionListItemOptions", "text": "CreateExceptionListItemOptions" }, - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", @@ -857,7 +857,7 @@ "section": "def-server.UpdateExceptionListItemOptions", "text": "UpdateExceptionListItemOptions" }, - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", @@ -901,7 +901,7 @@ "signature": [ "({ id, itemId, namespaceType, }: ", "DeleteExceptionListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", @@ -979,7 +979,7 @@ "signature": [ "({ id, itemId, }: ", "DeleteEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", @@ -1017,7 +1017,7 @@ "signature": [ "({ listId, filter, perPage, page, sortField, sortOrder, namespaceType, }: ", "FindExceptionListItemOptions", - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", @@ -1055,7 +1055,7 @@ "signature": [ "({ listId, filter, perPage, page, sortField, sortOrder, namespaceType, }: ", "FindExceptionListsItemOptions", - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", @@ -1093,7 +1093,7 @@ "signature": [ "({ perPage, page, sortField, sortOrder, valueListId, }: ", "FindValueListExceptionListsItems", - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", @@ -1171,7 +1171,7 @@ "signature": [ "({ filter, perPage, page, sortField, sortOrder, }: ", "FindEndpointListItemOptions", - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", @@ -1297,7 +1297,7 @@ "signature": [ "({ id }: ", "GetListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1335,7 +1335,7 @@ "signature": [ "({ id, deserializer, immutable, serializer, name, description, type, meta, version, }: ", "CreateListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1373,7 +1373,7 @@ "signature": [ "({ id, deserializer, serializer, name, description, immutable, type, meta, version, }: ", "CreateListIfItDoesNotExistOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1771,7 +1771,7 @@ "signature": [ "({ id }: ", "DeleteListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1809,7 +1809,7 @@ "signature": [ "({ listId, value, type, }: ", "DeleteListItemByValueOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1847,7 +1847,7 @@ "signature": [ "({ id }: ", "DeleteListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1923,7 +1923,7 @@ "signature": [ "({ deserializer, serializer, type, listId, stream, meta, version, }: ", "ImportListItemsToStreamOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1961,7 +1961,7 @@ "signature": [ "({ listId, value, type, }: ", "GetListItemByValueOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1999,7 +1999,7 @@ "signature": [ "({ id, deserializer, serializer, listId, value, type, meta, }: ", "CreateListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2037,7 +2037,7 @@ "signature": [ "({ _version, id, value, meta, }: ", "UpdateListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2075,7 +2075,7 @@ "signature": [ "({ _version, id, name, description, meta, version, }: ", "UpdateListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2113,7 +2113,7 @@ "signature": [ "({ id }: ", "GetListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2151,7 +2151,7 @@ "signature": [ "({ type, listId, value, }: ", "GetListItemsByValueOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2189,7 +2189,7 @@ "signature": [ "({ type, listId, value, }: ", "SearchListItemByValuesOptions", - ") => Promise<{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }[]>" + ") => Promise<{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }[]>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2227,7 +2227,7 @@ "signature": [ "({ filter, currentIndexPosition, perPage, page, sortField, sortOrder, searchAfter, }: ", "FindListOptions", - ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" + ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2265,7 +2265,7 @@ "signature": [ "({ listId, filter, currentIndexPosition, perPage, page, sortField, sortOrder, searchAfter, }: ", "FindListItemOptions", - ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; page: number; per_page: number; total: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2336,7 +2336,7 @@ "label": "entries", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", @@ -2897,7 +2897,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -3063,7 +3063,7 @@ "label": "entries", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index 8ef77a85fb548..47b1bde5c0782 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import listsObj from './lists.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 151 | 0 | 143 | 38 | + ## Client ### Setup diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 16e097a6158e6..22586c7b58b49 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import managementObj from './management.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 38 | 0 | 38 | 4 | + ## Client ### Setup diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index f4f5594b19347..efa7ddb5fddf5 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import mapsObj from './maps.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 196 | 2 | 195 | 11 | + ## Client ### Start diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 5907add0c5465..0abd9d511cf90 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import mapsEmsObj from './maps_ems.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 75 | 1 | 75 | 0 | + ## Client ### Setup diff --git a/api_docs/metrics_entities.json b/api_docs/metrics_entities.json index 3e67e8e750007..b78278a84162a 100644 --- a/api_docs/metrics_entities.json +++ b/api_docs/metrics_entities.json @@ -64,7 +64,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", diff --git a/api_docs/metrics_entities.mdx b/api_docs/metrics_entities.mdx index 19a27636511c3..182a78cd0ddc1 100644 --- a/api_docs/metrics_entities.mdx +++ b/api_docs/metrics_entities.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import metricsEntitiesObj from './metrics_entities.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 9 | 0 | 6 | 1 | + ## Server ### Setup diff --git a/api_docs/ml.json b/api_docs/ml.json index 7308e182d7e5c..2e0e6364993d5 100644 --- a/api_docs/ml.json +++ b/api_docs/ml.json @@ -1513,14 +1513,14 @@ "description": [], "signature": [ "{ GTE: ", - "TotalHitsRelation", + "SearchTotalHitsRelation", "; EQ: ", - "TotalHitsRelation", + "SearchTotalHitsRelation", "; }" ], "source": { "path": "x-pack/plugins/ml/common/types/es_client.ts", - "lineNumber": 20 + "lineNumber": 22 }, "deprecated": false, "initialIsOpen": false @@ -1779,7 +1779,7 @@ ", indexPatternTitle: string, query: any, fields: ", "HistogramField", "[], samplerShardSize: number, runtimeMappings?: Record | undefined) => Promise" ], "source": { @@ -1889,7 +1889,7 @@ "description": [], "signature": [ "Record | undefined" ], "source": { @@ -2852,7 +2852,7 @@ "signature": [ "CombinedJob", " extends ", - "Job" + "MlJob" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/combined_job.ts", @@ -2884,7 +2884,7 @@ "label": "datafeed_config", "description": [], "signature": [ - "Datafeed" + "MlDatafeed" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/combined_job.ts", @@ -2937,9 +2937,9 @@ "label": "datafeed_config", "description": [], "signature": [ - "Datafeed", + "MlDatafeed", " & ", - "DatafeedStats" + "MlDatafeedStats" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/combined_job.ts", @@ -2950,72 +2950,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "ml", - "id": "def-server.IndicesOptions", - "type": "Interface", - "tags": [], - "label": "IndicesOptions", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", - "lineNumber": 19 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "ml", - "id": "def-server.IndicesOptions.allow_no_indices", - "type": "CompoundType", - "tags": [], - "label": "allow_no_indices", - "description": [], - "signature": [ - "boolean | undefined" - ], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", - "lineNumber": 20 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.IndicesOptions.expand_wildcards", - "type": "CompoundType", - "tags": [], - "label": "expand_wildcards", - "description": [], - "signature": [ - "string | ", - "ExpandWildcardOptions", - "[] | undefined" - ], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", - "lineNumber": 21 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.IndicesOptions.ignore_unavailable", - "type": "CompoundType", - "tags": [], - "label": "ignore_unavailable", - "description": [], - "signature": [ - "boolean | undefined" - ], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", - "lineNumber": 22 - }, - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "ml", "id": "def-server.Influencer", @@ -3516,156 +3450,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot", - "type": "Interface", - "tags": [], - "label": "ModelSnapshot", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 11 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.job_id", - "type": "string", - "tags": [], - "label": "job_id", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 12 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.min_version", - "type": "string", - "tags": [], - "label": "min_version", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 13 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.timestamp", - "type": "number", - "tags": [], - "label": "timestamp", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 14 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.description", - "type": "string", - "tags": [], - "label": "description", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 15 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.snapshot_id", - "type": "string", - "tags": [], - "label": "snapshot_id", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 16 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.snapshot_doc_count", - "type": "number", - "tags": [], - "label": "snapshot_doc_count", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 17 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.model_size_stats", - "type": "CompoundType", - "tags": [], - "label": "model_size_stats", - "description": [], - "signature": [ - "ModelSizeStats", - " & { model_bytes_exceeded: number; model_bytes_memory_limit: number; peak_model_bytes?: number | undefined; }" - ], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 18 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.latest_record_time_stamp", - "type": "number", - "tags": [], - "label": "latest_record_time_stamp", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 19 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.latest_result_time_stamp", - "type": "number", - "tags": [], - "label": "latest_result_time_stamp", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 20 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.retain", - "type": "boolean", - "tags": [], - "label": "retain", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 21 - }, - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "ml", "id": "def-server.PerPartitionCategorization", @@ -3726,7 +3510,7 @@ "description": [], "signature": [ "{ [x: string]: ", - "AggregationContainer", + "AggregationsAggregationContainer", "; }" ], "source": { @@ -3744,7 +3528,7 @@ "label": "AnalysisConfig", "description": [], "signature": [ - "AnalysisConfig" + "MlAnalysisConfig" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -3761,7 +3545,7 @@ "label": "AnalysisLimits", "description": [], "signature": [ - "AnalysisLimits" + "MlAnalysisLimits" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -3812,7 +3596,7 @@ "label": "ChunkingConfig", "description": [], "signature": [ - "ChunkingConfig" + "MlChunkingConfig" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", @@ -3829,7 +3613,7 @@ "label": "CustomRule", "description": [], "signature": [ - "DetectionRule" + "MlDetectionRule" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -3846,7 +3630,7 @@ "label": "CustomSettings", "description": [], "signature": [ - "CustomSettings" + "MlCustomSettings" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -3863,11 +3647,11 @@ "label": "DataCounts", "description": [], "signature": [ - "DataCounts" + "MlDataCounts" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job_stats.ts", - "lineNumber": 15 + "lineNumber": 12 }, "deprecated": false, "initialIsOpen": false @@ -3880,7 +3664,7 @@ "label": "DataDescription", "description": [], "signature": [ - "DataDescription" + "MlDataDescription" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -3897,7 +3681,7 @@ "label": "Datafeed", "description": [], "signature": [ - "Datafeed" + "MlDatafeed" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", @@ -3931,7 +3715,7 @@ "label": "DatafeedStats", "description": [], "signature": [ - "DatafeedStats" + "MlDatafeedStats" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed_stats.ts", @@ -3948,9 +3732,9 @@ "label": "DatafeedWithStats", "description": [], "signature": [ - "Datafeed", + "MlDatafeed", " & ", - "DatafeedStats" + "MlDatafeedStats" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/combined_job.ts", @@ -3967,7 +3751,7 @@ "label": "Detector", "description": [], "signature": [ - "Detector" + "MlDetector" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -4001,11 +3785,28 @@ "label": "ForecastsStats", "description": [], "signature": [ - "JobForecastStatistics" + "MlJobForecastStatistics" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job_stats.ts", - "lineNumber": 27 + "lineNumber": 18 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "ml", + "id": "def-server.IndicesOptions", + "type": "Type", + "tags": [], + "label": "IndicesOptions", + "description": [], + "signature": [ + "MlDatafeedIndicesOptions" + ], + "source": { + "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", + "lineNumber": 18 }, "deprecated": false, "initialIsOpen": false @@ -4018,7 +3819,7 @@ "label": "Job", "description": [], "signature": [ - "Job" + "MlJob" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -4052,12 +3853,7 @@ "label": "JobStats", "description": [], "signature": [ - "JobStats", - " & { model_size_stats: ", - "ModelSizeStats", - "; timing_stats: ", - "TimingStats", - "; }" + "MlJobStats" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job_stats.ts", @@ -4074,14 +3870,10 @@ "label": "JobWithStats", "description": [], "signature": [ - "Job", + "MlJob", + " & ", + "MlJobStats", " & ", - "JobStats", - " & { model_size_stats: ", - "ModelSizeStats", - "; timing_stats: ", - "TimingStats", - "; } & ", "JobAlertingRuleStats" ], "source": { @@ -4117,7 +3909,7 @@ "label": "ModelPlotConfig", "description": [], "signature": [ - "ModelPlotConfig" + "MlModelPlotConfig" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -4134,12 +3926,28 @@ "label": "ModelSizeStats", "description": [], "signature": [ - "ModelSizeStats", - " & { model_bytes_exceeded: number; model_bytes_memory_limit: number; peak_model_bytes?: number | undefined; }" + "MlModelSizeStats" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job_stats.ts", - "lineNumber": 17 + "lineNumber": 14 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "ml", + "id": "def-server.ModelSnapshot", + "type": "Type", + "tags": [], + "label": "ModelSnapshot", + "description": [], + "signature": [ + "MlModelSnapshot" + ], + "source": { + "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", + "lineNumber": 10 }, "deprecated": false, "initialIsOpen": false @@ -4169,11 +3977,11 @@ "label": "Node", "description": [], "signature": [ - "DiscoveryNode" + "MlDiscoveryNode" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job_stats.ts", - "lineNumber": 29 + "lineNumber": 20 }, "deprecated": false, "initialIsOpen": false @@ -4203,12 +4011,11 @@ "label": "TimingStats", "description": [], "signature": [ - "TimingStats", - " & { total_bucket_processing_time_ms: number; }" + "MlTimingStats" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job_stats.ts", - "lineNumber": 23 + "lineNumber": 16 }, "deprecated": false, "initialIsOpen": false @@ -4671,7 +4478,7 @@ "description": [], "signature": [ "{ [x: string]: ", - "RuntimeField", + "MappingRuntimeField", "; }" ], "source": { @@ -4692,14 +4499,14 @@ "description": [], "signature": [ "{ GTE: ", - "TotalHitsRelation", + "SearchTotalHitsRelation", "; EQ: ", - "TotalHitsRelation", + "SearchTotalHitsRelation", "; }" ], "source": { "path": "x-pack/plugins/ml/common/types/es_client.ts", - "lineNumber": 20 + "lineNumber": 22 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index abb03511bbcaa..4a9b98a326837 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import mlObj from './ml.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 274 | 10 | 270 | 32 | + ## Client ### Start diff --git a/api_docs/monitoring.json b/api_docs/monitoring.json index 188e3f7b32100..2569619f007d7 100644 --- a/api_docs/monitoring.json +++ b/api_docs/monitoring.json @@ -96,7 +96,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index 4c32b1c933c93..e3dd2a0bbb6a5 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import monitoringObj from './monitoring.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 10 | 0 | 10 | 2 | + ## Server ### Setup diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index d9dc1703ed4d8..b8b6f82162916 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import navigationObj from './navigation.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 31 | 0 | 31 | 2 | + ## Client ### Setup diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index cb5c264e1940c..0c3fe2bbc6640 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import newsfeedObj from './newsfeed.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 17 | 0 | 17 | 0 | + ## Client ### Setup diff --git a/api_docs/observability.json b/api_docs/observability.json index f6104d1c1b802..f59cf6407de75 100644 --- a/api_docs/observability.json +++ b/api_docs/observability.json @@ -145,7 +145,11 @@ "section": "def-public.AlertTypeModel", "text": "AlertTypeModel" }, - " & { format: Formatter; }) => void; getFormatter: (typeId: string) => Formatter | undefined; } & { registerFormatter: () => void; }" + " & { format: ", + "Formatter", + "; }) => void; getFormatter: (typeId: string) => ", + "Formatter", + " | undefined; } & { registerFormatter: () => void; }" ], "source": { "path": "x-pack/plugins/observability/public/rules/observability_rule_type_registry_mock.ts", @@ -927,7 +931,7 @@ "label": "useUiTracker", "description": [], "signature": [ - "({\n app: defaultApp,\n}: { app?: \"apm\" | \"fleet\" | \"infra_metrics\" | \"infra_logs\" | \"uptime\" | \"synthetics\" | \"observability-overview\" | \"stack_monitoring\" | \"ux\" | undefined; }) => ({ app, metric, metricType }: ", + "({\n app: defaultApp,\n}: { app?: \"fleet\" | \"apm\" | \"infra_metrics\" | \"infra_logs\" | \"uptime\" | \"synthetics\" | \"observability-overview\" | \"stack_monitoring\" | \"ux\" | undefined; }) => ({ app, metric, metricType }: ", { "pluginId": "observability", "scope": "public", @@ -964,7 +968,7 @@ "label": "app", "description": [], "signature": [ - "\"apm\" | \"fleet\" | \"infra_metrics\" | \"infra_logs\" | \"uptime\" | \"synthetics\" | \"observability-overview\" | \"stack_monitoring\" | \"ux\" | undefined" + "\"fleet\" | \"apm\" | \"infra_metrics\" | \"infra_logs\" | \"uptime\" | \"synthetics\" | \"observability-overview\" | \"stack_monitoring\" | \"ux\" | undefined" ], "source": { "path": "x-pack/plugins/observability/public/hooks/use_track_metric.tsx", @@ -3046,7 +3050,11 @@ "section": "def-public.AlertTypeModel", "text": "AlertTypeModel" }, - " & { format: Formatter; }) => void; getFormatter: (typeId: string) => Formatter | undefined; }" + " & { format: ", + "Formatter", + "; }) => void; getFormatter: (typeId: string) => ", + "Formatter", + " | undefined; }" ], "source": { "path": "x-pack/plugins/observability/public/rules/create_observability_rule_type_registry.ts", @@ -3184,7 +3192,11 @@ "section": "def-public.AlertTypeModel", "text": "AlertTypeModel" }, - " & { format: Formatter; }) => void; getFormatter: (typeId: string) => Formatter | undefined; }; isAlertingExperienceEnabled: () => boolean; navigation: { registerSections: (sections$: ", + " & { format: ", + "Formatter", + "; }) => void; getFormatter: (typeId: string) => ", + "Formatter", + " | undefined; }; isAlertingExperienceEnabled: () => boolean; navigation: { registerSections: (sections$: ", "Observable", "<", "NavigationSection", @@ -3370,46 +3382,50 @@ "description": [], "signature": [ "(", - "TypeMapping", + "MappingTypeMapping", " & { all_field?: ", - "AllField", - " | undefined; date_detection?: boolean | undefined; dynamic?: boolean | \"strict\" | undefined; dynamic_date_formats?: string[] | undefined; dynamic_templates?: Record | Record[] | undefined; field_names_field?: ", - "FieldNamesField", + "MappingFieldNamesField", " | undefined; index_field?: ", - "IndexField", + "MappingIndexField", " | undefined; meta?: Record | undefined; numeric_detection?: boolean | undefined; properties?: Record | undefined; routing_field?: ", - "RoutingField", + "MappingRoutingField", " | undefined; size_field?: ", - "SizeField", + "MappingSizeField", " | undefined; source_field?: ", - "SourceField", - " | undefined; }) | (Record | undefined; }) | (Record & { all_field?: ", - "AllField", - " | undefined; date_detection?: boolean | undefined; dynamic?: boolean | \"strict\" | undefined; dynamic_date_formats?: string[] | undefined; dynamic_templates?: Record | Record[] | undefined; field_names_field?: ", - "FieldNamesField", + "MappingFieldNamesField", " | undefined; index_field?: ", - "IndexField", + "MappingIndexField", " | undefined; meta?: Record | undefined; numeric_detection?: boolean | undefined; properties?: Record | undefined; routing_field?: ", - "RoutingField", + "MappingRoutingField", " | undefined; size_field?: ", - "SizeField", + "MappingSizeField", " | undefined; source_field?: ", - "SourceField", - " | undefined; })" + "MappingSourceField", + " | undefined; runtime?: Record | undefined; })" ], "source": { "path": "x-pack/plugins/observability/server/utils/create_or_update_index.ts", @@ -3427,7 +3443,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -3474,12 +3490,12 @@ "description": [], "signature": [ "(kql: string | undefined) => ", - "QueryContainer", + "QueryDslQueryContainer", "[]" ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 35 + "lineNumber": 39 }, "deprecated": false, "children": [ @@ -3495,7 +3511,7 @@ ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 35 + "lineNumber": 39 }, "deprecated": false, "isRequired": false @@ -3513,7 +3529,7 @@ "description": [], "signature": [ "(start: number | undefined, end: number | undefined, field: string) => ", - "QueryContainer", + "QueryDslQueryContainer", "[]" ], "source": { @@ -3534,7 +3550,7 @@ ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 21 + "lineNumber": 22 }, "deprecated": false, "isRequired": false @@ -3551,7 +3567,7 @@ ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 21 + "lineNumber": 23 }, "deprecated": false, "isRequired": false @@ -3568,7 +3584,7 @@ ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 21 + "lineNumber": 24 }, "deprecated": false, "isRequired": true @@ -3841,46 +3857,50 @@ "description": [], "signature": [ "(", - "TypeMapping", + "MappingTypeMapping", " & { all_field?: ", - "AllField", - " | undefined; date_detection?: boolean | undefined; dynamic?: boolean | \"strict\" | undefined; dynamic_date_formats?: string[] | undefined; dynamic_templates?: Record | Record[] | undefined; field_names_field?: ", - "FieldNamesField", + "MappingFieldNamesField", " | undefined; index_field?: ", - "IndexField", + "MappingIndexField", " | undefined; meta?: Record | undefined; numeric_detection?: boolean | undefined; properties?: Record | undefined; routing_field?: ", - "RoutingField", + "MappingRoutingField", " | undefined; size_field?: ", - "SizeField", + "MappingSizeField", " | undefined; source_field?: ", - "SourceField", - " | undefined; }) | (Record | undefined; }) | (Record & { all_field?: ", - "AllField", - " | undefined; date_detection?: boolean | undefined; dynamic?: boolean | \"strict\" | undefined; dynamic_date_formats?: string[] | undefined; dynamic_templates?: Record | Record[] | undefined; field_names_field?: ", - "FieldNamesField", + "MappingFieldNamesField", " | undefined; index_field?: ", - "IndexField", + "MappingIndexField", " | undefined; meta?: Record | undefined; numeric_detection?: boolean | undefined; properties?: Record | undefined; routing_field?: ", - "RoutingField", + "MappingRoutingField", " | undefined; size_field?: ", - "SizeField", + "MappingSizeField", " | undefined; source_field?: ", - "SourceField", - " | undefined; })" + "MappingSourceField", + " | undefined; runtime?: Record | undefined; })" ], "source": { "path": "x-pack/plugins/observability/server/utils/create_or_update_index.ts", diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 353e65b0fa080..6787e3f0238c8 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import observabilityObj from './observability.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 194 | 0 | 194 | 10 | + ## Client ### Setup diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 8638e916107a4..a981f8f4b8c65 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import osqueryObj from './osquery.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 10 | 0 | 10 | 0 | + ## Client ### Setup diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 9416a74b8f42c..3df30c54e4390 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import presentationUtilObj from './presentation_util.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 125 | 1 | 121 | 3 | + ## Client ### Setup diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index a669a858ba6be..166aeee82153e 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import remoteClustersObj from './remote_clusters.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 4 | 0 | 4 | 0 | + ## Client ### Setup diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 445d38e4ec71b..f349b223ddf97 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import reportingObj from './reporting.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 133 | 1 | 132 | 19 | + ## Client ### Start diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index 3216c8cd96895..7a7765dfe1584 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import rollupObj from './rollup.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 20 | 0 | 20 | 0 | + ## Common ### Objects diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 964d29594d3c6..a0171607e8eeb 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import ruleRegistryObj from './rule_registry.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 43 | 0 | 43 | 6 | + ## Server ### Setup diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index a1d1b548350ee..2b9585f558ad5 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import runtimeFieldsObj from './runtime_fields.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 24 | 0 | 19 | 2 | + ## Client ### Setup diff --git a/api_docs/saved_objects.json b/api_docs/saved_objects.json index 6c2e7cc262cf3..6af18c749db67 100644 --- a/api_docs/saved_objects.json +++ b/api_docs/saved_objects.json @@ -1389,14 +1389,14 @@ { "plugin": "discover", "link": { - "path": "src/plugins/discover/public/application/components/top_nav/on_save_search.tsx", + "path": "src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.tsx", "lineNumber": 11 } }, { "plugin": "discover", "link": { - "path": "src/plugins/discover/public/application/components/top_nav/on_save_search.tsx", + "path": "src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.tsx", "lineNumber": 133 } }, diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 01d7f9fce991f..66579c3e3b0ca 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import savedObjectsObj from './saved_objects.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 211 | 3 | 197 | 5 | + ## Client ### Setup diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 916288f934b57..0ee0660609f14 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import savedObjectsManagementObj from './saved_objects_management.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 96 | 0 | 85 | 0 | + ## Client ### Setup diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index 52a8b19a8300b..fe1d90171a2c1 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import savedObjectsTaggingObj from './saved_objects_tagging.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 54 | 0 | 50 | 0 | + ## Client ### Start diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index 921ee5240bfe8..6fe8b4c6d4698 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 89 | 3 | 50 | 0 | + ## Client ### Setup diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index cdb70b22b0837..a098e5f296d69 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import screenshotModeObj from './screenshot_mode.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 21 | 0 | 16 | 1 | + ## Client ### Setup diff --git a/api_docs/security.json b/api_docs/security.json index fe1381030f97f..f7547221cec66 100644 --- a/api_docs/security.json +++ b/api_docs/security.json @@ -14,7 +14,13 @@ "\nRepresents the currently authenticated user." ], "signature": [ - "AuthenticatedUser", + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, " extends ", "User" ], @@ -96,6 +102,70 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "security", + "id": "def-public.AuthenticationServiceSetup", + "type": "Interface", + "tags": [], + "label": "AuthenticationServiceSetup", + "description": [], + "source": { + "path": "x-pack/plugins/security/public/authentication/authentication_service.ts", + "lineNumber": 33 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-public.AuthenticationServiceSetup.getCurrentUser", + "type": "Function", + "tags": [], + "label": "getCurrentUser", + "description": [ + "\nReturns currently authenticated user and throws if current user isn't authenticated." + ], + "signature": [ + "() => Promise<", + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + ">" + ], + "source": { + "path": "x-pack/plugins/security/public/authentication/authentication_service.ts", + "lineNumber": 37 + }, + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "security", + "id": "def-public.AuthenticationServiceSetup.areAPIKeysEnabled", + "type": "Function", + "tags": [], + "label": "areAPIKeysEnabled", + "description": [ + "\nDetermines if API Keys are currently enabled." + ], + "signature": [ + "() => Promise" + ], + "source": { + "path": "x-pack/plugins/security/public/authentication/authentication_service.ts", + "lineNumber": 42 + }, + "deprecated": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "security", "id": "def-public.SecurityLicense", @@ -408,6 +478,104 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "security", + "id": "def-public.SecurityNavControlServiceStart", + "type": "Interface", + "tags": [], + "label": "SecurityNavControlServiceStart", + "description": [], + "source": { + "path": "x-pack/plugins/security/public/nav_control/nav_control_service.tsx", + "lineNumber": 32 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-public.SecurityNavControlServiceStart.getUserMenuLinks$", + "type": "Function", + "tags": [], + "label": "getUserMenuLinks$", + "description": [ + "\nReturns an Observable of the array of user menu links (the links that show up under the user's Avatar in the UI) registered by other plugins" + ], + "signature": [ + "() => ", + "Observable", + "<", + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.UserMenuLink", + "text": "UserMenuLink" + }, + "[]>" + ], + "source": { + "path": "x-pack/plugins/security/public/nav_control/nav_control_service.tsx", + "lineNumber": 36 + }, + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "security", + "id": "def-public.SecurityNavControlServiceStart.addUserMenuLinks", + "type": "Function", + "tags": [], + "label": "addUserMenuLinks", + "description": [ + "\nRegisters the provided user menu links to be displayed in the user menu (the links that show up under the user's Avatar in the UI)." + ], + "signature": [ + "(newUserMenuLink: ", + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.UserMenuLink", + "text": "UserMenuLink" + }, + "[]) => void" + ], + "source": { + "path": "x-pack/plugins/security/public/nav_control/nav_control_service.tsx", + "lineNumber": 41 + }, + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "security", + "id": "def-public.newUserMenuLink", + "type": "Array", + "tags": [], + "label": "newUserMenuLink", + "description": [], + "signature": [ + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.UserMenuLink", + "text": "UserMenuLink" + }, + "[]" + ], + "source": { + "path": "x-pack/plugins/security/public/nav_control/nav_control_service.tsx", + "lineNumber": 41 + }, + "deprecated": false + } + ] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "security", "id": "def-public.UserMenuLink", @@ -500,55 +668,161 @@ } ], "enums": [], - "misc": [], + "misc": [ + { + "parentPluginId": "security", + "id": "def-public.AuthenticationServiceStart", + "type": "Type", + "tags": [], + "label": "AuthenticationServiceStart", + "description": [ + "\nStart has the same contract as Setup for now." + ], + "signature": [ + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.AuthenticationServiceSetup", + "text": "AuthenticationServiceSetup" + } + ], + "source": { + "path": "x-pack/plugins/security/public/authentication/authentication_service.ts", + "lineNumber": 48 + }, + "deprecated": false, + "initialIsOpen": false + } + ], "objects": [], "setup": { "parentPluginId": "security", "id": "def-public.SecurityPluginSetup", - "type": "Type", + "type": "Interface", "tags": [], "label": "SecurityPluginSetup", "description": [], - "signature": [ - "{ authc: ", - "AuthenticationServiceSetup", - "; sessionTimeout: ", - "SessionTimeout", - "; license: Readonly<{ isLicenseAvailable: () => boolean; isEnabled: () => boolean; getType: () => \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; getFeatures: () => ", - "SecurityLicenseFeatures", - "; features$: ", - "Observable", - "<", - "SecurityLicenseFeatures", - ">; }>; __legacyCompat: { logoutUrl: string; tenant: string; }; }" - ], "source": { "path": "x-pack/plugins/security/public/plugin.tsx", - "lineNumber": 164 + "lineNumber": 167 }, "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-public.SecurityPluginSetup.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [ + "\nExposes authentication information about the currently logged in user." + ], + "signature": [ + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.AuthenticationServiceSetup", + "text": "AuthenticationServiceSetup" + } + ], + "source": { + "path": "x-pack/plugins/security/public/plugin.tsx", + "lineNumber": 171 + }, + "deprecated": false + }, + { + "parentPluginId": "security", + "id": "def-public.SecurityPluginSetup.license", + "type": "Object", + "tags": [], + "label": "license", + "description": [ + "\nExposes information about the available security features under the current license." + ], + "signature": [ + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.SecurityLicense", + "text": "SecurityLicense" + } + ], + "source": { + "path": "x-pack/plugins/security/public/plugin.tsx", + "lineNumber": 175 + }, + "deprecated": false + } + ], "lifecycle": "setup", "initialIsOpen": true }, "start": { "parentPluginId": "security", "id": "def-public.SecurityPluginStart", - "type": "Type", + "type": "Interface", "tags": [], "label": "SecurityPluginStart", "description": [], - "signature": [ - "{ navControlService: ", - "SecurityNavControlServiceStart", - "; authc: ", - "AuthenticationServiceSetup", - "; }" - ], "source": { "path": "x-pack/plugins/security/public/plugin.tsx", - "lineNumber": 165 + "lineNumber": 178 }, "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-public.SecurityPluginStart.navControlService", + "type": "Object", + "tags": [], + "label": "navControlService", + "description": [ + "\nExposes the ability to add custom links to the dropdown menu in the top right, where the user's Avatar is." + ], + "signature": [ + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.SecurityNavControlServiceStart", + "text": "SecurityNavControlServiceStart" + } + ], + "source": { + "path": "x-pack/plugins/security/public/plugin.tsx", + "lineNumber": 182 + }, + "deprecated": false + }, + { + "parentPluginId": "security", + "id": "def-public.SecurityPluginStart.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [ + "\nExposes authentication information about the currently logged in user." + ], + "signature": [ + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.AuthenticationServiceSetup", + "text": "AuthenticationServiceSetup" + } + ], + "source": { + "path": "x-pack/plugins/security/public/plugin.tsx", + "lineNumber": 186 + }, + "deprecated": false + } + ], "lifecycle": "start", "initialIsOpen": true } @@ -681,6 +955,121 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "security", + "id": "def-server.AuditServiceSetup", + "type": "Interface", + "tags": [], + "label": "AuditServiceSetup", + "description": [], + "source": { + "path": "x-pack/plugins/security/server/audit/audit_service.ts", + "lineNumber": 40 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-server.AuditServiceSetup.asScoped", + "type": "Function", + "tags": [], + "label": "asScoped", + "description": [], + "signature": [ + "(request: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ") => ", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.AuditLogger", + "text": "AuditLogger" + } + ], + "source": { + "path": "x-pack/plugins/security/server/audit/audit_service.ts", + "lineNumber": 41 + }, + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "security", + "id": "def-server.request", + "type": "Object", + "tags": [], + "label": "request", + "description": [], + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "source": { + "path": "x-pack/plugins/security/server/audit/audit_service.ts", + "lineNumber": 41 + }, + "deprecated": false + } + ] + }, + { + "parentPluginId": "security", + "id": "def-server.AuditServiceSetup.getLogger", + "type": "Function", + "tags": [], + "label": "getLogger", + "description": [], + "signature": [ + "(id?: string | undefined) => ", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.LegacyAuditLogger", + "text": "LegacyAuditLogger" + } + ], + "source": { + "path": "x-pack/plugins/security/server/audit/audit_service.ts", + "lineNumber": 42 + }, + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "security", + "id": "def-server.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | undefined" + ], + "source": { + "path": "x-pack/plugins/security/server/audit/audit_service.ts", + "lineNumber": 42 + }, + "deprecated": false + } + ] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "security", "id": "def-server.AuthenticatedUser", @@ -691,7 +1080,13 @@ "\nRepresents the currently authenticated user." ], "signature": [ - "AuthenticatedUser", + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, " extends ", "User" ], @@ -775,26 +1170,194 @@ }, { "parentPluginId": "security", - "id": "def-server.CheckPrivilegesPayload", + "id": "def-server.AuthenticationServiceStart", "type": "Interface", "tags": [], - "label": "CheckPrivilegesPayload", - "description": [], + "label": "AuthenticationServiceStart", + "description": [ + "\nAuthentication services available on the security plugin's start contract." + ], "source": { - "path": "x-pack/plugins/security/server/authorization/types.ts", - "lineNumber": 70 + "path": "x-pack/plugins/security/server/authentication/authentication_service.ts", + "lineNumber": 72 }, "deprecated": false, "children": [ { "parentPluginId": "security", - "id": "def-server.CheckPrivilegesPayload.kibana", - "type": "CompoundType", + "id": "def-server.AuthenticationServiceStart.apiKeys", + "type": "Object", "tags": [], - "label": "kibana", + "label": "apiKeys", "description": [], "signature": [ - "string | string[] | undefined" + "{ create: (request: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ", params: ", + "CreateAPIKeyParams", + ") => Promise<", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.CreateAPIKeyResult", + "text": "CreateAPIKeyResult" + }, + " | null>; areAPIKeysEnabled: () => Promise; invalidate: (request: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ", params: ", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + }, + ") => Promise<", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.InvalidateAPIKeyResult", + "text": "InvalidateAPIKeyResult" + }, + " | null>; grantAsInternalUser: (request: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ", createParams: ", + "CreateAPIKeyParams", + ") => Promise<", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.GrantAPIKeyResult", + "text": "GrantAPIKeyResult" + }, + " | null>; invalidateAsInternalUser: (params: ", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + }, + ") => Promise<", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.InvalidateAPIKeyResult", + "text": "InvalidateAPIKeyResult" + }, + " | null>; }" + ], + "source": { + "path": "x-pack/plugins/security/server/authentication/authentication_service.ts", + "lineNumber": 73 + }, + "deprecated": false + }, + { + "parentPluginId": "security", + "id": "def-server.AuthenticationServiceStart.getCurrentUser", + "type": "Function", + "tags": [], + "label": "getCurrentUser", + "description": [], + "signature": [ + "(request: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ") => ", + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " | null" + ], + "source": { + "path": "x-pack/plugins/security/server/authentication/authentication_service.ts", + "lineNumber": 81 + }, + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "security", + "id": "def-server.request", + "type": "Object", + "tags": [], + "label": "request", + "description": [], + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "source": { + "path": "x-pack/plugins/security/server/authentication/authentication_service.ts", + "lineNumber": 81 + }, + "deprecated": false + } + ] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "security", + "id": "def-server.CheckPrivilegesPayload", + "type": "Interface", + "tags": [], + "label": "CheckPrivilegesPayload", + "description": [], + "source": { + "path": "x-pack/plugins/security/server/authorization/types.ts", + "lineNumber": 70 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-server.CheckPrivilegesPayload.kibana", + "type": "CompoundType", + "tags": [], + "label": "kibana", + "description": [], + "signature": [ + "string | string[] | undefined" ], "source": { "path": "x-pack/plugins/security/server/authorization/types.ts", @@ -1234,249 +1797,478 @@ } ], "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "security", + "id": "def-server.AuthorizationServiceSetup", + "type": "Type", + "tags": [], + "label": "AuthorizationServiceSetup", + "description": [], + "source": { + "path": "x-pack/plugins/security/server/index.ts", + "lineNumber": 31 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "security", + "id": "def-server.ROUTE_TAG_CAN_REDIRECT", + "type": "string", + "tags": [], + "label": "ROUTE_TAG_CAN_REDIRECT", + "description": [ + "\nIf the route is marked with this tag Security can safely assume that the calling party that sends\nrequest to this route can handle redirect responses. It's particularly important if we want the\nspecific route to be able to initiate or participate in the authentication handshake that may\ninvolve redirects and will eventually redirect authenticated user to this route." + ], + "signature": [ + "\"security:canRedirect\"" + ], + "source": { + "path": "x-pack/plugins/security/server/routes/tags.ts", + "lineNumber": 21 + }, + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [], + "setup": { + "parentPluginId": "security", + "id": "def-server.SecurityPluginSetup", + "type": "Interface", + "tags": [], + "label": "SecurityPluginSetup", + "description": [ + "\nDescribes public Security plugin contract returned at the `setup` stage." + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 72 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-server.SecurityPluginSetup.authc", + "type": "Object", + "tags": [ + "deprecated" + ], + "label": "authc", + "description": [], + "signature": [ + "{ getCurrentUser: (request: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ") => ", + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " | null; }" + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 76 + }, + "deprecated": true, + "references": [ + { + "plugin": "reporting", + "link": { + "path": "x-pack/plugins/reporting/server/routes/lib/get_user.ts", + "lineNumber": 13 + } + }, + { + "plugin": "encryptedSavedObjects", + "link": { + "path": "x-pack/plugins/encrypted_saved_objects/server/crypto/encryption_key_rotation_service.ts", + "lineNumber": 107 + } + }, + { + "plugin": "encryptedSavedObjects", + "link": { + "path": "x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts", + "lineNumber": 67 + } + }, + { + "plugin": "actions", + "link": { + "path": "x-pack/plugins/actions/server/plugin.ts", + "lineNumber": 444 + } + }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/server/routes/annotations.ts", + "lineNumber": 105 + } + }, + { + "plugin": "dashboardMode", + "link": { + "path": "x-pack/plugins/dashboard_mode/server/interceptors/dashboard_mode_request_interceptor.ts", + "lineNumber": 33 + } + }, + { + "plugin": "dataEnhanced", + "link": { + "path": "x-pack/plugins/data_enhanced/server/search/session/session_service.ts", + "lineNumber": 448 + } + }, + { + "plugin": "logstash", + "link": { + "path": "x-pack/plugins/logstash/server/routes/pipeline/save.ts", + "lineNumber": 41 + } + }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts", + "lineNumber": 48 + } + }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts", + "lineNumber": 45 + } + }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts", + "lineNumber": 45 + } + }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts", + "lineNumber": 28 + } + } + ] + }, + { + "parentPluginId": "security", + "id": "def-server.SecurityPluginSetup.authz", + "type": "Object", + "tags": [ + "deprecated" + ], + "label": "authz", + "description": [], + "signature": [ + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.AuthorizationServiceSetup", + "text": "AuthorizationServiceSetup" + } + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 80 + }, + "deprecated": true, + "references": [ + { + "plugin": "actions", + "link": { + "path": "x-pack/plugins/actions/server/plugin.ts", + "lineNumber": 443 + } + }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/server/saved_objects/initialization/initialization.ts", + "lineNumber": 54 + } + }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/server/plugin.ts", + "lineNumber": 153 + } + }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/server/plugin.ts", + "lineNumber": 203 + } + }, + { + "plugin": "enterpriseSearch", + "link": { + "path": "x-pack/plugins/enterprise_search/server/lib/check_access.ts", + "lineNumber": 46 + } + }, + { + "plugin": "enterpriseSearch", + "link": { + "path": "x-pack/plugins/enterprise_search/server/lib/check_access.ts", + "lineNumber": 86 + } + }, + { + "plugin": "enterpriseSearch", + "link": { + "path": "x-pack/plugins/enterprise_search/server/lib/check_access.ts", + "lineNumber": 88 + } + }, + { + "plugin": "savedObjectsTagging", + "link": { + "path": "x-pack/plugins/saved_objects_tagging/server/request_handler_context.ts", + "lineNumber": 37 + } + } + ] + }, + { + "parentPluginId": "security", + "id": "def-server.SecurityPluginSetup.license", + "type": "Object", + "tags": [], + "label": "license", + "description": [ + "\nExposes information about the available security features under the current license." + ], + "signature": [ + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.SecurityLicense", + "text": "SecurityLicense" + } + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 84 + }, + "deprecated": false + }, + { + "parentPluginId": "security", + "id": "def-server.SecurityPluginSetup.audit", + "type": "Object", + "tags": [], + "label": "audit", + "description": [ + "\nExposes services for audit logging." + ], + "signature": [ + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.AuditServiceSetup", + "text": "AuditServiceSetup" + } + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 88 + }, + "deprecated": false + } + ], + "lifecycle": "setup", + "initialIsOpen": true + }, + "start": { + "parentPluginId": "security", + "id": "def-server.SecurityPluginStart", + "type": "Interface", + "tags": [], + "label": "SecurityPluginStart", + "description": [ + "\nDescribes public Security plugin contract returned at the `start` stage." + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 94 }, + "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-server.SecurityPluginStart.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [ + "\nAuthentication services to confirm the user is who they say they are." + ], + "signature": [ + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.AuthenticationServiceStart", + "text": "AuthenticationServiceStart" + } + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 98 + }, + "deprecated": false + }, + { + "parentPluginId": "security", + "id": "def-server.SecurityPluginStart.authz", + "type": "Object", + "tags": [], + "label": "authz", + "description": [ + "\nAuthorization services to manage and access the permissions a particular user has." + ], + "signature": [ + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.AuthorizationServiceSetup", + "text": "AuthorizationServiceSetup" + } + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 102 + }, + "deprecated": false + } + ], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ { "parentPluginId": "security", - "id": "def-server.SecurityPluginSetup", + "id": "def-common.AuthenticatedUser", "type": "Interface", "tags": [], - "label": "SecurityPluginSetup", + "label": "AuthenticatedUser", "description": [ - "\nDescribes public Security plugin contract returned at the `setup` stage." + "\nRepresents the currently authenticated user." + ], + "signature": [ + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " extends ", + "User" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 69 + "path": "x-pack/plugins/security/common/model/authenticated_user.ts", + "lineNumber": 21 }, "deprecated": false, "children": [ { "parentPluginId": "security", - "id": "def-server.SecurityPluginSetup.authc", + "id": "def-common.AuthenticatedUser.authentication_realm", "type": "Object", - "tags": [ - "deprecated" + "tags": [], + "label": "authentication_realm", + "description": [ + "\nThe name and type of the Realm that has authenticated the user." ], - "label": "authc", - "description": [], "signature": [ - "{ getCurrentUser: (request: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - ") => ", - "AuthenticatedUser", - " | null; }" + "UserRealm" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 73 + "path": "x-pack/plugins/security/common/model/authenticated_user.ts", + "lineNumber": 25 }, - "deprecated": true, - "references": [ - { - "plugin": "reporting", - "link": { - "path": "x-pack/plugins/reporting/server/routes/lib/get_user.ts", - "lineNumber": 13 - } - }, - { - "plugin": "encryptedSavedObjects", - "link": { - "path": "x-pack/plugins/encrypted_saved_objects/server/crypto/encryption_key_rotation_service.ts", - "lineNumber": 107 - } - }, - { - "plugin": "encryptedSavedObjects", - "link": { - "path": "x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts", - "lineNumber": 67 - } - }, - { - "plugin": "actions", - "link": { - "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 444 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/server/routes/annotations.ts", - "lineNumber": 105 - } - }, - { - "plugin": "dashboardMode", - "link": { - "path": "x-pack/plugins/dashboard_mode/server/interceptors/dashboard_mode_request_interceptor.ts", - "lineNumber": 33 - } - }, - { - "plugin": "dataEnhanced", - "link": { - "path": "x-pack/plugins/data_enhanced/server/search/session/session_service.ts", - "lineNumber": 448 - } - }, - { - "plugin": "logstash", - "link": { - "path": "x-pack/plugins/logstash/server/routes/pipeline/save.ts", - "lineNumber": 41 - } - }, - { - "plugin": "securitySolution", - "link": { - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts", - "lineNumber": 48 - } - }, - { - "plugin": "securitySolution", - "link": { - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts", - "lineNumber": 45 - } - }, - { - "plugin": "securitySolution", - "link": { - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts", - "lineNumber": 45 - } - }, - { - "plugin": "securitySolution", - "link": { - "path": "x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts", - "lineNumber": 28 - } - } - ] + "deprecated": false }, { "parentPluginId": "security", - "id": "def-server.SecurityPluginSetup.authz", + "id": "def-common.AuthenticatedUser.lookup_realm", "type": "Object", - "tags": [ - "deprecated" + "tags": [], + "label": "lookup_realm", + "description": [ + "\nThe name and type of the Realm where the user information were retrieved from." ], - "label": "authz", - "description": [], "signature": [ - "{ mode: ", - "AuthorizationMode", - "; actions: ", - "Actions", - "; checkPrivilegesDynamicallyWithRequest: ", - "CheckPrivilegesDynamicallyWithRequest", - "; checkPrivilegesWithRequest: ", - "CheckPrivilegesWithRequest", - "; }" + "UserRealm" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 77 + "path": "x-pack/plugins/security/common/model/authenticated_user.ts", + "lineNumber": 30 }, - "deprecated": true, - "references": [ - { - "plugin": "actions", - "link": { - "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 443 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/server/saved_objects/initialization/initialization.ts", - "lineNumber": 54 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/server/plugin.ts", - "lineNumber": 153 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/server/plugin.ts", - "lineNumber": 203 - } - }, - { - "plugin": "enterpriseSearch", - "link": { - "path": "x-pack/plugins/enterprise_search/server/lib/check_access.ts", - "lineNumber": 46 - } - }, - { - "plugin": "enterpriseSearch", - "link": { - "path": "x-pack/plugins/enterprise_search/server/lib/check_access.ts", - "lineNumber": 86 - } - }, - { - "plugin": "enterpriseSearch", - "link": { - "path": "x-pack/plugins/enterprise_search/server/lib/check_access.ts", - "lineNumber": 88 - } - }, - { - "plugin": "savedObjectsTagging", - "link": { - "path": "x-pack/plugins/saved_objects_tagging/server/request_handler_context.ts", - "lineNumber": 37 - } - } - ] + "deprecated": false }, { "parentPluginId": "security", - "id": "def-server.SecurityPluginSetup.license", + "id": "def-common.AuthenticatedUser.authentication_provider", "type": "Object", "tags": [], - "label": "license", - "description": [], + "label": "authentication_provider", + "description": [ + "\nThe authentication provider that used to authenticate user." + ], "signature": [ - "SecurityLicense" + "AuthenticationProvider" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 81 + "path": "x-pack/plugins/security/common/model/authenticated_user.ts", + "lineNumber": 35 }, "deprecated": false }, { "parentPluginId": "security", - "id": "def-server.SecurityPluginSetup.audit", - "type": "Object", + "id": "def-common.AuthenticatedUser.authentication_type", + "type": "string", "tags": [], - "label": "audit", - "description": [], - "signature": [ - "AuditServiceSetup" + "label": "authentication_type", + "description": [ + "\nThe AuthenticationType used by ES to authenticate the user.\n" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 82 + "path": "x-pack/plugins/security/common/model/authenticated_user.ts", + "lineNumber": 42 }, "deprecated": false } @@ -1485,68 +2277,106 @@ }, { "parentPluginId": "security", - "id": "def-server.SecurityPluginStart", + "id": "def-common.SecurityLicense", "type": "Interface", "tags": [], - "label": "SecurityPluginStart", - "description": [ - "\nDescribes public Security plugin contract returned at the `start` stage." - ], + "label": "SecurityLicense", + "description": [], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 88 + "path": "x-pack/plugins/security/common/licensing/license_service.ts", + "lineNumber": 14 }, "deprecated": false, "children": [ { "parentPluginId": "security", - "id": "def-server.SecurityPluginStart.authc", - "type": "Object", + "id": "def-common.SecurityLicense.isLicenseAvailable", + "type": "Function", "tags": [], - "label": "authc", + "label": "isLicenseAvailable", "description": [], "signature": [ - "{ getCurrentUser: (request: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - ") => ", - "AuthenticatedUser", - " | null; apiKeys: Pick<", - "APIKeys", - ", \"create\" | \"areAPIKeysEnabled\" | \"invalidate\" | \"grantAsInternalUser\" | \"invalidateAsInternalUser\">; }" + "() => boolean" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 89 + "path": "x-pack/plugins/security/common/licensing/license_service.ts", + "lineNumber": 15 }, - "deprecated": false + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "security", + "id": "def-common.SecurityLicense.isEnabled", + "type": "Function", + "tags": [], + "label": "isEnabled", + "description": [], + "signature": [ + "() => boolean" + ], + "source": { + "path": "x-pack/plugins/security/common/licensing/license_service.ts", + "lineNumber": 16 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "security", + "id": "def-common.SecurityLicense.getType", + "type": "Function", + "tags": [], + "label": "getType", + "description": [], + "signature": [ + "() => \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined" + ], + "source": { + "path": "x-pack/plugins/security/common/licensing/license_service.ts", + "lineNumber": 17 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "security", + "id": "def-common.SecurityLicense.getFeatures", + "type": "Function", + "tags": [], + "label": "getFeatures", + "description": [], + "signature": [ + "() => ", + "SecurityLicenseFeatures" + ], + "source": { + "path": "x-pack/plugins/security/common/licensing/license_service.ts", + "lineNumber": 18 + }, + "deprecated": false, + "children": [], + "returnComment": [] }, { "parentPluginId": "security", - "id": "def-server.SecurityPluginStart.authz", + "id": "def-common.SecurityLicense.features$", "type": "Object", "tags": [], - "label": "authz", + "label": "features$", "description": [], "signature": [ - "{ mode: ", - "AuthorizationMode", - "; actions: ", - "Actions", - "; checkPrivilegesDynamicallyWithRequest: ", - "CheckPrivilegesDynamicallyWithRequest", - "; checkPrivilegesWithRequest: ", - "CheckPrivilegesWithRequest", - "; }" + "Observable", + "<", + "SecurityLicenseFeatures", + ">" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 90 + "path": "x-pack/plugins/security/common/licensing/license_service.ts", + "lineNumber": 19 }, "deprecated": false } @@ -1555,59 +2385,6 @@ } ], "enums": [], - "misc": [ - { - "parentPluginId": "security", - "id": "def-server.AuthorizationServiceSetup", - "type": "Type", - "tags": [], - "label": "AuthorizationServiceSetup", - "description": [], - "signature": [ - "{ mode: ", - "AuthorizationMode", - "; actions: ", - "Actions", - "; checkPrivilegesDynamicallyWithRequest: ", - "CheckPrivilegesDynamicallyWithRequest", - "; checkPrivilegesWithRequest: ", - "CheckPrivilegesWithRequest", - "; }" - ], - "source": { - "path": "x-pack/plugins/security/server/index.ts", - "lineNumber": 30 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "security", - "id": "def-server.ROUTE_TAG_CAN_REDIRECT", - "type": "string", - "tags": [], - "label": "ROUTE_TAG_CAN_REDIRECT", - "description": [ - "\nIf the route is marked with this tag Security can safely assume that the calling party that sends\nrequest to this route can handle redirect responses. It's particularly important if we want the\nspecific route to be able to initiate or participate in the authentication handshake that may\ninvolve redirects and will eventually redirect authenticated user to this route." - ], - "signature": [ - "\"security:canRedirect\"" - ], - "source": { - "path": "x-pack/plugins/security/server/routes/tags.ts", - "lineNumber": 21 - }, - "deprecated": false, - "initialIsOpen": false - } - ], - "objects": [] - }, - "common": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], "misc": [], "objects": [] } diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 4d2afe42cb151..e31fa44014c94 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import securityObj from './security.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 95 | 0 | 45 | 11 | + ## Client ### Setup @@ -22,11 +32,25 @@ import securityObj from './security.json'; ### Interfaces +### Consts, variables and types + + ## Server +### Setup + + +### Start + + ### Interfaces ### Consts, variables and types +## Common + +### Interfaces + + diff --git a/api_docs/security_oss.mdx b/api_docs/security_oss.mdx index f8c49a56551cd..ada97232ffe84 100644 --- a/api_docs/security_oss.mdx +++ b/api_docs/security_oss.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import securityOssObj from './security_oss.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 12 | 0 | 9 | 3 | + ## Client ### Setup diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index b38a877f7edd5..0667a98e3762b 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import securitySolutionObj from './security_solution.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 32 | 0 | 32 | 6 | + ## Client ### Setup diff --git a/api_docs/share.mdx b/api_docs/share.mdx index e2a9da26c0fc4..58886148bd4a7 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import shareObj from './share.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 67 | 1 | 61 | 4 | + ## Client ### Setup diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index a0fc3231baf4d..ab2f917598737 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import snapshotRestoreObj from './snapshot_restore.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 22 | 1 | 22 | 1 | + ## Common ### Objects diff --git a/api_docs/spaces.json b/api_docs/spaces.json index d24b3884ffac6..002145f3b48db 100644 --- a/api_docs/spaces.json +++ b/api_docs/spaces.json @@ -1203,7 +1203,7 @@ "plugin": "security", "link": { "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 263 + "lineNumber": 267 } }, { @@ -2002,28 +2002,28 @@ "plugin": "security", "link": { "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 57 + "lineNumber": 60 } }, { "plugin": "security", "link": { "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 263 + "lineNumber": 267 } }, { "plugin": "security", "link": { "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 281 + "lineNumber": 285 } }, { "plugin": "security", "link": { "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 297 + "lineNumber": 301 } }, { diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index ccaffdd3748b5..197fe460b47d3 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import spacesObj from './spaces.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 96 | 0 | 0 | 0 | + ## Client ### Setup diff --git a/api_docs/spaces_oss.mdx b/api_docs/spaces_oss.mdx index e889a319f5f23..b36b0b4c19aff 100644 --- a/api_docs/spaces_oss.mdx +++ b/api_docs/spaces_oss.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import spacesOssObj from './spaces_oss.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 71 | 0 | 5 | 0 | + ## Client ### Setup diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index 9fbed513491dd..eefe0a2dc76fe 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import stackAlertsObj from './stack_alerts.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 4 | 0 | 4 | 0 | + ## Server ### Consts, variables and types diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index b143323bf1c7a..5c6d5b3d08ba4 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import taskManagerObj from './task_manager.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 44 | 0 | 18 | 7 | + ## Server ### Setup diff --git a/api_docs/telemetry.json b/api_docs/telemetry.json index 6b64191c95400..30c80119d62e2 100644 --- a/api_docs/telemetry.json +++ b/api_docs/telemetry.json @@ -661,7 +661,7 @@ "text": "NodeUsage" }, " extends ", - "NodeUsageInformation" + "NodesUsageNodeUsage" ], "source": { "path": "src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.ts", diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 995c9b22e268a..f8d632c0d9708 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import telemetryObj from './telemetry.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 42 | 0 | 0 | 0 | + ## Client ### Setup diff --git a/api_docs/telemetry_collection_manager.json b/api_docs/telemetry_collection_manager.json index d30ff36b56093..681e10bd3ffaa 100644 --- a/api_docs/telemetry_collection_manager.json +++ b/api_docs/telemetry_collection_manager.json @@ -86,7 +86,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index d112897e1c489..749ec3ba2bd71 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import telemetryCollectionManagerObj from './telemetry_collection_manager.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 29 | 0 | 29 | 4 | + ## Server ### Setup diff --git a/api_docs/telemetry_collection_xpack.json b/api_docs/telemetry_collection_xpack.json index a97647773c7f1..1dd45d1d619f1 100644 --- a/api_docs/telemetry_collection_xpack.json +++ b/api_docs/telemetry_collection_xpack.json @@ -22,7 +22,7 @@ "label": "ESLicense", "description": [], "signature": [ - "LicenseInformation" + "LicenseGetLicenseInformation" ], "source": { "path": "x-pack/plugins/telemetry_collection_xpack/server/telemetry_collection/get_license.ts", diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index 058a9d3fcb460..53914260b037f 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import telemetryCollectionXpackObj from './telemetry_collection_xpack.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 1 | 0 | 1 | 0 | + ## Server ### Consts, variables and types diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index 78193e3485c59..71831a66284fc 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import telemetryManagementSectionObj from './telemetry_management_section.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 14 | 0 | 13 | 0 | + ## Client ### Setup diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index cb16e39419a43..e9d4a75e39991 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import timelinesObj from './timelines.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 6 | 0 | 6 | 1 | + ## Client ### Setup diff --git a/api_docs/triggers_actions_ui.json b/api_docs/triggers_actions_ui.json index b21514a8b450e..bccb50d96759a 100644 --- a/api_docs/triggers_actions_ui.json +++ b/api_docs/triggers_actions_ui.json @@ -422,60 +422,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.getActionType", - "type": "Function", - "tags": [], - "label": "getActionType", - "description": [], - "signature": [ - "() => ", - "ActionTypeModel", - "<", - "JiraConfig", - ", ", - "JiraSecrets", - ", ", - "JiraActionParams", - ">" - ], - "source": { - "path": "x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/jira.tsx", - "lineNumber": 77 - }, - "deprecated": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.getActionType", - "type": "Function", - "tags": [], - "label": "getActionType", - "description": [], - "signature": [ - "() => ", - "ActionTypeModel", - "<", - "ResilientConfig", - ", ", - "ResilientSecrets", - ", ", - "ResilientActionParams", - ">" - ], - "source": { - "path": "x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/resilient/resilient.tsx", - "lineNumber": 85 - }, - "deprecated": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.getFields", @@ -656,60 +602,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.getServiceNowITSMActionType", - "type": "Function", - "tags": [], - "label": "getServiceNowITSMActionType", - "description": [], - "signature": [ - "() => ", - "ActionTypeModel", - "<", - "ServiceNowConfig", - ", ", - "ServiceNowSecrets", - ", ", - "ServiceNowITSMActionParams", - ">" - ], - "source": { - "path": "x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow.tsx", - "lineNumber": 92 - }, - "deprecated": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.getServiceNowSIRActionType", - "type": "Function", - "tags": [], - "label": "getServiceNowSIRActionType", - "description": [], - "signature": [ - "() => ", - "ActionTypeModel", - "<", - "ServiceNowConfig", - ", ", - "ServiceNowSecrets", - ", ", - "ServiceNowSIRActionParams", - ">" - ], - "source": { - "path": "x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow.tsx", - "lineNumber": 128 - }, - "deprecated": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.getTimeFieldOptions", diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 50a7a11abdf16..91327ad1f990f 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import triggersActionsUiObj from './triggers_actions_ui.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 237 | 1 | 228 | 19 | + ## Client ### Setup diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 9833f2a19e63a..9045dc736bb2f 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import uiActionsObj from './ui_actions.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 127 | 0 | 88 | 11 | + ## Client ### Setup diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 285232bf3fe0c..3e9c924753229 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import uiActionsEnhancedObj from './ui_actions_enhanced.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 205 | 2 | 147 | 10 | + ## Client ### Setup diff --git a/api_docs/uptime.mdx b/api_docs/uptime.mdx index 8d63edcd18eca..ceb7d854a8fec 100644 --- a/api_docs/uptime.mdx +++ b/api_docs/uptime.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import uptimeObj from './uptime.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 6 | 0 | 6 | 3 | + ## Server ### Functions diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index a80a1e0e53f27..b457ca9eb331f 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import urlForwardingObj from './url_forwarding.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 15 | 0 | 15 | 0 | + ## Client ### Classes diff --git a/api_docs/usage_collection.json b/api_docs/usage_collection.json index 219901ba96b6d..e0912fe6bed40 100644 --- a/api_docs/usage_collection.json +++ b/api_docs/usage_collection.json @@ -777,7 +777,7 @@ "\nPossible type values in the schema" ], "signature": [ - "\"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"short\" | \"integer\" | \"byte\" | \"float\"" + "\"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"short\" | \"float\" | \"integer\" | \"byte\"" ], "source": { "path": "src/plugins/usage_collection/server/collector/types.ts", diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 62db0389c2d5c..197cfc72f17af 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import usageCollectionObj from './usage_collection.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 57 | 0 | 16 | 2 | + ## Client ### Setup diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 041d01196bad9..a904e00ef0efc 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import visTypeTimeseriesObj from './vis_type_timeseries.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 10 | 1 | 10 | 3 | + ## Server ### Setup diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index d3834b2d5f83f..c6d9bdc741d4a 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -11,6 +11,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import visualizationsObj from './visualizations.json'; + + + + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 246 | 13 | 228 | 12 | + ## Client ### Setup diff --git a/dev_docs/tutorials/building_a_plugin.mdx b/dev_docs/tutorials/building_a_plugin.mdx index cee5a9a399de5..e751ce7d01b16 100644 --- a/dev_docs/tutorials/building_a_plugin.mdx +++ b/dev_docs/tutorials/building_a_plugin.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/tutorials/build-a-plugin title: Kibana plugin tutorial summary: Anatomy of a Kibana plugin and how to build one date: 2021-02-05 -tags: ['kibana','onboarding', 'dev', 'tutorials'] +tags: ['kibana', 'onboarding', 'dev', 'tutorials'] --- Prereading material: @@ -14,7 +14,7 @@ Prereading material: ## The anatomy of a plugin Plugins are defined as classes and present themselves to Kibana through a simple wrapper function. A plugin can have browser-side code, server-side code, -or both. There is no architectural difference between a plugin in the browser and a plugin on the server. In both places, you describe your plugin similarly, +or both. There is no architectural difference between a plugin in the browser and a plugin on the server. In both places, you describe your plugin similarly, and you interact with Core and other plugins in the same way. The basic file structure of a Kibana plugin named demo that has both client-side and server-side code would be: @@ -33,7 +33,7 @@ plugins/ index.ts [6] ``` -### [1] kibana.json +### [1] kibana.json `kibana.json` is a static manifest file that is used to identify the plugin and to specify if this plugin has server-side code, browser-side code, or both: @@ -42,14 +42,33 @@ plugins/ "id": "demo", "version": "kibana", "server": true, - "ui": true + "ui": true, + "owner": { [1] + "name": "App Services", + "githubTeam": "kibana-app-services" + }, + "description": "This plugin extends Kibana by doing xyz, and allows other plugins to extend Kibana by offering abc functionality. It also exposes some helper utilities that do efg", [2] + "requiredPlugins": ["data"], [3] + "optionalPlugins": ["alerting"] [4] + "requiredBundles": ["anotherPlugin"] [5] } ``` +[1], [2]: Every internal plugin should fill in the owner and description properties. + +[3], [4]: Any plugin that you have a dependency on should be listed in `requiredPlugins` or `optionalPlugins`. Doing this will ensure that you have access to that plugin's start and setup contract inside your own plugin's start and setup lifecycle methods. If a plugin you optionally depend on is not installed or disabled, it will be undefined if you try to access it. If a plugin you require is not installed or disabled, kibana will fail to build. + +[5]: Don't worry too much about getting 5 right. The build optimizer will complain if any of these values are incorrect. + + + + You don't need to declare a dependency on a plugin if you only wish to access its types. + + ### [2] public/index.ts -`public/index.ts` is the entry point into the client-side code of this plugin. It must export a function named plugin, which will receive a standard set of - core capabilities as an argument. It should return an instance of its plugin class for Kibana to load. +`public/index.ts` is the entry point into the client-side code of this plugin. Everything exported from this file will be a part of the plugins . If the plugin only exists to export static utilities, consider using a package. Otherwise, this file must export a function named plugin, which will receive a standard set of +core capabilities as an argument. It should return an instance of its plugin class for Kibana to load. ``` import type { PluginInitializerContext } from 'kibana/server'; @@ -60,13 +79,32 @@ export function plugin(initializerContext: PluginInitializerContext) { } ``` + + +1. When possible, use + +``` +export type { AType } from '...'` +``` + +instead of + +``` +export { AType } from '...'`. +``` + +Using the non-`type` variation will increase the bundle size unnecessarily and may unwillingly provide access to the implementation of `AType` class. + +2. Don't use `export *` in these top level index.ts files + + + ### [3] public/plugin.ts `public/plugin.ts` is the client-side plugin definition itself. Technically speaking, it does not need to be a class or even a separate file from the entry - point, but all plugins at Elastic should be consistent in this way. +point, but all plugins at Elastic should be consistent in this way. - - ```ts +```ts import type { Plugin, PluginInitializerContext, CoreSetup, CoreStart } from 'kibana/server'; export class DemoPlugin implements Plugin { @@ -84,10 +122,9 @@ export class DemoPlugin implements Plugin { // called when plugin is torn down during Kibana's shutdown sequence } } - ``` - +``` -### [4] server/index.ts +### [4] server/index.ts `server/index.ts` is the entry-point into the server-side code of this plugin. It is identical in almost every way to the client-side entry-point: @@ -115,7 +152,7 @@ export class DemoPlugin implements Plugin { } ``` -Kibana does not impose any technical restrictions on how the the internals of a plugin are architected, though there are certain +Kibana does not impose any technical restrictions on how the the internals of a plugin are architected, though there are certain considerations related to how plugins integrate with core APIs and APIs exposed by other plugins that may greatly impact how they are built. ### [6] common/index.ts @@ -124,8 +161,8 @@ considerations related to how plugins integrate with core APIs and APIs exposed ## How plugin's interact with each other, and Core -The lifecycle-specific contracts exposed by core services are always passed as the first argument to the equivalent lifecycle function in a plugin. -For example, the core http service exposes a function createRouter to all plugin setup functions. To use this function to register an HTTP route handler, +The lifecycle-specific contracts exposed by core services are always passed as the first argument to the equivalent lifecycle function in a plugin. +For example, the core http service exposes a function createRouter to all plugin setup functions. To use this function to register an HTTP route handler, a plugin just accesses it off of the first argument: ```ts @@ -135,14 +172,16 @@ export class DemoPlugin { public setup(core: CoreSetup) { const router = core.http.createRouter(); // handler is called when '/path' resource is requested with `GET` method - router.get({ path: '/path', validate: false }, (context, req, res) => res.ok({ content: 'ok' })); + router.get({ path: '/path', validate: false }, (context, req, res) => + res.ok({ content: 'ok' }) + ); } } ``` Unlike core, capabilities exposed by plugins are not automatically injected into all plugins. Instead, if a plugin wishes to use the public interface provided by another plugin, it must first declare that plugin as a - dependency in it’s kibana.json manifest file. +dependency in it’s kibana.json manifest file. ** foobar plugin.ts: ** @@ -174,8 +213,8 @@ export class MyPlugin implements Plugin { } } ``` -[1] We highly encourage plugin authors to explicitly declare public interfaces for their plugins. +[1] We highly encourage plugin authors to explicitly declare public interfaces for their plugins. ** demo kibana.json** @@ -194,7 +233,7 @@ With that specified in the plugin manifest, the appropriate interfaces are then import type { CoreSetup, CoreStart } from 'kibana/server'; import type { FoobarPluginSetup, FoobarPluginStart } from '../../foobar/server'; -interface DemoSetupPlugins { [1] +interface DemoSetupPlugins { [1] foobar: FoobarPluginSetup; } @@ -218,7 +257,7 @@ export class DemoPlugin { public stop() {} } ``` - + [1] The interface for plugin’s dependencies must be manually composed. You can do this by importing the appropriate type from the plugin and constructing an interface where the property name is the plugin’s ID. [2] These manually constructed types should then be used to specify the type of the second argument to the plugin. diff --git a/dev_docs/tutorials/expressions.mdx b/dev_docs/tutorials/expressions.mdx index 288fb9afdd722..4688da98b7b01 100644 --- a/dev_docs/tutorials/expressions.mdx +++ b/dev_docs/tutorials/expressions.mdx @@ -10,10 +10,12 @@ tags: ['kibana', 'onboarding', 'dev', 'architecture'] ## Expressions service Expression service exposes a registry of reusable functions primary used for fetching and transposing data and a registry of renderer functions that can render data into a DOM element. -Adding functions is easy and so is reusing them. An expression is a chain of functions with provided arguments, which given a single input translates to a single output. +Adding functions is easy and so is reusing them. + +An expression is a chain of functions with provided arguments, which given a single input translates to a single output. Each expression is representable by a human friendly string which a user can type. -### creating expressions +### Creating expressions Here is a very simple expression string: @@ -23,7 +25,7 @@ essql 'select column1, column2 from myindex' | mapColumn name=column3 fn='{ colu It consists of 3 functions: - - essql which runs given sql query against elasticsearch and returns the results + - `essql` which runs given sql query against elasticsearch and returns the results - `mapColumn`, which computes a new column from existing ones; - `table`, which prepares the data for rendering in a tabular format. @@ -41,7 +43,7 @@ const expression = buildExpression([ Note: Consumers need to be aware which plugin registers specific functions with expressions function registry and import correct type definitions from there. - + The `expressions` service is available on both server and client, with similar APIs. @@ -54,7 +56,7 @@ const executionContract = expressions.execute(expression, input); const result = await executionContract.getData(); ``` - + Check the full spec of execute function [here](https://github.com/elastic/kibana/blob/master/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.execution.md) @@ -68,7 +70,7 @@ This is the easiest way to get expressions rendered inside your application. ``` - + Check the full spec of ReactExpressionRenderer component props [here](https://github.com/elastic/kibana/blob/master/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.reactexpressionrendererprops.md) @@ -80,7 +82,7 @@ If you are not using React, you can use the loader expression service provides t const handler = loader(domElement, expression, params); ``` - + Check the full spec of expression loader params [here](https://github.com/elastic/kibana/blob/master/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.iexpressionloaderparams.md) @@ -103,7 +105,7 @@ const functionDefinition = { expressions.registerFunction(functionDefinition); ``` - + Check the full interface of ExpressionFuntionDefinition [here](https://github.com/elastic/kibana/blob/master/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.md) @@ -125,6 +127,6 @@ const rendererDefinition = { expressions.registerRenderer(rendererDefinition); ``` - + Check the full interface of ExpressionRendererDefinition [here](https://github.com/elastic/kibana/blob/master/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionrenderdefinition.md) diff --git a/docs/api/alerting/list_rule_types.asciidoc b/docs/api/alerting/list_rule_types.asciidoc index 98016c8cf82fa..31c8416e75059 100644 --- a/docs/api/alerting/list_rule_types.asciidoc +++ b/docs/api/alerting/list_rule_types.asciidoc @@ -8,7 +8,7 @@ Retrieve a list of alerting rule types that the user is authorized to access. Each rule type includes a list of consumer features. Within these features, users are authorized to perform either `read` or `all` operations on rules of that type. This helps determine which rule types users can read, but not create or modify. -NOTE: Some rule types are limited to specific features. These rule types are not available when <> in <>. +NOTE: Some rule types are limited to specific features. These rule types are not available when <> in <>. [[list-rule-types-api-request]] ==== Request diff --git a/docs/api/index-patterns.asciidoc b/docs/api/index-patterns.asciidoc index 79d2f164fb8c3..b343d80b4fc15 100644 --- a/docs/api/index-patterns.asciidoc +++ b/docs/api/index-patterns.asciidoc @@ -20,6 +20,12 @@ The following index patterns APIs are available: ** <> to set a default index pattern * Fields ** <> to change field metadata, such as `count`, `customLabel` and `format` +* Runtime fields + ** <> to retrieve a runtime field + ** <> to create a runtime field + ** <> to create or update a runtime field + ** <> to partially update an existing runtime field + ** <> to delete a runtime field include::index-patterns/get.asciidoc[] include::index-patterns/create.asciidoc[] @@ -28,3 +34,9 @@ include::index-patterns/delete.asciidoc[] include::index-patterns/default-get.asciidoc[] include::index-patterns/default-set.asciidoc[] include::index-patterns/update-fields.asciidoc[] +include::index-patterns/runtime-fields/get.asciidoc[] +include::index-patterns/runtime-fields/create.asciidoc[] +include::index-patterns/runtime-fields/upsert.asciidoc[] +include::index-patterns/runtime-fields/update.asciidoc[] +include::index-patterns/runtime-fields/delete.asciidoc[] + diff --git a/docs/api/index-patterns/create.asciidoc b/docs/api/index-patterns/create.asciidoc index 771292d6f934d..521e25931ad49 100644 --- a/docs/api/index-patterns/create.asciidoc +++ b/docs/api/index-patterns/create.asciidoc @@ -84,6 +84,7 @@ $ curl -X POST api/index_patterns/index_pattern "typeMeta": {}, "fieldFormats": {}, "fieldAttrs": {}, + "runtimeFieldMap": {} "allowNoIndex": "..." } } diff --git a/docs/api/index-patterns/get.asciidoc b/docs/api/index-patterns/get.asciidoc index 3f53bf0726bf1..64588e63f62ae 100644 --- a/docs/api/index-patterns/get.asciidoc +++ b/docs/api/index-patterns/get.asciidoc @@ -58,6 +58,7 @@ The API returns an index pattern object: "typeMeta": {}, "fieldFormats": {}, "fieldAttrs": {}, + "runtimeFieldMap" {}, "allowNoIndex: "..." } } diff --git a/docs/api/index-patterns/runtime-fields/create.asciidoc b/docs/api/index-patterns/runtime-fields/create.asciidoc new file mode 100644 index 0000000000000..b0773c29e5309 --- /dev/null +++ b/docs/api/index-patterns/runtime-fields/create.asciidoc @@ -0,0 +1,61 @@ +[[index-patterns-runtime-field-api-create]] +=== Create runtime field API +++++ +Create runtime field +++++ + +experimental[] Create a runtime field + +[[index-patterns-runtime-field-create-request]] +==== Request + +`POST :/api/index_patterns/index_pattern//runtime_field` + +`POST :/s//api/index_patterns/index_pattern//runtime_field` + +[[index-patterns-runtime-field-create-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. + +`index_pattern_id`:: +(Required, string) The ID of the index pattern. + +[[index-patterns-runtime-field-create-body]] +==== Request body + +`name`:: (Required, string) The name for a runtime field. + +`runtimeField`:: (Required, object) The runtime field definition object. + + +[[index-patterns-runtime-field-create-example]] +==== Examples + +Create a runtime field on an index pattern: + +[source,sh] +-------------------------------------------------- +$ curl -X POST api/index_patterns/index_pattern//runtime_field +{ + "name": "runtimeFoo", + "runtimeField": { + "type": "long", + "script": { + "source": "emit(doc["foo"].value)" + } + } +} +-------------------------------------------------- +// KIBANA + +The API returns created runtime field object and update index pattern object: + +[source,sh] +-------------------------------------------------- +{ + "index_pattern": {...}, + "field": {...} +} +-------------------------------------------------- diff --git a/docs/api/index-patterns/runtime-fields/delete.asciidoc b/docs/api/index-patterns/runtime-fields/delete.asciidoc new file mode 100644 index 0000000000000..840789fe1ec23 --- /dev/null +++ b/docs/api/index-patterns/runtime-fields/delete.asciidoc @@ -0,0 +1,37 @@ +[[index-patterns-runtime-field-api-delete]] +=== Delete runtime field API +++++ +Delete runtime field +++++ + +experimental[] Delete a runtime field from an index pattern. + +[[index-patterns-runtime-field-api-delete-request]] +==== Request + +`DELETE :/api/index_patterns/index_pattern//runtime_field/` + +`DELETE :/s//api/index_patterns/index_pattern//runtime_field/` + +[[index-patterns-runtime-field-api-delete-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. + +`index_pattern_id`:: +(Required, string) The ID of the index pattern your want to delete a runtime field from. + +`name`:: +(Required, string) The name of the runtime field you want to delete. + + +==== Example + +Delete a runtime field from an index pattern: + +[source,sh] +-------------------------------------------------- +$ curl -X DELETE api/index_patterns/index_pattern//runtime_field/ +-------------------------------------------------- +// KIBANA diff --git a/docs/api/index-patterns/runtime-fields/get.asciidoc b/docs/api/index-patterns/runtime-fields/get.asciidoc new file mode 100644 index 0000000000000..42bd209c708bc --- /dev/null +++ b/docs/api/index-patterns/runtime-fields/get.asciidoc @@ -0,0 +1,52 @@ +[[index-patterns-runtime-field-api-get]] +=== Get runtime field API +++++ +Get runtime field +++++ + +experimental[] Get a runtime field + +[[index-patterns-runtime-field-get-request]] +==== Request + +`GET :/api/index_patterns/index_pattern//runtime_field/` + +`GET :/s//api/index_patterns/index_pattern//runtime_field/` + +[[index-patterns-runtime-field-get-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. + +`index_pattern_id`:: +(Required, string) The ID of the index pattern. + +`name`:: +(Required, string) The name of the runtime field you want to retrieve. + + +[[index-patterns-runtime-field-get-example]] +==== Example + +Retrieve a runtime field named `foo` of index pattern with the `my-pattern` ID: + +[source,sh] +-------------------------------------------------- +$ curl -X GET api/index_patterns/index_pattern/my-pattern/runtime_field/foo +-------------------------------------------------- +// KIBANA + +The API returns a runtime `field` object, and a `runtimeField` definition object: + +[source,sh] +-------------------------------------------------- +{ + "field": { + ... + }, + "runtimeField": { + ... + } +} +-------------------------------------------------- diff --git a/docs/api/index-patterns/runtime-fields/update.asciidoc b/docs/api/index-patterns/runtime-fields/update.asciidoc new file mode 100644 index 0000000000000..f34460896f7bc --- /dev/null +++ b/docs/api/index-patterns/runtime-fields/update.asciidoc @@ -0,0 +1,66 @@ +[[index-patterns-runtime-field-api-update]] +=== Update runtime field API +++++ +Update runtime field +++++ + +experimental[] Update an existing runtime field + +[[index-patterns-runtime-field-update-request]] +==== Request + +`POST :/api/index_patterns/index_pattern//runtime_field/` + +`POST :/s//api/index_patterns/index_pattern//runtime_field/` + +[[index-patterns-runtime-field-update-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. + +`index_pattern_id`:: +(Required, string) The ID of the index pattern. + +`name`:: +(Required, string) The name of the runtime field you want to update. + +[[index-patterns-runtime-field-update-body]] +==== Request body + +`runtimeField`:: (Required, object) The runtime field definition object. + +You can update following fields: + +* `type` +* `script` + + + +[[index-patterns-runtime-field-update-example]] +==== Examples + +Update an existing runtime field on an index pattern: + +[source,sh] +-------------------------------------------------- +$ curl -X POST api/index_patterns/index_pattern//runtime_field/ +{ + "runtimeField": { + "script": { + "source": "emit(doc["bar"].value)" + } + } +} +-------------------------------------------------- +// KIBANA + +The API returns updated runtime field object and updated index pattern object: + +[source,sh] +-------------------------------------------------- +{ + "index_pattern": {...}, + "field": {...} +} +-------------------------------------------------- diff --git a/docs/api/index-patterns/runtime-fields/upsert.asciidoc b/docs/api/index-patterns/runtime-fields/upsert.asciidoc new file mode 100644 index 0000000000000..1b436db19c62e --- /dev/null +++ b/docs/api/index-patterns/runtime-fields/upsert.asciidoc @@ -0,0 +1,61 @@ +[[index-patterns-runtime-field-api-upsert]] +=== Upsert runtime field API +++++ +Upsert runtime field +++++ + +experimental[] Create or update an existing runtime field + +[[index-patterns-runtime-field-upsert-request]] +==== Request + +`PUT :/api/index_patterns/index_pattern//runtime_field` + +`PUT :/s//api/index_patterns/index_pattern//runtime_field` + +[[index-patterns-runtime-field-upsert-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. + +`index_pattern_id`:: +(Required, string) The ID of the index pattern. + +[[index-patterns-runtime-field-upsert-body]] +==== Request body + +`name`:: (Required, string) The name for a new runtime field or a name of an existing runtime field. + +`runtimeField`:: (Required, object) The runtime field definition object. + + +[[index-patterns-runtime-field-upsert-example]] +==== Examples + +Create or update an existing runtime field on an index pattern: + +[source,sh] +-------------------------------------------------- +$ curl -X PUT api/index_patterns/index_pattern//runtime_field +{ + "name": "runtimeFoo", + "runtimeField": { + "type": "long", + "script": { + "source": "emit(doc["foo"].value)" + } + } +} +-------------------------------------------------- +// KIBANA + +The API returns created or updated runtime field object and updated index pattern object: + +[source,sh] +-------------------------------------------------- +{ + "index_pattern": {...}, + "field": {...} +} +-------------------------------------------------- diff --git a/docs/api/index-patterns/update.asciidoc b/docs/api/index-patterns/update.asciidoc index 8ed0ff89fb928..2d5fe882d448d 100644 --- a/docs/api/index-patterns/update.asciidoc +++ b/docs/api/index-patterns/update.asciidoc @@ -93,7 +93,8 @@ $ curl -X POST api/saved_objects/index-pattern/my-pattern "fieldFormats": {}, "type": "...", "typeMeta": {}, - "fields": {} + "fields": {}, + "runtimeFieldMap": {} } } -------------------------------------------------- diff --git a/docs/apm/apm-alerts.asciidoc b/docs/apm/apm-alerts.asciidoc index b4afc2788895c..3e3e2b178ff10 100644 --- a/docs/apm/apm-alerts.asciidoc +++ b/docs/apm/apm-alerts.asciidoc @@ -15,7 +15,7 @@ and enables central management of all alerts from <>. +see Kibana's <>. The APM app supports four different types of alerts: @@ -126,4 +126,4 @@ See {kibana-ref}/alerting-getting-started.html[alerting and actions] for more in NOTE: If you are using an **on-premise** Elastic Stack deployment with security, communication between Elasticsearch and Kibana must have TLS configured. -More information is in the alerting {kibana-ref}/alerting-getting-started.html#alerting-setup-prerequisites[prerequisites]. \ No newline at end of file +More information is in the alerting {kibana-ref}/alerting-setup.html#alerting-prerequisites[prerequisites]. \ No newline at end of file diff --git a/docs/canvas/canvas-function-reference.asciidoc b/docs/canvas/canvas-function-reference.asciidoc index 67210c9d77057..272cd524c2c20 100644 --- a/docs/canvas/canvas-function-reference.asciidoc +++ b/docs/canvas/canvas-function-reference.asciidoc @@ -2893,6 +2893,33 @@ Alias: `type` [[u_fns]] == U +[float] +[[uiSetting_fn]] +=== `uiSetting` + +Returns a UI settings parameter value. + +*Accepts:* `null` + +[cols="3*^<"] +|=== +|Argument |Type |Description + +|_Unnamed_ *** + +Aliases: `parameter` +|`string` +|The parameter name. + +|`default` +|`any` +|A default value in case of the parameter is not set. + +Default: `null` +|=== + +*Returns:* `ui_setting` + [float] [[urlparam_fn]] === `urlparam` diff --git a/docs/developer/contributing/development-functional-tests.asciidoc b/docs/developer/contributing/development-functional-tests.asciidoc index f0041b85c14eb..6f5c05f526bd6 100644 --- a/docs/developer/contributing/development-functional-tests.asciidoc +++ b/docs/developer/contributing/development-functional-tests.asciidoc @@ -229,9 +229,9 @@ export default function ({ getService, getPageObject }) { before(async () => { await Promise.all([ // start with an empty .kibana index - esArchiver.load('empty_kibana'), + esArchiver.load('test/functional/fixtures/es_archiver/empty_kibana'), // load some basic log data only if the index doesn't exist - esArchiver.loadIfNeeded('makelogs') + esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/makelogs') ]); // go to the page described by `apps.visualize` in the config await PageObjects.common.navigateTo('visualize'); @@ -243,7 +243,7 @@ export default function ({ getService, getPageObject }) { // we unload the empty_kibana archive but not the makelogs // archive because we don't make any changes to it, and subsequent // suites could use it if they call `.loadIfNeeded()`. - await esArchiver.unload('empty_kibana'); + await esArchiver.unload('test/functional/fixtures/es_archiver/empty_kibana'); }); // This series of tests illustrate how tests generally verify @@ -370,9 +370,9 @@ await testSubjects.click(‘containerButton’); * Source: {blob}test/common/services/es_archiver.ts[test/common/services/es_archiver.ts] * Load/unload archives created with the `esArchiver` * Popular methods: -** `esArchiver.load(name)` -** `esArchiver.loadIfNeeded(name)` -** `esArchiver.unload(name)` +** `esArchiver.load(path)` +** `esArchiver.loadIfNeeded(path)` +** `esArchiver.unload(path)` Full list of services that are used in functional tests can be found here: {blob}test/functional/services[test/functional/services] diff --git a/docs/developer/getting-started/monorepo-packages.asciidoc b/docs/developer/getting-started/monorepo-packages.asciidoc index 029ee9ea4faf6..0ae806618adc5 100644 --- a/docs/developer/getting-started/monorepo-packages.asciidoc +++ b/docs/developer/getting-started/monorepo-packages.asciidoc @@ -97,6 +97,7 @@ yarn kbn watch-bazel - @kbn/securitysolution-list-utils - @kbn/securitysolution-utils - @kbn/server-http-tools +- @kbn/server-route-repository - @kbn/std - @kbn/telemetry-utils - @kbn/tinymath diff --git a/docs/developer/getting-started/sample-data.asciidoc b/docs/developer/getting-started/sample-data.asciidoc index 0d313cbabe64e..2454c9d8a6146 100644 --- a/docs/developer/getting-started/sample-data.asciidoc +++ b/docs/developer/getting-started/sample-data.asciidoc @@ -6,7 +6,7 @@ There are a couple ways to easily get data ingested into {es}. [discrete] === Sample data packages available for one click installation -The easiest is to install one or more of our vailable sample data packages. If you have no data, you should be +The easiest is to install one or more of our available sample data packages. If you have no data, you should be prompted to install when running {kib} for the first time. You can also access and install the sample data packages by going to the home page and clicking "add sample data". @@ -27,5 +27,5 @@ Make sure to execute `node scripts/makelogs` *after* {es} is up and running! [discrete] === CSV upload -If running with a platinum or trial license, you can also use the CSV uploader provided inside the Machine learning app. -Navigate to the Data visualizer to upload your data from a file. \ No newline at end of file +You can also use the CSV uploader provided on the {kib} home page. +Navigate to **Add data** > **Upload file** to upload your data from a file. \ No newline at end of file diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 7d06562547f70..6675a8dd283c9 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -369,6 +369,10 @@ The client-side plugin configures following values: |The data_enhanced plugin is the x-pack counterpart to the src/plguins/data plugin. +|{kib-repo}blob/{branch}/x-pack/plugins/data_visualizer/README.md[dataVisualizer] +|The data_visualizer plugin enables you to explore the fields in your data. + + |{kib-repo}blob/{branch}/x-pack/plugins/discover_enhanced/README.md[discoverEnhanced] |Contains the enhancements to the OSS discover app. @@ -396,10 +400,6 @@ actitivies. |The features plugin enhance Kibana with a per-feature privilege system. -|{kib-repo}blob/{branch}/x-pack/plugins/file_data_visualizer[fileDataVisualizer] -|WARNING: Missing README. - - |{kib-repo}blob/{branch}/x-pack/plugins/file_upload[fileUpload] |WARNING: Missing README. diff --git a/docs/developer/plugin/external-plugin-functional-tests.asciidoc b/docs/developer/plugin/external-plugin-functional-tests.asciidoc index b39d576d85268..55b311794f9dc 100644 --- a/docs/developer/plugin/external-plugin-functional-tests.asciidoc +++ b/docs/developer/plugin/external-plugin-functional-tests.asciidoc @@ -58,11 +58,6 @@ export default async function ({ readConfigFile }) { } }, - // choose where esArchiver should load archives from - esArchiver: { - directory: resolve(__dirname, './es_archives'), - }, - // choose where screenshots should be saved screenshots: { directory: resolve(__dirname, './tmp/screenshots'), diff --git a/docs/development/core/public/kibana-plugin-core-public.app.md b/docs/development/core/public/kibana-plugin-core-public.app.md index 721d9a2f121c7..d79a12a83367d 100644 --- a/docs/development/core/public/kibana-plugin-core-public.app.md +++ b/docs/development/core/public/kibana-plugin-core-public.app.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface App +export interface App extends AppNavOptions ``` ## Properties @@ -21,16 +21,13 @@ export interface App | [chromeless](./kibana-plugin-core-public.app.chromeless.md) | boolean | Hide the UI chrome when the application is mounted. Defaults to false. Takes precedence over chrome service visibility settings. | | [deepLinks](./kibana-plugin-core-public.app.deeplinks.md) | AppDeepLink[] | Input type for registering secondary in-app locations for an application.Deep links must include at least one of path or deepLinks. A deep link that does not have a path represents a topological level in the application's hierarchy, but does not have a destination URL that is user-accessible. | | [defaultPath](./kibana-plugin-core-public.app.defaultpath.md) | string | Allow to define the default path a user should be directed to when navigating to the app. When defined, this value will be used as a default for the path option when calling [navigateToApp](./kibana-plugin-core-public.applicationstart.navigatetoapp.md)\`, and will also be appended to the [application navLink](./kibana-plugin-core-public.chromenavlink.md) in the navigation bar. | -| [euiIconType](./kibana-plugin-core-public.app.euiicontype.md) | string | A EUI iconType that will be used for the app's icon. This icon takes precendence over the icon property. | | [exactRoute](./kibana-plugin-core-public.app.exactroute.md) | boolean | If set to true, the application's route will only be checked against an exact match. Defaults to false. | -| [icon](./kibana-plugin-core-public.app.icon.md) | string | A URL to an image file used as an icon. Used as a fallback if euiIconType is not provided. | | [id](./kibana-plugin-core-public.app.id.md) | string | The unique identifier of the application | | [keywords](./kibana-plugin-core-public.app.keywords.md) | string[] | Optional keywords to match with in deep links search. Omit if this part of the hierarchy does not have a page URL. | | [mount](./kibana-plugin-core-public.app.mount.md) | AppMount<HistoryLocationState> | A mount function called when the user navigates to this app's route. | | [navLinkStatus](./kibana-plugin-core-public.app.navlinkstatus.md) | AppNavLinkStatus | The initial status of the application's navLink. Defaulting to visible if status is accessible and hidden if status is inaccessible See [AppNavLinkStatus](./kibana-plugin-core-public.appnavlinkstatus.md) | -| [order](./kibana-plugin-core-public.app.order.md) | number | An ordinal used to sort nav links relative to one another for display. | +| [searchable](./kibana-plugin-core-public.app.searchable.md) | boolean | The initial flag to determine if the application is searchable in the global search. Defaulting to true if navLinkStatus is visible or omitted. | | [status](./kibana-plugin-core-public.app.status.md) | AppStatus | The initial status of the application. Defaulting to accessible | | [title](./kibana-plugin-core-public.app.title.md) | string | The title of the application. | -| [tooltip](./kibana-plugin-core-public.app.tooltip.md) | string | A tooltip shown when hovering over app link. | | [updater$](./kibana-plugin-core-public.app.updater_.md) | Observable<AppUpdater> | An [AppUpdater](./kibana-plugin-core-public.appupdater.md) observable that can be used to update the application [AppUpdatableFields](./kibana-plugin-core-public.appupdatablefields.md) at runtime. | diff --git a/docs/development/core/public/kibana-plugin-core-public.app.searchable.md b/docs/development/core/public/kibana-plugin-core-public.app.searchable.md new file mode 100644 index 0000000000000..ab1b559a7f6a1 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.app.searchable.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [App](./kibana-plugin-core-public.app.md) > [searchable](./kibana-plugin-core-public.app.searchable.md) + +## App.searchable property + +The initial flag to determine if the application is searchable in the global search. Defaulting to `true` if `navLinkStatus` is `visible` or omitted. + +Signature: + +```typescript +searchable?: boolean; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appdeeplink.md b/docs/development/core/public/kibana-plugin-core-public.appdeeplink.md index 5aa951cffdcb5..30fd3085a4341 100644 --- a/docs/development/core/public/kibana-plugin-core-public.appdeeplink.md +++ b/docs/development/core/public/kibana-plugin-core-public.appdeeplink.md @@ -16,7 +16,8 @@ export declare type AppDeepLink = { title: string; keywords?: string[]; navLinkStatus?: AppNavLinkStatus; -} & ({ + searchable?: boolean; +} & AppNavOptions & ({ path: string; deepLinks?: AppDeepLink[]; } | { diff --git a/docs/development/core/public/kibana-plugin-core-public.app.euiicontype.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.euiicontype.md similarity index 60% rename from docs/development/core/public/kibana-plugin-core-public.app.euiicontype.md rename to docs/development/core/public/kibana-plugin-core-public.appnavoptions.euiicontype.md index ff79d832f92e2..069eccf63a235 100644 --- a/docs/development/core/public/kibana-plugin-core-public.app.euiicontype.md +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.euiicontype.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [App](./kibana-plugin-core-public.app.md) > [euiIconType](./kibana-plugin-core-public.app.euiicontype.md) +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AppNavOptions](./kibana-plugin-core-public.appnavoptions.md) > [euiIconType](./kibana-plugin-core-public.appnavoptions.euiicontype.md) -## App.euiIconType property +## AppNavOptions.euiIconType property A EUI iconType that will be used for the app's icon. This icon takes precendence over the `icon` property. diff --git a/docs/development/core/public/kibana-plugin-core-public.app.icon.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.icon.md similarity index 61% rename from docs/development/core/public/kibana-plugin-core-public.app.icon.md rename to docs/development/core/public/kibana-plugin-core-public.appnavoptions.icon.md index 98260da5d2021..3b809fc4aec39 100644 --- a/docs/development/core/public/kibana-plugin-core-public.app.icon.md +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.icon.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [App](./kibana-plugin-core-public.app.md) > [icon](./kibana-plugin-core-public.app.icon.md) +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AppNavOptions](./kibana-plugin-core-public.appnavoptions.md) > [icon](./kibana-plugin-core-public.appnavoptions.icon.md) -## App.icon property +## AppNavOptions.icon property A URL to an image file used as an icon. Used as a fallback if `euiIconType` is not provided. diff --git a/docs/development/core/public/kibana-plugin-core-public.appnavoptions.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.md new file mode 100644 index 0000000000000..52c28c861dc70 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AppNavOptions](./kibana-plugin-core-public.appnavoptions.md) + +## AppNavOptions interface + +App navigation menu options + +Signature: + +```typescript +export interface AppNavOptions +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [euiIconType](./kibana-plugin-core-public.appnavoptions.euiicontype.md) | string | A EUI iconType that will be used for the app's icon. This icon takes precendence over the icon property. | +| [icon](./kibana-plugin-core-public.appnavoptions.icon.md) | string | A URL to an image file used as an icon. Used as a fallback if euiIconType is not provided. | +| [order](./kibana-plugin-core-public.appnavoptions.order.md) | number | An ordinal used to sort nav links relative to one another for display. | +| [tooltip](./kibana-plugin-core-public.appnavoptions.tooltip.md) | string | A tooltip shown when hovering over app link. | + diff --git a/docs/development/core/public/kibana-plugin-core-public.app.order.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.order.md similarity index 59% rename from docs/development/core/public/kibana-plugin-core-public.app.order.md rename to docs/development/core/public/kibana-plugin-core-public.appnavoptions.order.md index bb6be116b6b58..ca7ae482a04ad 100644 --- a/docs/development/core/public/kibana-plugin-core-public.app.order.md +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.order.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [App](./kibana-plugin-core-public.app.md) > [order](./kibana-plugin-core-public.app.order.md) +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AppNavOptions](./kibana-plugin-core-public.appnavoptions.md) > [order](./kibana-plugin-core-public.appnavoptions.order.md) -## App.order property +## AppNavOptions.order property An ordinal used to sort nav links relative to one another for display. diff --git a/docs/development/core/public/kibana-plugin-core-public.app.tooltip.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.tooltip.md similarity index 56% rename from docs/development/core/public/kibana-plugin-core-public.app.tooltip.md rename to docs/development/core/public/kibana-plugin-core-public.appnavoptions.tooltip.md index e901de0fdccc9..97c18c2e56a1e 100644 --- a/docs/development/core/public/kibana-plugin-core-public.app.tooltip.md +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.tooltip.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [App](./kibana-plugin-core-public.app.md) > [tooltip](./kibana-plugin-core-public.app.tooltip.md) +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AppNavOptions](./kibana-plugin-core-public.appnavoptions.md) > [tooltip](./kibana-plugin-core-public.appnavoptions.tooltip.md) -## App.tooltip property +## AppNavOptions.tooltip property A tooltip shown when hovering over app link. diff --git a/docs/development/core/public/kibana-plugin-core-public.appupdatablefields.md b/docs/development/core/public/kibana-plugin-core-public.appupdatablefields.md index d7b12d4b70701..c24da05abe7ec 100644 --- a/docs/development/core/public/kibana-plugin-core-public.appupdatablefields.md +++ b/docs/development/core/public/kibana-plugin-core-public.appupdatablefields.md @@ -9,5 +9,5 @@ Defines the list of fields that can be updated via an [AppUpdater](./kibana-plug Signature: ```typescript -export declare type AppUpdatableFields = Pick; +export declare type AppUpdatableFields = Pick; ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavlink.md b/docs/development/core/public/kibana-plugin-core-public.chromenavlink.md index dfe8f119505aa..c7dd461617e34 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavlink.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavlink.md @@ -26,5 +26,5 @@ export interface ChromeNavLink | [order](./kibana-plugin-core-public.chromenavlink.order.md) | number | An ordinal used to sort nav links relative to one another for display. | | [title](./kibana-plugin-core-public.chromenavlink.title.md) | string | The title of the application. | | [tooltip](./kibana-plugin-core-public.chromenavlink.tooltip.md) | string | A tooltip shown when hovering over an app link. | -| [url](./kibana-plugin-core-public.chromenavlink.url.md) | string | The route used to open the of an application. If unset, baseUrl will be used instead. | +| [url](./kibana-plugin-core-public.chromenavlink.url.md) | string | The route used to open the default path and the deep links of an application. | diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavlink.url.md b/docs/development/core/public/kibana-plugin-core-public.chromenavlink.url.md index 833930c494786..b9d12e450df50 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavlink.url.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavlink.url.md @@ -4,10 +4,10 @@ ## ChromeNavLink.url property -The route used to open the of an application. If unset, `baseUrl` will be used instead. +The route used to open the default path and the deep links of an application. Signature: ```typescript -readonly url?: string; +readonly url: string; ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.md b/docs/development/core/public/kibana-plugin-core-public.md index 6239279f275d1..f341a7cd9315f 100644 --- a/docs/development/core/public/kibana-plugin-core-public.md +++ b/docs/development/core/public/kibana-plugin-core-public.md @@ -38,6 +38,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | [ApplicationSetup](./kibana-plugin-core-public.applicationsetup.md) | | | [ApplicationStart](./kibana-plugin-core-public.applicationstart.md) | | | [AppMountParameters](./kibana-plugin-core-public.appmountparameters.md) | | +| [AppNavOptions](./kibana-plugin-core-public.appnavoptions.md) | App navigation menu options | | [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) | A plugin with asynchronous lifecycle methods. | | [Capabilities](./kibana-plugin-core-public.capabilities.md) | The read-only set of capabilities available for the current UI session. Capabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID, and the boolean is a flag indicating if the capability is enabled or disabled. | | [ChromeBadge](./kibana-plugin-core-public.chromebadge.md) | | diff --git a/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.deeplinkid.md b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.deeplinkid.md new file mode 100644 index 0000000000000..4039e1338fc1c --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.deeplinkid.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [NavigateToAppOptions](./kibana-plugin-core-public.navigatetoappoptions.md) > [deepLinkId](./kibana-plugin-core-public.navigatetoappoptions.deeplinkid.md) + +## NavigateToAppOptions.deepLinkId property + +optional [deep link](./kibana-plugin-core-public.app.deeplinks.md) id inside the application to navigate to. If an additional [path](./kibana-plugin-core-public.navigatetoappoptions.path.md) is defined it will be appended to the deep link path. + +Signature: + +```typescript +deepLinkId?: string; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md index 79b59a19508e7..7b01bab056d84 100644 --- a/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md @@ -16,8 +16,9 @@ export interface NavigateToAppOptions | Property | Type | Description | | --- | --- | --- | +| [deepLinkId](./kibana-plugin-core-public.navigatetoappoptions.deeplinkid.md) | string | optional [deep link](./kibana-plugin-core-public.app.deeplinks.md) id inside the application to navigate to. If an additional [path](./kibana-plugin-core-public.navigatetoappoptions.path.md) is defined it will be appended to the deep link path. | | [openInNewTab](./kibana-plugin-core-public.navigatetoappoptions.openinnewtab.md) | boolean | if true, will open the app in new tab, will share session information via window.open if base | -| [path](./kibana-plugin-core-public.navigatetoappoptions.path.md) | string | optional path inside application to deep link to. If undefined, will use [the app's default path](./kibana-plugin-core-public.app.defaultpath.md)\` as default. | +| [path](./kibana-plugin-core-public.navigatetoappoptions.path.md) | string | optional path inside application to deep link to. If undefined, will use [the app's default path](./kibana-plugin-core-public.app.defaultpath.md) as default. | | [replace](./kibana-plugin-core-public.navigatetoappoptions.replace.md) | boolean | if true, will not create a new history entry when navigating (using replace instead of push) | | [state](./kibana-plugin-core-public.navigatetoappoptions.state.md) | unknown | optional state to forward to the application | diff --git a/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.path.md b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.path.md index 095553d05778c..b39fc8c324ad9 100644 --- a/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.path.md +++ b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.path.md @@ -4,7 +4,7 @@ ## NavigateToAppOptions.path property -optional path inside application to deep link to. If undefined, will use [the app's default path](./kibana-plugin-core-public.app.defaultpath.md)\` as default. +optional path inside application to deep link to. If undefined, will use [the app's default path](./kibana-plugin-core-public.app.defaultpath.md) as default. Signature: diff --git a/docs/development/core/public/kibana-plugin-core-public.publicappdeeplinkinfo.md b/docs/development/core/public/kibana-plugin-core-public.publicappdeeplinkinfo.md index d3a6a4de905fd..40fd98687c619 100644 --- a/docs/development/core/public/kibana-plugin-core-public.publicappdeeplinkinfo.md +++ b/docs/development/core/public/kibana-plugin-core-public.publicappdeeplinkinfo.md @@ -9,9 +9,10 @@ Public information about a registered app's [deepLinks](./kibana-plugin-core-pub Signature: ```typescript -export declare type PublicAppDeepLinkInfo = Omit & { +export declare type PublicAppDeepLinkInfo = Omit & { deepLinks: PublicAppDeepLinkInfo[]; keywords: string[]; navLinkStatus: AppNavLinkStatus; + searchable: boolean; }; ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.publicappinfo.md b/docs/development/core/public/kibana-plugin-core-public.publicappinfo.md index a5563eae83563..01d23ae47a0d9 100644 --- a/docs/development/core/public/kibana-plugin-core-public.publicappinfo.md +++ b/docs/development/core/public/kibana-plugin-core-public.publicappinfo.md @@ -9,11 +9,12 @@ Public information about a registered [application](./kibana-plugin-core-public. Signature: ```typescript -export declare type PublicAppInfo = Omit & { +export declare type PublicAppInfo = Omit & { status: AppStatus; navLinkStatus: AppNavLinkStatus; appRoute: string; keywords: string[]; deepLinks: PublicAppDeepLinkInfo[]; + searchable: boolean; }; ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.md index 7be45c6c173b4..706408f81f02a 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.md @@ -30,7 +30,7 @@ export interface SavedObjectsFindOptions | [searchAfter](./kibana-plugin-core-public.savedobjectsfindoptions.searchafter.md) | estypes.Id[] | Use the sort values from the previous page to retrieve the next page of results. | | [searchFields](./kibana-plugin-core-public.savedobjectsfindoptions.searchfields.md) | string[] | The fields to perform the parsed query against. See Elasticsearch Simple Query String fields argument for more information | | [sortField](./kibana-plugin-core-public.savedobjectsfindoptions.sortfield.md) | string | | -| [sortOrder](./kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md) | estypes.SortOrder | | +| [sortOrder](./kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md) | estypes.SearchSortOrder | | | [type](./kibana-plugin-core-public.savedobjectsfindoptions.type.md) | string | string[] | | | [typeToNamespacesMap](./kibana-plugin-core-public.savedobjectsfindoptions.typetonamespacesmap.md) | Map<string, string[] | undefined> | This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the type and namespaces fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md index 36f99e51ea8c6..506fb9041e353 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md @@ -7,5 +7,5 @@ Signature: ```typescript -sortOrder?: estypes.SortOrder; +sortOrder?: estypes.SearchSortOrder; ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md index 32a2f3312708c..604cdea1a7fbe 100644 --- a/docs/development/core/server/kibana-plugin-core-server.md +++ b/docs/development/core/server/kibana-plugin-core-server.md @@ -159,8 +159,6 @@ The plugin integrates with the core system via lifecycle events: `setup` | [SavedObjectsCollectMultiNamespaceReferencesObject](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesobject.md) | An object to collect references for. It must be a multi-namespace type (in other words, the object type must be registered with the namespaceType: 'multiple' or namespaceType: 'multiple-isolated' option).Note: if options.purpose is 'updateObjectsSpaces', it must be a shareable type (in other words, the object type must be registered with the namespaceType: 'multiple'). | | [SavedObjectsCollectMultiNamespaceReferencesOptions](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesoptions.md) | Options for collecting references. | | [SavedObjectsCollectMultiNamespaceReferencesResponse](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesresponse.md) | The response when object references are collected. | -| [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. | -| [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. | | [SavedObjectsCreateOptions](./kibana-plugin-core-server.savedobjectscreateoptions.md) | | | [SavedObjectsCreatePointInTimeFinderDependencies](./kibana-plugin-core-server.savedobjectscreatepointintimefinderdependencies.md) | | | [SavedObjectsDeleteByNamespaceOptions](./kibana-plugin-core-server.savedobjectsdeletebynamespaceoptions.md) | | diff --git a/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.description.md b/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.description.md new file mode 100644 index 0000000000000..b6bba3b5e356c --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.description.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [PluginManifest](./kibana-plugin-core-server.pluginmanifest.md) > [description](./kibana-plugin-core-server.pluginmanifest.description.md) + +## PluginManifest.description property + +TODO: make required once all plugins specify this. A brief description of what this plugin does and any capabilities it provides. + +Signature: + +```typescript +readonly description?: string; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.md b/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.md index bd15b95d73ace..b3e20bc7ed693 100644 --- a/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.md +++ b/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.md @@ -21,10 +21,12 @@ Should never be used in code outside of Core but is exported for documentation p | Property | Type | Description | | --- | --- | --- | | [configPath](./kibana-plugin-core-server.pluginmanifest.configpath.md) | ConfigPath | Root used by the plugin, defaults to "id" in snake\_case format. | +| [description](./kibana-plugin-core-server.pluginmanifest.description.md) | string | TODO: make required once all plugins specify this. A brief description of what this plugin does and any capabilities it provides. | | [extraPublicDirs](./kibana-plugin-core-server.pluginmanifest.extrapublicdirs.md) | string[] | Specifies directory names that can be imported by other ui-plugins built using the same instance of the @kbn/optimizer. A temporary measure we plan to replace with better mechanisms for sharing static code between plugins | | [id](./kibana-plugin-core-server.pluginmanifest.id.md) | PluginName | Identifier of the plugin. Must be a string in camelCase. Part of a plugin public contract. Other plugins leverage it to access plugin API, navigate to the plugin, etc. | | [kibanaVersion](./kibana-plugin-core-server.pluginmanifest.kibanaversion.md) | string | The version of Kibana the plugin is compatible with, defaults to "version". | | [optionalPlugins](./kibana-plugin-core-server.pluginmanifest.optionalplugins.md) | readonly PluginName[] | An optional list of the other plugins that if installed and enabled \*\*may be\*\* leveraged by this plugin for some additional functionality but otherwise are not required for this plugin to work properly. | +| [owner](./kibana-plugin-core-server.pluginmanifest.owner.md) | {
readonly name: string;
readonly githubTeam?: string;
} | TODO: make required once all internal plugins have this specified. | | [requiredBundles](./kibana-plugin-core-server.pluginmanifest.requiredbundles.md) | readonly string[] | List of plugin ids that this plugin's UI code imports modules from that are not in requiredPlugins. | | [requiredPlugins](./kibana-plugin-core-server.pluginmanifest.requiredplugins.md) | readonly PluginName[] | An optional list of the other plugins that \*\*must be\*\* installed and enabled for this plugin to function properly. | | [server](./kibana-plugin-core-server.pluginmanifest.server.md) | boolean | Specifies whether plugin includes some server-side specific functionality. | diff --git a/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.owner.md b/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.owner.md new file mode 100644 index 0000000000000..a90af81aa186a --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.owner.md @@ -0,0 +1,16 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [PluginManifest](./kibana-plugin-core-server.pluginmanifest.md) > [owner](./kibana-plugin-core-server.pluginmanifest.owner.md) + +## PluginManifest.owner property + +TODO: make required once all internal plugins have this specified. + +Signature: + +```typescript +readonly owner?: { + readonly name: string; + readonly githubTeam?: string; + }; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md deleted file mode 100644 index 3f2d81cc97c7c..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [doc\_values](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md) - -## SavedObjectsComplexFieldMapping.doc\_values property - -Signature: - -```typescript -doc_values?: boolean; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md deleted file mode 100644 index b01da3c62fda6..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [dynamic](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md) - -## SavedObjectsComplexFieldMapping.dynamic property - -The dynamic property of the mapping, either `false` or `'strict'`. If unspecified `dynamic: 'strict'` will be inherited from the top-level index mappings. - -Note: To limit the number of mapping fields Saved Object types should \*never\* use `dynamic: true`. - -Signature: - -```typescript -dynamic?: false | 'strict'; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md deleted file mode 100644 index 08513aa2a849b..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [enabled](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md) - -## SavedObjectsComplexFieldMapping.enabled property - -Signature: - -```typescript -enabled?: boolean; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md deleted file mode 100644 index fc262cad54f18..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) - -## SavedObjectsComplexFieldMapping interface - -See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. - -Signature: - -```typescript -export interface SavedObjectsComplexFieldMapping -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [doc\_values](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md) | boolean | | -| [dynamic](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md) | false | 'strict' | The dynamic property of the mapping, either false or 'strict'. If unspecified dynamic: 'strict' will be inherited from the top-level index mappings.Note: To limit the number of mapping fields Saved Object types should \*never\* use dynamic: true. | -| [enabled](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md) | boolean | | -| [properties](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md) | SavedObjectsMappingProperties | | -| [type](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md) | string | | - diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md deleted file mode 100644 index 613a36a09ba1e..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [properties](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md) - -## SavedObjectsComplexFieldMapping.properties property - -Signature: - -```typescript -properties: SavedObjectsMappingProperties; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md deleted file mode 100644 index 8aaa524dad43a..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [type](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md) - -## SavedObjectsComplexFieldMapping.type property - -Signature: - -```typescript -type?: string; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md deleted file mode 100644 index 2a79eafd85a6c..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) > [doc\_values](./kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md) - -## SavedObjectsCoreFieldMapping.doc\_values property - -Signature: - -```typescript -doc_values?: boolean; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md deleted file mode 100644 index 4f88b635ca2f7..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md +++ /dev/null @@ -1,16 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) > [fields](./kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md) - -## SavedObjectsCoreFieldMapping.fields property - -Signature: - -```typescript -fields?: { - [subfield: string]: { - type: string; - ignore_above?: number; - }; - }; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.index.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.index.md deleted file mode 100644 index e3cf685e310d2..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.index.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) > [index](./kibana-plugin-core-server.savedobjectscorefieldmapping.index.md) - -## SavedObjectsCoreFieldMapping.index property - -Signature: - -```typescript -index?: boolean; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md deleted file mode 100644 index e9b9c2bcf51b5..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) - -## SavedObjectsCoreFieldMapping interface - -See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. - -Signature: - -```typescript -export interface SavedObjectsCoreFieldMapping -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [doc\_values](./kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md) | boolean | | -| [fields](./kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md) | {
[subfield: string]: {
type: string;
ignore_above?: number;
};
} | | -| [index](./kibana-plugin-core-server.savedobjectscorefieldmapping.index.md) | boolean | | -| [null\_value](./kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md) | number | boolean | string | | -| [type](./kibana-plugin-core-server.savedobjectscorefieldmapping.type.md) | string | | - diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md deleted file mode 100644 index 627ea3695383a..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) > [null\_value](./kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md) - -## SavedObjectsCoreFieldMapping.null\_value property - -Signature: - -```typescript -null_value?: number | boolean | string; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.type.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.type.md deleted file mode 100644 index 94d395d7983e5..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.type.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) > [type](./kibana-plugin-core-server.savedobjectscorefieldmapping.type.md) - -## SavedObjectsCoreFieldMapping.type property - -Signature: - -```typescript -type: string; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfieldmapping.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfieldmapping.md index 925ca4be92e66..85b52bacafa25 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfieldmapping.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfieldmapping.md @@ -11,5 +11,7 @@ Please refer to [elasticsearch documentation](https://www.elastic.co/guide/en/el Signature: ```typescript -export declare type SavedObjectsFieldMapping = SavedObjectsCoreFieldMapping | SavedObjectsComplexFieldMapping; +export declare type SavedObjectsFieldMapping = estypes.MappingProperty & { + dynamic?: false | 'strict'; +}; ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md index a92b1f48d08eb..d3696ee71049a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md @@ -30,7 +30,7 @@ export interface SavedObjectsFindOptions | [searchAfter](./kibana-plugin-core-server.savedobjectsfindoptions.searchafter.md) | estypes.Id[] | Use the sort values from the previous page to retrieve the next page of results. | | [searchFields](./kibana-plugin-core-server.savedobjectsfindoptions.searchfields.md) | string[] | The fields to perform the parsed query against. See Elasticsearch Simple Query String fields argument for more information | | [sortField](./kibana-plugin-core-server.savedobjectsfindoptions.sortfield.md) | string | | -| [sortOrder](./kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md) | estypes.SortOrder | | +| [sortOrder](./kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md) | estypes.SearchSortOrder | | | [type](./kibana-plugin-core-server.savedobjectsfindoptions.type.md) | string | string[] | | | [typeToNamespacesMap](./kibana-plugin-core-server.savedobjectsfindoptions.typetonamespacesmap.md) | Map<string, string[] | undefined> | This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the type and namespaces fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md index e1c657e3a5171..dca5a7d8c7583 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md @@ -7,5 +7,5 @@ Signature: ```typescript -sortOrder?: estypes.SortOrder; +sortOrder?: estypes.SearchSortOrder; ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.lang.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.lang.md index a994fc458cfb6..f99e7ba8b967e 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.lang.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.lang.md @@ -7,5 +7,5 @@ Signature: ```typescript -lang?: string; +lang?: estypes.ScriptLanguage; ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.md index 4e3dea5549b56..29377ff8fd392 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.md @@ -26,7 +26,7 @@ export interface IFieldType | [esTypes](./kibana-plugin-plugins-data-public.ifieldtype.estypes.md) | string[] | | | [filterable](./kibana-plugin-plugins-data-public.ifieldtype.filterable.md) | boolean | | | [format](./kibana-plugin-plugins-data-public.ifieldtype.format.md) | any | | -| [lang](./kibana-plugin-plugins-data-public.ifieldtype.lang.md) | string | | +| [lang](./kibana-plugin-plugins-data-public.ifieldtype.lang.md) | estypes.ScriptLanguage | | | [name](./kibana-plugin-plugins-data-public.ifieldtype.name.md) | string | | | [readFromDocValues](./kibana-plugin-plugins-data-public.ifieldtype.readfromdocvalues.md) | boolean | | | [script](./kibana-plugin-plugins-data-public.ifieldtype.script.md) | string | | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.addscriptedfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.addscriptedfield.md index 812f014b15a6c..e0ee1f0ec15a4 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.addscriptedfield.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.addscriptedfield.md @@ -6,6 +6,7 @@ > Warning: This API is now obsolete. > +> use runtime field instead > Add scripted field to field list diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getnonscriptedfields.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getnonscriptedfields.md index 1792a979bf749..94adbefe535dd 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getnonscriptedfields.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getnonscriptedfields.md @@ -6,6 +6,7 @@ > Warning: This API is now obsolete. > +> use runtime field instead > Signature: diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getruntimefield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getruntimefield.md new file mode 100644 index 0000000000000..c0aca53255b8f --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getruntimefield.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [getRuntimeField](./kibana-plugin-plugins-data-public.indexpattern.getruntimefield.md) + +## IndexPattern.getRuntimeField() method + +Returns runtime field if exists + +Signature: + +```typescript +getRuntimeField(name: string): RuntimeField | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | + +Returns: + +`RuntimeField | null` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getscriptedfields.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getscriptedfields.md index b6b3dcb19bac1..57e1b5f49371b 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getscriptedfields.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getscriptedfields.md @@ -6,6 +6,7 @@ > Warning: This API is now obsolete. > +> use runtime field instead > Signature: diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.hasruntimefield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.hasruntimefield.md new file mode 100644 index 0000000000000..96dbe13a7f197 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.hasruntimefield.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [hasRuntimeField](./kibana-plugin-plugins-data-public.indexpattern.hasruntimefield.md) + +## IndexPattern.hasRuntimeField() method + +Checks if runtime field exists + +Signature: + +```typescript +hasRuntimeField(name: string): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | + +Returns: + +`boolean` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md index 53d173d39f50d..51ca42fdce70a 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md @@ -54,13 +54,16 @@ export declare class IndexPattern implements IIndexPattern | [getFormatterForField(field)](./kibana-plugin-plugins-data-public.indexpattern.getformatterforfield.md) | | Provide a field, get its formatter | | [getFormatterForFieldNoDefault(fieldname)](./kibana-plugin-plugins-data-public.indexpattern.getformatterforfieldnodefault.md) | | Get formatter for a given field name. Return undefined if none exists | | [getNonScriptedFields()](./kibana-plugin-plugins-data-public.indexpattern.getnonscriptedfields.md) | | | +| [getRuntimeField(name)](./kibana-plugin-plugins-data-public.indexpattern.getruntimefield.md) | | Returns runtime field if exists | | [getScriptedFields()](./kibana-plugin-plugins-data-public.indexpattern.getscriptedfields.md) | | | | [getSourceFiltering()](./kibana-plugin-plugins-data-public.indexpattern.getsourcefiltering.md) | | Get the source filtering configuration for that index. | | [getTimeField()](./kibana-plugin-plugins-data-public.indexpattern.gettimefield.md) | | | +| [hasRuntimeField(name)](./kibana-plugin-plugins-data-public.indexpattern.hasruntimefield.md) | | Checks if runtime field exists | | [isTimeBased()](./kibana-plugin-plugins-data-public.indexpattern.istimebased.md) | | | | [isTimeNanosBased()](./kibana-plugin-plugins-data-public.indexpattern.istimenanosbased.md) | | | -| [removeRuntimeField(name)](./kibana-plugin-plugins-data-public.indexpattern.removeruntimefield.md) | | Remove a runtime field - removed from mapped field or removed unmapped field as appropriate | +| [removeRuntimeField(name)](./kibana-plugin-plugins-data-public.indexpattern.removeruntimefield.md) | | Remove a runtime field - removed from mapped field or removed unmapped field as appropriate. Doesn't clear associated field attributes. | | [removeScriptedField(fieldName)](./kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md) | | Remove scripted field from field list | +| [replaceAllRuntimeFields(newFields)](./kibana-plugin-plugins-data-public.indexpattern.replaceallruntimefields.md) | | Replaces all existing runtime fields with new fields | | [setFieldAttrs(fieldName, attrName, value)](./kibana-plugin-plugins-data-public.indexpattern.setfieldattrs.md) | | | | [setFieldCount(fieldName, count)](./kibana-plugin-plugins-data-public.indexpattern.setfieldcount.md) | | | | [setFieldCustomLabel(fieldName, customLabel)](./kibana-plugin-plugins-data-public.indexpattern.setfieldcustomlabel.md) | | | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removeruntimefield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removeruntimefield.md index 7a5228fece782..f2774924fc73c 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removeruntimefield.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removeruntimefield.md @@ -4,7 +4,7 @@ ## IndexPattern.removeRuntimeField() method -Remove a runtime field - removed from mapped field or removed unmapped field as appropriate +Remove a runtime field - removed from mapped field or removed unmapped field as appropriate. Doesn't clear associated field attributes. Signature: @@ -16,7 +16,7 @@ removeRuntimeField(name: string): void; | Parameter | Type | Description | | --- | --- | --- | -| name | string | | +| name | string | Field name to remove | Returns: diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md index 91f25c09ab197..d3e1b26810fd7 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md @@ -6,6 +6,7 @@ > Warning: This API is now obsolete. > +> use runtime field instead > Remove scripted field from field list diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.replaceallruntimefields.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.replaceallruntimefields.md new file mode 100644 index 0000000000000..076b2b38cf474 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.replaceallruntimefields.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [replaceAllRuntimeFields](./kibana-plugin-plugins-data-public.indexpattern.replaceallruntimefields.md) + +## IndexPattern.replaceAllRuntimeFields() method + +Replaces all existing runtime fields with new fields + +Signature: + +```typescript +replaceAllRuntimeFields(newFields: Record): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| newFields | Record<string, RuntimeField> | | + +Returns: + +`void` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.lang.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.lang.md index b81218eb08886..3666e503e2722 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.lang.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.lang.md @@ -9,7 +9,7 @@ Script field language Signature: ```typescript -get lang(): string | undefined; +get lang(): "painless" | "expression" | "mustache" | "java" | undefined; -set lang(lang: string | undefined); +set lang(lang: "painless" | "expression" | "mustache" | "java" | undefined); ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md index 05c807b1cd845..8cd1a476cf32f 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md @@ -28,7 +28,7 @@ export declare class IndexPatternField implements IFieldType | [esTypes](./kibana-plugin-plugins-data-public.indexpatternfield.estypes.md) | | string[] | undefined | | | [filterable](./kibana-plugin-plugins-data-public.indexpatternfield.filterable.md) | | boolean | | | [isMapped](./kibana-plugin-plugins-data-public.indexpatternfield.ismapped.md) | | boolean | undefined | Is the field part of the index mapping? | -| [lang](./kibana-plugin-plugins-data-public.indexpatternfield.lang.md) | | string | undefined | Script field language | +| [lang](./kibana-plugin-plugins-data-public.indexpatternfield.lang.md) | | "painless" | "expression" | "mustache" | "java" | undefined | Script field language | | [name](./kibana-plugin-plugins-data-public.indexpatternfield.name.md) | | string | | | [readFromDocValues](./kibana-plugin-plugins-data-public.indexpatternfield.readfromdocvalues.md) | | boolean | | | [runtimeField](./kibana-plugin-plugins-data-public.indexpatternfield.runtimefield.md) | | RuntimeField | undefined | | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tojson.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tojson.md index f0600dd20658a..8882fa05ce0c2 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tojson.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tojson.md @@ -10,7 +10,7 @@ toJSON(): { count: number; script: string | undefined; - lang: string | undefined; + lang: "painless" | "expression" | "mustache" | "java" | undefined; conflictDescriptions: Record | undefined; name: string; type: string; @@ -28,7 +28,7 @@ toJSON(): { `{ count: number; script: string | undefined; - lang: string | undefined; + lang: "painless" | "expression" | "mustache" | "java" | undefined; conflictDescriptions: Record | undefined; name: string; type: string; diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.phrasefilter.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.phrasefilter.md index 090b78a7078cc..8d0447d58634c 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.phrasefilter.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.phrasefilter.md @@ -12,7 +12,7 @@ export declare type PhraseFilter = Filter & { script?: { script: { source?: any; - lang?: string; + lang?: estypes.ScriptLanguage; params: any; }; }; diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.rangefilter.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.rangefilter.md index fbe04f5e0a2a9..1cb627ec3a8f9 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.rangefilter.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.rangefilter.md @@ -12,7 +12,7 @@ export declare type RangeFilter = Filter & EsRangeFilter & { script?: { script: { params: any; - lang: string; + lang: estypes.ScriptLanguage; source: any; }; }; diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.lang.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.lang.md index 095142cf0f05b..757d8f34a0c3a 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.lang.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.lang.md @@ -7,5 +7,5 @@ Signature: ```typescript -lang?: string; +lang?: estypes.ScriptLanguage; ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.md index a1a76f2d2a295..fb39333cf245e 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.md @@ -15,7 +15,7 @@ export interface Reason | Property | Type | Description | | --- | --- | --- | | [caused\_by](./kibana-plugin-plugins-data-public.reason.caused_by.md) | {
type: string;
reason: string;
} | | -| [lang](./kibana-plugin-plugins-data-public.reason.lang.md) | string | | +| [lang](./kibana-plugin-plugins-data-public.reason.lang.md) | estypes.ScriptLanguage | | | [position](./kibana-plugin-plugins-data-public.reason.position.md) | {
offset: number;
start: number;
end: number;
} | | | [reason](./kibana-plugin-plugins-data-public.reason.reason.md) | string | | | [script\_stack](./kibana-plugin-plugins-data-public.reason.script_stack.md) | string[] | | diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.lang.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.lang.md index d033804cb6fcb..3d5a757cb8f18 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.lang.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.lang.md @@ -7,5 +7,5 @@ Signature: ```typescript -lang?: string; +lang?: estypes.ScriptLanguage; ``` diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.md index 5ac48d26a85d6..bbc4cc2135d40 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.md @@ -26,7 +26,7 @@ export interface IFieldType | [esTypes](./kibana-plugin-plugins-data-server.ifieldtype.estypes.md) | string[] | | | [filterable](./kibana-plugin-plugins-data-server.ifieldtype.filterable.md) | boolean | | | [format](./kibana-plugin-plugins-data-server.ifieldtype.format.md) | any | | -| [lang](./kibana-plugin-plugins-data-server.ifieldtype.lang.md) | string | | +| [lang](./kibana-plugin-plugins-data-server.ifieldtype.lang.md) | estypes.ScriptLanguage | | | [name](./kibana-plugin-plugins-data-server.ifieldtype.name.md) | string | | | [readFromDocValues](./kibana-plugin-plugins-data-server.ifieldtype.readfromdocvalues.md) | boolean | | | [script](./kibana-plugin-plugins-data-server.ifieldtype.script.md) | string | | diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md index 981f28a51ae09..33f1ac5e31660 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md @@ -6,6 +6,7 @@ > Warning: This API is now obsolete. > +> use runtime field instead > Add scripted field to field list diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md index cff2c5de98de6..e791dfc7c3738 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md @@ -6,6 +6,7 @@ > Warning: This API is now obsolete. > +> use runtime field instead > Signature: diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getruntimefield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getruntimefield.md new file mode 100644 index 0000000000000..d5dc8f966316b --- /dev/null +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getruntimefield.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [getRuntimeField](./kibana-plugin-plugins-data-server.indexpattern.getruntimefield.md) + +## IndexPattern.getRuntimeField() method + +Returns runtime field if exists + +Signature: + +```typescript +getRuntimeField(name: string): RuntimeField | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | + +Returns: + +`RuntimeField | null` + diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md index 62b8f1b62ac78..95f9f31309674 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md @@ -6,6 +6,7 @@ > Warning: This API is now obsolete. > +> use runtime field instead > Signature: diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.hasruntimefield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.hasruntimefield.md new file mode 100644 index 0000000000000..5000d5e645cbb --- /dev/null +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.hasruntimefield.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [hasRuntimeField](./kibana-plugin-plugins-data-server.indexpattern.hasruntimefield.md) + +## IndexPattern.hasRuntimeField() method + +Checks if runtime field exists + +Signature: + +```typescript +hasRuntimeField(name: string): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | + +Returns: + +`boolean` + diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md index 97d1cd9115262..27b8a31a2582b 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md @@ -54,13 +54,16 @@ export declare class IndexPattern implements IIndexPattern | [getFormatterForField(field)](./kibana-plugin-plugins-data-server.indexpattern.getformatterforfield.md) | | Provide a field, get its formatter | | [getFormatterForFieldNoDefault(fieldname)](./kibana-plugin-plugins-data-server.indexpattern.getformatterforfieldnodefault.md) | | Get formatter for a given field name. Return undefined if none exists | | [getNonScriptedFields()](./kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md) | | | +| [getRuntimeField(name)](./kibana-plugin-plugins-data-server.indexpattern.getruntimefield.md) | | Returns runtime field if exists | | [getScriptedFields()](./kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md) | | | | [getSourceFiltering()](./kibana-plugin-plugins-data-server.indexpattern.getsourcefiltering.md) | | Get the source filtering configuration for that index. | | [getTimeField()](./kibana-plugin-plugins-data-server.indexpattern.gettimefield.md) | | | +| [hasRuntimeField(name)](./kibana-plugin-plugins-data-server.indexpattern.hasruntimefield.md) | | Checks if runtime field exists | | [isTimeBased()](./kibana-plugin-plugins-data-server.indexpattern.istimebased.md) | | | | [isTimeNanosBased()](./kibana-plugin-plugins-data-server.indexpattern.istimenanosbased.md) | | | -| [removeRuntimeField(name)](./kibana-plugin-plugins-data-server.indexpattern.removeruntimefield.md) | | Remove a runtime field - removed from mapped field or removed unmapped field as appropriate | +| [removeRuntimeField(name)](./kibana-plugin-plugins-data-server.indexpattern.removeruntimefield.md) | | Remove a runtime field - removed from mapped field or removed unmapped field as appropriate. Doesn't clear associated field attributes. | | [removeScriptedField(fieldName)](./kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md) | | Remove scripted field from field list | +| [replaceAllRuntimeFields(newFields)](./kibana-plugin-plugins-data-server.indexpattern.replaceallruntimefields.md) | | Replaces all existing runtime fields with new fields | | [setFieldAttrs(fieldName, attrName, value)](./kibana-plugin-plugins-data-server.indexpattern.setfieldattrs.md) | | | | [setFieldCount(fieldName, count)](./kibana-plugin-plugins-data-server.indexpattern.setfieldcount.md) | | | | [setFieldCustomLabel(fieldName, customLabel)](./kibana-plugin-plugins-data-server.indexpattern.setfieldcustomlabel.md) | | | diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removeruntimefield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removeruntimefield.md index da8e7e40a7fac..ef32b80ba8502 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removeruntimefield.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removeruntimefield.md @@ -4,7 +4,7 @@ ## IndexPattern.removeRuntimeField() method -Remove a runtime field - removed from mapped field or removed unmapped field as appropriate +Remove a runtime field - removed from mapped field or removed unmapped field as appropriate. Doesn't clear associated field attributes. Signature: @@ -16,7 +16,7 @@ removeRuntimeField(name: string): void; | Parameter | Type | Description | | --- | --- | --- | -| name | string | | +| name | string | Field name to remove | Returns: diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md index f6beed7389e43..b351eba2ace4f 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md @@ -6,6 +6,7 @@ > Warning: This API is now obsolete. > +> use runtime field instead > Remove scripted field from field list diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.replaceallruntimefields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.replaceallruntimefields.md new file mode 100644 index 0000000000000..35df871763f8a --- /dev/null +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.replaceallruntimefields.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [replaceAllRuntimeFields](./kibana-plugin-plugins-data-server.indexpattern.replaceallruntimefields.md) + +## IndexPattern.replaceAllRuntimeFields() method + +Replaces all existing runtime fields with new fields + +Signature: + +```typescript +replaceAllRuntimeFields(newFields: Record): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| newFields | Record<string, RuntimeField> | | + +Returns: + +`void` + diff --git a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.md b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.md index 449cc66cb3335..34de4f9e13cda 100644 --- a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.md +++ b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.md @@ -23,7 +23,7 @@ export interface ExpressionFunctionDefinitionstring | Help text displayed in the Expression editor. This text should be internationalized. | | [inputTypes](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.inputtypes.md) | Array<TypeToString<Input>> | List of allowed type names for input value of this function. If this property is set the input of function will be cast to the first possible type in this list. If this property is missing the input will be provided to the function as-is. | | [name](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.name.md) | Name | The name of the function, as will be used in expression. | -| [type](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.type.md) | TypeToString<UnwrapPromiseOrReturn<Output>> | Name of type of value this function outputs. | +| [type](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.type.md) | TypeString<Output> | UnmappedTypeStrings | Name of type of value this function outputs. | ## Methods diff --git a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.type.md b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.type.md index 4831f24a418bc..01ad35b8a1ba5 100644 --- a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.type.md +++ b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.type.md @@ -9,5 +9,5 @@ Name of type of value this function outputs. Signature: ```typescript -type?: TypeToString>; +type?: TypeString | UnmappedTypeStrings; ``` diff --git a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionsservice.md b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionsservice.md index 6ba0f0feb82b3..9afd603bc4869 100644 --- a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionsservice.md +++ b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionsservice.md @@ -70,7 +70,7 @@ The actual function is defined in the fn key. The function can be \ | Method | Modifiers | Description | | --- | --- | --- | -| [setup()](./kibana-plugin-plugins-expressions-public.expressionsservice.setup.md) | | Returns Kibana Platform \*setup\* life-cycle contract. Useful to return the same contract on server-side and browser-side. | -| [start()](./kibana-plugin-plugins-expressions-public.expressionsservice.start.md) | | Returns Kibana Platform \*start\* life-cycle contract. Useful to return the same contract on server-side and browser-side. | +| [setup(args)](./kibana-plugin-plugins-expressions-public.expressionsservice.setup.md) | | Returns Kibana Platform \*setup\* life-cycle contract. Useful to return the same contract on server-side and browser-side. | +| [start(args)](./kibana-plugin-plugins-expressions-public.expressionsservice.start.md) | | Returns Kibana Platform \*start\* life-cycle contract. Useful to return the same contract on server-side and browser-side. | | [stop()](./kibana-plugin-plugins-expressions-public.expressionsservice.stop.md) | | | diff --git a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionsservice.setup.md b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionsservice.setup.md index a51f3f073d518..991f1f717d5f5 100644 --- a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionsservice.setup.md +++ b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionsservice.setup.md @@ -9,8 +9,15 @@ Returns Kibana Platform \*setup\* life-cycle contract. Useful to return the same Signature: ```typescript -setup(): ExpressionsServiceSetup; +setup(...args: unknown[]): ExpressionsServiceSetup; ``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| args | unknown[] | | + Returns: `ExpressionsServiceSetup` diff --git a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionsservice.start.md b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionsservice.start.md index 766d703a0729d..34d33cacabebb 100644 --- a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionsservice.start.md +++ b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionsservice.start.md @@ -9,8 +9,15 @@ Returns Kibana Platform \*start\* life-cycle contract. Useful to return the same Signature: ```typescript -start(): ExpressionsServiceStart; +start(...args: unknown[]): ExpressionsServiceStart; ``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| args | unknown[] | | + Returns: `ExpressionsServiceStart` diff --git a/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.expressionfunctiondefinition.md b/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.expressionfunctiondefinition.md index 51240f094b181..35248c01a4e29 100644 --- a/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.expressionfunctiondefinition.md +++ b/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.expressionfunctiondefinition.md @@ -23,7 +23,7 @@ export interface ExpressionFunctionDefinitionstring | Help text displayed in the Expression editor. This text should be internationalized. | | [inputTypes](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinition.inputtypes.md) | Array<TypeToString<Input>> | List of allowed type names for input value of this function. If this property is set the input of function will be cast to the first possible type in this list. If this property is missing the input will be provided to the function as-is. | | [name](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinition.name.md) | Name | The name of the function, as will be used in expression. | -| [type](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinition.type.md) | TypeToString<UnwrapPromiseOrReturn<Output>> | Name of type of value this function outputs. | +| [type](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinition.type.md) | TypeString<Output> | UnmappedTypeStrings | Name of type of value this function outputs. | ## Methods diff --git a/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.expressionfunctiondefinition.type.md b/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.expressionfunctiondefinition.type.md index a73ded342f053..2994b9547fd8c 100644 --- a/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.expressionfunctiondefinition.type.md +++ b/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.expressionfunctiondefinition.type.md @@ -9,5 +9,5 @@ Name of type of value this function outputs. Signature: ```typescript -type?: TypeToString>; +type?: TypeString | UnmappedTypeStrings; ``` diff --git a/docs/discover/images/discover-search-for-relevance.png b/docs/discover/images/discover-search-for-relevance.png index 4d59ad186ded4..e42ed2416f79e 100644 Binary files a/docs/discover/images/discover-search-for-relevance.png and b/docs/discover/images/discover-search-for-relevance.png differ diff --git a/docs/discover/images/double-arrow.png b/docs/discover/images/double-arrow.png new file mode 100644 index 0000000000000..ba4ee11ebf738 Binary files /dev/null and b/docs/discover/images/double-arrow.png differ diff --git a/docs/discover/images/downward-arrow.png b/docs/discover/images/downward-arrow.png new file mode 100644 index 0000000000000..47b03cfe82b34 Binary files /dev/null and b/docs/discover/images/downward-arrow.png differ diff --git a/docs/discover/search-for-relevance.asciidoc b/docs/discover/search-for-relevance.asciidoc index 0232c02b6e061..f3cf1c3a7f52c 100644 --- a/docs/discover/search-for-relevance.asciidoc +++ b/docs/discover/search-for-relevance.asciidoc @@ -1,24 +1,36 @@ [[discover-search-for-relevance]] == Search for relevance -Sometimes you might be unsure which documents best match your question. +Sometimes you might be unsure which documents best match your search. {es} assigns a relevancy, or score to each document, so you can can narrow your search to the documents with the most relevant results. The higher the score, the better it matches your query. -For example, suppose you have the <>, and you're a searching for -a flight that arrived or departed from `Warsaw` or `Venice` when the weather was clear. +This example shows how to use *Discover* to list +your documents from most relevant to least relevant. This example uses +the <>, or you can use your own data. -. In *Discover*, open the index pattern dropdown, and select `kibana_sample_data_flight`. -. In the query bar, click *KQL*, and switch to the <>. -. Search for `Warsaw OR Venice OR Clear`. -. If you don't see any results, open the time filter and select a time range that contains data. -. From the list of *Available fields*, add `_score` to the document table. -. In the document table, click the header for the `_score` column, and then sort the column by descending scores. +. In *Discover*, open the index pattern dropdown, and select that data you want to work with. + -The results are currently sorted by first `Time`, and then by `_score`. -. To sort only by `_score`, remove the `Time` field. +For the sample flights data, set the index pattern to *kibana_sample_data_flights*. +. In the query bar, click *KQL*, and then turn it off. + -Your table now shows documents with the best matches, from most to least relevant. +You're now using the <>. +. Run your search. For the sample data, try: ++ +```ts +Warsaw OR Venice OR Clear +``` +. If you don't see any results, expand the <>, for example to *Last 7 days*. +. From the list of *Available fields*, add `_score` and any other fields you want to the document table. +. To sort the `_score` column in descending order, hover over its header, and then click twice on +the arrow icon +image:images/double-arrow.png[Double arrow icon to indicate sorting] so it changes to +image:images/downward-arrow.png[Downward pointing arrow to indicate descending sorting]. ++ +At this point, you're doing a multi-column sort: first by `Time`, and then by `_score`. +. To turn off sorting for the `Time` field, hover over its header, and then click the down arrow. ++ +Your table now sorts documents from most to least relevant. + [role="screenshot"] image::images/discover-search-for-relevance.png["Example of a search for relevance"] diff --git a/docs/index-extra-title-page.html b/docs/index-extra-title-page.html index 06d8c0b2e827b..7bcbc9f075124 100644 --- a/docs/index-extra-title-page.html +++ b/docs/index-extra-title-page.html @@ -1,5 +1,6 @@

From creating beautiful visualizations to managing the Elastic Stack, learn how Kibana helps you get the most of your data.

+

Watch our videos

@@ -11,8 +12,8 @@ diff --git a/docs/management/connectors/action-types/index.asciidoc b/docs/management/connectors/action-types/index.asciidoc index d3bd3d431748c..7868085ef9c96 100644 --- a/docs/management/connectors/action-types/index.asciidoc +++ b/docs/management/connectors/action-types/index.asciidoc @@ -119,7 +119,7 @@ When creating a new rule, add an <> and select [role="screenshot"] image::images/pre-configured-alert-history-connector.png[Select pre-configured alert history connectors] -Documents are indexed using a preconfigured schema that captures the <> available for the rule. By default, these documents are indexed into the `kibana-alert-history-default` index, but you can specify a different index. Index names must start with `kibana-alert-history-` to take advantage of the preconfigured alert history index template. +Documents are indexed using a preconfigured schema that captures the <> available for the rule. By default, these documents are indexed into the `kibana-alert-history-default` index, but you can specify a different index. Index names must start with `kibana-alert-history-` to take advantage of the preconfigured alert history index template. [IMPORTANT] ============================================== diff --git a/docs/management/connectors/action-types/webhook.asciidoc b/docs/management/connectors/action-types/webhook.asciidoc index aa52e8a3bdb43..02c3de139e0d5 100644 --- a/docs/management/connectors/action-types/webhook.asciidoc +++ b/docs/management/connectors/action-types/webhook.asciidoc @@ -91,4 +91,4 @@ Body:: A JSON payload sent to the request URL. For example: Mustache template variables (the text enclosed in double braces, for example, `context.rule.name`) have their values escaped, so that the final JSON will be valid (escaping double quote characters). -For more information on Mustache template variables, refer to <>. +For more information on Mustache template variables, refer to <>. diff --git a/docs/rule-type-template.asciidoc b/docs/rule-type-template.asciidoc index 605bdd57c1492..5fe4de81bcddc 100644 --- a/docs/rule-type-template.asciidoc +++ b/docs/rule-type-template.asciidoc @@ -6,7 +6,7 @@ Include a short description of the rule type. [float] ==== Create the rule -Fill in the <>, then select **. +Fill in the <>, then select **. [float] ==== Define the conditions @@ -25,7 +25,7 @@ Condition2:: This is another condition the user must define. [float] ==== Add action variables -<> to run when the rule condition is met. The following variables are specific to the rule. You can also specify <>. +<> to run when the rule condition is met. The following variables are specific to the rule. You can also specify <>. `context.variableA`:: A short description of the context variable defined by the rule type. `context.variableB`:: A short description of the context variable defined by the rule type with an example. Example: `this is what variableB outputs`. diff --git a/docs/setup/connect-to-elasticsearch.asciidoc b/docs/setup/connect-to-elasticsearch.asciidoc index 8c0aa12ffc4c6..5e18d934863aa 100644 --- a/docs/setup/connect-to-elasticsearch.asciidoc +++ b/docs/setup/connect-to-elasticsearch.asciidoc @@ -46,8 +46,7 @@ image::images/add-data-fleet.png[Add data using Fleet] [[upload-data-kibana]] === Upload a file -experimental[] If your data is in a CSV, JSON, or log file, you can upload it using the File -Data Visualizer. You can upload a file up to 100 MB. This value is configurable up to 1 GB in +experimental[] If your data is in a CSV, JSON, or log file, you can upload it using the {file-data-viz}. You can upload a file up to 100 MB. This value is configurable up to 1 GB in <>. To upload a file with geospatial data, refer to <>. diff --git a/docs/setup/images/add-data-fv.png b/docs/setup/images/add-data-fv.png old mode 100755 new mode 100644 index 45313d133822c..7e253cdd0229d Binary files a/docs/setup/images/add-data-fv.png and b/docs/setup/images/add-data-fv.png differ diff --git a/docs/setup/images/add-data-tutorials.png b/docs/setup/images/add-data-tutorials.png index 74deedc57b42e..782b44e383772 100644 Binary files a/docs/setup/images/add-data-tutorials.png and b/docs/setup/images/add-data-tutorials.png differ diff --git a/docs/user/alerting/alerting-getting-started.asciidoc b/docs/user/alerting/alerting-getting-started.asciidoc index bb11d2a0be423..8c17f8ec93b96 100644 --- a/docs/user/alerting/alerting-getting-started.asciidoc +++ b/docs/user/alerting/alerting-getting-started.asciidoc @@ -11,7 +11,7 @@ image::images/alerting-overview.png[Rules and Connectors UI] [IMPORTANT] ============================================== -To make sure you can access alerting and actions, see the <> section. +To make sure you can access alerting and actions, see the <> section. ============================================== [float] @@ -22,7 +22,7 @@ Actions typically involve interaction with {kib} services or third party integra This section describes all of these elements and how they operate together. [float] -=== What is a rule? +=== Rules A rule specifies a background task that runs on the {kib} server to check for specific conditions. It consists of three main parts: @@ -30,7 +30,10 @@ A rule specifies a background task that runs on the {kib} server to check for sp * *Schedule*: when/how often should detection checks run? * *Actions*: what happens when a condition is detected? -For example, when monitoring a set of servers, a rule might check for average CPU usage > 0.9 on each server for the last two minutes (condition), checked every minute (schedule), sending a warning email message via SMTP with subject `CPU on {{server}} is high` (action). +For example, when monitoring a set of servers, a rule might: +* Check for average CPU usage > 0.9 on each server for the last two minutes (condition). +* Check every minute (schedule). +* Send a warning email message via SMTP with subject `CPU on {{server}} is high` (action). image::images/what-is-a-rule.svg[Three components of a rule] @@ -40,7 +43,7 @@ The following sections describe each part of the rule in more detail. [[alerting-concepts-conditions]] ==== Conditions -Under the hood, {kib} rules detect conditions by running a javascript function on the {kib} server, which gives it the flexibility to support a wide range of conditions, anything from the results of a simple {es} query to heavy computations involving data from multiple sources or external systems. +Under the hood, {kib} rules detect conditions by running a Javascript function on the {kib} server, which gives it the flexibility to support a wide range of conditions, anything from the results of a simple {es} query to heavy computations involving data from multiple sources or external systems. These conditions are packaged and exposed as *rule types*. A rule type hides the underlying details of the condition, and exposes a set of parameters to control the details of the conditions to detect. @@ -68,22 +71,22 @@ Actions are invocations of connectors, which allow interaction with {kib} servic When defining actions in a rule, you specify: -* the *connector type*: the type of service or integration to use -* the connection for that type by referencing a <> -* a mapping of rule values to properties exposed for that type of action +* The *connector type*: the type of service or integration to use +* The connection for that type by referencing a <> +* A mapping of rule values to properties exposed for that type of action The result is a template: all the parameters needed to invoke a service are supplied except for specific values that are only known at the time the rule condition is detected. In the server monitoring example, the `email` connector type is used, and `server` is mapped to the body of the email, using the template string `CPU on {{server}} is high`. -When the rule detects the condition, it creates an <> containing the details of the condition, renders the template with these details such as server name, and executes the action on the {kib} server by invoking the `email` connector type. +When the rule detects the condition, it creates an <> containing the details of the condition, renders the template with these details such as server name, and executes the action on the {kib} server by invoking the `email` connector type. image::images/what-is-an-action.svg[Actions are like templates that are rendered when an alert detects a condition] See <> for details on the types of connectors provided by {kib}. [float] -[[alerting-concepts-alert-instances]] +[[alerting-concepts-alerts]] === Alerts When checking for a condition, a rule might identify multiple occurrences of the condition. {kib} tracks each of these *alerts* separately and takes an action per alert. @@ -92,22 +95,6 @@ Using the server monitoring example, each server with average CPU > 0.9 is track image::images/alerts.svg[{kib} tracks each detected condition as an alert and takes action on each alert] -[float] -[[alerting-concepts-suppressing-duplicate-notifications]] -=== Suppressing duplicate notifications - -Since actions are executed per alert, a rule can end up generating a large number of actions. Take the following example where a rule is monitoring three servers every minute for CPU usage > 0.9: - -* Minute 1: server X123 > 0.9. *One email* is sent for server X123. -* Minute 2: X123 and Y456 > 0.9. *Two emails* are sent, one for X123 and one for Y456. -* Minute 3: X123, Y456, Z789 > 0.9. *Three emails* are sent, one for each of X123, Y456, Z789. - -In the above example, three emails are sent for server X123 in the span of 3 minutes for the same rule. Often it's desirable to suppress frequent re-notification. Operations like muting and throttling can be applied at the alert level. If we set the rule re-notify interval to 5 minutes, we reduce noise by only getting emails for new servers that exceed the threshold: - -* Minute 1: server X123 > 0.9. *One email* is sent for server X123. -* Minute 2: X123 and Y456 > 0.9. *One email* is sent for Y456. -* Minute 3: X123, Y456, Z789 > 0.9. *One email* is sent for Z789. - [float] [[alerting-concepts-connectors]] === Connectors @@ -120,7 +107,7 @@ Rather than repeatedly entering connection information and credentials for each image::images/rule-concepts-connectors.svg[Connectors provide a central place to store service connection settings] [float] -=== Summary +== Putting it all together A *rule* consists of conditions, *actions*, and a schedule. When conditions are met, *alerts* are created that render *actions* and invoke them. To make action setup and update easier, actions use *connectors* that centralize the information used to connect with {kib} services and third-party integrations. The following example ties these concepts together: @@ -131,7 +118,6 @@ image::images/rule-concepts-summary.svg[Rules, connectors, alerts and actions wo . {kib} invokes the actions, sending them to a third party *integration* like an email service. . If the third party integration has connection parameters or credentials, {kib} will fetch these from the *connector* referenced in the action. - [float] [[alerting-concepts-differences]] == Differences from Watcher @@ -152,63 +138,7 @@ Pre-packaged *rule types* simplify setup and hide the details of complex, domain [float] [[alerting-setup-prerequisites]] -== Setup and prerequisites - -If you are using an *on-premises* Elastic Stack deployment: - -* In the kibana.yml configuration file, add the <> setting. -* For emails to have a footer with a link back to {kib}, set the <> configuration setting. - -If you are using an *on-premises* Elastic Stack deployment with <>: - -* You must enable Transport Layer Security (TLS) for communication <>. {kib} alerting uses <> to secure background rule 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 alerting 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 +== Prerequisites +<> -To access alerting in a space, a user must have access to one of the following features: - -* Alerting -* <> -* <> -* <> -* <> -* <> -* <> - -See <> for more information on configuring roles that provide access to these features. -Also note that a user will need +read+ privileges for the *Actions and Connectors* feature to attach actions to a rule or to edit a rule that has an action attached to it. - -[float] -[[alerting-spaces]] -=== Space isolation - -Rules and connectors are isolated to the {kib} space in which they were created. A rule or connector created in one space will not be visible in another. - -[float] -[[alerting-authorization]] -=== Authorization - -Rules, including all background detection and the actions they generate are authorized using an <> associated with the last user to edit the rule. Upon creating or modifying a rule, an API key is generated for that user, capturing a snapshot of their privileges at that moment in time. The API key is then used to run all background tasks associated with the rule including detection checks and executing actions. - -[IMPORTANT] -============================================== -If a rule requires certain privileges to run, such as index privileges, keep in mind that if a user without those privileges updates the rule, the rule will no longer function. -============================================== - -[float] -[[alerting-restricting-actions]] -=== Restricting actions - -For security reasons you may wish to limit the extent to which {kib} can connect to external services. <> allows you to disable certain <> and allowlist the hostnames that {kib} can connect with. - --- +-- \ No newline at end of file diff --git a/docs/user/alerting/alerting-setup.asciidoc b/docs/user/alerting/alerting-setup.asciidoc new file mode 100644 index 0000000000000..39f1af0030e0a --- /dev/null +++ b/docs/user/alerting/alerting-setup.asciidoc @@ -0,0 +1,68 @@ +[role="xpack"] +[[alerting-setup]] +== Alerting Setup +++++ +Setup +++++ + +The Alerting feature is automatically enabled in {kib}, but might require some additional configuration. + +[float] +[[alerting-prerequisites]] +=== Prerequisites +If you are using an *on-premises* Elastic Stack deployment: + +* In the kibana.yml configuration file, add the <> setting. +* For emails to have a footer with a link back to {kib}, set the <> configuration setting. + +If you are using an *on-premises* Elastic Stack deployment with <>: + +* You must enable Transport Layer Security (TLS) for communication <>. {kib} alerting uses <> to secure background rule 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 alerting 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 + +To access alerting in a space, a user must have access to one of the following features: + +* Alerting +* <> +* <> +* <> +* <> +* <> +* <> + +See <> for more information on configuring roles that provide access to these features. +Also note that a user will need +read+ privileges for the *Actions and Connectors* feature to attach actions to a rule or to edit a rule that has an action attached to it. + +[float] +[[alerting-restricting-actions]] +==== Restrict actions + +For security reasons you may wish to limit the extent to which {kib} can connect to external services. <> allows you to disable certain <> and allowlist the hostnames that {kib} can connect with. + +[float] +[[alerting-spaces]] +=== Space isolation + +Rules and connectors are isolated to the {kib} space in which they were created. A rule or connector created in one space will not be visible in another. + +[float] +[[alerting-authorization]] +=== Authorization + +Rules, including all background detection and the actions they generate are authorized using an <> associated with the last user to edit the rule. Upon creating or modifying a rule, an API key is generated for that user, capturing a snapshot of their privileges at that moment in time. The API key is then used to run all background tasks associated with the rule including detection checks and executing actions. + +[IMPORTANT] +============================================== +If a rule requires certain privileges to run, such as index privileges, keep in mind that if a user without those privileges updates the rule, the rule will no longer function. +============================================== diff --git a/docs/user/alerting/alerting-troubleshooting.asciidoc b/docs/user/alerting/alerting-troubleshooting.asciidoc index b7fd98d1c674e..b7b0c749dfe14 100644 --- a/docs/user/alerting/alerting-troubleshooting.asciidoc +++ b/docs/user/alerting/alerting-troubleshooting.asciidoc @@ -1,6 +1,9 @@ [role="xpack"] [[alerting-troubleshooting]] == Alerting Troubleshooting +++++ +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: diff --git a/docs/user/alerting/create-and-manage-rules.asciidoc b/docs/user/alerting/create-and-manage-rules.asciidoc new file mode 100644 index 0000000000000..af6714aef662f --- /dev/null +++ b/docs/user/alerting/create-and-manage-rules.asciidoc @@ -0,0 +1,184 @@ +[role="xpack"] +[[create-and-manage-rules]] +== Create and manage rules + +The *Rules* UI provides a cross-app view of alerting. Different {kib} apps like {observability-guide}/create-alerts.html[*Observability*], {security-guide}/prebuilt-rules.html[*Security*], <> and <> can offer their own rules. The *Rules* UI provides a central place to: + +* <> rules +* <> including enabling/disabling, muting/unmuting, and deleting +* Drill-down to <> + +[role="screenshot"] +image:images/rules-and-connectors-ui.png[Example rule listing in the Rules and Connectors UI] + +For more information on alerting concepts and the types of rules and connectors available, see <>. + +[float] +=== Required permissions + +Access to rules is granted based on your privileges to alerting-enabled features. See <> for more information. + +[float] +[[create-edit-rules]] +=== Create and edit rules + +Many rules must be created within the context of a {kib} app like <>, <>, or <>, but others are generic. Generic rule types can be created in the *Rules* management UI by clicking the *Create* button. This will launch a flyout that guides you through selecting a rule type and configuring its conditions and action type. Refer to <> for details on what types of rules are available and how to configure them. + +After a rule is created, you can re-open the flyout and change a rule's properties by clicking the *Edit* button shown on each row of the rule listing. + +[float] +[[defining-rules-general-details]] +==== General rule details + +All rules share the following four properties. + +Name:: The name of the rule. While this name does not have to be unique, the name can be referenced in actions and also appears in the searchable rule listing in the *Management* UI. A distinctive name can help identify and find a rule. +Tags:: A list of tag names that can be applied to a rule. Tags can help you organize and find rules, because tags appear in the rule listing in the *Management* UI, which is searchable by tag. +Check every:: This value determines how frequently the rule conditions are checked. Note that the timing of background rule checks is not guaranteed, particularly for intervals of less than 10 seconds. See <> for more information. +Notify:: This value limits how often actions are repeated when an alert remains active across rule checks. See <> for more information. + +- **Only on status change**: Actions are not repeated when an alert remains active across checks. Actions run only when the alert status changes. +- **Every time alert is active**: Actions are repeated when an alert remains active across checks. +- **On a custom action interval**: Actions are suppressed for the throttle interval, but repeat when an alert remains active across checks for a duration longer than the throttle interval. + +[float] +[[alerting-concepts-suppressing-duplicate-notifications]] +[NOTE] +============================================== +Since actions are executed per alert, a rule can end up generating a large number of actions. Take the following example where a rule is monitoring three servers every minute for CPU usage > 0.9, and the rule is set to notify **Every time alert is active**: + +* Minute 1: server X123 > 0.9. *One email* is sent for server X123. +* Minute 2: X123 and Y456 > 0.9. *Two emails* are sent, one for X123 and one for Y456. +* Minute 3: X123, Y456, Z789 > 0.9. *Three emails* are sent, one for each of X123, Y456, Z789. + +In the above example, three emails are sent for server X123 in the span of 3 minutes for the same rule. Often, it's desirable to suppress these re-notifications. If you set the rule **Notify** setting to **On a custom action interval** with an interval of 5 minutes, you reduce noise by only getting emails every 5 minutes for servers that continue to exceed the threshold: + +* Minute 1: server X123 > 0.9. *One email* is sent for server X123. +* Minute 2: X123 and Y456 > 0.9. *One email* is sent for Y456. +* Minute 3: X123, Y456, Z789 > 0.9. *One email* is sent for Z789. + +To get notified **only once** when a server exceeds the threshold, you can set the rule's **Notify** setting to **Only on status change**. +============================================== + +[role="screenshot"] +image::images/rule-flyout-general-details.png[alt='All rules have name, tags, check every, and notify properties in common'] + +[float] +[[defining-rules-type-conditions]] +==== Rule type and conditions + +Depending upon the {kib} app and context, you might be prompted to choose the type of rule to create. Some apps will pre-select the type of rule for you. + +[role="screenshot"] +image::images/rule-flyout-rule-type-selection.png[Choosing the type of rule to create] + +Each rule type provides its own way of defining the conditions to detect, but an expression formed by a series of clauses is a common pattern. Each clause has a UI control that allows you to define the clause. For example, in an index threshold rule, the `WHEN` clause allows you to select an aggregation operation to apply to a numeric field. + +[role="screenshot"] +image::images/rule-flyout-rule-conditions.png[UI for defining rule conditions on an index threshold rule] + +[float] +[[defining-rules-actions-details]] +==== Action type and details + +To receive notifications when a rule meets the defined conditions, you must add one or more actions. Start by selecting a type of connector for your action: + +[role="screenshot"] +image::images/rule-flyout-connector-type-selection.png[UI for selecting an action type] + +Each action must specify a <> instance. If no connectors exist for the selected type, click **Add connector** to create one. + +[role="screenshot"] +image::images/rule-flyout-action-no-connector.png[UI for adding connector] + +Once you have selected a connector, use the **Run When** dropdown to choose the action group to associate with this action. When a rule meets the defined condition, it is marked as **Active** and alerts are created and assigned to an action group. In addition to the action groups defined by the selected rule type, each rule also has a **Recovered** action group that is assigned when a rule's conditions are no longer detected. + +Each action type exposes different properties. For example, an email action allows you to set the recipients, the subject, and a message body in markdown format. See <> for details on the types of actions provided by {kib} and their properties. + +[role="screenshot"] +image::images/rule-flyout-action-details.png[UI for defining an email action] + +[float] +[[defining-rules-actions-variables]] +===== Action variables +Using the https://mustache.github.io/[Mustache] template syntax `{{variable name}}`, you can pass rule values at the time a condition is detected to an action. You can access the list of available variables using the "add variable" button. Although available variables differ by rule type, all rule types pass the following variables: + +`rule.id`:: The ID of the rule. +`rule.name`:: The name of the rule. +`rule.spaceId`:: The ID of the space for the rule. +`rule.tags`:: The list of tags applied to the rule. +`date`:: The date the rule scheduled the action, in ISO format. +`alert.id`:: The ID of the alert that scheduled the action. +`alert.actionGroup`:: The ID of the action group of the alert that scheduled the action. +`alert.actionSubgroup`:: The action subgroup of the alert that scheduled the action. +`alert.actionGroupName`:: The name of the action group of the alert that scheduled the action. +`kibanaBaseUrl`:: The configured <>. If not configured, this will be empty. + +[role="screenshot"] +image::images/rule-flyout-action-variables.png[Passing rule values to an action] + +Some cases exist where the variable values will be "escaped", when used in a context where escaping is needed: + +- For the <> connector, the `message` action configuration property escapes any characters that would be interpreted as Markdown. +- For the <> connector, the `message` action configuration property escapes any characters that would be interpreted as Slack Markdown. +- For the <> connector, the `body` action configuration property escapes any characters that are invalid in JSON string values. + +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 rule type defines additional variables as properties of the variable `context`. For example, if a rule 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 rule type. + +You can attach more than one action. Clicking the "Add action" button will prompt you to select another rule type and repeat the above steps again. + +[role="screenshot"] +image::images/rule-flyout-add-action.png[You can add multiple actions on a rule] + +[NOTE] +============================================== +Actions are not required on rules. You can run a rule without actions to understand its behavior, and then <> later. +============================================== + +[float] +[[controlling-rules]] +=== Mute and disable rules + +The rule listing allows you to quickly mute/unmute, disable/enable, and delete individual rules by clicking menu button to open the actions menu. Muting means that the rule checks continue to run on a schedule, but that alert will not trigger any action. + +[role="screenshot"] +image:images/individual-mute-disable.png[The actions button allows an individual rule to be muted, disabled, or deleted] + +You can perform these operations in bulk by multi-selecting rules, and then clicking the *Manage rules* button: + +[role="screenshot"] +image:images/bulk-mute-disable.png[The Manage rules button lets you mute/unmute, enable/disable, and delete in bulk,width=75%] + +[float] +[[rule-details]] +=== Drilldown to rule details + +Select a rule name from the rule listing to access the *Rule details* page, which tells you about the state of the rule and provides granular control over the actions it is taking. + +[role="screenshot"] +image::images/rule-details-alerts-active.png[Rule details page with three alerts] + +In this example, the rule detects when a site serves more than a threshold number of bytes in a 24 hour period. Three sites are above the threshold. These are called alerts - occurrences of the condition being detected - and the alert name, status, time of detection, and duration of the condition are shown in this view. + +Upon detection, each alert can trigger one or more actions. If the condition persists, the same actions will trigger either on the next scheduled rule check, or (if defined) after the re-notify period on the rule has passed. To prevent re-notification, you can suppress future actions by clicking on the switch to mute an individual alert. + +[role="screenshot"] +image::images/rule-details-alert-muting.png[Muting an alert,width=50%] + +Alerts will come and go from the list depending on whether they meet the rule conditions or not - unless they are muted. If a muted instance no longer meets the rule conditions, it will appear as inactive in the list. This prevents an alert from triggering actions if it reappears in the future. + +[role="screenshot"] +image::images/rule-details-alerts-inactive.png[Rule details page with three inactive alerts] + +If you want to suppress actions on all current and future alerts, you can mute the entire rule. Rule checks continue to run and the alert list will update as alerts activate or deactivate, but no actions will be triggered. + +[role="screenshot"] +image::images/rule-details-muting.png[Use the mute toggle to suppress all actions on current and future alerts,width=50%] + +You can also disable a rule altogether. When disabled, the rule stops running checks altogether and will clear any alerts it is tracking. You may want to disable rules that are not currently needed to reduce the load on {kib} and {es}. + +[role="screenshot"] +image::images/rule-details-disabling.png[Use the disable toggle to turn off rule checks and clear alerts tracked] diff --git a/docs/user/alerting/defining-rules.asciidoc b/docs/user/alerting/defining-rules.asciidoc index 05885f1af13ba..686a7bbc8a37b 100644 --- a/docs/user/alerting/defining-rules.asciidoc +++ b/docs/user/alerting/defining-rules.asciidoc @@ -2,114 +2,10 @@ [[defining-alerts]] == Defining rules -{kib} alerting rules can be created in a variety of apps including <>, <>, <>, <>, <> and from the <> UI. While alerting details may differ from app to app, they share a common interface for defining and configuring rules that this section describes in more detail. - -[float] -=== Create a rule - -When you create a rule, you must define the rule details, conditions, and actions. - -. <> -. <> -. <> - -image::images/rule-flyout-sections.png[The three sections of a rule definition] +This content has been moved to <>. [float] [[defining-alerts-general-details]] -=== General rule details - -All rules share the following four properties. - -[role="screenshot"] -image::images/rule-flyout-general-details.png[alt='All rules have name, tags, check every, and notify properties in common'] - -Name:: The name of the rule. While this name does not have to be unique, the name can be referenced in actions and also appears in the searchable rule listing in the management UI. A distinctive name can help identify and find a rule. -Tags:: A list of tag names that can be applied to a rule. Tags can help you organize and find rules, because tags appear in the rule listing in the management UI which is searchable by tag. -Check every:: This value determines how frequently the rule conditions below are checked. Note that the timing of background rule checks are not guaranteed, particularly for intervals of less than 10 seconds. See <> for more information. -Notify:: This value limits how often actions are repeated when an alert remains active across rule checks. See <> for more information. + -- **Only on status change**: Actions are not repeated when an alert remains active across checks. Actions run only when the alert status changes. -- **Every time alert is active**: Actions are repeated when an alert remains active across checks. -- **On a custom action interval**: Actions are suppressed for the throttle interval, but repeat when an alert remains active across checks for a duration longer than the throttle interval. - - -[float] -[[defining-alerts-type-conditions]] -=== Rule type and conditions - -Depending upon the {kib} app and context, you may be prompted to choose the type of rule you wish to create. Some apps will pre-select the type of rule for you. - -[role="screenshot"] -image::images/rule-flyout-rule-type-selection.png[Choosing the type of rule to create] - -Each rule type provides its own way of defining the conditions to detect, but an expression formed by a series of clauses is a common pattern. Each clause has a UI control that allows you to define the clause. For example, in an index threshold rule the `WHEN` clause allows you to select an aggregation operation to apply to a numeric field. - -[role="screenshot"] -image::images/rule-flyout-rule-conditions.png[UI for defining rule conditions on an index threshold rule] - -[float] -[[defining-alerts-actions-details]] -=== Action type and action details - -To add an action to a rule, you first select the type of connector: - -[role="screenshot"] -image::images/rule-flyout-connector-type-selection.png[UI for selecting an action type] - -When an alert matches a condition, the rule is marked as _Active_ and assigned an action group. The actions in that group are triggered. -When the condition is no longer detected, the rule is assigned to the _Recovered_ action group, which triggers any actions assigned to that group. - -**Run When** allows you to assign an action to an action group. This will trigger the action in accordance with your **Notify** setting. - -Each action must specify a <> instance. If no connectors exist for that action type, click *Add connector* to create one. - -Each action type exposes different properties. For example an email action allows you to set the recipients, the subject, and a message body in markdown format. See <> for details on the types of actions provided by {kib} and their properties. - -[role="screenshot"] -image::images/rule-flyout-action-details.png[UI for defining an email action] - -[float] -[[defining-alerts-actions-variables]] -==== Action variables -Using the https://mustache.github.io/[Mustache] template syntax `{{variable name}}`, you can pass rule values at the time a condition is detected to an action. You can access the list of available variables using the "add variable" button. Although available variables differ by rule type, all rule types pass the following variables: - -`rule.id`:: The ID of the rule. -`rule.name`:: The name of the rule. -`rule.spaceId`:: The ID of the space for the rule. -`rule.tags`:: The list of tags applied to the rule. -`date`:: The date the rule scheduled the action, in ISO format. -`alert.id`:: The ID of the alert that scheduled the action. -`alert.actionGroup`:: The ID of the action group of the alert that scheduled the action. -`alert.actionSubgroup`:: The action subgroup of the alert that scheduled the action. -`alert.actionGroupName`:: The name of the action group of the alert that scheduled the action. -`kibanaBaseUrl`:: The configured <>. If not configured, this will be empty. - -[role="screenshot"] -image::images/rule-flyout-action-variables.png[Passing rule values to an action] - -Some cases exist where the variable values will be "escaped", when used in a context where escaping is needed: - -- For the <> connector, the `message` action configuration property escapes any characters that would be interpreted as Markdown. -- For the <> connector, the `message` action configuration property escapes any characters that would be interpreted as Slack Markdown. -- For the <> connector, the `body` action configuration property escapes any characters that are invalid in JSON string values. - -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 rule type defines additional variables as properties of the variable `context`. For example, if a rule 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 rule type. - -You can attach more than one action. Clicking the "Add action" button will prompt you to select another rule type and repeat the above steps again. - -[role="screenshot"] -image::images/rule-flyout-add-action.png[You can add multiple actions on a rule] - -[NOTE] -============================================== -Actions are not required on rules. You can run a rule without actions to understand its behavior, and then <> later. -============================================== - -[float] -=== Manage rules +==== General rule details -To modify a rule after it was created, including muting or disabling it, use the <>. +This content has been moved to <>. \ No newline at end of file diff --git a/docs/user/alerting/domain-specific-rules.asciidoc b/docs/user/alerting/domain-specific-rules.asciidoc deleted file mode 100644 index f509f9e528823..0000000000000 --- a/docs/user/alerting/domain-specific-rules.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[role="xpack"] -[[domain-specific-rules]] -== Domain-specific rules - -For domain-specific rules, refer to the documentation for that app. -{kib} supports these rules: - -* {observability-guide}/create-alerts.html[Observability rules] -* {security-guide}/prebuilt-rules.html[Security rules] -* <> -* {ml-docs}/ml-configuring-alerts.html[{ml-cap} rules] beta:[] - -[NOTE] -============================================== -Some rule types are subscription features, while others are free features. -For a comparison of the Elastic subscription levels, -see {subscriptions}[the subscription page]. -============================================== - -include::map-rules/geo-rule-types.asciidoc[] diff --git a/docs/user/alerting/images/individual-mute-disable.png b/docs/user/alerting/images/individual-mute-disable.png index 0ed2bfc0186c0..c9d8cd666f1d8 100644 Binary files a/docs/user/alerting/images/individual-mute-disable.png and b/docs/user/alerting/images/individual-mute-disable.png differ diff --git a/docs/user/alerting/images/rule-flyout-action-no-connector.png b/docs/user/alerting/images/rule-flyout-action-no-connector.png new file mode 100644 index 0000000000000..b8b0864e04226 Binary files /dev/null and b/docs/user/alerting/images/rule-flyout-action-no-connector.png differ diff --git a/docs/user/alerting/index.asciidoc b/docs/user/alerting/index.asciidoc index f8a5aacce8f0e..9ab6a2dc46ebf 100644 --- a/docs/user/alerting/index.asciidoc +++ b/docs/user/alerting/index.asciidoc @@ -1,7 +1,7 @@ include::alerting-getting-started.asciidoc[] +include::alerting-setup.asciidoc[] +include::create-and-manage-rules.asciidoc[] include::defining-rules.asciidoc[] include::rule-management.asciidoc[] -include::rule-details.asciidoc[] -include::stack-rules.asciidoc[] -include::domain-specific-rules.asciidoc[] +include::rule-types.asciidoc[] include::alerting-troubleshooting.asciidoc[] diff --git a/docs/user/alerting/rule-details.asciidoc b/docs/user/alerting/rule-details.asciidoc deleted file mode 100644 index 6e743595e5c33..0000000000000 --- a/docs/user/alerting/rule-details.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[role="xpack"] -[[rule-details]] -== Rule details - - -The *Rule details* page tells you about the state of the rule and provides granular control over the actions it is taking. - -[role="screenshot"] -image::images/rule-details-alerts-active.png[Rule details page with three alerts] - -In this example, the rule detects when a site serves more than a threshold number of bytes in a 24 hour period. Three sites are above the threshold. These are called alerts - occurrences of the condition being detected - and the alert name, status, time of detection, and duration of the condition are shown in this view. - -Upon detection, each alert can trigger one or more actions. If the condition persists, the same actions will trigger either on the next scheduled rule check, or (if defined) after the re-notify period on the rule has passed. To prevent re-notification, you can suppress future actions by clicking on the eye icon to mute an individual alert. Muting means that the rule checks continue to run on a schedule, but that alert will not trigger any action. - -[role="screenshot"] -image::images/rule-details-alert-muting.png[Muting an alert] - -Alerts will come and go from the list depending on whether they meet the rule conditions or not - unless they are muted. If a muted instance no longer meets the rule conditions, it will appear as inactive in the list. This prevents an alert from triggering actions if it reappears in the future. - -[role="screenshot"] -image::images/rule-details-alerts-inactive.png[Rule details page with three inactive alerts] - -If you want to suppress actions on all current and future alerts, you can mute the entire rule. Rule checks continue to run and the alert list will update as alerts activate or deactivate, but no actions will be triggered. - -[role="screenshot"] -image::images/rule-details-muting.png[Use the mute toggle to suppress all actions on current and future alerts] - -You can also disable a rule altogether. When disabled, the rule stops running checks altogether and will clear any alerts it is tracking. You may want to disable rules that are not currently needed to reduce the load on {kib} and {es}. - -[role="screenshot"] -image::images/rule-details-disabling.png[Use the disable toggle to turn off rule checks and clear alerts tracked] - -* For further information on alerting concepts and examples, see <>. diff --git a/docs/user/alerting/rule-management.asciidoc b/docs/user/alerting/rule-management.asciidoc index b908bd03b0992..d6349a60e08eb 100644 --- a/docs/user/alerting/rule-management.asciidoc +++ b/docs/user/alerting/rule-management.asciidoc @@ -2,62 +2,4 @@ [[alert-management]] == Managing rules - -The *Rules* tab provides a cross-app view of alerting. Different {kib} apps like {observability-guide}/create-alerts.html[*Observability*], {security-guide}/prebuilt-rules.html[*Security*], <> and <> can offer their own rules. The *Rules* tab provides a central place to: - -* <> rules -* <> including enabling/disabling, muting/unmuting, and deleting -* Drill-down to <> - -[role="screenshot"] -image:images/rules-and-connectors-ui.png[Example rule listing in the Rules and Connectors UI] - -For more information on alerting concepts and the types of rules and connectors available, see <>. - -[float] -=== Finding rules - -The *Rules* tab lists all rules in the current space, including summary information about their execution frequency, tags, and type. - -The *search bar* can be used to quickly find rules by name or tag. - -[role="screenshot"] -image::images/rules-filter-by-search.png[Filtering the rules list using the search bar] - -The *type* dropdown lets you filter to a subset of rule types. - -[role="screenshot"] -image::images/rules-filter-by-type.png[Filtering the rules list by types of rule] - -The *Action type* dropdown lets you filter by the type of action used in the rule. - -[role="screenshot"] -image::images/rules-filter-by-action-type.png[Filtering the rule list by type of action] - -[float] -[[create-edit-rules]] -=== Creating and editing rules - -Many rules must be created within the context of a {kib} app like <>, <>, or <>, but others are generic. Generic rule types can be created in the *Rules* management UI by clicking the *Create* button. This will launch a flyout that guides you through selecting a rule type and configuring its properties. Refer to <> for details on what types of rules are available and how to configure them. - -After a rule is created, you can re-open the flyout and change a rule's properties by clicking the *Edit* button shown on each row of the rule listing. - - -[float] -[[controlling-rules]] -=== Controlling rules - -The rule listing allows you to quickly mute/unmute, disable/enable, and delete individual rules by clicking the action button. - -[role="screenshot"] -image:images/individual-mute-disable.png[The actions button allows an individual rule to be muted, disabled, or deleted] - -These operations can also be performed in bulk by multi-selecting rules and clicking the *Manage rules* button: - -[role="screenshot"] -image:images/bulk-mute-disable.png[The Manage rules button lets you mute/unmute, enable/disable, and delete in bulk] - -[float] -=== Required permissions - -Access to rules is granted based on your privileges to alerting-enabled features. See <> for more information. +This content has been moved to <>. \ No newline at end of file diff --git a/docs/user/alerting/rule-types.asciidoc b/docs/user/alerting/rule-types.asciidoc new file mode 100644 index 0000000000000..bb840014fe80f --- /dev/null +++ b/docs/user/alerting/rule-types.asciidoc @@ -0,0 +1,56 @@ +[role="xpack"] +[[rule-types]] +== Rule types + +A rule is a set of <>, <>, and <> that enable notifications. {kib} provides two types of rules: rules specific to the Elastic Stack and rules specific to a domain. + +[NOTE] +============================================== +Some rule types are subscription features, while others are free features. +For a comparison of the Elastic subscription levels, +see {subscriptions}[the subscription page]. +============================================== + +[float] +[[stack-rules]] +=== Stack rules + +<> are built into {kib}. To access the *Stack Rules* feature and create and edit rules, users require the `all` privilege. See <> for more information. + +[cols="2*<"] +|=== + +| <> +| Aggregate field values from documents using {es} queries, compare them to threshold values, and schedule actions to run when the thresholds are met. + +| <> +| Run a user-configured {es} query, compare the number of matches to a configured threshold, and schedule actions to run when the threshold condition is met. + +|=== + +[float] +[[domain-specific-rules]] +=== Domain rules + +Domain rules are registered by *Observability*, *Security*, <> and <>. + +[cols="2*<"] +|=== + +| {observability-guide}/create-alerts.html[Observability rules] +| Detect complex conditions in the *Logs*, *Metrics*, and *Uptime* apps. + +| {security-guide}/prebuilt-rules.html[Security rules] +| Detect suspicous source events with pre-built or custom rules and create alerts when a rule’s conditions are met. + +| <> +| Run an {es} query to determine if any documents are currently contained in any boundaries from a specified boundary index and generate alerts when a rule's conditions are met. + +| {ml-docs}/ml-configuring-alerts.html[{ml-cap} rules] beta:[] +| Run scheduled checks on an anomaly detection job to detect anomalies with certain conditions. If an anomaly meets the conditions, an alert is created and the associated action is triggered. + +|=== + +include::rule-types/index-threshold.asciidoc[] +include::rule-types/es-query.asciidoc[] +include::rule-types/geo-rule-types.asciidoc[] diff --git a/docs/user/alerting/stack-rules/es-query.asciidoc b/docs/user/alerting/rule-types/es-query.asciidoc similarity index 87% rename from docs/user/alerting/stack-rules/es-query.asciidoc rename to docs/user/alerting/rule-types/es-query.asciidoc index c62ebbf4bf2bc..5615c79a6c9c7 100644 --- a/docs/user/alerting/stack-rules/es-query.asciidoc +++ b/docs/user/alerting/rule-types/es-query.asciidoc @@ -7,7 +7,7 @@ The {es} query rule type runs a user-configured {es} query, compares the number [float] ==== Create the rule -Fill in the <>, then select *{es} query*. +Fill in the <>, then select *{es} query*. [float] ==== Define the conditions @@ -22,12 +22,12 @@ Size:: This clause specifies the number of documents to pass to the configured a {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. +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. [float] ==== Add action variables -<> to run when the rule condition is met. The following variables are specific to the {es} query rule. You can also specify <>. +<> to run when the rule condition is met. The following variables are specific to the {es} query rule. You can also specify <>. `context.title`:: A preconstructed title for the rule. Example: `rule term match alert query matched`. `context.message`:: A preconstructed message for the rule. Example: + diff --git a/docs/user/alerting/map-rules/geo-rule-types.asciidoc b/docs/user/alerting/rule-types/geo-rule-types.asciidoc similarity index 74% rename from docs/user/alerting/map-rules/geo-rule-types.asciidoc rename to docs/user/alerting/rule-types/geo-rule-types.asciidoc index 4b17145c2d149..244cf90c855a7 100644 --- a/docs/user/alerting/map-rules/geo-rule-types.asciidoc +++ b/docs/user/alerting/rule-types/geo-rule-types.asciidoc @@ -1,16 +1,14 @@ [role="xpack"] [[geo-alerting]] -=== Geo rule type +=== Tracking containment -Alerting now includes one additional stack rule: <>. - -As with other stack rules, you need `all` access to the *Stack Rules* feature -to be able to create and edit a geo rule. -See <> for more information on configuring roles that provide access to this feature. +<> offers the Tracking containment rule type which runs an {es} query over indices to determine whether any +documents are currently contained within any boundaries from the specified boundary index. +In the event that an entity is contained within a boundary, an alert may be generated. [float] -==== Geo alerting requirements -To create a *Tracking containment* rule, the following requirements must be present: +==== Requirements +To create a Tracking containment rule, the following requirements must be present: - *Tracks index or index pattern*: An index containing a `geo_point` field, `date` field, and some form of entity identifier. An entity identifier is a `keyword` or `number` @@ -29,22 +27,12 @@ than the current time minus the amount of the interval. If data older than `now - ` is ingested, it won't trigger a rule. [float] -==== Creating a geo rule -Click the *Create* button in the <>. -Complete the <>. - -[role="screenshot"] -image::user/alerting/images/alert-types-tracking-select.png[Choosing a tracking rule type] +==== Create the rule -[float] -[[rule-type-tracking-containment]] -==== Tracking containment -The Tracking containment rule type runs an {es} query over indices, determining if any -documents are currently contained within any boundaries from the specified boundary index. -In the event that an entity is contained within a boundary, an alert may be generated. +Fill in the <>, then select Tracking containment. [float] -===== Defining the conditions +==== Define the conditions Tracking containment rules have 3 clauses that define the condition to detect, as well as 2 Kuery bars used to provide additional filtering context for each of the indices. @@ -61,6 +49,9 @@ Index (Boundary):: This clause requires an *index or index pattern*, a *`geo_sha identifying boundaries, and an optional *Human-readable boundary name* for better alerting messages. +[float] +==== Add action + Conditions for how a rule is tracked can be specified uniquely for each individual action. A rule can be triggered either when a containment condition is met or when an entity is no longer contained. diff --git a/docs/user/alerting/stack-rules/index-threshold.asciidoc b/docs/user/alerting/rule-types/index-threshold.asciidoc similarity index 88% rename from docs/user/alerting/stack-rules/index-threshold.asciidoc rename to docs/user/alerting/rule-types/index-threshold.asciidoc index 43b750b85fb3b..8c45c158414f4 100644 --- a/docs/user/alerting/stack-rules/index-threshold.asciidoc +++ b/docs/user/alerting/rule-types/index-threshold.asciidoc @@ -7,7 +7,7 @@ The index threshold rule type runs an {es} query. It aggregates field values fro [float] ==== Create the rule -Fill in the <>, then select *Index Threshold*. +Fill in the <>, then select *Index Threshold*. [float] ==== Define the conditions @@ -19,9 +19,9 @@ image::user/alerting/images/rule-types-index-threshold-conditions.png[Five claus Index:: This clause requires an *index or index pattern* and a *time field* that will be used for the *time window*. When:: This clause specifies how the value to be compared to the threshold is calculated. The value is calculated by aggregating a numeric field a the *time window*. The aggregation options are: `count`, `average`, `sum`, `min`, and `max`. When using `count` the document count is used, and an aggregation field is not necessary. -Over/Grouped Over:: This clause lets you configure whether the aggregation is applied over all documents, or should be split into groups using a grouping field. If grouping is used, an <> will be created for each group when it exceeds the threshold. To limit the number of alerts on high cardinality fields, you must specify the number of groups to check against the threshold. Only the *top* groups are checked. +Over/Grouped Over:: This clause lets you configure whether the aggregation is applied over all documents, or should be split into groups using a grouping field. If grouping is used, an <> will be created for each group when it exceeds the threshold. To limit the number of alerts on high cardinality fields, you must specify the number of groups to check against the threshold. Only the *top* groups are checked. Threshold:: This clause defines a threshold value and a comparison operator (one of `is above`, `is above or equals`, `is below`, `is below or equals`, or `is between`). The result of the aggregation 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 to a value higher than the *check every* value in the <>, to avoid gaps in detection. +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 to a value higher than the *check every* value in the <>, to avoid gaps in detection. If data is available and all clauses have been defined, a preview chart will render the threshold value and display a line chart showing the value for the last 30 intervals. This can provide an indication of recent values and their proximity to the threshold, and help you tune the clauses. @@ -31,7 +31,7 @@ image::user/alerting/images/rule-types-index-threshold-preview.png[Five clauses [float] ==== Add action variables -<> to run when the rule condition is met. The following variables are specific to the index threshold rule. You can also specify <>. +<> to run when the rule condition is met. The following variables are specific to the index threshold rule. You can also specify <>. `context.title`:: A preconstructed title for the rule. Example: `rule kibana sites - high egress met threshold`. `context.message`:: A preconstructed message for the rule. Example: + diff --git a/docs/user/alerting/stack-rules.asciidoc b/docs/user/alerting/stack-rules.asciidoc deleted file mode 100644 index 483834c78806e..0000000000000 --- a/docs/user/alerting/stack-rules.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[role="xpack"] -[[stack-rules]] -== Stack rule types - -Kibana provides two types of rules: - -* Stack rules, which are built into {kib} -* <>, which are registered by {kib} apps. - -{kib} provides two stack rules: - -* <> -* <> - -Users require the `all` privilege to access the *Stack Rules* feature and create and edit rules. -See <> for more information. - -[NOTE] -============================================== -Some rule types are subscription features, while others are free features. -For a comparison of the Elastic subscription levels, -see {subscriptions}[the subscription page]. -============================================== - - -include::stack-rules/index-threshold.asciidoc[] -include::stack-rules/es-query.asciidoc[] diff --git a/docs/user/dashboard/aggregation-reference.asciidoc b/docs/user/dashboard/aggregation-reference.asciidoc index 7d5547fe3c3c5..39e596df4af34 100644 --- a/docs/user/dashboard/aggregation-reference.asciidoc +++ b/docs/user/dashboard/aggregation-reference.asciidoc @@ -188,6 +188,12 @@ For information about {es} metrics aggregations, refer to {ref}/search-aggregati | Type | Agg-based | Markdown | Lens | TSVB +| Metrics with filters +| +^| X +| +| + | Average ^| X ^| X @@ -221,7 +227,7 @@ For information about {es} metrics aggregations, refer to {ref}/search-aggregati | Percentiles ^| X ^| X -| +^| X ^| X | Percentiles Rank @@ -230,10 +236,10 @@ For information about {es} metrics aggregations, refer to {ref}/search-aggregati | ^| X -| Top hit +| Top hit (Last value) +^| X ^| X ^| X -| ^| X | Value count @@ -266,7 +272,7 @@ For information about {es} pipeline aggregations, refer to {ref}/search-aggregat | Derivative ^| X ^| X -| +^| X ^| X | Max bucket @@ -290,13 +296,13 @@ For information about {es} pipeline aggregations, refer to {ref}/search-aggregat | Moving average ^| X ^| X -| +^| X ^| X | Cumulative sum ^| X ^| X -| +^| X ^| X | Bucket script diff --git a/docs/user/dashboard/lens.asciidoc b/docs/user/dashboard/lens.asciidoc index 3b3a7a9ee527d..9f17a380bc209 100644 --- a/docs/user/dashboard/lens.asciidoc +++ b/docs/user/dashboard/lens.asciidoc @@ -147,14 +147,24 @@ For the answers to common *Lens* questions, review the following. [float] [[kql-]] -===== When should I use the Filter function instead of KQL filters? +===== When should I use the top filter bar, filters function, or "Filter by"? -The easiest way to apply KQL filters is to use <>, but you can also use the *Filters* function in the following scenarios: +Using the top <> bar is best when you want to focus on a known set of +data for all the visualization results. These top level filters are combined with other filters +using AND logic. + +Use the *Filters* function in the following scenarios: * When you want to apply more than one KQL filter to the visualization. * When you want to apply the KQL filter to a single layer, which allows you to visualize filtered and unfiltered data. +Use the *Filter by* advanced option in the following scenarios: + +* When you want to assign a custom color to each filter in a bar, line or area chart. + +* When you want to build a complex table, such as showing both failure rate and overall. + [float] [[when-should-i-normalize-the-data-by-unit-or-use-a-custom-interval]] ===== When should I normalize the data by unit or use a custom interval? diff --git a/docs/user/introduction.asciidoc b/docs/user/introduction.asciidoc index 25780d303eec4..82ca11f2162fd 100644 --- a/docs/user/introduction.asciidoc +++ b/docs/user/introduction.asciidoc @@ -195,7 +195,7 @@ When the rule triggers, you can send a notification to a system that is part of your daily workflow. {kib} integrates with email, Slack, PagerDuty, and ServiceNow, to name a few. -A dedicated view for creating, searching, and editing rules is in <>. +A dedicated view for creating, searching, and editing rules is in <>. [role="screenshot"] image::images/rules-and-connectors.png[Rules and Connectors view] @@ -437,7 +437,7 @@ the <>. |< Data>> |Set up rules -|< Rules and Connectors>> +|< Rules and Connectors>> |Organize your workspace and users |< Spaces>> diff --git a/docs/user/management.asciidoc b/docs/user/management.asciidoc index c5fabb15dc4de..b86fa82c30381 100644 --- a/docs/user/management.asciidoc +++ b/docs/user/management.asciidoc @@ -75,7 +75,7 @@ You can add and remove remote clusters, and check their connectivity. |=== | <> -| Centrally <> across {kib}. Create and <> across {kib}. Create and <> for triggering actions. | <> diff --git a/docs/user/monitoring/images/monitoring-kibana-alerting-notification.png b/docs/user/monitoring/images/monitoring-kibana-alerting-notification.png new file mode 100644 index 0000000000000..90951d18e667b Binary files /dev/null and b/docs/user/monitoring/images/monitoring-kibana-alerting-notification.png differ diff --git a/docs/user/monitoring/images/monitoring-kibana-alerting-setup-mode.png b/docs/user/monitoring/images/monitoring-kibana-alerting-setup-mode.png new file mode 100644 index 0000000000000..146992da5837a Binary files /dev/null and b/docs/user/monitoring/images/monitoring-kibana-alerting-setup-mode.png differ diff --git a/docs/user/monitoring/kibana-alerts.asciidoc b/docs/user/monitoring/kibana-alerts.asciidoc index 58bf419d8d54a..6046e67db62f1 100644 --- a/docs/user/monitoring/kibana-alerts.asciidoc +++ b/docs/user/monitoring/kibana-alerts.asciidoc @@ -1,100 +1,109 @@ [role="xpack"] [[kibana-alerts]] -= {kib} Alerts += {kib} alerts The {stack} {monitor-features} provide -<> out-of-the box to notify you of -potential issues in the {stack}. These alerts are preconfigured based on the +<> out-of-the box to notify you +of potential issues in the {stack}. These rules are preconfigured based on the best practices recommended by Elastic. However, you can tailor them to meet your specific needs. -When you open *{stack-monitor-app}*, the preconfigured {kib} alerts are -created automatically. If you collect monitoring data from multiple clusters, -these alerts can search, detect, and notify on various conditions across the -clusters. The alerts are visible alongside your existing {watcher} cluster -alerts. You can view details about the alerts that are active and view health -and performance data for {es}, {ls}, and Beats in real time, as well as -analyze past performance. You can also modify active alerts. +[role="screenshot"] +image::user/monitoring/images/monitoring-kibana-alerts.png["{kib} alerts in {stack-monitor-app}"] + +When you open *{stack-monitor-app}*, the preconfigured rules are created +automatically. They are initially configured to detect and notify on various +conditions across your monitored clusters. You can view notifications for: *Cluster health*, *Resource utilization*, and *Errors and exceptions* for {es} +in real time. + +NOTE: The default {watcher} based "cluster alerts" for {stack-monitor-app} have +been recreated as rules in {kib} {alert-features}. For this reason, the existing +{watcher} email action +`monitoring.cluster_alerts.email_notifications.email_address` no longer works. +The default action for all {stack-monitor-app} rules is to write to {kib} logs +and display a notification in the UI. [role="screenshot"] -image::user/monitoring/images/monitoring-kibana-alerts.png["Kibana alerts in the Stack Monitoring app"] +image::user/monitoring/images/monitoring-kibana-alerting-notification.png["{kib} alerting notifications in {stack-monitor-app}"] -To review and modify all the available alerts, use -<> in *{stack-manage-app}*. + +[role="screenshot"] +image::user/monitoring/images/monitoring-kibana-alerting-setup-mode.png["Modify {kib} alerting rules in {stack-monitor-app}"] [discrete] [[kibana-alerts-cpu-threshold]] -== CPU threshold +== CPU usage threshold -This alert is triggered when a node runs a consistently high CPU load. By -default, the trigger condition is set at 85% or more averaged over the last 5 -minutes. The alert is grouped across all the nodes of the cluster by running -checks on a schedule time of 1 minute with a re-notify interval of 1 day. +This rule checks for {es} nodes that run a consistently high CPU load. By +default, the condition is set at 85% or more averaged over the last 5 minutes. +The rule is grouped across all the nodes of the cluster by running checks on a +schedule time of 1 minute with a re-notify interval of 1 day. [discrete] [[kibana-alerts-disk-usage-threshold]] == Disk usage threshold -This alert is triggered when a node is nearly at disk capacity. By -default, the trigger condition is set at 80% or more averaged over the last 5 -minutes. The alert is grouped across all the nodes of the cluster by running -checks on a schedule time of 1 minute with a re-notify interval of 1 day. +This rule checks for {es} nodes that are nearly at disk capacity. By default, +the condition is set at 80% or more averaged over the last 5 minutes. The rule +is grouped across all the nodes of the cluster by running checks on a schedule +time of 1 minute with a re-notify interval of 1 day. [discrete] [[kibana-alerts-jvm-memory-threshold]] == JVM memory threshold -This alert is triggered when a node runs a consistently high JVM memory usage. By -default, the trigger condition is set at 85% or more averaged over the last 5 -minutes. The alert is grouped across all the nodes of the cluster by running -checks on a schedule time of 1 minute with a re-notify interval of 1 day. +This rule checks for {es} nodes that use a high amount of JVM memory. By +default, the condition is set at 85% or more averaged over the last 5 minutes. +The rule is grouped across all the nodes of the cluster by running checks on a +schedule time of 1 minute with a re-notify interval of 1 day. [discrete] [[kibana-alerts-missing-monitoring-data]] == Missing monitoring data -This alert is triggered when any stack products nodes or instances stop sending -monitoring data. By default, the trigger condition is set to missing for 15 minutes -looking back 1 day. The alert is grouped across all the nodes of the cluster by running -checks on a schedule time of 1 minute with a re-notify interval of 6 hours. +This rule checks for {es} nodes that stop sending monitoring data. By default, +the condition is set to missing for 15 minutes looking back 1 day. The rule is +grouped across all the {es} nodes of the cluster by running checks on a schedule +time of 1 minute with a re-notify interval of 6 hours. [discrete] [[kibana-alerts-thread-pool-rejections]] == Thread pool rejections (search/write) -This alert is triggered when a node experiences thread pool rejections. By -default, the trigger condition is set at 300 or more over the last 5 -minutes. The alert is grouped across all the nodes of the cluster by running -checks on a schedule time of 1 minute with a re-notify interval of 1 day. -Thresholds can be set independently for `search` and `write` type rejections. +This rule checks for {es} nodes that experience thread pool rejections. By +default, the condition is set at 300 or more over the last 5 minutes. The rule +is grouped across all the nodes of the cluster by running checks on a schedule +time of 1 minute with a re-notify interval of 1 day. Thresholds can be set +independently for `search` and `write` type rejections. [discrete] [[kibana-alerts-ccr-read-exceptions]] == CCR read exceptions -This alert is triggered if a read exception has been detected on any of the -replicated clusters. The trigger condition is met if 1 or more read exceptions -are detected in the last hour. The alert is grouped across all replicated clusters -by running checks on a schedule time of 1 minute with a re-notify interval of 6 hours. +This rule checks for read exceptions on any of the replicated {es} clusters. The +condition is met if 1 or more read exceptions are detected in the last hour. The +rule is grouped across all replicated clusters by running checks on a schedule +time of 1 minute with a re-notify interval of 6 hours. [discrete] [[kibana-alerts-large-shard-size]] == Large shard size -This alert is triggered if a large average shard size (across associated primaries) is found on any of the -specified index patterns. The trigger condition is met if an index's average shard size is -55gb or higher in the last 5 minutes. The alert is grouped across all indices that match -the default pattern of `*` by running checks on a schedule time of 1 minute with a re-notify -interval of 12 hours. +This rule checks for a large average shard size (across associated primaries) on +any of the specified index patterns in an {es} cluster. The condition is met if +an index's average shard size is 55gb or higher in the last 5 minutes. The rule +is grouped across all indices that match the default pattern of `-.*` by running +checks on a schedule time of 1 minute with a re-notify interval of 12 hours. [discrete] [[kibana-alerts-cluster-alerts]] -== Cluster alerts +== Cluster alerting -These alerts summarize the current status of your {stack}. You can drill down into the metrics -to view more information about your cluster and specific nodes, instances, and indices. +These rules check the current status of your {stack}. You can drill down into +the metrics to view more information about your cluster and specific nodes, instances, and indices. -An alert will be triggered if any of the following conditions are met within the last minute: +An action is triggered if any of the following conditions are met within the +last minute: * {es} cluster health status is yellow (missing at least one replica) or red (missing at least one primary). @@ -110,7 +119,7 @@ versions reporting stats to the same monitoring cluster. -- If you do not preserve the data directory when upgrading a {kib} or Logstash node, the instance is assigned a new persistent UUID and shows up -as a new instance +as a new instance. -- * Subscription license expiration. When the expiration date approaches, you will get notifications with a severity level relative to how diff --git a/docs/user/production-considerations/alerting-production-considerations.asciidoc b/docs/user/production-considerations/alerting-production-considerations.asciidoc index 6294a4fe6f14a..bd19a11435a99 100644 --- a/docs/user/production-considerations/alerting-production-considerations.asciidoc +++ b/docs/user/production-considerations/alerting-production-considerations.asciidoc @@ -19,7 +19,7 @@ When relying on rules and actions as mission critical services, make sure you fo 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. -Rules are recurring background tasks which are rescheduled according to the <> on completion. +Rules 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 <>. @@ -42,7 +42,7 @@ As rules and actions leverage background tasks to perform the majority of work, When estimating the required task throughput, keep the following in mind: -* Each rule uses a single recurring task that is scheduled to run at the cadence defined by its <>. +* Each rule 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 rules and actions are executed at consistent schedules. diff --git a/docs/user/production-considerations/task-manager-health-monitoring.asciidoc b/docs/user/production-considerations/task-manager-health-monitoring.asciidoc index f64c120f61298..8f2c8d106c77c 100644 --- a/docs/user/production-considerations/task-manager-health-monitoring.asciidoc +++ b/docs/user/production-considerations/task-manager-health-monitoring.asciidoc @@ -6,6 +6,8 @@ Health monitoring ++++ +experimental[] + 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. @@ -90,10 +92,18 @@ 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. +a| Capacity Estimation + +| This section provides a rough estimate about the sufficiency of its capacity. As the name suggests, these are estimates based on historical data and should not be used as predictions. Use these estimations when following the Task Manager <>. + |=== 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. +The Runtime `status` indicates whether task executions have exceeded any of the <>. An `OK` status means none of the threshold have been exceeded. A `Warning` status means that at least one warning threshold has been exceeded. An `Error` status means that at least one error threshold has been exceeded. + +The Capacity Estimation `status` indicates the sufficiency of the observed capacity. An `OK` status means capacity is sufficient. A `Warning` status means that capacity is sufficient for the scheduled recurring tasks, but non-recurring tasks often cause the cluster to exceed capacity. An `Error` status means that there is insufficient capacity across all types of tasks. + 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 index 606f113b2274f..17eae59ff2f9c 100644 --- a/docs/user/production-considerations/task-manager-production-considerations.asciidoc +++ b/docs/user/production-considerations/task-manager-production-considerations.asciidoc @@ -68,11 +68,7 @@ This means that you can expect a single {kib} instance to support up to 200 _tas 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). +By <>, you can estimate the number of {kib} instances required to reliably execute tasks in a timely manner. An appropriate number of {kib} instances can be estimated to match the required scale. For details on monitoring the health of {kib} Task Manager, follow the guidance in <>. @@ -126,6 +122,35 @@ Throughput is best thought of as a measurements in tasks per minute. A default {kib} instance can support up to `200/tpm`. +[float] +===== Automatic estimation + +experimental[] + +As demonstrated in <>, the Task Manager <> performs these estimations automatically. + +These estimates are based on historical data and should not be used as predictions, but can be used as a rough guide when scaling the system. + +We recommend provisioning enough {kib} instances to ensure a buffer between the observed maximum throughput (as estimated under `observed.max_throughput_per_minute`) and the average required throughput (as estimated under `observed.avg_required_throughput_per_minute`). Otherwise there might be insufficient capacity to handle spikes of ad-hoc tasks. How much of a buffer is needed largely depends on your use case, but keep in mind that estimated throughput takes into account recent spikes and, as long as they are representative of your system's behaviour, shouldn't require much of a buffer. + +We recommend provisioning at least as many {kib} instances as proposed by `proposed.provisioned_kibana`, but keep in mind that this number is based on the estimated required throughput, which is based on average historical performance, and cannot accurately predict future requirements. + +[WARNING] +============================================================================ +Automatic capacity estimation is performed by each {kib} instance independently. This estimation is performed by observing the task throughput in that instance, the number of {kib} instances executing tasks at that moment in time, and the recurring workload in {es}. + +If a {kib} instance is idle at the moment of capacity estimation, the number of active {kib} instances might be miscounted and the available throughput miscalculated. + +When evaluating the proposed {kib} instance number under `proposed.provisioned_kibana`, we highly recommend verifying that the `observed.observed_kibana_instances` matches the number of provisioned {kib} instances. +============================================================================ + +[float] +===== Manual estimation + +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. + 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. @@ -136,8 +161,11 @@ A recurring task requires as many executions as its cadence can fit in a minute. 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. +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). + 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. + +Once you estimate _tasks per minute_ , add a buffer for non-recurring tasks. How much of a buffer is required largely depends on your use case. Ensure enough of a buffer is provisioned by <> as it grows and tracking the ratio of recurring to non-recurring tasks by <>. diff --git a/docs/user/production-considerations/task-manager-troubleshooting.asciidoc b/docs/user/production-considerations/task-manager-troubleshooting.asciidoc index 5e75aef0d9570..4b63313b2b96e 100644 --- a/docs/user/production-considerations/task-manager-troubleshooting.asciidoc +++ b/docs/user/production-considerations/task-manager-troubleshooting.asciidoc @@ -60,6 +60,8 @@ For details on scaling Task Manager, see <>. [[task-manager-diagnosing-root-cause]] ==== Diagnose a root cause for drift +experimental[] + 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. @@ -72,6 +74,7 @@ By analyzing the different sections of the output, you can evaluate different th ** <> ** <> * <> +* <> Retrieve the latest monitored health stats of a {kib} instance Task Manager: @@ -176,6 +179,11 @@ The API returns the following: "p99": 166 } }, + "persistence": { + "recurring": 88, + "non_recurring": 4, + "ephemeral": 8 + }, "result_frequency_percent_as_number": { "alerting:.index-threshold": { "Success": 100, @@ -231,12 +239,44 @@ The API returns the following: ["1m", 2], ["60s", 2], ["5m", 2], - ["60m", 4] + ["60m", 4], + ["3600s", 1], + ["720m", 1] ], - "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] + "non_recurring": 18, + "owner_ids": 0, + "overdue": 10, + "overdue_non_recurring": 10, + "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], + "capacity_requirments": { + "per_minute": 6, + "per_hour": 28, + "per_day": 2 + } }, "status": "OK" + }, + "capacity_estimation": { + "timestamp": "2021-02-16T11:38:06.826Z", + "value": { + "observed": { + "observed_kibana_instances": 1, + "max_throughput_per_minute_per_kibana": 200, + "max_throughput_per_minute": 200, + "minutes_to_drain_overdue": 1, + "avg_recurring_required_throughput_per_minute": 28, + "avg_recurring_required_throughput_per_minute_per_kibana": 28, + "avg_required_throughput_per_minute": 28, + "avg_required_throughput_per_minute_per_kibana": 28 + }, + "proposed": { + "min_required_kibana": 1, + "provisioned_kibana": 1, + "avg_recurring_required_throughput_per_minute_per_kibana": 28, + "avg_required_throughput_per_minute_per_kibana": 28 + } + } + "status": "OK" } } } @@ -528,7 +568,7 @@ Evaluating the health stats in this hypothetical scenario, you see the following 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. +In the preceding example, 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*: @@ -569,6 +609,82 @@ Evaluating the preceding health stats, you see the following output under `stats 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-theory-spikes-in-non-recurring-tasks]] +*Theory*: +Spikes in non-recurring and ephemeral tasks are consuming a high percentage of the available capacity + +*Diagnosis*: +Task Manager uses ad-hoc non-recurring tasks to load balance operations across multiple {kib} instances. +Additionally, {kib} can use Task Manager to allocate resources for expensive operations by executing an ephemeral task. Ephemeral tasks are identical in operation to non-recurring tasks, but are not persisted and cannot be load balanced across {kib} instances. + +Evaluating the preceding health stats, you see the following output under `stats.runtime.value.execution.persistence`: + +[source,json] +-------------------------------------------------- +{ + "recurring": 88, # <1> + "non_recurring": 4, # <2> + "ephemeral": 8 # <3> +}, +-------------------------------------------------- +<1> 88% of executed tasks are recurring tasks +<2> 4% of executed tasks are non-recurring tasks +<3> 8% of executed tasks are ephemeral tasks + +You can infer from these stats that the majority of executions consist of recurring tasks at 88%. +You can use the `execution.persistence` stats to evaluate the ratio of consumed capacity, but on their own, you should not make assumptions about the sufficiency of the available capacity. + +To assess the capacity, you should evaluate these stats against the `load` under `stats.runtime.value`: + +[source,json] +-------------------------------------------------- +{ + "load": { # <2> + "p50": 40, + "p90": 40, + "p95": 60, + "p99": 80 + } +} +-------------------------------------------------- + +You can infer from these stats that it is very unusual for Task Manager to run out of capacity, so the capacity is likely sufficient to handle the amount of non-recurring and ephemeral tasks. + +Suppose you have an alternate scenario, where you see the following output under `stats.runtime.value.execution.persistence`: + +[source,json] +-------------------------------------------------- +{ + "recurring": 60, # <1> + "non_recurring": 30, # <2> + "ephemeral": 10 # <3> +}, +-------------------------------------------------- +<1> 60% of executed tasks are recurring tasks +<2> 30% of executed tasks are non-recurring tasks +<3> 10% of executed tasks are ephemeral tasks + +You can infer from these stats that even though most executions are recurring tasks, a substantial percentage of executions are non-recurring and ephemeral tasks at 40%. + +Evaluating the `load` under `stats.runtime.value`, you see the following: + +[source,json] +-------------------------------------------------- +{ + "load": { # <2> + "p50": 70, + "p90": 100, + "p95": 100, + "p99": 100 + } +} +-------------------------------------------------- + +You can infer from these stats that it is quite common for this {kib} instance to run out of capacity. +Given the high rate of non-recurring and ephemeral tasks, it would be reasonable to assess that there is insufficient capacity in the {kib} cluster to handle the amount of tasks. + +Keep in mind that these stats give you a glimpse at a moment in time, and even though there has been insufficient capacity in recent minutes, this might not be true in other times where fewer non-recurring or ephemeral tasks are used. We recommend tracking these stats over time and identifying the source of these tasks before making sweeping changes to your infrastructure. + [[task-manager-health-evaluate-the-workload]] ===== Evaluate the Workload @@ -577,7 +693,7 @@ Predicting the required throughput a deplyment might need to support Task Manage <> 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`: +Evaluating the preceding health stats in the previous example, you see the following output under `stats.workload.value`: [source,json] -------------------------------------------------- @@ -605,27 +721,39 @@ Evaluating the preceding health stats above, you see the following output under } }, }, - "schedule": [ # <4> + "non_recurring": 0, # <4> + "owner_ids": 1, # <5> + "schedule": [ # <6> ["10s", 2], ["1m", 2], ["90s", 2], ["5m", 8] ], - "overdue": 0, # <5> - "estimated_schedule_density": [ # <6> + "overdue_non_recurring": 0, # <7> + "overdue": 0, # <8> + "estimated_schedule_density": [ # <9> 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 - ] + ], + "capacity_requirments": { # <10> + "per_minute": 14, + "per_hour": 240, + "per_day": 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 +<4> There are no non-recurring tasks in the queue. +<5> There is one Task Manager actively executing tasks. There might be additional idle Task Managers, but they aren't actively executing tasks at this moment in time. +<6> 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. +<7> There are no overdue non-recurring tasks. Non-recurring tasks are usually scheduled to execute immediately, so overdue non-recurring tasks are often a symptom of a congested system. +<8> There are no overdue tasks, which means that all tasks that *should* have run by now *have* run. +<9> 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. +<10> The capacity required to handle the recurring tasks in the system. These are buckets, rather than aggregated sums, and we recommend <> section, rather than evaluating these buckets yourself. The `workload` section summarizes the work load across the cluster, listing the tasks in the system, their types, schedules, and current status. @@ -672,6 +800,8 @@ Suppose the output of `stats.workload.value` looked something like this: } }, }, + "non_recurring": 0, + "owner_ids": 1, "schedule": [ # <2> ["10s", 38], ["1m", 101], @@ -681,32 +811,133 @@ Suppose the output of `stats.workload.value` looked something like this: ["60m", 106], ["1d", 61] ], + "overdue_non_recurring": 0, "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 - ] + ], + "capacity_requirments": { + "per_minute": 329, # <4> + "per_hour": 4272, # <5> + "per_day": 61 # <6> + } } -------------------------------------------------- <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. +<4> There are 329 task executions that recur within the space of every minute. +<5> There are 4,273 task executions that recur within the space of every hour. +<6> There are 61 task executions that recur within the space of every day. 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 high frequency tasks (tasks that recur at a cadence of a couple of minutes or less), you must support a throughput of approximately 330 task executions per minute (38 every 10 seconds + 101 every minute). +* Assessing the medium frequency tasks (tasks that recur at a cadence of an hour or less), you must support an additional throughput of over 4,272 task executions per hour (55 every 90 seconds + 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 70 - 80 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. +These rough calculations give you a lower bound to the required throughput, which is _at least_ 410 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 <>. + +[[task-manager-health-evaluate-the-capacity-estimation]] +===== Evaluate the Capacity Estimation + +Task Manager is constantly evaluating its runtime operations and workload. This enables Task Manager to make rough estimates about the sufficiency of its capacity. + +As the name suggests, these are estimates based on historical data and should not be used as predictions. These estimations should be evaluated alongside the detailed <> stats before making changes to infrastructure. These estimations assume all {kib} instances are configured identically. + +We recommend using these estimations when following the Task Manager <>. + +Evaluating the health stats in the previous example, you can see the following output under `stats.capacity_estimation.value`: + +[source,json] +-------------------------------------------------- +{ + "observed": { + "observed_kibana_instances": 1, # <1> + "minutes_to_drain_overdue": 1, # <2> + "max_throughput_per_minute_per_kibana": 200, + "max_throughput_per_minute": 200, # <3> + "avg_recurring_required_throughput_per_minute": 28, # <4> + "avg_recurring_required_throughput_per_minute_per_kibana": 28, + "avg_required_throughput_per_minute": 28, # <5> + "avg_required_throughput_per_minute_per_kibana": 28 + }, + "proposed": { + "min_required_kibana": 1, # <6> + "provisioned_kibana": 1, # <7> + "avg_recurring_required_throughput_per_minute_per_kibana": 28, + "avg_required_throughput_per_minute_per_kibana": 28 + } +} +-------------------------------------------------- +<1> These estimates assume that there is one {kib} instance actively executing tasks. +<2> Based on past throughput the overdue tasks in the system could be executed within 1 minute. +<3> Assuming all {kib} instances in the cluster are configured the same as this instance, the maximum available throughput is 200 tasks per minute. +<4> On average, the recurring tasks in the system have historically required a throughput of 28 tasks per minute. +<5> On average, regardless of whether they are recurring or otherwise, the tasks in the system have historically required a throughput of 28 tasks per minute. +<6> One {kib} instance should be sufficient to run the current recurring workload. +<7> We propose waiting for the workload to change before additional {kib} instances are provisioned. + +The `capacity_estimation` section is made up of two subsections: + +* `observed` estimates the current capacity by observing historical runtime and workload statistics +* `proposed` estimates the baseline {kib} cluster size and the expected throughput under such a deployment strategy + +You can infer from these estimates that the current system is under-utilized and has enough capacity to handle many more tasks than it currently does. + +Suppose an alternate scenario, where you see the following output under `stats.capacity_estimation.value`: + +[source,json] +-------------------------------------------------- +{ + "observed": { + "observed_kibana_instances": 2, # <1> + "max_throughput_per_minute_per_kibana": 200, + "max_throughput_per_minute": 400, # <2> + "minutes_to_drain_overdue": 12, # <3> + "avg_recurring_required_throughput_per_minute": 354, # <4> + "avg_recurring_required_throughput_per_minute_per_kibana": 177, # <5> + "avg_required_throughput_per_minute": 434, # <6> + "avg_required_throughput_per_minute_per_kibana": 217 + }, + "proposed": { + "min_required_kibana": 2, # <7> + "provisioned_kibana": 3, # <8> + "avg_recurring_required_throughput_per_minute_per_kibana": 118, # <9> + "avg_required_throughput_per_minute_per_kibana": 145 # <10> + } +} +-------------------------------------------------- +<1> These estimates assume that there are two {kib} instance actively executing tasks. +<2> The maximum available throughput in the system currently is 400 tasks per minute. +<3> Based on past throughput the overdue tasks in the system should be executed within 12 minutes. +<4> On average, the recurring tasks in the system have historically required a throughput of 354 tasks per minute. +<5> On average, each {kib} instance utilizes 177 tasks per minute of its capacity to execute recurring tasks. +<6> On average the tasks in the system have historically required a throughput of 434 tasks per minute. +<7> The system estimates that at least two {kib} instances are required to run the current recurring workload. +<8> The system recommends provisioning three {kib} instances to handle the workload. +<9> Once a third {kib} instance is provisioned, the capacity utilized by each instance to execute recurring tasks should drop from 177 to 118 tasks per minute. +<10> Taking into account historical ad-hoc task execution, we estimate the throughput required of each {kib} instance will drop from 217 task per minute to 145, once a third {kib} instance is provisioned. + +Evaluating by these estimates, we can infer some interesting attributes of our system: + +* These estimates are produced based on the assumption that there are two {kib} instances in the cluster. This number is based on the number of {kib} instances actively executing tasks in recent minutes. At times this number might fluctuate if {kib} instances remain idle, so validating these estimates against what you know about the system is recommended. +* There appear to be so many overdue tasks that it would take 12 minutes of executions to catch up with that backlog. This does not take into account tasks that might become overdue during those 12 minutes. Although this congestion might be temporary, the system could also remain consistently under provisioned and might never drain the backlog entirely. +* Evaluating the recurring tasks in the workload, the system requires a throughput of 354 tasks per minute on average to execute tasks on time, which is lower then the estimated maximum throughput of 400 tasks per minute. Once we take into account historical throughput though, we estimate the required throughput at 434 tasks per minute. This suggests that, historically, approximately 20% of tasks have been ad-hoc non-recurring tasks, the scale of which are harder to predict than recurring tasks. + +You can infer from these estimates that the capacity in the current system is insufficient and at least one additional {kib} instance is required to keep up with the workload. + +For details on scaling Task Manager, see <>. + [float] [[task-manager-cannot-operate-when-inline-scripts-are-disabled]] ==== Inline scripts are disabled in {es} diff --git a/examples/index_pattern_field_editor_example/README.md b/examples/index_pattern_field_editor_example/README.md new file mode 100644 index 0000000000000..35ae814fc10e2 --- /dev/null +++ b/examples/index_pattern_field_editor_example/README.md @@ -0,0 +1,7 @@ +## index pattern field editor example + +This example index pattern field editor app shows how to: + - Edit index pattern fields via flyout + - Delete index pattern runtime fields with modal confirm prompt + +To run this example, use the command `yarn start --run-examples`. \ No newline at end of file diff --git a/examples/index_pattern_field_editor_example/kibana.json b/examples/index_pattern_field_editor_example/kibana.json new file mode 100644 index 0000000000000..c522e6698ac3d --- /dev/null +++ b/examples/index_pattern_field_editor_example/kibana.json @@ -0,0 +1,10 @@ +{ + "id": "indexPatternFieldEditorExample", + "version": "0.0.1", + "kibanaVersion": "kibana", + "server": false, + "ui": true, + "requiredPlugins": ["data", "indexPatternFieldEditor", "developerExamples"], + "optionalPlugins": [], + "requiredBundles": [] +} diff --git a/examples/index_pattern_field_editor_example/public/app.tsx b/examples/index_pattern_field_editor_example/public/app.tsx new file mode 100644 index 0000000000000..bd725759380aa --- /dev/null +++ b/examples/index_pattern_field_editor_example/public/app.tsx @@ -0,0 +1,145 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useState } from 'react'; +import ReactDOM from 'react-dom'; +import { + EuiPage, + EuiPageHeader, + EuiPageBody, + EuiPageContent, + EuiPageContentBody, + EuiButton, + EuiInMemoryTable, + EuiText, + DefaultItemAction, +} from '@elastic/eui'; +import { AppMountParameters } from '../../../src/core/public'; +import { + DataPublicPluginStart, + IndexPattern, + IndexPatternField, +} from '../../../src/plugins/data/public'; +import { IndexPatternFieldEditorStart } from '../../../src/plugins/index_pattern_field_editor/public'; + +interface Props { + indexPattern?: IndexPattern; + indexPatternFieldEditor: IndexPatternFieldEditorStart; +} + +const IndexPatternFieldEditorExample = ({ indexPattern, indexPatternFieldEditor }: Props) => { + const [fields, setFields] = useState( + indexPattern?.getNonScriptedFields() || [] + ); + const refreshFields = () => setFields(indexPattern?.getNonScriptedFields() || []); + const columns = [ + { + field: 'name', + name: 'Field name', + }, + { + name: 'Actions', + actions: [ + { + name: 'Edit', + description: 'Edit this field', + icon: 'pencil', + type: 'icon', + 'data-test-subj': 'editField', + onClick: (fld: IndexPatternField) => + indexPatternFieldEditor.openEditor({ + ctx: { indexPattern: indexPattern! }, + fieldName: fld.name, + onSave: refreshFields, + }), + }, + { + name: 'Delete', + description: 'Delete this field', + icon: 'trash', + type: 'icon', + 'data-test-subj': 'deleteField', + available: (fld) => !!fld.runtimeField, + onClick: (fld: IndexPatternField) => + indexPatternFieldEditor.openDeleteModal({ + fieldName: fld.name, + ctx: { + indexPattern: indexPattern!, + }, + onDelete: refreshFields, + }), + }, + ] as Array>, + }, + ]; + + const content = indexPattern ? ( + <> + Index pattern: {indexPattern?.title} +
+ + indexPatternFieldEditor.openEditor({ + ctx: { indexPattern: indexPattern! }, + onSave: refreshFields, + }) + } + data-test-subj="addField" + > + Add field + +
+ + items={fields} + columns={columns} + pagination={true} + hasActions={true} + sorting={{ + sort: { + field: 'name', + direction: 'asc', + }, + }} + /> + + ) : ( +

Please create an index pattern

+ ); + + return ( + + + Index pattern field editor demo + + {content} + + + + ); +}; + +interface RenderAppDependencies { + data: DataPublicPluginStart; + indexPatternFieldEditor: IndexPatternFieldEditorStart; +} + +export const renderApp = async ( + { data, indexPatternFieldEditor }: RenderAppDependencies, + { element }: AppMountParameters +) => { + const indexPattern = (await data.indexPatterns.getDefault()) || undefined; + ReactDOM.render( + , + element + ); + + return () => ReactDOM.unmountComponentAtNode(element); +}; diff --git a/examples/index_pattern_field_editor_example/public/index.ts b/examples/index_pattern_field_editor_example/public/index.ts new file mode 100644 index 0000000000000..cc509da31d25f --- /dev/null +++ b/examples/index_pattern_field_editor_example/public/index.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { IndexPatternFieldEditorPlugin } from './plugin'; + +export const plugin = () => new IndexPatternFieldEditorPlugin(); diff --git a/examples/index_pattern_field_editor_example/public/plugin.tsx b/examples/index_pattern_field_editor_example/public/plugin.tsx new file mode 100644 index 0000000000000..ccbb93e3acf95 --- /dev/null +++ b/examples/index_pattern_field_editor_example/public/plugin.tsx @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { Plugin, CoreSetup, AppMountParameters, AppNavLinkStatus } from '../../../src/core/public'; +import { DeveloperExamplesSetup } from '../../developer_examples/public'; +import { DataPublicPluginStart } from '../../../src/plugins/data/public'; +import { IndexPatternFieldEditorStart } from '../../../src/plugins/index_pattern_field_editor/public'; + +interface StartDeps { + data: DataPublicPluginStart; + indexPatternFieldEditor: IndexPatternFieldEditorStart; +} + +interface SetupDeps { + developerExamples: DeveloperExamplesSetup; +} + +export class IndexPatternFieldEditorPlugin implements Plugin { + public setup(core: CoreSetup, deps: SetupDeps) { + core.application.register({ + id: 'indexPatternFieldEditorExample', + title: 'Index pattern field editor example', + navLinkStatus: AppNavLinkStatus.hidden, + async mount(params: AppMountParameters) { + const [, depsStart] = await core.getStartServices(); + const { renderApp } = await import('./app'); + return renderApp(depsStart, params); + }, + }); + + deps.developerExamples.register({ + appId: 'indexPatternFieldEditorExample', + title: 'Index pattern field editor', + description: `IndexPatternFieldEditor provides a UI for editing index pattern fields directly from Kibana apps. This example plugin demonstrates integration.`, + links: [ + { + label: 'README', + href: + 'https://github.com/elastic/kibana/blob/master/src/plugins/index_pattern_field_editor/README.md', + iconType: 'logoGithub', + size: 's', + target: '_blank', + }, + ], + }); + } + + public start() {} + + public stop() {} +} diff --git a/examples/index_pattern_field_editor_example/tsconfig.json b/examples/index_pattern_field_editor_example/tsconfig.json new file mode 100644 index 0000000000000..1f6d52ed5260e --- /dev/null +++ b/examples/index_pattern_field_editor_example/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target", + "skipLibCheck": true + }, + "include": [ + "index.ts", + "public/**/*.ts", + "public/**/*.tsx", + "../../typings/**/*", + ], + "exclude": [], + "references": [ + { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/kibana_react/tsconfig.json" }, + ] +} \ No newline at end of file diff --git a/examples/screenshot_mode_example/kibana.json b/examples/screenshot_mode_example/kibana.json index 4cb8c1a1393fb..28e5b39e5337f 100644 --- a/examples/screenshot_mode_example/kibana.json +++ b/examples/screenshot_mode_example/kibana.json @@ -4,6 +4,6 @@ "kibanaVersion": "kibana", "server": true, "ui": true, - "requiredPlugins": ["navigation", "screenshotMode", "usageCollection"], + "requiredPlugins": ["navigation", "screenshotMode", "usageCollection", "developerExamples"], "optionalPlugins": [] } diff --git a/examples/screenshot_mode_example/public/plugin.ts b/examples/screenshot_mode_example/public/plugin.ts index 91bcc2410b5fc..4108924ca3b8d 100644 --- a/examples/screenshot_mode_example/public/plugin.ts +++ b/examples/screenshot_mode_example/public/plugin.ts @@ -6,7 +6,13 @@ * Side Public License, v 1. */ -import { AppMountParameters, CoreSetup, CoreStart, Plugin } from '../../../src/core/public'; +import { + AppMountParameters, + CoreSetup, + CoreStart, + Plugin, + AppNavLinkStatus, +} from '../../../src/core/public'; import { AppPluginSetupDependencies, AppPluginStartDependencies } from './types'; import { MetricsTracking } from './services'; import { PLUGIN_NAME } from '../common'; @@ -15,7 +21,7 @@ export class ScreenshotModeExamplePlugin implements Plugin { uiTracking = new MetricsTracking(); public setup(core: CoreSetup, depsSetup: AppPluginSetupDependencies): void { - const { screenshotMode, usageCollection } = depsSetup; + const { screenshotMode, usageCollection, developerExamples } = depsSetup; const isScreenshotMode = screenshotMode.isScreenshotMode(); this.uiTracking.setup({ @@ -27,6 +33,7 @@ export class ScreenshotModeExamplePlugin implements Plugin { core.application.register({ id: 'screenshotModeExample', title: PLUGIN_NAME, + navLinkStatus: AppNavLinkStatus.hidden, async mount(params: AppMountParameters) { // Load application bundle const { renderApp } = await import('./application'); @@ -40,6 +47,13 @@ export class ScreenshotModeExamplePlugin implements Plugin { return renderApp(coreStart, depsSetup, depsStart as AppPluginStartDependencies, params); }, }); + + developerExamples.register({ + appId: 'screenshotModeExample', + title: 'Screenshot mode integration', + description: + 'Demonstrate how a plugin can adapt appearance based on whether we are in screenshot mode', + }); } public start(core: CoreStart): void {} diff --git a/examples/screenshot_mode_example/public/types.ts b/examples/screenshot_mode_example/public/types.ts index 88812a4a507c9..2eb9bd8e144a0 100644 --- a/examples/screenshot_mode_example/public/types.ts +++ b/examples/screenshot_mode_example/public/types.ts @@ -9,10 +9,12 @@ import { NavigationPublicPluginStart } from '../../../src/plugins/navigation/public'; import { ScreenshotModePluginSetup } from '../../../src/plugins/screenshot_mode/public'; import { UsageCollectionSetup } from '../../../src/plugins/usage_collection/public'; +import { DeveloperExamplesSetup } from '../../developer_examples/public'; export interface AppPluginSetupDependencies { usageCollection: UsageCollectionSetup; screenshotMode: ScreenshotModePluginSetup; + developerExamples: DeveloperExamplesSetup; } export interface AppPluginStartDependencies { diff --git a/examples/search_examples/public/search_sessions/app.tsx b/examples/search_examples/public/search_sessions/app.tsx index a768600db24ee..7fdf91537c977 100644 --- a/examples/search_examples/public/search_sessions/app.tsx +++ b/examples/search_examples/public/search_sessions/app.tsx @@ -702,7 +702,7 @@ function doSearch( const startTs = performance.now(); // Submit the search request using the `data.search` service. - // @ts-expect-error request.params is incompatible. Filter is not assignable to QueryContainer + // @ts-expect-error request.params is incompatible. Filter is not assignable to QueryDslQueryContainer return data.search .search(req, { sessionId }) .pipe( diff --git a/package.json b/package.json index 4614e9293e633..513352db3f81b 100644 --- a/package.json +++ b/package.json @@ -99,9 +99,9 @@ "dependencies": { "@elastic/apm-rum": "^5.6.1", "@elastic/apm-rum-react": "^1.2.5", - "@elastic/charts": "30.0.0", + "@elastic/charts": "30.1.0", "@elastic/datemath": "link:bazel-bin/packages/elastic-datemath", - "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.4", + "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.13", "@elastic/ems-client": "7.13.0", "@elastic/eui": "33.0.0", "@elastic/filesaver": "1.1.2", @@ -118,7 +118,7 @@ "@hapi/boom": "^9.1.1", "@hapi/cookie": "^11.0.2", "@hapi/good-squeeze": "6.0.0", - "@hapi/h2o2": "^9.0.2", + "@hapi/h2o2": "^9.1.0", "@hapi/hapi": "^20.0.3", "@hapi/hoek": "^9.1.1", "@hapi/inert": "^6.0.3", @@ -150,7 +150,7 @@ "@kbn/securitysolution-list-utils": "link:bazel-bin/packages/kbn-securitysolution-list-utils", "@kbn/securitysolution-utils": "link:bazel-bin/packages/kbn-securitysolution-utils", "@kbn/server-http-tools": "link:bazel-bin/packages/kbn-server-http-tools", - "@kbn/server-route-repository": "link:packages/kbn-server-route-repository", + "@kbn/server-route-repository": "link:bazel-bin/packages/kbn-server-route-repository", "@kbn/std": "link:bazel-bin/packages/kbn-std", "@kbn/tinymath": "link:bazel-bin/packages/kbn-tinymath", "@kbn/ui-framework": "link:packages/kbn-ui-framework", @@ -198,7 +198,7 @@ "broadcast-channel": "^3.0.3", "chalk": "^4.1.0", "check-disk-space": "^2.1.0", - "cheerio": "0.22.0", + "cheerio": "^1.0.0-rc.9", "chokidar": "^3.4.3", "chroma-js": "^1.4.1", "classnames": "2.2.6", @@ -318,7 +318,7 @@ "pegjs": "0.10.0", "pluralize": "3.1.0", "pngjs": "^3.4.0", - "polished": "^1.9.2", + "polished": "^3.7.2", "prop-types": "^15.7.2", "proper-lockfile": "^3.2.0", "proxy-from-env": "1.0.0", @@ -501,7 +501,6 @@ "@types/base64-js": "^1.2.5", "@types/bluebird": "^3.1.1", "@types/chance": "^1.0.0", - "@types/cheerio": "^0.22.28", "@types/chroma-js": "^1.4.2", "@types/chromedriver": "^81.0.0", "@types/classnames": "^2.2.9", diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index 083ae90a031f5..3e17d471a3cac 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -40,6 +40,7 @@ filegroup( "//packages/kbn-securitysolution-utils:build", "//packages/kbn-securitysolution-es-utils:build", "//packages/kbn-server-http-tools:build", + "//packages/kbn-server-route-repository:build", "//packages/kbn-std:build", "//packages/kbn-telemetry-tools:build", "//packages/kbn-tinymath:build", diff --git a/packages/kbn-apm-utils/src/index.ts b/packages/kbn-apm-utils/src/index.ts index 384b6683199e5..09a6989091f60 100644 --- a/packages/kbn-apm-utils/src/index.ts +++ b/packages/kbn-apm-utils/src/index.ts @@ -14,6 +14,7 @@ export interface SpanOptions { type?: string; subtype?: string; labels?: Record; + intercept?: boolean; } type Span = Exclude; @@ -36,23 +37,27 @@ export async function withSpan( ): Promise { const options = parseSpanOptions(optionsOrName); - const { name, type, subtype, labels } = options; + const { name, type, subtype, labels, intercept } = options; if (!agent.isStarted()) { return cb(); } + let createdSpan: Span | undefined; + // When a span starts, it's marked as the active span in its context. // When it ends, it's not untracked, which means that if a span // starts directly after this one ends, the newly started span is a // child of this span, even though it should be a sibling. // To mitigate this, we queue a microtask by awaiting a promise. - await Promise.resolve(); + if (!intercept) { + await Promise.resolve(); - const span = agent.startSpan(name); + createdSpan = agent.startSpan(name) ?? undefined; - if (!span) { - return cb(); + if (!createdSpan) { + return cb(); + } } // If a span is created in the same context as the span that we just @@ -61,33 +66,51 @@ export async function withSpan( // mitigate this we create a new context. return runInNewContext(() => { + const promise = cb(createdSpan); + + let span: Span | undefined = createdSpan; + + if (intercept) { + span = agent.currentSpan ?? undefined; + } + + if (!span) { + return promise; + } + + const targetedSpan = span; + + if (name) { + targetedSpan.name = name; + } + // @ts-ignore if (type) { - span.type = type; + targetedSpan.type = type; } if (subtype) { - span.subtype = subtype; + targetedSpan.subtype = subtype; } if (labels) { - span.addLabels(labels); + targetedSpan.addLabels(labels); } - return cb(span) + return promise .then((res) => { - if (!span.outcome || span.outcome === 'unknown') { - span.outcome = 'success'; + if (!targetedSpan.outcome || targetedSpan.outcome === 'unknown') { + targetedSpan.outcome = 'success'; } return res; }) .catch((err) => { - if (!span.outcome || span.outcome === 'unknown') { - span.outcome = 'failure'; + if (!targetedSpan.outcome || targetedSpan.outcome === 'unknown') { + targetedSpan.outcome = 'failure'; } throw err; }) .finally(() => { - span.end(); + targetedSpan.end(); }); }); } diff --git a/packages/kbn-cli-dev-mode/src/base_path_proxy_server.test.ts b/packages/kbn-cli-dev-mode/src/base_path_proxy_server.test.ts index a0afbe3a9b8c9..34c6be02847a7 100644 --- a/packages/kbn-cli-dev-mode/src/base_path_proxy_server.test.ts +++ b/packages/kbn-cli-dev-mode/src/base_path_proxy_server.test.ts @@ -185,6 +185,45 @@ describe('BasePathProxyServer', () => { }); }); + test('forwards request cancellation', async () => { + let propagated = false; + + let notifyRequestReceived: () => void; + const requestReceived = new Promise((resolve) => { + notifyRequestReceived = resolve; + }); + + let notifyRequestAborted: () => void; + const requestAborted = new Promise((resolve) => { + notifyRequestAborted = resolve; + }); + + server.route({ + method: 'GET', + path: `${basePath}/foo/{test}`, + handler: async (request, h) => { + notifyRequestReceived(); + + request.raw.req.once('aborted', () => { + notifyRequestAborted(); + propagated = true; + }); + return await new Promise((resolve) => undefined); + }, + }); + await server.start(); + + const request = proxySupertest.get(`${basePath}/foo/some-string`).end(); + + await requestReceived; + + request.abort(); + + await requestAborted; + + expect(propagated).toEqual(true); + }); + test('handles putting', async () => { server.route({ method: 'PUT', diff --git a/packages/kbn-dev-utils/src/plugins/parse_kibana_platform_plugin.ts b/packages/kbn-dev-utils/src/plugins/parse_kibana_platform_plugin.ts index 8d3fdb0f390c5..62231f8221a95 100644 --- a/packages/kbn-dev-utils/src/plugins/parse_kibana_platform_plugin.ts +++ b/packages/kbn-dev-utils/src/plugins/parse_kibana_platform_plugin.ts @@ -29,6 +29,16 @@ interface Manifest { server: boolean; kibanaVersion: string; version: string; + // TODO: make this required. + owner?: { + // Internally, this should be a team name. + name: string; + // All internally owned plugins should have a github team specified that can be pinged in issues, or used to look up + // members who can be asked questions regarding the plugin. + githubTeam?: string; + }; + // TODO: make required. + description?: string; serviceFolders: readonly string[]; requiredPlugins: readonly string[]; optionalPlugins: readonly string[]; @@ -66,6 +76,8 @@ export function parseKibanaPlatformPlugin(manifestPath: string): KibanaPlatformP version: manifest.version, kibanaVersion: manifest.kibanaVersion || manifest.version, serviceFolders: manifest.serviceFolders || [], + owner: manifest.owner, + description: manifest.description, requiredPlugins: isValidDepsDeclaration(manifest.requiredPlugins, 'requiredPlugins'), optionalPlugins: isValidDepsDeclaration(manifest.optionalPlugins, 'optionalPlugins'), requiredBundles: isValidDepsDeclaration(manifest.requiredBundles, 'requiredBundles'), diff --git a/packages/kbn-docs-utils/src/api_docs/build_api_docs_cli.ts b/packages/kbn-docs-utils/src/api_docs/build_api_docs_cli.ts index 0e3d209d6398c..55a466a430b69 100644 --- a/packages/kbn-docs-utils/src/api_docs/build_api_docs_cli.ts +++ b/packages/kbn-docs-utils/src/api_docs/build_api_docs_cli.ts @@ -13,20 +13,12 @@ import { REPO_ROOT, run, CiStatsReporter, createFlagError } from '@kbn/dev-utils import { Project } from 'ts-morph'; import { writePluginDocs } from './mdx/write_plugin_mdx_docs'; -import { ApiDeclaration, PluginApi, TypeKind } from './types'; +import { ApiDeclaration, ApiStats, MissingApiItemMap, PluginApi, TypeKind } from './types'; import { findPlugins } from './find_plugins'; import { pathsOutsideScopes } from './build_api_declarations/utils'; import { getPluginApiMap } from './get_plugin_api_map'; import { writeDeprecationDoc } from './mdx/write_deprecations_doc'; -export interface PluginInfo { - apiCount: number; - apiCountMissingComments: number; - id: string; - missingApiItems: string[]; - percentApiMissingComments: number; -} - function isStringArray(arr: unknown | string[]): arr is string[] { return Array.isArray(arr) && arr.every((p) => typeof p === 'string'); } @@ -95,14 +87,13 @@ export function runBuildApiDocsCli() { const id = plugin.manifest.id; const pluginApi = pluginApiMap[id]; - const apiCount = countApiForPlugin(pluginApi); - const pluginStats = collectApiStatsForPlugin(pluginApi); + const pluginStats = collectApiStatsForPlugin(pluginApi, missingApiItems); reporter.metrics([ { id, group: 'API count', - value: apiCount, + value: pluginStats.apiCount, }, { id, @@ -202,8 +193,8 @@ export function runBuildApiDocsCli() { } } - if (apiCount > 0) { - writePluginDocs(outputFolder, pluginApi, log); + if (pluginStats.apiCount > 0) { + writePluginDocs(outputFolder, { doc: pluginApi, plugin, pluginStats, log }); } writeDeprecationDoc(outputFolder, referencedDeprecations, log); }); @@ -239,27 +230,27 @@ function getTsProject(repoPath: string) { return project; } -interface ApiStats { - missingComments: ApiDeclaration[]; - isAnyType: ApiDeclaration[]; - noReferences: ApiDeclaration[]; -} - -function collectApiStatsForPlugin(doc: PluginApi): ApiStats { - const stats: ApiStats = { missingComments: [], isAnyType: [], noReferences: [] }; +function collectApiStatsForPlugin(doc: PluginApi, missingApiItems: MissingApiItemMap): ApiStats { + const stats: ApiStats = { + missingComments: [], + isAnyType: [], + noReferences: [], + apiCount: countApiForPlugin(doc), + missingExports: Object.values(missingApiItems[doc.id] ?? {}).length, + }; Object.values(doc.client).forEach((def) => { - collectStatsForApi(def, stats); + collectStatsForApi(def, stats, doc); }); Object.values(doc.server).forEach((def) => { - collectStatsForApi(def, stats); + collectStatsForApi(def, stats, doc); }); Object.values(doc.common).forEach((def) => { - collectStatsForApi(def, stats); + collectStatsForApi(def, stats, doc); }); return stats; } -function collectStatsForApi(doc: ApiDeclaration, stats: ApiStats): void { +function collectStatsForApi(doc: ApiDeclaration, stats: ApiStats, pluginApi: PluginApi): void { const missingComment = doc.description === undefined || doc.description.length === 0; if (missingComment) { stats.missingComments.push(doc); @@ -269,7 +260,7 @@ function collectStatsForApi(doc: ApiDeclaration, stats: ApiStats): void { } if (doc.children) { doc.children.forEach((child) => { - collectStatsForApi(child, stats); + collectStatsForApi(child, stats, pluginApi); }); } if (!doc.references || doc.references.length === 0) { diff --git a/packages/kbn-docs-utils/src/api_docs/mdx/types.ts b/packages/kbn-docs-utils/src/api_docs/mdx/types.ts new file mode 100644 index 0000000000000..38c25fe68f7bb --- /dev/null +++ b/packages/kbn-docs-utils/src/api_docs/mdx/types.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { KibanaPlatformPlugin, ToolingLog } from '@kbn/dev-utils'; +import { ApiStats, PluginApi } from '../types'; + +export interface WritePluginDocsOpts { + doc: PluginApi; + plugin: KibanaPlatformPlugin; + pluginStats: ApiStats; + log: ToolingLog; +} diff --git a/packages/kbn-docs-utils/src/api_docs/mdx/write_plugin_mdx_docs.ts b/packages/kbn-docs-utils/src/api_docs/mdx/write_plugin_mdx_docs.ts index 86ddf38cba4b6..557277331b099 100644 --- a/packages/kbn-docs-utils/src/api_docs/mdx/write_plugin_mdx_docs.ts +++ b/packages/kbn-docs-utils/src/api_docs/mdx/write_plugin_mdx_docs.ts @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -import { ToolingLog } from '@kbn/dev-utils'; import fs from 'fs'; import Path from 'path'; import dedent from 'dedent'; @@ -19,6 +18,7 @@ import { groupPluginApi, } from '../utils'; import { writePluginDocSplitByFolder } from './write_plugin_split_by_folder'; +import { WritePluginDocsOpts } from './types'; /** * Converts the plugin doc to mdx and writes it into the file system. If the plugin, @@ -28,12 +28,15 @@ import { writePluginDocSplitByFolder } from './write_plugin_split_by_folder'; * @param doc Contains the information of the plugin that will be written into mdx. * @param log Used for logging debug and error information. */ -export function writePluginDocs(folder: string, doc: PluginApi, log: ToolingLog): void { +export function writePluginDocs( + folder: string, + { doc, plugin, pluginStats, log }: WritePluginDocsOpts +): void { if (doc.serviceFolders) { log.debug(`Splitting plugin ${doc.id}`); - writePluginDocSplitByFolder(folder, doc, log); + writePluginDocSplitByFolder(folder, { doc, log, plugin, pluginStats }); } else { - writePluginDoc(folder, doc, log); + writePluginDoc(folder, { doc, plugin, pluginStats, log }); } } @@ -50,7 +53,10 @@ function hasPublicApi(doc: PluginApi): boolean { * @param doc Contains the information of the plugin that will be written into mdx. * @param log Used for logging debug and error information. */ -export function writePluginDoc(folder: string, doc: PluginApi, log: ToolingLog): void { +export function writePluginDoc( + folder: string, + { doc, log, plugin, pluginStats }: WritePluginDocsOpts +): void { if (!hasPublicApi(doc)) { log.debug(`${doc.id} does not have a public api. Skipping.`); return; @@ -62,6 +68,7 @@ export function writePluginDoc(folder: string, doc: PluginApi, log: ToolingLog): // Append "obj" to avoid special names in here. 'case' is one in particular that // caused issues. const json = getJsonName(fileName) + 'Obj'; + const name = plugin.manifest.owner?.name; let mdx = dedent(` --- @@ -74,9 +81,26 @@ date: 2020-11-16 tags: ['contributor', 'dev', 'apidocs', 'kibana', '${doc.id}'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- - import ${json} from './${fileName}.json'; +${plugin.manifest.description ?? ''} + +${ + plugin.manifest.owner?.githubTeam && name + ? `Contact [${name}](https://github.com/orgs/elastic/teams/${plugin.manifest.owner?.githubTeam}) for questions regarding this plugin.` + : name + ? `Contact ${name} for questions regarding this plugin.` + : '' +} + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| ${pluginStats.apiCount} | ${pluginStats.isAnyType.length} | ${ + pluginStats.missingComments.length + } | ${pluginStats.missingExports} | + `) + '\n\n'; const scopedDoc = { diff --git a/packages/kbn-docs-utils/src/api_docs/mdx/write_plugin_split_by_folder.ts b/packages/kbn-docs-utils/src/api_docs/mdx/write_plugin_split_by_folder.ts index f5d547fc03520..1a9037df0aa25 100644 --- a/packages/kbn-docs-utils/src/api_docs/mdx/write_plugin_split_by_folder.ts +++ b/packages/kbn-docs-utils/src/api_docs/mdx/write_plugin_split_by_folder.ts @@ -6,17 +6,22 @@ * Side Public License, v 1. */ -import { ToolingLog } from '@kbn/dev-utils'; import { snakeToCamel } from '../utils'; import { PluginApi, ApiDeclaration } from '../types'; import { writePluginDoc } from './write_plugin_mdx_docs'; +import { WritePluginDocsOpts } from './types'; -export function writePluginDocSplitByFolder(folder: string, doc: PluginApi, log: ToolingLog) { +export function writePluginDocSplitByFolder( + folder: string, + { doc, plugin, pluginStats, log }: WritePluginDocsOpts +) { const apisByFolder = splitApisByFolder(doc); log.debug(`Split ${doc.id} into ${apisByFolder.length} services`); apisByFolder.forEach((docDef) => { - writePluginDoc(folder, docDef, log); + // TODO: we should probably see if we can break down these stats by service folder. As it is, they will represent stats for + // the entire plugin. + writePluginDoc(folder, { doc: docDef, plugin, pluginStats, log }); }); } diff --git a/packages/kbn-docs-utils/src/api_docs/tests/api_doc_suite.test.ts b/packages/kbn-docs-utils/src/api_docs/tests/api_doc_suite.test.ts index ff71b0efc79d1..c5538b9da229e 100644 --- a/packages/kbn-docs-utils/src/api_docs/tests/api_doc_suite.test.ts +++ b/packages/kbn-docs-utils/src/api_docs/tests/api_doc_suite.test.ts @@ -13,7 +13,7 @@ import { Project } from 'ts-morph'; import { ToolingLog, KibanaPlatformPlugin } from '@kbn/dev-utils'; import { writePluginDocs } from '../mdx/write_plugin_mdx_docs'; -import { ApiDeclaration, PluginApi, Reference, TextWithLinks, TypeKind } from '../types'; +import { ApiDeclaration, ApiStats, PluginApi, Reference, TextWithLinks, TypeKind } from '../types'; import { getKibanaPlatformPlugin } from './kibana_platform_plugin_mock'; import { groupPluginApi } from '../utils'; import { getPluginApiMap } from '../get_plugin_api_map'; @@ -99,11 +99,23 @@ beforeAll(() => { const plugins: KibanaPlatformPlugin[] = [pluginA, pluginB]; const { pluginApiMap } = getPluginApiMap(project, plugins, log, { collectReferences: false }); + const pluginStats: ApiStats = { + missingComments: [], + isAnyType: [], + noReferences: [], + apiCount: 3, + missingExports: 0, + }; doc = pluginApiMap.pluginA; mdxOutputFolder = Path.resolve(__dirname, 'snapshots'); - writePluginDocs(mdxOutputFolder, doc, log); - writePluginDocs(mdxOutputFolder, pluginApiMap.pluginB, log); + writePluginDocs(mdxOutputFolder, { doc, plugin: pluginA, pluginStats, log }); + writePluginDocs(mdxOutputFolder, { + doc: pluginApiMap.pluginB, + plugin: pluginB, + pluginStats, + log, + }); }); it('Setup type is extracted', () => { diff --git a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json index 7d8a90c3aad77..0c3f65bc1b205 100644 --- a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json +++ b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json @@ -598,7 +598,7 @@ "section": "def-public.ImAType", "text": "ImAType" }, - ", e?: string | undefined) => ", + ", e: string | undefined) => ", { "pluginId": "pluginA", "scope": "public", diff --git a/packages/kbn-docs-utils/src/api_docs/types.ts b/packages/kbn-docs-utils/src/api_docs/types.ts index 007b8c824d3c2..de53993fe3036 100644 --- a/packages/kbn-docs-utils/src/api_docs/types.ts +++ b/packages/kbn-docs-utils/src/api_docs/types.ts @@ -231,3 +231,10 @@ export interface ApiReference { export interface ReferencedDeprecations { [key: string]: Array<{ deprecatedApi: ApiDeclaration; ref: ApiReference }>; } +export interface ApiStats { + missingComments: ApiDeclaration[]; + isAnyType: ApiDeclaration[]; + noReferences: ApiDeclaration[]; + apiCount: number; + missingExports: number; +} diff --git a/packages/kbn-es-archiver/src/actions/edit.ts b/packages/kbn-es-archiver/src/actions/edit.ts index eb28985f71437..7a97bf08f3675 100644 --- a/packages/kbn-es-archiver/src/actions/edit.ts +++ b/packages/kbn-es-archiver/src/actions/edit.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ -import { resolve, relative } from 'path'; +import { relative } from 'path'; import Fs from 'fs'; -import { createGunzip, createGzip, Z_BEST_COMPRESSION } from 'zlib'; +import { createGunzip, createGzip, constants } from 'zlib'; import { promisify } from 'util'; import globby from 'globby'; import { ToolingLog } from '@kbn/dev-utils'; @@ -17,24 +17,22 @@ import { createPromiseFromStreams } from '@kbn/utils'; const unlinkAsync = promisify(Fs.unlink); export async function editAction({ - prefix, - dataDir, + path, log, handler, }: { - prefix: string; - dataDir: string; + path: string; log: ToolingLog; handler: () => Promise; }) { const archives = ( await globby('**/*.gz', { - cwd: prefix ? resolve(dataDir, prefix) : dataDir, + cwd: path, absolute: true, }) - ).map((path) => ({ - path, - rawPath: path.slice(0, -3), + ).map((found) => ({ + path: found, + rawPath: found.slice(0, -3), })); await Promise.all( @@ -61,7 +59,7 @@ export async function editAction({ archives.map(async (archive) => { await createPromiseFromStreams([ Fs.createReadStream(archive.rawPath), - createGzip({ level: Z_BEST_COMPRESSION }), + createGzip({ level: constants.Z_BEST_COMPRESSION }), Fs.createWriteStream(archive.path), ]); diff --git a/packages/kbn-es-archiver/src/actions/load.ts b/packages/kbn-es-archiver/src/actions/load.ts index 248c4a65cb20a..673fa7e7d96c8 100644 --- a/packages/kbn-es-archiver/src/actions/load.ts +++ b/packages/kbn-es-archiver/src/actions/load.ts @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -import { resolve } from 'path'; +import { resolve, relative } from 'path'; import { createReadStream } from 'fs'; import { Readable } from 'stream'; -import { ToolingLog } from '@kbn/dev-utils'; +import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils'; import { KbnClient } from '@kbn/test'; import type { KibanaClient } from '@elastic/elasticsearch/api/kibana'; import { createPromiseFromStreams, concatStreamProviders } from '@kbn/utils'; @@ -37,23 +37,21 @@ const pipeline = (...streams: Readable[]) => ); export async function loadAction({ - name, + inputDir, skipExisting, useCreate, client, - dataDir, log, kbnClient, }: { - name: string; + inputDir: string; skipExisting: boolean; useCreate: boolean; client: KibanaClient; - dataDir: string; log: ToolingLog; kbnClient: KbnClient; }) { - const inputDir = resolve(dataDir, name); + const name = relative(REPO_ROOT, inputDir); const stats = createStats(name, log); const files = prioritizeMappings(await readDirectory(inputDir)); const kibanaPluginIds = await kbnClient.plugins.getEnabledIds(); diff --git a/packages/kbn-es-archiver/src/actions/rebuild_all.ts b/packages/kbn-es-archiver/src/actions/rebuild_all.ts index 1581ff41b95fc..f286f9719bdf1 100644 --- a/packages/kbn-es-archiver/src/actions/rebuild_all.ts +++ b/packages/kbn-es-archiver/src/actions/rebuild_all.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -import { resolve, dirname, relative } from 'path'; +import { resolve, relative } from 'path'; import { stat, Stats, rename, createReadStream, createWriteStream } from 'fs'; import { Readable, Writable } from 'stream'; import { fromNode } from 'bluebird'; -import { ToolingLog } from '@kbn/dev-utils'; +import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils'; import { createPromiseFromStreams } from '@kbn/utils'; import { prioritizeMappings, @@ -25,15 +25,7 @@ async function isDirectory(path: string): Promise { return stats.isDirectory(); } -export async function rebuildAllAction({ - dataDir, - log, - rootDir = dataDir, -}: { - dataDir: string; - log: ToolingLog; - rootDir?: string; -}) { +export async function rebuildAllAction({ dataDir, log }: { dataDir: string; log: ToolingLog }) { const childNames = prioritizeMappings(await readDirectory(dataDir)); for (const childName of childNames) { const childPath = resolve(dataDir, childName); @@ -42,13 +34,12 @@ export async function rebuildAllAction({ await rebuildAllAction({ dataDir: childPath, log, - rootDir, }); continue; } - const archiveName = dirname(relative(rootDir, childPath)); - log.info(`${archiveName} Rebuilding ${childName}`); + const archiveName = relative(REPO_ROOT, childPath); + log.info('[%s] Rebuilding %j', archiveName, childName); const gzip = isGzip(childPath); const tempFile = childPath + (gzip ? '.rebuilding.gz' : '.rebuilding'); @@ -60,6 +51,6 @@ export async function rebuildAllAction({ ] as [Readable, ...Writable[]]); await fromNode((cb) => rename(tempFile, childPath, cb)); - log.info(`${archiveName} Rebuilt ${childName}`); + log.info('[%s] Rebuilt %j', archiveName, childName); } } diff --git a/packages/kbn-es-archiver/src/actions/save.ts b/packages/kbn-es-archiver/src/actions/save.ts index c90f241a1c639..da0966920de24 100644 --- a/packages/kbn-es-archiver/src/actions/save.ts +++ b/packages/kbn-es-archiver/src/actions/save.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -import { resolve } from 'path'; +import { resolve, relative } from 'path'; import { createWriteStream, mkdirSync } from 'fs'; import { Readable, Writable } from 'stream'; import type { KibanaClient } from '@elastic/elasticsearch/api/kibana'; -import { ToolingLog } from '@kbn/dev-utils'; +import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils'; import { createListStream, createPromiseFromStreams } from '@kbn/utils'; import { @@ -22,23 +22,21 @@ import { } from '../lib'; export async function saveAction({ - name, + outputDir, indices, client, - dataDir, log, raw, query, }: { - name: string; + outputDir: string; indices: string | string[]; client: KibanaClient; - dataDir: string; log: ToolingLog; raw: boolean; query?: Record; }) { - const outputDir = resolve(dataDir, name); + const name = relative(REPO_ROOT, outputDir); const stats = createStats(name, log); log.info('[%s] Creating archive of %j', name, indices); diff --git a/packages/kbn-es-archiver/src/actions/unload.ts b/packages/kbn-es-archiver/src/actions/unload.ts index f4e37871a5337..d8bc013b40991 100644 --- a/packages/kbn-es-archiver/src/actions/unload.ts +++ b/packages/kbn-es-archiver/src/actions/unload.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -import { resolve } from 'path'; +import { resolve, relative } from 'path'; import { createReadStream } from 'fs'; import { Readable, Writable } from 'stream'; import type { KibanaClient } from '@elastic/elasticsearch/api/kibana'; -import { ToolingLog } from '@kbn/dev-utils'; +import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils'; import { KbnClient } from '@kbn/test'; import { createPromiseFromStreams } from '@kbn/utils'; @@ -25,19 +25,17 @@ import { } from '../lib'; export async function unloadAction({ - name, + inputDir, client, - dataDir, log, kbnClient, }: { - name: string; + inputDir: string; client: KibanaClient; - dataDir: string; log: ToolingLog; kbnClient: KbnClient; }) { - const inputDir = resolve(dataDir, name); + const name = relative(REPO_ROOT, inputDir); const stats = createStats(name, log); const kibanaPluginIds = await kbnClient.plugins.getEnabledIds(); diff --git a/packages/kbn-es-archiver/src/cli.ts b/packages/kbn-es-archiver/src/cli.ts index 9617457d4573e..9268f5fa7bbb5 100644 --- a/packages/kbn-es-archiver/src/cli.ts +++ b/packages/kbn-es-archiver/src/cli.ts @@ -30,13 +30,12 @@ export function runCli() { new RunWithCommands({ description: 'CLI to manage archiving/restoring data in elasticsearch', globalFlags: { - string: ['es-url', 'kibana-url', 'dir', 'config', 'es-ca', 'kibana-ca'], + string: ['es-url', 'kibana-url', 'config', 'es-ca', 'kibana-ca'], help: ` - --config path to an FTR config file that sets --es-url, --kibana-url, and --dir + --config path to an FTR config file that sets --es-url and --kibana-url default: ${defaultConfigPath} --es-url url for Elasticsearch, prefer the --config flag --kibana-url url for Kibana, prefer the --config flag - --dir where arechives are stored, prefer the --config flag --kibana-ca if Kibana url points to https://localhost we default to the CA from @kbn/dev-utils, customize the CA with this flag --es-ca if Elasticsearch url points to https://localhost we default to the CA from @kbn/dev-utils, customize the CA with this flag `, @@ -104,17 +103,6 @@ export function runCli() { } } - let dir = flags.dir; - if (dir && typeof dir !== 'string') { - throw createFlagError('--dir must be a string'); - } - if (!dir && config) { - dir = Path.resolve(config.get('esArchiver.directory')); - } - if (!dir) { - throw createFlagError('--dir or --config must be defined'); - } - const client = new Client({ node: esUrl, ssl: esCa ? { ca: esCa } : undefined, @@ -130,7 +118,7 @@ export function runCli() { const esArchiver = new EsArchiver({ log, client, - dataDir: dir, + baseDir: process.cwd(), kbnClient, }); @@ -141,16 +129,16 @@ export function runCli() { }) .command({ name: 'save', - usage: 'save [name] [...indices]', + usage: 'save [path] [...indices]', description: ` - archive the [indices ...] into the --dir with [name] + archive the [indices ...] into a directory at [path] Example: - Save all [logstash-*] indices from http://localhost:9200 to [snapshots/my_test_data] directory + Save all [logstash-*] indices from http://localhost:9200 to the [test/functional/es_archives/my_test_data] directory - WARNING: If the [my_test_data] snapshot exists it will be deleted! + WARNING: If the [test/functional/es_archives/my_test_data] snapshot exists it will be deleted! - $ node scripts/es_archiver save my_test_data logstash-* --dir snapshots + $ node scripts/es_archiver save test/functional/es_archives/my_test_data logstash-* `, flags: { boolean: ['raw'], @@ -161,9 +149,9 @@ export function runCli() { `, }, async run({ flags, esArchiver }) { - const [name, ...indices] = flags._; - if (!name) { - throw createFlagError('missing [name] argument'); + const [path, ...indices] = flags._; + if (!path) { + throw createFlagError('missing [path] argument'); } if (!indices.length) { throw createFlagError('missing [...indices] arguments'); @@ -184,22 +172,22 @@ export function runCli() { } } - await esArchiver.save(name, indices, { raw, query: parsedQuery }); + await esArchiver.save(path, indices, { raw, query: parsedQuery }); }, }) .command({ name: 'load', - usage: 'load [name]', + usage: 'load [path]', description: ` - load the archive in --dir with [name] + load the archive stored at [path] Example: - Load the [my_test_data] snapshot from the archive directory and elasticsearch instance defined - in the [test/functional/config.js] config file + Load the [my_test_data] snapshot from the local directory and elasticsearch instance defined + in the [../config.js] config file WARNING: If the indices exist already they will be deleted! - $ node scripts/es_archiver load my_test_data --config test/functional/config.js + $ node scripts/es_archiver load my_test_data --config ../config.js `, flags: { boolean: ['use-create'], @@ -208,9 +196,9 @@ export function runCli() { `, }, async run({ flags, esArchiver }) { - const [name] = flags._; - if (!name) { - throw createFlagError('missing [name] argument'); + const [path] = flags._; + if (!path) { + throw createFlagError('missing [path] argument'); } if (flags._.length > 1) { throw createFlagError(`unknown extra arguments: [${flags._.slice(1).join(', ')}]`); @@ -221,40 +209,40 @@ export function runCli() { throw createFlagError('--use-create does not take a value'); } - await esArchiver.load(name, { useCreate }); + await esArchiver.load(path, { useCreate }); }, }) .command({ name: 'unload', - usage: 'unload [name]', - description: 'remove indices created by the archive in --dir with [name]', + usage: 'unload [path]', + description: 'remove indices created by the archive at [path]', async run({ flags, esArchiver }) { - const [name] = flags._; - if (!name) { - throw createFlagError('missing [name] argument'); + const [path] = flags._; + if (!path) { + throw createFlagError('missing [path] argument'); } if (flags._.length > 1) { throw createFlagError(`unknown extra arguments: [${flags._.slice(1).join(', ')}]`); } - await esArchiver.unload(name); + await esArchiver.unload(path); }, }) .command({ name: 'edit', - usage: 'edit [prefix]', + usage: 'edit [path]', description: - 'extract the archives under the prefix, wait for edits to be completed, and then recompress the archives', + 'extract the archives within or at [path], wait for edits to be completed, and then recompress the archives', async run({ flags, esArchiver }) { - const [prefix] = flags._; - if (!prefix) { - throw createFlagError('missing [prefix] argument'); + const [path] = flags._; + if (!path) { + throw createFlagError('missing [path] argument'); } if (flags._.length > 1) { throw createFlagError(`unknown extra arguments: [${flags._.slice(1).join(', ')}]`); } - await esArchiver.edit(prefix, async () => { + await esArchiver.edit(path, async () => { const rl = readline.createInterface({ input: process.stdin, output: process.stdout, @@ -278,10 +266,19 @@ export function runCli() { }, }) .command({ - name: 'rebuild-all', - description: '[internal] read and write all archives in --dir to remove any inconsistencies', - async run({ esArchiver }) { - await esArchiver.rebuildAll(); + name: 'rebuild-all [dir]', + description: + '[internal] read and write all archives within [dir] to remove any inconsistencies', + async run({ flags, esArchiver }) { + const [dir] = flags._; + if (!dir) { + throw createFlagError('missing [dir] argument'); + } + if (flags._.length > 1) { + throw createFlagError(`unknown extra arguments: [${flags._.slice(1).join(', ')}]`); + } + + await esArchiver.rebuildAll(dir); }, }) .execute(); diff --git a/packages/kbn-es-archiver/src/es_archiver.ts b/packages/kbn-es-archiver/src/es_archiver.ts index 93ce97efd4c84..06a56b79e3012 100644 --- a/packages/kbn-es-archiver/src/es_archiver.ts +++ b/packages/kbn-es-archiver/src/es_archiver.ts @@ -6,8 +6,11 @@ * Side Public License, v 1. */ +import Fs from 'fs'; +import Path from 'path'; + import type { KibanaClient } from '@elastic/elasticsearch/api/kibana'; -import { ToolingLog } from '@kbn/dev-utils'; +import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils'; import { KbnClient } from '@kbn/test'; import { @@ -21,139 +24,128 @@ import { interface Options { client: KibanaClient; - dataDir: string; + baseDir?: string; log: ToolingLog; kbnClient: KbnClient; } export class EsArchiver { private readonly client: KibanaClient; - private readonly dataDir: string; + private readonly baseDir: string; private readonly log: ToolingLog; private readonly kbnClient: KbnClient; constructor(options: Options) { this.client = options.client; - this.dataDir = options.dataDir; + this.baseDir = options.baseDir ?? REPO_ROOT; this.log = options.log; this.kbnClient = options.kbnClient; } /** - * Extract data and mappings from an elasticsearch index and store - * it in the dataDir so it can be used later to recreate the index. + * Extract data and mappings from an elasticsearch index and store + * it in the baseDir so it can be used later to recreate the index. * - * @param {String} name - the name of this archive, used to determine filename - * @param {String|Array} indices - the indices to archive - * @param {Object} options - * @property {Boolean} options.raw - should the archive be raw (unzipped) or not - * @return Promise + * @param {String} path - relative path to the archive, resolved relative to this.baseDir which defaults to REPO_ROOT + * @param {String|Array} indices - the indices to archive + * @param {Object} options + * @property {Boolean} options.raw - should the archive be raw (unzipped) or not */ async save( - name: string, + path: string, indices: string | string[], { raw = false, query }: { raw?: boolean; query?: Record } = {} ) { return await saveAction({ - name, + outputDir: Path.resolve(this.baseDir, path), indices, raw, client: this.client, - dataDir: this.dataDir, log: this.log, query, }); } /** - * Load an index from an archive + * Load an index from an archive * - * @param {String} name - the name of the archive to load - * @param {Object} options - * @property {Boolean} options.skipExisting - should existing indices + * @param {String} path - relative path to the archive to load, resolved relative to this.baseDir which defaults to REPO_ROOT + * @param {Object} options + * @property {Boolean} options.skipExisting - should existing indices * be ignored or overwritten - * @property {Boolean} options.useCreate - use a create operation instead of index for documents - * @return Promise + * @property {Boolean} options.useCreate - use a create operation instead of index for documents */ async load( - name: string, + path: string, { skipExisting = false, useCreate = false, }: { skipExisting?: boolean; useCreate?: boolean } = {} ) { return await loadAction({ - name, + inputDir: this.findArchive(path), skipExisting: !!skipExisting, useCreate: !!useCreate, client: this.client, - dataDir: this.dataDir, log: this.log, kbnClient: this.kbnClient, }); } /** - * Remove the indexes in elasticsearch that have data in an archive. + * Remove the indexes in elasticsearch that have data in an archive. * - * @param {String} name - * @return Promise + * @param {String} path - relative path to the archive to unload, resolved relative to this.baseDir which defaults to REPO_ROOT */ - async unload(name: string) { + async unload(path: string) { return await unloadAction({ - name, + inputDir: this.findArchive(path), client: this.client, - dataDir: this.dataDir, log: this.log, kbnClient: this.kbnClient, }); } /** - * Parse and reformat all of the archives. This is primarily helpful - * for working on the esArchiver. + * Parse and reformat all of the archives. This is primarily helpful + * for working on the esArchiver. * - * @return Promise + * @param {String} dir - relative path to a directory which contains archives, resolved relative to this.baseDir which defaults to REPO_ROOT */ - async rebuildAll() { + async rebuildAll(dir: string) { return await rebuildAllAction({ - dataDir: this.dataDir, + dataDir: Path.resolve(this.baseDir, dir), log: this.log, }); } /** - * Extract the gzipped files in an archive, then call the handler. When it - * resolves re-archive the gzipped files. + * Extract the gzipped files in an archive, then call the handler. When it + * resolves re-archive the gzipped files. * - * @param {String} prefix optional prefix to limit archives that are extracted - * @param {() => Promise} handler - * @return Promise + * @param {String} path optional prefix to limit archives that are extracted + * @param {() => Promise} handler */ - async edit(prefix: string, handler: () => Promise) { + async edit(path: string, handler: () => Promise) { return await editAction({ - prefix, + path: Path.resolve(this.baseDir, path), log: this.log, - dataDir: this.dataDir, handler, }); } /** - * Just like load, but skips any existing index + * Just like load, but skips any existing index * - * @param {String} name - * @return Promise + * @param name */ async loadIfNeeded(name: string) { return await this.load(name, { skipExisting: true }); } /** - * Delete any Kibana indices, and initialize the Kibana index as Kibana would do - * on startup. - * - * @return Promise + * Delete any Kibana indices, and initialize the Kibana index as Kibana would do + * on startup. */ async emptyKibanaIndex() { return await emptyKibanaIndexAction({ @@ -162,4 +154,33 @@ export class EsArchiver { kbnClient: this.kbnClient, }); } + + /** + * Resolve a path relative to the baseDir + * + * @param relativePath + */ + private findArchive(relativePath: string) { + const path = Path.resolve(this.baseDir, relativePath); + let stats; + try { + stats = Fs.statSync(path); + } catch (error) { + if (error.code === 'ENOENT') { + throw new Error( + `Attempt to reference an esArchive with relative path [${relativePath}] could not be resolved. This path was resolved relative to [${this.baseDir}].` + ); + } + + throw error; + } + + if (stats.isDirectory()) { + return path; + } + + throw new Error( + `Attempt to reference an esArchive with relative path [${relativePath}] resolved to a file instead of a directory containing data/mapping files. This path was resolved relative to [${this.baseDir}].` + ); + } } diff --git a/packages/kbn-es-archiver/src/lib/indices/create_index_stream.ts b/packages/kbn-es-archiver/src/lib/indices/create_index_stream.ts index b45a8b18a5776..fba3df24e896f 100644 --- a/packages/kbn-es-archiver/src/lib/indices/create_index_stream.ts +++ b/packages/kbn-es-archiver/src/lib/indices/create_index_stream.ts @@ -19,7 +19,7 @@ import { deleteIndex } from './delete_index'; import { ES_CLIENT_HEADERS } from '../../client_headers'; interface DocRecord { - value: estypes.IndexState & { + value: estypes.IndicesIndexState & { index: string; type: string; }; diff --git a/packages/kbn-es-archiver/src/lib/indices/delete_index.ts b/packages/kbn-es-archiver/src/lib/indices/delete_index.ts index 2a42d52e2ca80..d3d6f85d7a360 100644 --- a/packages/kbn-es-archiver/src/lib/indices/delete_index.ts +++ b/packages/kbn-es-archiver/src/lib/indices/delete_index.ts @@ -126,7 +126,7 @@ export async function waitForSnapshotCompletion( const { body: repositoryMap } = await client.snapshot.getRepository({} as any); for (const repository of Object.keys(repositoryMap)) { const allInProgress = await getInProgressSnapshots(repository); - const found = allInProgress.find((s: any) => s.indices.includes(index)); + const found = allInProgress?.find((s: any) => s.indices.includes(index)); if (!found) { continue; diff --git a/packages/kbn-es-archiver/src/lib/indices/kibana_index.ts b/packages/kbn-es-archiver/src/lib/indices/kibana_index.ts index 51d4f28d20f2e..0712d2789a91a 100644 --- a/packages/kbn-es-archiver/src/lib/indices/kibana_index.ts +++ b/packages/kbn-es-archiver/src/lib/indices/kibana_index.ts @@ -35,7 +35,7 @@ export async function deleteKibanaIndices({ await client.indices.putSettings( { index: indexNames, - body: { index: { blocks: { read_only: false } } }, + body: { settings: { blocks: { read_only: false } } }, }, { headers: ES_CLIENT_HEADERS, diff --git a/packages/kbn-monaco/src/monaco_imports.ts b/packages/kbn-monaco/src/monaco_imports.ts index 872ac46352cf3..92ea23347c374 100644 --- a/packages/kbn-monaco/src/monaco_imports.ts +++ b/packages/kbn-monaco/src/monaco_imports.ts @@ -21,5 +21,6 @@ import 'monaco-editor/esm/vs/editor/contrib/folding/folding.js'; // Needed for f import 'monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js'; // Needed for suggestions import 'monaco-editor/esm/vs/editor/contrib/hover/hover.js'; // Needed for hover import 'monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js'; // Needed for signature +import 'monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js'; // Needed for brackets matching highlight export { monaco }; diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 455453464e957..9b4199c812864 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -104,7 +104,7 @@ pageLoadAssetSize: indexPatternFieldEditor: 90489 osquery: 107090 fileUpload: 25664 - fileDataVisualizer: 27530 + dataVisualizer: 27530 banners: 17946 mapsEms: 26072 timelines: 28613 diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index 5b064e492beb5..1311eb4d7c638 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -650,6 +650,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArray", function() { return __spreadArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; }); @@ -683,6 +684,8 @@ var extendStatics = function(d, b) { }; function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); @@ -805,19 +808,27 @@ function __read(o, n) { return ar; } +/** @deprecated */ function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } +/** @deprecated */ function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; -}; +} + +function __spreadArray(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +} function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); @@ -872,19 +883,17 @@ function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } -function __classPrivateFieldGet(receiver, privateMap) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to get private field on non-instance"); - } - return privateMap.get(receiver); +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } -function __classPrivateFieldSet(receiver, privateMap, value) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to set private field on non-instance"); - } - privateMap.set(receiver, value); - return value; +function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; } @@ -48470,7 +48479,7 @@ async function runBazelCommandWithRunner(bazelCommandRunner, bazelArgs, offline stdio: 'pipe' }); - if (offline) { + if (offline || !offline) { bazelArgs = [...bazelArgs, '--config=offline']; } diff --git a/packages/kbn-pm/src/utils/bazel/run.ts b/packages/kbn-pm/src/utils/bazel/run.ts index c030081e53daa..5f3743876e0e4 100644 --- a/packages/kbn-pm/src/utils/bazel/run.ts +++ b/packages/kbn-pm/src/utils/bazel/run.ts @@ -29,7 +29,7 @@ async function runBazelCommandWithRunner( stdio: 'pipe', }; - if (offline) { + if (offline || !offline) { bazelArgs = [...bazelArgs, '--config=offline']; } diff --git a/packages/kbn-server-route-repository/BUILD.bazel b/packages/kbn-server-route-repository/BUILD.bazel new file mode 100644 index 0000000000000..3a146086e80bc --- /dev/null +++ b/packages/kbn-server-route-repository/BUILD.bazel @@ -0,0 +1,89 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") + +PKG_BASE_NAME = "kbn-server-route-repository" +PKG_REQUIRE_NAME = "@kbn/server-route-repository" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", + "README.md" +] + +SRC_DEPS = [ + "//packages/kbn-config-schema", + "//packages/kbn-io-ts-utils", + "@npm//@hapi/boom", + "@npm//fp-ts", + "@npm//io-ts", + "@npm//lodash", + "@npm//utility-types" +] + +TYPES_DEPS = [ + "@npm//@types/jest", + "@npm//@types/lodash", + "@npm//@types/node", +] + +DEPS = SRC_DEPS + TYPES_DEPS + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + ], +) + +ts_project( + name = "tsc", + args = ['--pretty'], + srcs = SRCS, + deps = DEPS, + declaration = True, + declaration_map = True, + incremental = True, + out_dir = "target", + source_map = True, + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_BASE_NAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = DEPS + [":tsc"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [ + ":%s" % PKG_BASE_NAME, + ] +) + +filegroup( + name = "build", + srcs = [ + ":npm_module", + ], + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-server-route-repository/package.json b/packages/kbn-server-route-repository/package.json index 4ae625d83a700..cfeab275e19cf 100644 --- a/packages/kbn-server-route-repository/package.json +++ b/packages/kbn-server-route-repository/package.json @@ -4,10 +4,5 @@ "types": "./target/index.d.ts", "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", - "private": true, - "scripts": { - "build": "../../node_modules/.bin/tsc", - "kbn:bootstrap": "yarn build", - "kbn:watch": "yarn build --watch" - } + "private": true } diff --git a/packages/kbn-server-route-repository/tsconfig.json b/packages/kbn-server-route-repository/tsconfig.json index 8f1e72172c675..7614a9411602e 100644 --- a/packages/kbn-server-route-repository/tsconfig.json +++ b/packages/kbn-server-route-repository/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "incremental": false, + "incremental": true, "outDir": "./target", "stripInternal": false, "declaration": true, diff --git a/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts b/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts index e5d0fdc122a1a..6a8f384208fd8 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts @@ -209,13 +209,6 @@ export const schema = Joi.object() // definition of apps that work with `common.navigateToApp()` apps: Joi.object().pattern(ID_PATTERN, appUrlPartsSchema()).default(), - // settings for the esArchiver module - esArchiver: Joi.object() - .keys({ - directory: Joi.string().default(defaultRelativeToConfigPath('fixtures/es_archiver')), - }) - .default(), - // settings for the saved objects svc kbnArchiver: Joi.object() .keys({ diff --git a/packages/kbn-test/src/jest/utils/router_helpers.tsx b/packages/kbn-test/src/jest/utils/router_helpers.tsx index e2245440274d1..85ef27488a4ce 100644 --- a/packages/kbn-test/src/jest/utils/router_helpers.tsx +++ b/packages/kbn-test/src/jest/utils/router_helpers.tsx @@ -8,18 +8,39 @@ import React, { Component, ComponentType } from 'react'; import { MemoryRouter, Route, withRouter } from 'react-router-dom'; -import * as H from 'history'; +import { History, LocationDescriptor } from 'history'; -export const WithMemoryRouter = (initialEntries: string[] = ['/'], initialIndex: number = 0) => ( - WrappedComponent: ComponentType -) => (props: any) => ( +const stringifyPath = (path: LocationDescriptor): string => { + if (typeof path === 'string') { + return path; + } + + return path.pathname || '/'; +}; + +const locationDescriptorToRoutePath = ( + paths: LocationDescriptor | LocationDescriptor[] +): string | string[] => { + if (Array.isArray(paths)) { + return paths.map((path: LocationDescriptor) => { + return stringifyPath(path); + }); + } + + return stringifyPath(paths); +}; + +export const WithMemoryRouter = ( + initialEntries: LocationDescriptor[] = ['/'], + initialIndex: number = 0 +) => (WrappedComponent: ComponentType) => (props: any) => ( ); export const WithRoute = ( - componentRoutePath: string | string[] = '/', + componentRoutePath: LocationDescriptor | LocationDescriptor[] = ['/'], onRouter = (router: any) => {} ) => (WrappedComponent: ComponentType) => { // Create a class component that will catch the router @@ -40,16 +61,16 @@ export const WithRoute = ( return (props: any) => ( } /> ); }; interface Router { - history: Partial; + history: Partial; route: { - location: H.Location; + location: LocationDescriptor; }; } diff --git a/packages/kbn-test/src/jest/utils/testbed/types.ts b/packages/kbn-test/src/jest/utils/testbed/types.ts index fdc000215c4f1..bba504951c0bc 100644 --- a/packages/kbn-test/src/jest/utils/testbed/types.ts +++ b/packages/kbn-test/src/jest/utils/testbed/types.ts @@ -8,6 +8,7 @@ import { Store } from 'redux'; import { ReactWrapper } from 'enzyme'; +import { LocationDescriptor } from 'history'; export type SetupFunc = (props?: any) => TestBed | Promise>; @@ -161,11 +162,11 @@ export interface MemoryRouterConfig { /** Flag to add or not the `MemoryRouter`. If set to `false`, there won't be any router and the component won't be wrapped on a ``. */ wrapComponent?: boolean; /** The React Router **initial entries** setting ([see documentation](https://github.com/ReactTraining/react-router/blob/master/packages/react-router/docs/api/MemoryRouter.md)) */ - initialEntries?: string[]; + initialEntries?: LocationDescriptor[]; /** The React Router **initial index** setting ([see documentation](https://github.com/ReactTraining/react-router/blob/master/packages/react-router/docs/api/MemoryRouter.md)) */ initialIndex?: number; /** The route **path** for the mounted component (defaults to `"/"`) */ - componentRoutePath?: string | string[]; + componentRoutePath?: LocationDescriptor | LocationDescriptor[]; /** A callBack that will be called with the React Router instance once mounted */ onRouter?: (router: any) => void; } diff --git a/packages/kbn-test/src/kbn_archiver_cli.ts b/packages/kbn-test/src/kbn_archiver_cli.ts index 04581a8354668..6eb1d4bf68dad 100644 --- a/packages/kbn-test/src/kbn_archiver_cli.ts +++ b/packages/kbn-test/src/kbn_archiver_cli.ts @@ -43,13 +43,11 @@ export function runKbnArchiverCli() { new RunWithCommands({ description: 'Import/export saved objects from archives, for testing', globalFlags: { - string: ['config', 'space', 'kibana-url', 'dir'], + string: ['config', 'space', 'kibana-url'], help: ` --space space id to operate on, defaults to the default space --config optional path to an FTR config file that will be parsed and used for defaults --kibana-url set the url that kibana can be reached at, uses the "servers.kibana" setting from --config by default - --dir directory that contains exports to be imported, or where exports will be saved, uses the "kbnArchiver.directory" - setting from --config by default `, }, async extendContext({ log, flags }) { @@ -79,23 +77,6 @@ export function runKbnArchiverCli() { ); } - let importExportDir; - if (flags.dir) { - if (typeof flags.dir !== 'string') { - throw createFlagError('expected --dir to be a string'); - } - - importExportDir = flags.dir; - } else if (config) { - importExportDir = config.get('kbnArchiver.directory'); - } - - if (!importExportDir) { - throw createFlagError( - '--config does not include a kbnArchiver.directory, specify it or include --dir flag' - ); - } - const space = flags.space; if (!(space === undefined || typeof space === 'string')) { throw createFlagError('--space must be a string'); @@ -106,7 +87,7 @@ export function runKbnArchiverCli() { kbnClient: new KbnClient({ log, url: kibanaUrl, - importExportDir, + importExportBaseDir: process.cwd(), }), }; }, diff --git a/packages/kbn-test/src/kbn_client/import_export/parse_archive.test.ts b/packages/kbn-test/src/kbn_client/import_export/parse_archive.test.ts new file mode 100644 index 0000000000000..25651a0dd2190 --- /dev/null +++ b/packages/kbn-test/src/kbn_client/import_export/parse_archive.test.ts @@ -0,0 +1,63 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { parseArchive } from './parse_archive'; + +jest.mock('fs/promises', () => ({ + readFile: jest.fn(), +})); + +const mockReadFile = jest.requireMock('fs/promises').readFile; + +beforeEach(() => { + jest.clearAllMocks(); +}); + +it('parses archives with \\n', async () => { + mockReadFile.mockResolvedValue( + `{ + "foo": "abc" + }\n\n{ + "foo": "xyz" + }` + ); + + const archive = await parseArchive('mock'); + expect(archive).toMatchInlineSnapshot(` + Array [ + Object { + "foo": "abc", + }, + Object { + "foo": "xyz", + }, + ] + `); +}); + +it('parses archives with \\r\\n', async () => { + mockReadFile.mockResolvedValue( + `{ + "foo": "123" + }\r\n\r\n{ + "foo": "456" + }` + ); + + const archive = await parseArchive('mock'); + expect(archive).toMatchInlineSnapshot(` + Array [ + Object { + "foo": "123", + }, + Object { + "foo": "456", + }, + ] + `); +}); diff --git a/packages/kbn-test/src/kbn_client/import_export/parse_archive.ts b/packages/kbn-test/src/kbn_client/import_export/parse_archive.ts new file mode 100644 index 0000000000000..b6b85ba521525 --- /dev/null +++ b/packages/kbn-test/src/kbn_client/import_export/parse_archive.ts @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Fs from 'fs/promises'; + +export interface SavedObject { + id: string; + type: string; + [key: string]: unknown; +} + +export async function parseArchive(path: string): Promise { + return (await Fs.readFile(path, 'utf-8')) + .split(/\r?\n\r?\n/) + .filter((line) => !!line) + .map((line) => JSON.parse(line)); +} diff --git a/packages/kbn-test/src/kbn_client/kbn_client.ts b/packages/kbn-test/src/kbn_client/kbn_client.ts index ac14a399918cb..e44f500593300 100644 --- a/packages/kbn-test/src/kbn_client/kbn_client.ts +++ b/packages/kbn-test/src/kbn_client/kbn_client.ts @@ -22,7 +22,7 @@ export interface KbnClientOptions { certificateAuthorities?: Buffer[]; log: ToolingLog; uiSettingDefaults?: UiSettingValues; - importExportDir?: string; + importExportBaseDir?: string; } export class KbnClient { @@ -67,7 +67,7 @@ export class KbnClient { this.log, this.requester, this.savedObjects, - options.importExportDir + options.importExportBaseDir ); } diff --git a/packages/kbn-test/src/kbn_client/kbn_client_import_export.ts b/packages/kbn-test/src/kbn_client/kbn_client_import_export.ts index fe67fbb70fa3c..4adae7d1cd031 100644 --- a/packages/kbn-test/src/kbn_client/kbn_client_import_export.ts +++ b/packages/kbn-test/src/kbn_client/kbn_client_import_export.ts @@ -8,38 +8,26 @@ import { inspect } from 'util'; import Fs from 'fs/promises'; +import { existsSync } from 'fs'; import Path from 'path'; import FormData from 'form-data'; -import { ToolingLog, isAxiosResponseError, createFailError } from '@kbn/dev-utils'; +import { ToolingLog, isAxiosResponseError, createFailError, REPO_ROOT } from '@kbn/dev-utils'; import { KbnClientRequester, uriencode, ReqOptions } from './kbn_client_requester'; import { KbnClientSavedObjects } from './kbn_client_saved_objects'; +import { parseArchive } from './import_export/parse_archive'; interface ImportApiResponse { success: boolean; [key: string]: unknown; } - -interface SavedObject { - id: string; - type: string; - [key: string]: unknown; -} - -async function parseArchive(path: string): Promise { - return (await Fs.readFile(path, 'utf-8')) - .split('\n\n') - .filter((line) => !!line) - .map((line) => JSON.parse(line)); -} - export class KbnClientImportExport { constructor( public readonly log: ToolingLog, public readonly requester: KbnClientRequester, public readonly savedObjects: KbnClientSavedObjects, - public readonly dir?: string + public readonly baseDir: string = REPO_ROOT ) {} private resolvePath(path: string) { @@ -47,18 +35,24 @@ export class KbnClientImportExport { path = `${path}.json`; } - if (!this.dir && !Path.isAbsolute(path)) { + return Path.resolve(this.baseDir, path); + } + + private resolveAndValidatePath(path: string) { + const absolutePath = this.resolvePath(path); + + if (!existsSync(absolutePath)) { throw new Error( - 'unable to resolve relative path to import/export without a configured dir, either path absolute path or specify --dir' + `unable to resolve path [${path}] to import/export, resolved relative to [${this.baseDir}]` ); } - return this.dir ? Path.resolve(this.dir, path) : path; + return absolutePath; } - async load(name: string, options?: { space?: string }) { - const src = this.resolvePath(name); - this.log.debug('resolved import for', name, 'to', src); + async load(path: string, options?: { space?: string }) { + const src = this.resolveAndValidatePath(path); + this.log.debug('resolved import for', path, 'to', src); const objects = await parseArchive(src); this.log.info('importing', objects.length, 'saved objects', { space: options?.space }); @@ -91,8 +85,8 @@ export class KbnClientImportExport { } } - async unload(name: string, options?: { space?: string }) { - const src = this.resolvePath(name); + async unload(path: string, options?: { space?: string }) { + const src = this.resolveAndValidatePath(path); this.log.debug('unloading docs from archive at', src); const objects = await parseArchive(src); @@ -110,8 +104,8 @@ export class KbnClientImportExport { this.log.success(deleted, 'saved objects deleted'); } - async save(name: string, options: { types: string[]; space?: string }) { - const dest = this.resolvePath(name); + async save(path: string, options: { types: string[]; space?: string }) { + const dest = this.resolvePath(path); this.log.debug('saving export to', dest); const resp = await this.req(options.space, { @@ -141,6 +135,7 @@ export class KbnClientImportExport { }) .join('\n\n'); + await Fs.mkdir(Path.dirname(dest), { recursive: true }); await Fs.writeFile(dest, fileContents, 'utf-8'); this.log.success('Exported', objects.length, 'saved objects to', dest); diff --git a/packages/kbn-tinymath/grammar/grammar.peggy b/packages/kbn-tinymath/grammar/grammar.peggy index cbcb0b91bfea9..1c6f8c3334c23 100644 --- a/packages/kbn-tinymath/grammar/grammar.peggy +++ b/packages/kbn-tinymath/grammar/grammar.peggy @@ -1,16 +1,16 @@ // tinymath parsing grammar { - function simpleLocation (location) { - // Returns an object representing the position of the function within the expression, - // demarcated by the position of its first character and last character. We calculate these values - // using the offset because the expression could span multiple lines, and we don't want to deal - // with column and line values. - return { - min: location.start.offset, - max: location.end.offset + function simpleLocation (location) { + // Returns an object representing the position of the function within the expression, + // demarcated by the position of its first character and last character. We calculate these values + // using the offset because the expression could span multiple lines, and we don't want to deal + // with column and line values. + return { + min: location.start.offset, + max: location.end.offset + } } - } } start @@ -74,26 +74,34 @@ Expression = AddSubtract AddSubtract - = _ left:MultiplyDivide rest:(('+' / '-') MultiplyDivide)* _ { - return rest.reduce((acc, curr) => ({ + = _ left:MultiplyDivide rest:(('+' / '-') MultiplyDivide)+ _ { + const topLevel = rest.reduce((acc, curr) => ({ type: 'function', name: curr[0] === '+' ? 'add' : 'subtract', args: [acc, curr[1]], - location: simpleLocation(location()), - text: text() - }), left) + }), left); + if (typeof topLevel === 'object') { + topLevel.location = simpleLocation(location()); + topLevel.text = text(); + } + return topLevel; } + / MultiplyDivide MultiplyDivide = _ left:Factor rest:(('*' / '/') Factor)* _ { - return rest.reduce((acc, curr) => ({ + const topLevel = rest.reduce((acc, curr) => ({ type: 'function', name: curr[0] === '*' ? 'multiply' : 'divide', args: [acc, curr[1]], - location: simpleLocation(location()), - text: text() - }), left) + }), left); + if (typeof topLevel === 'object') { + topLevel.location = simpleLocation(location()); + topLevel.text = text(); + } + return topLevel; } + / Factor Factor = Group diff --git a/packages/kbn-tinymath/index.d.ts b/packages/kbn-tinymath/index.d.ts index c3c32a59fa15a..8e15d86c88fc8 100644 --- a/packages/kbn-tinymath/index.d.ts +++ b/packages/kbn-tinymath/index.d.ts @@ -24,9 +24,11 @@ export interface TinymathLocation { export interface TinymathFunction { type: 'function'; name: string; - text: string; args: TinymathAST[]; - location: TinymathLocation; + // Location is not guaranteed because PEG grammars are not left-recursive + location?: TinymathLocation; + // Text is not guaranteed because PEG grammars are not left-recursive + text?: string; } export interface TinymathVariable { diff --git a/packages/kbn-tinymath/test/library.test.js b/packages/kbn-tinymath/test/library.test.js index bf1c7a9dbc5fb..bbc8503684fd4 100644 --- a/packages/kbn-tinymath/test/library.test.js +++ b/packages/kbn-tinymath/test/library.test.js @@ -41,6 +41,35 @@ describe('Parser', () => { }); }); + describe('Math', () => { + it('converts basic symbols into left-to-right pairs', () => { + expect(parse('a + b + c - d')).toEqual({ + args: [ + { + name: 'add', + type: 'function', + args: [ + { + name: 'add', + type: 'function', + args: [ + expect.objectContaining({ location: { min: 0, max: 2 } }), + expect.objectContaining({ location: { min: 3, max: 6 } }), + ], + }, + expect.objectContaining({ location: { min: 7, max: 10 } }), + ], + }, + expect.objectContaining({ location: { min: 11, max: 13 } }), + ], + name: 'subtract', + type: 'function', + text: 'a + b + c - d', + location: { min: 0, max: 13 }, + }); + }); + }); + describe('Variables', () => { it('strings', () => { expect(parse('f')).toEqual(variableEqual('f')); @@ -263,6 +292,8 @@ describe('Evaluate', () => { expect(evaluate('5/20')).toEqual(0.25); expect(evaluate('1 + 1 + 2 + 3 + 12')).toEqual(19); expect(evaluate('100 / 10 / 10')).toEqual(1); + expect(evaluate('0 * 1 - 100 / 10 / 10')).toEqual(-1); + expect(evaluate('100 / (10 / 10)')).toEqual(100); }); it('equations with functions', () => { diff --git a/src/cli_plugin/install/index.js b/src/cli_plugin/install/index.js index 2683dd41d2bb3..dbad6bc8ba19c 100644 --- a/src/cli_plugin/install/index.js +++ b/src/cli_plugin/install/index.js @@ -24,7 +24,7 @@ function processCommand(command, options) { const logger = new Logger(settings); - logWarnings(settings, logger); + logWarnings(logger); install(settings, logger); } diff --git a/src/cli_plugin/remove/index.js b/src/cli_plugin/remove/index.js index 329f506520c24..3f571e605028f 100644 --- a/src/cli_plugin/remove/index.js +++ b/src/cli_plugin/remove/index.js @@ -24,7 +24,7 @@ function processCommand(command, options) { const logger = new Logger(settings); - logWarnings(settings, logger); + logWarnings(logger); remove(settings, logger); } diff --git a/src/core/TESTING.md b/src/core/TESTING.md index ef6db57c1a993..10ead1ea8cfe2 100644 --- a/src/core/TESTING.md +++ b/src/core/TESTING.md @@ -792,8 +792,8 @@ To do that we'll write a Jest integration test using `TestUtils` to start Kibana and esArchiver to load fixture data into Elasticsearch. 1. Create the fixtures data you need in Elasticsearch -2. Create a fixtures archive with `node scripts/es_archiver save [index patterns...]` -3. Load the fixtures in your test using esArchiver `esArchiver.load('name')`; +2. Create a fixtures archive with `node scripts/es_archiver save [index patterns...]` +3. Load the fixtures in your test using esArchiver `esArchiver.load('path from root of repo')`; _todo: fully worked out example_ diff --git a/src/core/public/application/application_service.test.ts b/src/core/public/application/application_service.test.ts index 2e2f1cad49f19..5658d3f626077 100644 --- a/src/core/public/application/application_service.test.ts +++ b/src/core/public/application/application_service.test.ts @@ -107,6 +107,7 @@ describe('#setup()', () => { status: AppStatus.inaccessible, tooltip: 'App inaccessible due to reason', defaultPath: 'foo/bar', + deepLinks: [{ id: 'subapp2', title: 'Subapp 2', path: '/subapp2' }], })); applications = await applications$.pipe(take(1)).toPromise(); @@ -118,6 +119,9 @@ describe('#setup()', () => { status: AppStatus.inaccessible, defaultPath: 'foo/bar', tooltip: 'App inaccessible due to reason', + deepLinks: [ + expect.objectContaining({ id: 'subapp2', title: 'Subapp 2', path: '/subapp2' }), + ], }) ); expect(applications.get('app2')).toEqual( @@ -814,6 +818,128 @@ describe('#start()', () => { expect(MockHistory.replace).not.toHaveBeenCalled(); }); }); + + describe('deepLinkId option', () => { + beforeEach(() => { + MockHistory.push.mockClear(); + }); + + it('preserves trailing slash when path contains a hash', async () => { + const { register } = service.setup(setupDeps); + + register( + Symbol(), + createApp({ + id: 'app1', + appRoute: '/custom/app-path', + deepLinks: [{ id: 'dl1', title: 'deep link 1', path: '/deep-link' }], + }) + ); + + const { navigateToApp } = await service.start(startDeps); + await navigateToApp('app1', { deepLinkId: 'dl1', path: '#/' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom/app-path/deep-link#/', + undefined + ); + + await navigateToApp('app1', { deepLinkId: 'dl1', path: '#/foo/bar/' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom/app-path/deep-link#/foo/bar/', + undefined + ); + + await navigateToApp('app1', { deepLinkId: 'dl1', path: '/path#/' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom/app-path/deep-link/path#/', + undefined + ); + + await navigateToApp('app1', { deepLinkId: 'dl1', path: '/path#/hash/' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom/app-path/deep-link/path#/hash/', + undefined + ); + + await navigateToApp('app1', { deepLinkId: 'dl1', path: '/path/' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom/app-path/deep-link/path', + undefined + ); + }); + + it('omits the defaultPath when the deepLinkId parameter is specified', async () => { + const { register } = service.setup(setupDeps); + + register( + Symbol(), + createApp({ + id: 'app1', + defaultPath: 'default/path', + deepLinks: [{ id: 'dl1', title: 'deep link 1', path: '/deep-link' }], + }) + ); + register( + Symbol(), + createApp({ + id: 'app2', + appRoute: '/custom-app-path', + defaultPath: '/my-default', + deepLinks: [{ id: 'dl2', title: 'deep link 2', path: '/deep-link-2' }], + }) + ); + + const { navigateToApp } = await service.start(startDeps); + + await navigateToApp('app1', {}); + expect(MockHistory.push).toHaveBeenLastCalledWith('/app/app1/default/path', undefined); + + await navigateToApp('app1', { deepLinkId: 'dl1' }); + expect(MockHistory.push).toHaveBeenLastCalledWith('/app/app1/deep-link', undefined); + + await navigateToApp('app1', { deepLinkId: 'dl1', path: 'some-other-path' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/app/app1/deep-link/some-other-path', + undefined + ); + + await navigateToApp('app2', {}); + expect(MockHistory.push).toHaveBeenLastCalledWith('/custom-app-path/my-default', undefined); + + await navigateToApp('app2', { deepLinkId: 'dl2' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom-app-path/deep-link-2', + undefined + ); + + await navigateToApp('app2', { deepLinkId: 'dl2', path: 'some-other-path' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom-app-path/deep-link-2/some-other-path', + undefined + ); + }); + + it('ignores the deepLinkId parameter if it is unknown', async () => { + const { register } = service.setup(setupDeps); + + register( + Symbol(), + createApp({ + id: 'app1', + defaultPath: 'default/path', + deepLinks: [{ id: 'dl1', title: 'deep link 1', path: '/deep-link' }], + }) + ); + + const { navigateToApp } = await service.start(startDeps); + + await navigateToApp('app1', { deepLinkId: 'dl-unknown' }); + expect(MockHistory.push).toHaveBeenLastCalledWith('/app/app1/default/path', undefined); + + await navigateToApp('app1', { deepLinkId: 'dl-unknown', path: 'some-other-path' }); + expect(MockHistory.push).toHaveBeenLastCalledWith('/app/app1/some-other-path', undefined); + }); + }); }); describe('navigateToUrl', () => { diff --git a/src/core/public/application/application_service.tsx b/src/core/public/application/application_service.tsx index bbfea61220b51..32d45b32c32ff 100644 --- a/src/core/public/application/application_service.tsx +++ b/src/core/public/application/application_service.tsx @@ -64,6 +64,10 @@ const getAppUrl = (mounters: Map, appId: string, path: string = return appendAppPath(appBasePath, path); }; +const getAppDeepLinkPath = (mounters: Map, appId: string, deepLinkId: string) => { + return mounters.get(appId)?.deepLinkPaths[deepLinkId]; +}; + const allApplicationsFilter = '__ALL__'; interface AppUpdaterWrapper { @@ -175,6 +179,7 @@ export class ApplicationService { this.mounters.set(app.id, { appRoute: app.appRoute!, appBasePath: basePath.prepend(app.appRoute!), + deepLinkPaths: toDeepLinkPaths(app.deepLinks), exactRoute: app.exactRoute ?? false, mount: wrapMount(plugin, app), unmountBeforeMounting: false, @@ -226,7 +231,7 @@ export class ApplicationService { const navigateToApp: InternalApplicationStart['navigateToApp'] = async ( appId, - { path, state, replace = false, openInNewTab = false }: NavigateToAppOptions = {} + { deepLinkId, path, state, replace = false, openInNewTab = false }: NavigateToAppOptions = {} ) => { const currentAppId = this.currentAppId$.value; const navigatingToSameApp = currentAppId === appId; @@ -235,6 +240,12 @@ export class ApplicationService { : await this.shouldNavigate(overlays, appId); if (shouldNavigate) { + if (deepLinkId) { + const deepLinkPath = getAppDeepLinkPath(availableMounters, appId, deepLinkId); + if (deepLinkPath) { + path = appendAppPath(deepLinkPath, path); + } + } if (path === undefined) { path = applications$.value.get(appId)?.defaultPath; } @@ -384,8 +395,18 @@ const updateStatus = (app: App, statusUpdaters: AppUpdaterWrapper[]): App => { ...fields, // status and navLinkStatus enums are ordered by reversed priority // if multiple updaters wants to change these fields, we will always follow the priority order. - status: Math.max(changes.status ?? 0, fields.status ?? 0), - navLinkStatus: Math.max(changes.navLinkStatus ?? 0, fields.navLinkStatus ?? 0), + status: Math.max( + changes.status ?? AppStatus.accessible, + fields.status ?? AppStatus.accessible + ), + navLinkStatus: Math.max( + changes.navLinkStatus ?? AppNavLinkStatus.default, + fields.navLinkStatus ?? AppNavLinkStatus.default + ), + // deepLinks take the last defined update + deepLinks: fields.deepLinks + ? populateDeepLinkDefaults(fields.deepLinks) + : changes.deepLinks, }; } }); @@ -396,10 +417,22 @@ const updateStatus = (app: App, statusUpdaters: AppUpdaterWrapper[]): App => { }; const populateDeepLinkDefaults = (deepLinks?: AppDeepLink[]): AppDeepLink[] => { - if (!deepLinks) return []; + if (!deepLinks) { + return []; + } return deepLinks.map((deepLink) => ({ ...deepLink, navLinkStatus: deepLink.navLinkStatus ?? AppNavLinkStatus.default, deepLinks: populateDeepLinkDefaults(deepLink.deepLinks), })); }; + +const toDeepLinkPaths = (deepLinks?: AppDeepLink[]): Mounter['deepLinkPaths'] => { + if (!deepLinks) { + return {}; + } + return deepLinks.reduce((deepLinkPaths: Mounter['deepLinkPaths'], deepLink) => { + if (deepLink.path) deepLinkPaths[deepLink.id] = deepLink.path; + return { ...deepLinkPaths, ...toDeepLinkPaths(deepLink.deepLinks) }; + }, {}); +}; diff --git a/src/core/public/application/index.ts b/src/core/public/application/index.ts index 68e1991646afb..882555fcd60e0 100644 --- a/src/core/public/application/index.ts +++ b/src/core/public/application/index.ts @@ -17,6 +17,7 @@ export type { AppUnmount, AppMountParameters, AppUpdatableFields, + AppNavOptions, AppUpdater, AppDeepLink, ApplicationSetup, diff --git a/src/core/public/application/integration_tests/router.test.tsx b/src/core/public/application/integration_tests/router.test.tsx index 55c18e49cba13..2543d22ee6d31 100644 --- a/src/core/public/application/integration_tests/router.test.tsx +++ b/src/core/public/application/integration_tests/router.test.tsx @@ -96,7 +96,7 @@ describe('AppRouter', () => { expect(app1.mounter.mount).toHaveBeenCalled(); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /app/app1 html: App 1
" @@ -108,7 +108,7 @@ describe('AppRouter', () => { expect(app1Unmount).toHaveBeenCalled(); expect(app2.mounter.mount).toHaveBeenCalled(); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /app/app2 html:
App 2
" @@ -122,7 +122,7 @@ describe('AppRouter', () => { expect(standardApp.mounter.mount).toHaveBeenCalled(); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /app/app1 html: App 1
" @@ -134,7 +134,7 @@ describe('AppRouter', () => { expect(standardAppUnmount).toHaveBeenCalled(); expect(chromelessApp.mounter.mount).toHaveBeenCalled(); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /chromeless-a/path html:
Chromeless A
" @@ -146,7 +146,7 @@ describe('AppRouter', () => { expect(chromelessAppUnmount).toHaveBeenCalled(); expect(standardApp.mounter.mount).toHaveBeenCalledTimes(2); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /app/app1 html: App 1
" @@ -160,7 +160,7 @@ describe('AppRouter', () => { expect(chromelessAppA.mounter.mount).toHaveBeenCalled(); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /chromeless-a/path html:
Chromeless A
" @@ -172,7 +172,7 @@ describe('AppRouter', () => { expect(chromelessAppAUnmount).toHaveBeenCalled(); expect(chromelessAppB.mounter.mount).toHaveBeenCalled(); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /chromeless-b/path html:
Chromeless B
" @@ -184,7 +184,7 @@ describe('AppRouter', () => { expect(chromelessAppBUnmount).toHaveBeenCalled(); expect(chromelessAppA.mounter.mount).toHaveBeenCalledTimes(2); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /chromeless-a/path html:
Chromeless A
" diff --git a/src/core/public/application/integration_tests/utils.tsx b/src/core/public/application/integration_tests/utils.tsx index 40f8f3b795719..dcf071719c11a 100644 --- a/src/core/public/application/integration_tests/utils.tsx +++ b/src/core/public/application/integration_tests/utils.tsx @@ -35,12 +35,14 @@ export const createAppMounter = ({ appId, html = `
App ${appId}
`, appRoute = `/app/${appId}`, + deepLinkPaths = {}, exactRoute = false, extraMountHook, }: { appId: string; html?: string; appRoute?: string; + deepLinkPaths?: Record; exactRoute?: boolean; extraMountHook?: (params: AppMountParameters) => void; }): MockedMounterTuple => { @@ -51,6 +53,7 @@ export const createAppMounter = ({ mounter: { appRoute, appBasePath: appRoute, + deepLinkPaths, exactRoute, mount: jest.fn(async (params: AppMountParameters) => { const { appBasePath: basename, element } = params; diff --git a/src/core/public/application/types.ts b/src/core/public/application/types.ts index ffc41955360bd..60b0dbf158dd9 100644 --- a/src/core/public/application/types.ts +++ b/src/core/public/application/types.ts @@ -63,9 +63,37 @@ export enum AppNavLinkStatus { */ export type AppUpdatableFields = Pick< App, - 'status' | 'navLinkStatus' | 'tooltip' | 'defaultPath' | 'deepLinks' + 'status' | 'navLinkStatus' | 'searchable' | 'tooltip' | 'defaultPath' | 'deepLinks' >; +/** + * App navigation menu options + * @public + */ +export interface AppNavOptions { + /** + * An ordinal used to sort nav links relative to one another for display. + */ + order?: number; + + /** + * A tooltip shown when hovering over app link. + */ + tooltip?: string; + + /** + * A EUI iconType that will be used for the app's icon. This icon + * takes precendence over the `icon` property. + */ + euiIconType?: string; + + /** + * A URL to an image file used as an icon. Used as a fallback + * if `euiIconType` is not provided. + */ + icon?: string; +} + /** * Updater for applications. * see {@link ApplicationSetup} @@ -76,7 +104,7 @@ export type AppUpdater = (app: App) => Partial | undefined; /** * @public */ -export interface App { +export interface App extends AppNavOptions { /** * The unique identifier of the application */ @@ -107,6 +135,12 @@ export interface App { */ navLinkStatus?: AppNavLinkStatus; + /** + * The initial flag to determine if the application is searchable in the global search. + * Defaulting to `true` if `navLinkStatus` is `visible` or omitted. + */ + searchable?: boolean; + /** * Allow to define the default path a user should be directed to when navigating to the app. * When defined, this value will be used as a default for the `path` option when calling {@link ApplicationStart.navigateToApp | navigateToApp}`, @@ -148,28 +182,6 @@ export interface App { */ updater$?: Observable; - /** - * An ordinal used to sort nav links relative to one another for display. - */ - order?: number; - - /** - * A tooltip shown when hovering over app link. - */ - tooltip?: string; - - /** - * A EUI iconType that will be used for the app's icon. This icon - * takes precendence over the `icon` property. - */ - euiIconType?: string; - - /** - * A URL to an image file used as an icon. Used as a fallback - * if `euiIconType` is not provided. - */ - icon?: string; - /** * Custom capabilities defined by the app. */ @@ -261,11 +273,12 @@ export interface App { */ export type PublicAppDeepLinkInfo = Omit< AppDeepLink, - 'deepLinks' | 'keywords' | 'navLinkStatus' + 'deepLinks' | 'keywords' | 'navLinkStatus' | 'searchable' > & { deepLinks: PublicAppDeepLinkInfo[]; keywords: string[]; navLinkStatus: AppNavLinkStatus; + searchable: boolean; }; /** @@ -285,33 +298,40 @@ export type AppDeepLink = { keywords?: string[]; /** Optional status of the chrome navigation, defaults to `hidden` */ navLinkStatus?: AppNavLinkStatus; -} & ( - | { - /** URL path to access this link, relative to the application's appRoute. */ - path: string; - /** Optional array of links that are 'underneath' this section in the hierarchy */ - deepLinks?: AppDeepLink[]; - } - | { - /** Optional path to access this section. Omit if this part of the hierarchy does not have a page URL. */ - path?: string; - /** Array links that are 'underneath' this section in this hierarchy. */ - deepLinks: AppDeepLink[]; - } -); + /** Optional flag to determine if the link is searchable in the global search. Defaulting to `true` if `navLinkStatus` is `visible` or omitted */ + searchable?: boolean; +} & AppNavOptions & + ( + | { + /** URL path to access this link, relative to the application's appRoute. */ + path: string; + /** Optional array of links that are 'underneath' this section in the hierarchy */ + deepLinks?: AppDeepLink[]; + } + | { + /** Optional path to access this section. Omit if this part of the hierarchy does not have a page URL. */ + path?: string; + /** Array links that are 'underneath' this section in this hierarchy. */ + deepLinks: AppDeepLink[]; + } + ); /** * Public information about a registered {@link App | application} * * @public */ -export type PublicAppInfo = Omit & { +export type PublicAppInfo = Omit< + App, + 'mount' | 'updater$' | 'keywords' | 'deepLinks' | 'searchable' +> & { // remove optional on fields populated with default values status: AppStatus; navLinkStatus: AppNavLinkStatus; appRoute: string; keywords: string[]; deepLinks: PublicAppDeepLinkInfo[]; + searchable: boolean; }; /** @@ -592,6 +612,7 @@ export interface AppLeaveActionFactory { export interface Mounter { appRoute: string; appBasePath: string; + deepLinkPaths: Record; mount: AppMount; exactRoute: boolean; unmountBeforeMounting?: boolean; @@ -657,11 +678,17 @@ export interface InternalApplicationSetup extends Pick { appRoute: '/some-route', unmountBeforeMounting: false, exactRoute: false, + deepLinkPaths: {}, mount: async ({ element }: AppMountParameters) => { await promise; const container = document.createElement('div'); @@ -133,6 +134,7 @@ describe('AppContainer', () => { const mounter = { appBasePath: '/base-path/some-route', appRoute: '/some-route', + deepLinkPaths: {}, unmountBeforeMounting: false, exactRoute: false, mount: async ({ element }: AppMountParameters) => { diff --git a/src/core/public/application/ui/app_container.tsx b/src/core/public/application/ui/app_container.tsx index 02d321095b373..0312c707e1049 100644 --- a/src/core/public/application/ui/app_container.tsx +++ b/src/core/public/application/ui/app_container.tsx @@ -5,6 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ +import './app_container.scss'; import React, { Fragment, @@ -16,11 +17,12 @@ import React, { } from 'react'; import { EuiLoadingElastic } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; import type { MountPoint } from '../../types'; import { AppLeaveHandler, AppStatus, AppUnmount, Mounter } from '../types'; import { AppNotFound } from './app_not_found_screen'; import { ScopedHistory } from '../scoped_history'; -import './app_container.scss'; +import { APP_WRAPPER_CLASS } from '../../../utils'; interface Props { /** Path application is mounted on without the global basePath */ @@ -107,12 +109,16 @@ export const AppContainer: FunctionComponent = ({ return ( {appNotFound && } - {showSpinner && ( -
- -
+ {showSpinner && !appNotFound && ( + )} -
+
); }; diff --git a/src/core/public/application/utils/get_app_info.test.ts b/src/core/public/application/utils/get_app_info.test.ts index ef4a06707d666..fa1e2dd9a4537 100644 --- a/src/core/public/application/utils/get_app_info.test.ts +++ b/src/core/public/application/utils/get_app_info.test.ts @@ -7,7 +7,7 @@ */ import { of } from 'rxjs'; -import { App, AppNavLinkStatus, AppStatus } from '../types'; +import { App, AppDeepLink, AppNavLinkStatus, AppStatus } from '../types'; import { getAppInfo } from './get_app_info'; describe('getAppInfo', () => { @@ -18,10 +18,22 @@ describe('getAppInfo', () => { title: 'some-title', status: AppStatus.accessible, navLinkStatus: AppNavLinkStatus.default, + searchable: true, appRoute: `/app/some-id`, ...props, }); + const createDeepLink = (props: Partial = {}): AppDeepLink => ({ + id: 'some-deep-link-id', + title: 'my deep link', + path: '/my-deep-link', + navLinkStatus: AppNavLinkStatus.default, + searchable: true, + deepLinks: [], + keywords: [], + ...props, + }); + it('converts an application and remove sensitive properties', () => { const app = createApp(); const info = getAppInfo(app); @@ -31,6 +43,7 @@ describe('getAppInfo', () => { title: 'some-title', status: AppStatus.accessible, navLinkStatus: AppNavLinkStatus.visible, + searchable: true, appRoute: `/app/some-id`, keywords: [], deepLinks: [], @@ -54,12 +67,15 @@ describe('getAppInfo', () => { title: 'some-title', status: AppStatus.accessible, navLinkStatus: AppNavLinkStatus.visible, + searchable: true, appRoute: `/app/some-id`, keywords: [], deepLinks: [ { id: 'sub-id', title: 'sub-title', + navLinkStatus: AppNavLinkStatus.hidden, + searchable: true, keywords: [], deepLinks: [ { @@ -67,6 +83,8 @@ describe('getAppInfo', () => { title: 'sub-sub-title', path: '/sub-sub', keywords: [], + navLinkStatus: AppNavLinkStatus.hidden, + searchable: true, deepLinks: [], // default empty array added }, ], @@ -102,7 +120,70 @@ describe('getAppInfo', () => { ); }); - it('adds default meta fields to sublinks when needed', () => { + it('computes the searchable flag depending on the navLinkStatus when needed', () => { + expect( + getAppInfo( + createApp({ + navLinkStatus: AppNavLinkStatus.default, + searchable: undefined, + }) + ) + ).toEqual( + expect.objectContaining({ + searchable: true, + }) + ); + expect( + getAppInfo( + createApp({ + navLinkStatus: AppNavLinkStatus.visible, + searchable: undefined, + }) + ) + ).toEqual( + expect.objectContaining({ + searchable: true, + }) + ); + expect( + getAppInfo( + createApp({ + navLinkStatus: AppNavLinkStatus.disabled, + searchable: undefined, + }) + ) + ).toEqual( + expect.objectContaining({ + searchable: false, + }) + ); + expect( + getAppInfo( + createApp({ + navLinkStatus: AppNavLinkStatus.hidden, + searchable: undefined, + }) + ) + ).toEqual( + expect.objectContaining({ + searchable: false, + }) + ); + expect( + getAppInfo( + createApp({ + navLinkStatus: AppNavLinkStatus.hidden, + searchable: true, + }) + ) + ).toEqual( + expect.objectContaining({ + searchable: true, + }) + ); + }); + + it('adds default deepLinks when needed', () => { const app = createApp({ deepLinks: [ { @@ -126,17 +207,22 @@ describe('getAppInfo', () => { title: 'some-title', status: AppStatus.accessible, navLinkStatus: AppNavLinkStatus.visible, + searchable: true, appRoute: `/app/some-id`, keywords: [], deepLinks: [ { id: 'sub-id', title: 'sub-title', - keywords: [], // default empty array + navLinkStatus: AppNavLinkStatus.hidden, + searchable: true, + keywords: [], deepLinks: [ { id: 'sub-sub-id', title: 'sub-sub-title', + navLinkStatus: AppNavLinkStatus.hidden, + searchable: true, path: '/sub-sub', keywords: ['sub sub'], deepLinks: [], @@ -146,4 +232,127 @@ describe('getAppInfo', () => { ], }); }); + + it('computes the deepLinks navLinkStatus when needed', () => { + expect( + getAppInfo( + createApp({ + deepLinks: [ + createDeepLink({ + navLinkStatus: AppNavLinkStatus.visible, + }), + ], + }) + ) + ).toEqual( + expect.objectContaining({ + deepLinks: [ + expect.objectContaining({ + navLinkStatus: AppNavLinkStatus.visible, + }), + ], + }) + ); + expect( + getAppInfo( + createApp({ + deepLinks: [ + createDeepLink({ + navLinkStatus: AppNavLinkStatus.default, + }), + ], + }) + ) + ).toEqual( + expect.objectContaining({ + deepLinks: [ + expect.objectContaining({ + navLinkStatus: AppNavLinkStatus.hidden, + }), + ], + }) + ); + expect( + getAppInfo( + createApp({ + deepLinks: [ + createDeepLink({ + navLinkStatus: undefined, + }), + ], + }) + ) + ).toEqual( + expect.objectContaining({ + deepLinks: [ + expect.objectContaining({ + navLinkStatus: AppNavLinkStatus.hidden, + }), + ], + }) + ); + }); + + it('computes the deepLinks searchable depending on the navLinkStatus when needed', () => { + expect( + getAppInfo( + createApp({ + deepLinks: [ + createDeepLink({ + navLinkStatus: AppNavLinkStatus.default, + searchable: undefined, + }), + ], + }) + ) + ).toEqual( + expect.objectContaining({ + deepLinks: [ + expect.objectContaining({ + searchable: true, + }), + ], + }) + ); + expect( + getAppInfo( + createApp({ + deepLinks: [ + createDeepLink({ + navLinkStatus: AppNavLinkStatus.hidden, + searchable: undefined, + }), + ], + }) + ) + ).toEqual( + expect.objectContaining({ + deepLinks: [ + expect.objectContaining({ + searchable: false, + }), + ], + }) + ); + expect( + getAppInfo( + createApp({ + deepLinks: [ + createDeepLink({ + navLinkStatus: AppNavLinkStatus.hidden, + searchable: true, + }), + ], + }) + ) + ).toEqual( + expect.objectContaining({ + deepLinks: [ + expect.objectContaining({ + searchable: true, + }), + ], + }) + ); + }); }); diff --git a/src/core/public/application/utils/get_app_info.ts b/src/core/public/application/utils/get_app_info.ts index 4c94e24f501bc..6c753b7a71a0f 100644 --- a/src/core/public/application/utils/get_app_info.ts +++ b/src/core/public/application/utils/get_app_info.ts @@ -16,17 +16,19 @@ import { } from '../types'; export function getAppInfo(app: App): PublicAppInfo { - const navLinkStatus = - app.navLinkStatus === AppNavLinkStatus.default - ? app.status === AppStatus.inaccessible - ? AppNavLinkStatus.hidden - : AppNavLinkStatus.visible - : app.navLinkStatus!; - const { updater$, mount, ...infos } = app; + const { updater$, mount, navLinkStatus = AppNavLinkStatus.default, ...infos } = app; return { ...infos, status: app.status!, - navLinkStatus, + navLinkStatus: + navLinkStatus === AppNavLinkStatus.default + ? app.status === AppStatus.inaccessible + ? AppNavLinkStatus.hidden + : AppNavLinkStatus.visible + : navLinkStatus, + searchable: + app.searchable ?? + (navLinkStatus === AppNavLinkStatus.default || navLinkStatus === AppNavLinkStatus.visible), appRoute: app.appRoute!, keywords: app.keywords ?? [], deepLinks: getDeepLinkInfos(app.deepLinks), @@ -37,17 +39,18 @@ function getDeepLinkInfos(deepLinks?: AppDeepLink[]): PublicAppDeepLinkInfo[] { if (!deepLinks) return []; return deepLinks.map( - (rawDeepLink): PublicAppDeepLinkInfo => { - const navLinkStatus = - rawDeepLink.navLinkStatus === AppNavLinkStatus.default - ? AppNavLinkStatus.hidden - : rawDeepLink.navLinkStatus!; + ({ navLinkStatus = AppNavLinkStatus.default, ...rawDeepLink }): PublicAppDeepLinkInfo => { return { id: rawDeepLink.id, title: rawDeepLink.title, path: rawDeepLink.path, keywords: rawDeepLink.keywords ?? [], - navLinkStatus, + navLinkStatus: + navLinkStatus === AppNavLinkStatus.default ? AppNavLinkStatus.hidden : navLinkStatus, + searchable: + rawDeepLink.searchable ?? + (navLinkStatus === AppNavLinkStatus.default || + navLinkStatus === AppNavLinkStatus.visible), deepLinks: getDeepLinkInfos(rawDeepLink.deepLinks), }; } diff --git a/src/core/public/chrome/nav_links/nav_link.ts b/src/core/public/chrome/nav_links/nav_link.ts index 87175ea465b7f..4e9158cac5cd4 100644 --- a/src/core/public/chrome/nav_links/nav_link.ts +++ b/src/core/public/chrome/nav_links/nav_link.ts @@ -33,10 +33,9 @@ export interface ChromeNavLink { readonly baseUrl: string; /** - * The route used to open the {@link AppBase.defaultPath | default path } of an application. - * If unset, `baseUrl` will be used instead. + * The route used to open the default path and the deep links of an application. */ - readonly url?: string; + readonly url: string; /** * An ordinal used to sort nav links relative to one another for display. diff --git a/src/core/public/chrome/nav_links/nav_links_service.test.ts b/src/core/public/chrome/nav_links/nav_links_service.test.ts index afb902fd6bd83..e1d537da6959b 100644 --- a/src/core/public/chrome/nav_links/nav_links_service.test.ts +++ b/src/core/public/chrome/nav_links/nav_links_service.test.ts @@ -20,6 +20,22 @@ const availableApps = new Map([ order: -10, title: 'App 2', euiIconType: 'canvasApp', + deepLinks: [ + { + id: 'deepApp1', + order: 50, + title: 'Deep App 1', + path: '/deepapp1', + deepLinks: [ + { + id: 'deepApp2', + order: 40, + title: 'Deep App 2', + path: '/deepapp2', + }, + ], + }, + ], }, ], ['chromelessApp', { id: 'chromelessApp', order: 20, title: 'Chromless App', chromeless: true }], @@ -66,7 +82,7 @@ describe('NavLinksService', () => { map((links) => links.map((l) => l.id)) ) .toPromise() - ).toEqual(['app2', 'app1']); + ).toEqual(['app2', 'app1', 'app2:deepApp2', 'app2:deepApp1']); }); it('emits multiple values', async () => { @@ -76,7 +92,7 @@ describe('NavLinksService', () => { start.showOnly('app1'); service.stop(); - expect(emittedLinks).toEqual([['app2', 'app1'], ['app1']]); + expect(emittedLinks).toEqual([['app2', 'app1', 'app2:deepApp2', 'app2:deepApp1'], ['app1']]); }); it('completes when service is stopped', async () => { @@ -98,7 +114,12 @@ describe('NavLinksService', () => { describe('#getAll()', () => { it('returns a sorted array of navlinks', () => { - expect(start.getAll().map((l) => l.id)).toEqual(['app2', 'app1']); + expect(start.getAll().map((l) => l.id)).toEqual([ + 'app2', + 'app1', + 'app2:deepApp2', + 'app2:deepApp1', + ]); }); }); @@ -123,7 +144,7 @@ describe('NavLinksService', () => { map((links) => links.map((l) => l.id)) ) .toPromise() - ).toEqual(['app2', 'app1']); + ).toEqual(['app2', 'app1', 'app2:deepApp2', 'app2:deepApp1']); }); it('does nothing on chromeless applications', async () => { @@ -136,7 +157,7 @@ describe('NavLinksService', () => { map((links) => links.map((l) => l.id)) ) .toPromise() - ).toEqual(['app2', 'app1']); + ).toEqual(['app2', 'app1', 'app2:deepApp2', 'app2:deepApp1']); }); it('removes all other links', async () => { @@ -152,6 +173,19 @@ describe('NavLinksService', () => { ).toEqual(['app2']); }); + it('show only deep link', async () => { + start.showOnly('app2:deepApp1'); + expect( + await start + .getNavLinks$() + .pipe( + take(1), + map((links) => links.map((l) => l.id)) + ) + .toPromise() + ).toEqual(['app2:deepApp1']); + }); + it('still removes all other links when availableApps are re-emitted', async () => { start.showOnly('app2'); mockAppService.applications$.next(mockAppService.applications$.value); diff --git a/src/core/public/chrome/nav_links/nav_links_service.ts b/src/core/public/chrome/nav_links/nav_links_service.ts index d41d8ae964d62..af961987a6309 100644 --- a/src/core/public/chrome/nav_links/nav_links_service.ts +++ b/src/core/public/chrome/nav_links/nav_links_service.ts @@ -10,8 +10,8 @@ import { sortBy } from 'lodash'; import { BehaviorSubject, combineLatest, Observable, ReplaySubject } from 'rxjs'; import { map, takeUntil } from 'rxjs/operators'; -import { InternalApplicationStart } from '../../application'; -import { HttpStart } from '../../http'; +import { InternalApplicationStart, PublicAppDeepLinkInfo, PublicAppInfo } from '../../application'; +import { HttpStart, IBasePath } from '../../http'; import { ChromeNavLink, NavLinkWrapper } from './nav_link'; import { toNavLink } from './to_nav_link'; @@ -89,7 +89,13 @@ export class NavLinksService { return new Map( [...apps] .filter(([, app]) => !app.chromeless) - .map(([appId, app]) => [appId, toNavLink(app, http.basePath)]) + .reduce((navLinks: Array<[string, NavLinkWrapper]>, [appId, app]) => { + navLinks.push( + [appId, toNavLink(app, http.basePath)], + ...toNavDeepLinks(app, app.deepLinks, http.basePath) + ); + return navLinks; + }, []) ); }) ); @@ -163,3 +169,21 @@ function sortNavLinks(navLinks: ReadonlyMap) { 'order' ); } + +function toNavDeepLinks( + app: PublicAppInfo, + deepLinks: PublicAppDeepLinkInfo[], + basePath: IBasePath +): Array<[string, NavLinkWrapper]> { + if (!deepLinks) { + return []; + } + return deepLinks.reduce((navDeepLinks: Array<[string, NavLinkWrapper]>, deepLink) => { + const id = `${app.id}:${deepLink.id}`; + if (deepLink.path) { + navDeepLinks.push([id, toNavLink(app, basePath, { ...deepLink, id })]); + } + navDeepLinks.push(...toNavDeepLinks(app, deepLink.deepLinks, basePath)); + return navDeepLinks; + }, []); +} diff --git a/src/core/public/chrome/nav_links/to_nav_link.test.ts b/src/core/public/chrome/nav_links/to_nav_link.test.ts index db783d0028f07..9791f1bd1354b 100644 --- a/src/core/public/chrome/nav_links/to_nav_link.test.ts +++ b/src/core/public/chrome/nav_links/to_nav_link.test.ts @@ -6,7 +6,12 @@ * Side Public License, v 1. */ -import { PublicAppInfo, AppNavLinkStatus, AppStatus } from '../../application'; +import { + PublicAppInfo, + AppNavLinkStatus, + AppStatus, + PublicAppDeepLinkInfo, +} from '../../application'; import { toNavLink } from './to_nav_link'; import { httpServiceMock } from '../../mocks'; @@ -16,12 +21,24 @@ const app = (props: Partial = {}): PublicAppInfo => ({ title: 'some-title', status: AppStatus.accessible, navLinkStatus: AppNavLinkStatus.default, + searchable: true, appRoute: `/app/some-id`, keywords: [], deepLinks: [], ...props, }); +const deepLink = (props: Partial = {}): PublicAppDeepLinkInfo => ({ + id: 'some-deep-link-id', + title: 'my deep link', + path: '/my-deep-link', + navLinkStatus: AppNavLinkStatus.default, + searchable: true, + deepLinks: [], + keywords: [], + ...props, +}); + describe('toNavLink', () => { const basePath = httpServiceMock.createSetupContract({ basePath: '/base-path' }).basePath; @@ -64,7 +81,7 @@ describe('toNavLink', () => { }), basePath ); - expect(link.properties.url).toEqual('http://localhost/base-path/my-route/my-path'); + expect(link.properties.url).toEqual('/base-path/my-route/my-path'); link = toNavLink( app({ @@ -73,9 +90,7 @@ describe('toNavLink', () => { }), basePath ); - expect(link.properties.url).toEqual( - 'http://localhost/base-path/my-route/my-path/some/default/path' - ); + expect(link.properties.url).toEqual('/base-path/my-route/my-path/some/default/path'); }); it('uses the application status when the navLinkStatus is set to default', () => { @@ -153,4 +168,90 @@ describe('toNavLink', () => { }) ); }); + + describe('deepLink parameter', () => { + it('should be hidden and not disabled by default', () => { + expect(toNavLink(app(), basePath, deepLink()).properties).toEqual( + expect.objectContaining({ + disabled: false, + hidden: true, + }) + ); + }); + + it('should not be hidden when navLinkStatus is visible', () => { + expect( + toNavLink( + app(), + basePath, + deepLink({ + navLinkStatus: AppNavLinkStatus.visible, + }) + ).properties + ).toEqual( + expect.objectContaining({ + disabled: false, + hidden: false, + }) + ); + }); + + it('should be disabled when navLinkStatus is disabled', () => { + expect( + toNavLink( + app(), + basePath, + deepLink({ + navLinkStatus: AppNavLinkStatus.disabled, + }) + ).properties + ).toEqual( + expect.objectContaining({ + disabled: true, + hidden: false, + }) + ); + }); + + it('should have href, baseUrl and url containing the path', () => { + const testApp = app({ + appRoute: '/app/app-id', + defaultPath: '/default-path', + }); + + expect(toNavLink(testApp, basePath).properties).toEqual( + expect.objectContaining({ + baseUrl: 'http://localhost/base-path/app/app-id', + url: '/base-path/app/app-id/default-path', + href: 'http://localhost/base-path/app/app-id/default-path', + }) + ); + + expect( + toNavLink( + testApp, + basePath, + deepLink({ + id: 'deep-link-id', + path: '/my-deep-link', + }) + ).properties + ).toEqual( + expect.objectContaining({ + baseUrl: 'http://localhost/base-path/app/app-id', + url: '/base-path/app/app-id/my-deep-link', + href: 'http://localhost/base-path/app/app-id/my-deep-link', + }) + ); + }); + + it('should use the main app category', () => { + expect(toNavLink(app(), basePath, deepLink()).properties.category).toBeUndefined(); + + const category = { id: 'some-category', label: 'some category' }; + expect(toNavLink(app({ category }), basePath, deepLink()).properties.category).toEqual( + category + ); + }); + }); }); diff --git a/src/core/public/chrome/nav_links/to_nav_link.ts b/src/core/public/chrome/nav_links/to_nav_link.ts index f56d496f42d8f..6acf37d40f089 100644 --- a/src/core/public/chrome/nav_links/to_nav_link.ts +++ b/src/core/public/chrome/nav_links/to_nav_link.ts @@ -6,29 +6,50 @@ * Side Public License, v 1. */ -import { PublicAppInfo, AppNavLinkStatus, AppStatus } from '../../application'; +import { + PublicAppInfo, + AppNavLinkStatus, + AppStatus, + PublicAppDeepLinkInfo, +} from '../../application'; import { IBasePath } from '../../http'; import { NavLinkWrapper } from './nav_link'; import { appendAppPath } from '../../application/utils'; -export function toNavLink(app: PublicAppInfo, basePath: IBasePath): NavLinkWrapper { - const useAppStatus = app.navLinkStatus === AppNavLinkStatus.default; +export function toNavLink( + app: PublicAppInfo, + basePath: IBasePath, + deepLink?: PublicAppDeepLinkInfo +): NavLinkWrapper { const relativeBaseUrl = basePath.prepend(app.appRoute!); - const url = relativeToAbsolute(appendAppPath(relativeBaseUrl, app.defaultPath)); + const url = appendAppPath(relativeBaseUrl, deepLink?.path || app.defaultPath); + const href = relativeToAbsolute(url); const baseUrl = relativeToAbsolute(relativeBaseUrl); return new NavLinkWrapper({ - ...app, - hidden: useAppStatus - ? app.status === AppStatus.inaccessible - : app.navLinkStatus === AppNavLinkStatus.hidden, - disabled: useAppStatus ? false : app.navLinkStatus === AppNavLinkStatus.disabled, + ...(deepLink || app), + ...(app.category ? { category: app.category } : {}), // deepLinks use the main app category + hidden: deepLink ? isDeepNavLinkHidden(deepLink) : isAppNavLinkHidden(app), + disabled: (deepLink?.navLinkStatus ?? app.navLinkStatus) === AppNavLinkStatus.disabled, baseUrl, - href: url, + href, url, }); } +function isAppNavLinkHidden(app: PublicAppInfo) { + return app.navLinkStatus === AppNavLinkStatus.default + ? app.status === AppStatus.inaccessible + : app.navLinkStatus === AppNavLinkStatus.hidden; +} + +function isDeepNavLinkHidden(deepLink: PublicAppDeepLinkInfo) { + return ( + deepLink.navLinkStatus === AppNavLinkStatus.default || + deepLink.navLinkStatus === AppNavLinkStatus.hidden + ); +} + /** * @param {string} url - a relative or root relative url. If a relative path is given then the * absolute url returned will depend on the current page where this function is called from. For example diff --git a/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap index 0f5efe667ec2f..3668829a6888c 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap @@ -73,6 +73,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "Custom link", "isActive": true, "title": "Custom link", + "url": "/", }, "closed": false, "hasError": false, @@ -140,6 +141,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "discover", "isActive": true, "title": "discover", + "url": "/", }, Object { "baseUrl": "/", @@ -154,6 +156,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "siem", "isActive": true, "title": "siem", + "url": "/", }, Object { "baseUrl": "/", @@ -168,6 +171,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "metrics", "isActive": true, "title": "metrics", + "url": "/", }, Object { "baseUrl": "/", @@ -182,6 +186,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "monitoring", "isActive": true, "title": "monitoring", + "url": "/", }, Object { "baseUrl": "/", @@ -196,6 +201,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "visualize", "isActive": true, "title": "visualize", + "url": "/", }, Object { "baseUrl": "/", @@ -210,6 +216,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "dashboard", "isActive": true, "title": "dashboard", + "url": "/", }, Object { "baseUrl": "/", @@ -219,6 +226,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "canvas", "isActive": true, "title": "canvas", + "url": "/", }, Object { "baseUrl": "/", @@ -233,6 +241,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "logs", "isActive": true, "title": "logs", + "url": "/", }, ], "closed": false, @@ -351,6 +360,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "values": Array [], } } + url="/" > ) { id: title, href: title, baseUrl: '/', + url: '/', isActive: true, 'data-test-subj': title, }; @@ -50,6 +51,7 @@ function mockProps() { isLocked: false, isNavOpen: false, homeHref: '/', + url: '/', navLinks$: new BehaviorSubject([]), recentlyAccessed$: new BehaviorSubject([]), storage: new StubBrowserStorage(), diff --git a/src/core/public/chrome/ui/header/collapsible_nav.tsx b/src/core/public/chrome/ui/header/collapsible_nav.tsx index b5b2919b659bd..0e85dbea237cb 100644 --- a/src/core/public/chrome/ui/header/collapsible_nav.tsx +++ b/src/core/public/chrome/ui/header/collapsible_nav.tsx @@ -107,7 +107,7 @@ export function CollapsibleNav({ link, appId, dataTestSubj: 'collapsibleNavAppLink', - navigateToApp, + navigateToUrl, onClick: closeNav, ...(needsIcon && { basePath }), }); @@ -137,7 +137,7 @@ export function CollapsibleNav({ createEuiListItem({ link: customNavLink, basePath, - navigateToApp, + navigateToUrl, dataTestSubj: 'collapsibleNavCustomNavLink', onClick: closeNav, externalLink: true, diff --git a/src/core/public/chrome/ui/header/header.test.tsx b/src/core/public/chrome/ui/header/header.test.tsx index e0f10fe66c9f0..fdbdde8556eeb 100644 --- a/src/core/public/chrome/ui/header/header.test.tsx +++ b/src/core/public/chrome/ui/header/header.test.tsx @@ -61,13 +61,14 @@ describe('Header', () => { const breadcrumbs$ = new BehaviorSubject([{ text: 'test' }]); const isLocked$ = new BehaviorSubject(false); const navLinks$ = new BehaviorSubject([ - { id: 'kibana', title: 'kibana', baseUrl: '', href: '' }, + { id: 'kibana', title: 'kibana', baseUrl: '', href: '', url: '' }, ]); const headerBanner$ = new BehaviorSubject(undefined); const customNavLink$ = new BehaviorSubject({ id: 'cloud-deployment-link', title: 'Manage cloud deployment', baseUrl: '', + url: '', href: '', }); const recentlyAccessed$ = new BehaviorSubject([ diff --git a/src/core/public/chrome/ui/header/nav_link.tsx b/src/core/public/chrome/ui/header/nav_link.tsx index 84f758e2c737e..b0ebf7cc5f8e5 100644 --- a/src/core/public/chrome/ui/header/nav_link.tsx +++ b/src/core/public/chrome/ui/header/nav_link.tsx @@ -23,7 +23,7 @@ interface Props { basePath?: HttpStart['basePath']; dataTestSubj: string; onClick?: Function; - navigateToApp: CoreStart['application']['navigateToApp']; + navigateToUrl: CoreStart['application']['navigateToUrl']; externalLink?: boolean; } @@ -36,11 +36,11 @@ export function createEuiListItem({ appId, basePath, onClick = () => {}, - navigateToApp, + navigateToUrl, dataTestSubj, externalLink = false, }: Props) { - const { href, id, title, disabled, euiIconType, icon, tooltip } = link; + const { href, id, title, disabled, euiIconType, icon, tooltip, url } = link; return { label: tooltip ?? title, @@ -57,7 +57,7 @@ export function createEuiListItem({ !isModifiedOrPrevented(event) ) { event.preventDefault(); - navigateToApp(id); + navigateToUrl(url); } }, isActive: appId === id, diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts index 36d613ec82f9e..06277d9351922 100644 --- a/src/core/public/doc_links/doc_links_service.ts +++ b/src/core/public/doc_links/doc_links_service.ts @@ -32,14 +32,14 @@ export class DocLinksService { guide: `${KIBANA_DOCS}canvas.html`, }, dashboard: { - guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/dashboard.html`, - drilldowns: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/drilldowns.html`, - drilldownsTriggerPicker: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/drilldowns.html#url-drilldowns`, - urlDrilldownTemplateSyntax: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/url_templating-language.html`, - urlDrilldownVariables: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/url_templating-language.html#url-template-variables`, + guide: `${KIBANA_DOCS}dashboard.html`, + drilldowns: `${KIBANA_DOCS}drilldowns.html`, + drilldownsTriggerPicker: `${KIBANA_DOCS}drilldowns.html#url-drilldowns`, + urlDrilldownTemplateSyntax: `${KIBANA_DOCS}url_templating-language.html`, + urlDrilldownVariables: `${KIBANA_DOCS}url_templating-language.html#url-template-variables`, }, discover: { - guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/discover.html`, + guide: `${KIBANA_DOCS}discover.html`, }, filebeat: { base: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}`, @@ -128,21 +128,21 @@ export class DocLinksService { luceneExpressions: `${ELASTICSEARCH_DOCS}modules-scripting-expression.html`, }, indexPatterns: { - introduction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index-patterns.html`, - fieldFormattersNumber: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/numeral.html`, - fieldFormattersString: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/field-formatters-string.html`, + introduction: `${KIBANA_DOCS}index-patterns.html`, + fieldFormattersNumber: `${KIBANA_DOCS}numeral.html`, + fieldFormattersString: `${KIBANA_DOCS}field-formatters-string.html`, runtimeFields: `${KIBANA_DOCS}managing-index-patterns.html#runtime-fields`, }, - addData: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/connect-to-elasticsearch.html`, - kibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index.html`, - upgradeAssistant: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/upgrade-assistant.html`, + addData: `${KIBANA_DOCS}connect-to-elasticsearch.html`, + kibana: `${KIBANA_DOCS}index.html`, + upgradeAssistant: `${KIBANA_DOCS}upgrade-assistant.html`, elasticsearch: { docsBase: `${ELASTICSEARCH_DOCS}`, asyncSearch: `${ELASTICSEARCH_DOCS}async-search-intro.html`, dataStreams: `${ELASTICSEARCH_DOCS}data-streams.html`, indexModules: `${ELASTICSEARCH_DOCS}index-modules.html`, indexSettings: `${ELASTICSEARCH_DOCS}index-modules.html#index-modules-settings`, - indexTemplates: `${ELASTICSEARCH_DOCS}indices-templates.html`, + indexTemplates: `${ELASTICSEARCH_DOCS}index-templates.html`, mapping: `${ELASTICSEARCH_DOCS}mapping.html`, mappingAnalyzer: `${ELASTICSEARCH_DOCS}analyzer.html`, mappingCoerce: `${ELASTICSEARCH_DOCS}coerce.html`, @@ -195,23 +195,23 @@ export class DocLinksService { }, query: { eql: `${ELASTICSEARCH_DOCS}eql.html`, - kueryQuerySyntax: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kuery-query.html`, + kueryQuerySyntax: `${KIBANA_DOCS}kuery-query.html`, luceneQuerySyntax: `${ELASTICSEARCH_DOCS}query-dsl-query-string-query.html#query-string-syntax`, percolate: `${ELASTICSEARCH_DOCS}query-dsl-percolate-query.html`, queryDsl: `${ELASTICSEARCH_DOCS}query-dsl.html`, }, search: { - sessions: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/search-sessions.html`, + sessions: `${KIBANA_DOCS}search-sessions.html`, }, date: { dateMath: `${ELASTICSEARCH_DOCS}common-options.html#date-math`, dateMathIndexNames: `${ELASTICSEARCH_DOCS}date-math-index-names.html`, }, management: { - dashboardSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-dashboard-settings`, + dashboardSettings: `${KIBANA_DOCS}advanced-options.html#kibana-dashboard-settings`, indexManagement: `${ELASTICSEARCH_DOCS}index-mgmt.html`, - kibanaSearchSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-search-settings`, - visualizationSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-visualization-settings`, + kibanaSearchSettings: `${KIBANA_DOCS}advanced-options.html#kibana-search-settings`, + visualizationSettings: `${KIBANA_DOCS}advanced-options.html#kibana-visualization-settings`, }, ml: { guide: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/index.html`, @@ -242,52 +242,52 @@ export class DocLinksService { guide: `${ELASTICSEARCH_DOCS}transforms.html`, }, visualize: { - guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/dashboard.html`, - timelionDeprecation: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/timelion.html`, + guide: `${KIBANA_DOCS}dashboard.html`, + timelionDeprecation: `${KIBANA_DOCS}timelion.html`, lens: `${ELASTIC_WEBSITE_URL}what-is/kibana-lens`, - lensPanels: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/lens.html`, + lensPanels: `${KIBANA_DOCS}lens.html`, maps: `${ELASTIC_WEBSITE_URL}maps`, - vega: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/vega.html`, + vega: `${KIBANA_DOCS}vega.html`, }, observability: { guide: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/index.html`, }, alerting: { - guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/alert-management.html`, - actionTypes: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/action-types.html`, - emailAction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/email-action-type.html`, - emailActionConfig: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/email-action-type.html`, - generalSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/alert-action-settings-kb.html#general-alert-action-settings`, - indexAction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index-action-type.html`, - esQuery: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/rule-type-es-query.html`, - indexThreshold: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/rule-type-index-threshold.html`, - pagerDutyAction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/pagerduty-action-type.html`, - preconfiguredConnectors: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/pre-configured-connectors.html`, - preconfiguredAlertHistoryConnector: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index-action-type.html#preconfigured-connector-alert-history`, - serviceNowAction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/servicenow-action-type.html#configuring-servicenow`, - setupPrerequisites: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/alerting-getting-started.html#alerting-setup-prerequisites`, - slackAction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/slack-action-type.html#configuring-slack`, - teamsAction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/teams-action-type.html#configuring-teams`, + guide: `${KIBANA_DOCS}create-and-manage-rules.html`, + actionTypes: `${KIBANA_DOCS}action-types.html`, + emailAction: `${KIBANA_DOCS}email-action-type.html`, + emailActionConfig: `${KIBANA_DOCS}email-action-type.html`, + generalSettings: `${KIBANA_DOCS}alert-action-settings-kb.html#general-alert-action-settings`, + indexAction: `${KIBANA_DOCS}index-action-type.html`, + esQuery: `${KIBANA_DOCS}rule-type-es-query.html`, + indexThreshold: `${KIBANA_DOCS}rule-type-index-threshold.html`, + pagerDutyAction: `${KIBANA_DOCS}pagerduty-action-type.html`, + preconfiguredConnectors: `${KIBANA_DOCS}pre-configured-connectors.html`, + preconfiguredAlertHistoryConnector: `${KIBANA_DOCS}index-action-type.html#preconfigured-connector-alert-history`, + serviceNowAction: `${KIBANA_DOCS}servicenow-action-type.html#configuring-servicenow`, + setupPrerequisites: `${KIBANA_DOCS}alerting-setup.html#alerting-prerequisites`, + slackAction: `${KIBANA_DOCS}slack-action-type.html#configuring-slack`, + teamsAction: `${KIBANA_DOCS}teams-action-type.html#configuring-teams`, }, maps: { - guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/maps.html`, - importGeospatialPrivileges: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/import-geospatial-data.html#import-geospatial-privileges`, + guide: `${KIBANA_DOCS}maps.html`, + importGeospatialPrivileges: `${KIBANA_DOCS}import-geospatial-data.html#import-geospatial-privileges`, }, monitoring: { - alertsKibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html`, - alertsKibanaCpuThreshold: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-cpu-threshold`, - alertsKibanaDiskThreshold: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-disk-usage-threshold`, - alertsKibanaJvmThreshold: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-jvm-memory-threshold`, - alertsKibanaMissingData: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-missing-monitoring-data`, - alertsKibanaThreadpoolRejections: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-thread-pool-rejections`, - alertsKibanaCCRReadExceptions: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-ccr-read-exceptions`, - alertsKibanaLargeShardSize: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-large-shard-size`, - alertsKibanaClusterAlerts: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-cluster-alerts`, + alertsKibana: `${KIBANA_DOCS}kibana-alerts.html`, + alertsKibanaCpuThreshold: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-cpu-threshold`, + alertsKibanaDiskThreshold: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-disk-usage-threshold`, + alertsKibanaJvmThreshold: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-jvm-memory-threshold`, + alertsKibanaMissingData: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-missing-monitoring-data`, + alertsKibanaThreadpoolRejections: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-thread-pool-rejections`, + alertsKibanaCCRReadExceptions: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-ccr-read-exceptions`, + alertsKibanaLargeShardSize: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-large-shard-size`, + alertsKibanaClusterAlerts: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-cluster-alerts`, metricbeatBlog: `${ELASTIC_WEBSITE_URL}blog/external-collection-for-elastic-stack-monitoring-is-now-available-via-metricbeat`, monitorElasticsearch: `${ELASTICSEARCH_DOCS}configuring-metricbeat.html`, - monitorKibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/monitoring-metricbeat.html`, + monitorKibana: `${KIBANA_DOCS}monitoring-metricbeat.html`, monitorLogstash: `${ELASTIC_WEBSITE_URL}guide/en/logstash/${DOC_LINK_VERSION}/monitoring-with-metricbeat.html`, - troubleshootKibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/monitor-troubleshooting.html`, + troubleshootKibana: `${KIBANA_DOCS}monitor-troubleshooting.html`, }, security: { apiKeyServiceSettings: `${ELASTICSEARCH_DOCS}security-settings.html#api-key-service-settings`, @@ -295,8 +295,8 @@ export class DocLinksService { elasticsearchSettings: `${ELASTICSEARCH_DOCS}security-settings.html`, elasticsearchEnableSecurity: `${ELASTICSEARCH_DOCS}configuring-stack-security.html`, indicesPrivileges: `${ELASTICSEARCH_DOCS}security-privileges.html#privileges-list-indices`, - kibanaTLS: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/configuring-tls.html`, - kibanaPrivileges: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-privileges.html`, + kibanaTLS: `${KIBANA_DOCS}configuring-tls.html`, + kibanaPrivileges: `${KIBANA_DOCS}kibana-privileges.html`, mappingRoles: `${ELASTICSEARCH_DOCS}mapping-roles.html`, mappingRolesFieldRules: `${ELASTICSEARCH_DOCS}role-mapping-resources.html#mapping-roles-rule-field`, runAsPrivilege: `${ELASTICSEARCH_DOCS}security-privileges.html#_run_as_privilege`, @@ -305,7 +305,7 @@ export class DocLinksService { jiraAction: `${ELASTICSEARCH_DOCS}actions-jira.html`, pagerDutyAction: `${ELASTICSEARCH_DOCS}actions-pagerduty.html`, slackAction: `${ELASTICSEARCH_DOCS}actions-slack.html`, - ui: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/watcher-ui.html`, + ui: `${KIBANA_DOCS}watcher-ui.html`, }, ccs: { guide: `${ELASTICSEARCH_DOCS}modules-cross-cluster-search.html`, diff --git a/src/core/public/index.ts b/src/core/public/index.ts index 24b48683cdd93..32737ff427ef3 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -91,6 +91,7 @@ export type { AppLeaveConfirmAction, AppUpdatableFields, AppUpdater, + AppNavOptions, AppDeepLink, PublicAppInfo, PublicAppDeepLinkInfo, diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index 667863d29623e..235110aeb4633 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -53,24 +53,21 @@ import { UserProvidedValues as UserProvidedValues_2 } from 'src/core/server/type export function __kbnBootstrap__(): Promise; // @public (undocumented) -export interface App { +export interface App extends AppNavOptions { appRoute?: string; capabilities?: Partial; category?: AppCategory; chromeless?: boolean; deepLinks?: AppDeepLink[]; defaultPath?: string; - euiIconType?: string; exactRoute?: boolean; - icon?: string; id: string; keywords?: string[]; mount: AppMount; navLinkStatus?: AppNavLinkStatus; - order?: number; + searchable?: boolean; status?: AppStatus; title: string; - tooltip?: string; updater$?: Observable; } @@ -92,7 +89,8 @@ export type AppDeepLink = { title: string; keywords?: string[]; navLinkStatus?: AppNavLinkStatus; -} & ({ + searchable?: boolean; +} & AppNavOptions & ({ path: string; deepLinks?: AppDeepLink[]; } | { @@ -179,6 +177,14 @@ export enum AppNavLinkStatus { visible = 1 } +// @public +export interface AppNavOptions { + euiIconType?: string; + icon?: string; + order?: number; + tooltip?: string; +} + // @public export enum AppStatus { accessible = 0, @@ -189,7 +195,7 @@ export enum AppStatus { export type AppUnmount = () => void; // @public -export type AppUpdatableFields = Pick; +export type AppUpdatableFields = Pick; // @public export type AppUpdater = (app: App) => Partial | undefined; @@ -314,8 +320,7 @@ export interface ChromeNavLink { readonly order?: number; readonly title: string; readonly tooltip?: string; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "kibana" does not have an export "AppBase" - readonly url?: string; + readonly url: string; } // @public @@ -916,10 +921,9 @@ export interface IUiSettingsClient { // @public export type MountPoint = (element: T) => UnmountCallback; -// Warning: (ae-missing-release-tag) "NavigateToAppOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface NavigateToAppOptions { + deepLinkId?: string; openInNewTab?: boolean; path?: string; replace?: boolean; @@ -1067,19 +1071,21 @@ export interface PluginInitializerContext export type PluginOpaqueId = symbol; // @public -export type PublicAppDeepLinkInfo = Omit & { +export type PublicAppDeepLinkInfo = Omit & { deepLinks: PublicAppDeepLinkInfo[]; keywords: string[]; navLinkStatus: AppNavLinkStatus; + searchable: boolean; }; // @public -export type PublicAppInfo = Omit & { +export type PublicAppInfo = Omit & { status: AppStatus; navLinkStatus: AppNavLinkStatus; appRoute: string; keywords: string[]; deepLinks: PublicAppDeepLinkInfo[]; + searchable: boolean; }; // @public @@ -1249,7 +1255,7 @@ export interface SavedObjectsCreateOptions { // @public (undocumented) export interface SavedObjectsFindOptions { // @alpha - aggs?: Record; + aggs?: Record; defaultSearchOperator?: 'AND' | 'OR'; fields?: string[]; // Warning: (ae-forgotten-export) The symbol "KueryNode" needs to be exported by the entry point index.d.ts @@ -1275,7 +1281,7 @@ export interface SavedObjectsFindOptions { // (undocumented) sortField?: string; // (undocumented) - sortOrder?: estypes.SortOrder; + sortOrder?: estypes.SearchSortOrder; // (undocumented) type: string | string[]; typeToNamespacesMap?: Map; diff --git a/src/core/public/rendering/_base.scss b/src/core/public/rendering/_base.scss index 3a748f3ceb6fd..4bd6afe90d342 100644 --- a/src/core/public/rendering/_base.scss +++ b/src/core/public/rendering/_base.scss @@ -35,27 +35,12 @@ position: relative; // This is temporary for apps that relied on this being present on `.application` } -// TODO: This is problematic because it doesn't stay in line with EUI: -// adapted from euiHeaderAffordForFixed as we need to handle the top banner @mixin kbnAffordForHeader($headerHeight) { - padding-top: $headerHeight; + @include euiHeaderAffordForFixed($headerHeight); #app-fixed-viewport { top: $headerHeight; } - - .euiFlyout, - .euiCollapsibleNav { - top: $headerHeight; - height: calc(100% - #{$headerHeight}); - } - - @include euiBreakpoint('m', 'l', 'xl') { - .euiPageSideBar--sticky { - max-height: calc(100vh - #{$headerHeight}); - top: #{$headerHeight}; - } - } } .kbnBody { diff --git a/src/core/public/styles/_base.scss b/src/core/public/styles/_base.scss index 46f46b469783b..3386fa73f328a 100644 --- a/src/core/public/styles/_base.scss +++ b/src/core/public/styles/_base.scss @@ -28,3 +28,9 @@ .euiBody--collapsibleNavIsDocked .euiBottomBar { margin-left: $euiCollapsibleNavWidth; } + +// Temporary fix for EuiPageHeader with a bottom border but no tabs or padding +// Will fix in EUI -- @cchaos +.euiPageHeader--bottomBorder:not(.euiPageHeader--tabsAtBottom):not([class*='euiPageHeader--padding']) { + padding-bottom: $euiSizeL; +} diff --git a/src/core/server/elasticsearch/version_check/ensure_es_version.ts b/src/core/server/elasticsearch/version_check/ensure_es_version.ts index 43cd52f1b5721..e1f18f8ad836a 100644 --- a/src/core/server/elasticsearch/version_check/ensure_es_version.ts +++ b/src/core/server/elasticsearch/version_check/ensure_es_version.ts @@ -31,7 +31,7 @@ export interface PollEsNodesVersionOptions { interface NodeInfo { version: string; ip: string; - http: { + http?: { publish_address: string; }; name: string; diff --git a/src/core/server/http/integration_tests/core_services.test.ts b/src/core/server/http/integration_tests/core_services.test.ts index 5433f0d3c3e31..99b63fc73687a 100644 --- a/src/core/server/http/integration_tests/core_services.test.ts +++ b/src/core/server/http/integration_tests/core_services.test.ts @@ -405,7 +405,7 @@ describe('http service', () => { const { body } = await kbnTestServer.request.get(root, '/new-platform/').expect(400); - expect(body.message).toEqual('[error_type]: error_reason'); + expect(body.message).toMatch('[error_type]: error_reason'); }); }); }); diff --git a/src/core/server/http/lifecycle/on_pre_routing.ts b/src/core/server/http/lifecycle/on_pre_routing.ts index dbd00df13707b..be0af8c118627 100644 --- a/src/core/server/http/lifecycle/on_pre_routing.ts +++ b/src/core/server/http/lifecycle/on_pre_routing.ts @@ -102,24 +102,7 @@ export function adoptToHapiOnRequest(fn: OnPreRoutingHandler, log: Logger) { appState.rewrittenUrl = appState.rewrittenUrl ?? request.url; const { url } = result; - - // TODO: Remove once we upgrade to Node.js 12! - // - // Warning: The following for-loop took 10 days to write, and is a hack - // to force V8 to make a copy of the string in memory. - // - // The reason why we need this is because of what appears to be a bug - // in V8 that caused some URL paths to not be routed correctly once - // `request.setUrl` was called with the path. - // - // The details can be seen in this discussion on Twitter: - // https://twitter.com/wa7son/status/1319992632366518277 - let urlCopy = ''; - for (let i = 0; i < url.length; i++) { - urlCopy += url[i]; - } - - request.setUrl(urlCopy); + request.setUrl(url); // We should update raw request as well since it can be proxied to the old platform request.raw.req.url = url; diff --git a/src/core/server/index.ts b/src/core/server/index.ts index 2e495657d3410..ef1ee69ff529b 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -339,8 +339,6 @@ export type { SavedObjectsDeleteByNamespaceOptions, SavedObjectsIncrementCounterOptions, SavedObjectsIncrementCounterField, - SavedObjectsComplexFieldMapping, - SavedObjectsCoreFieldMapping, SavedObjectsFieldMapping, SavedObjectsTypeMappingDefinition, SavedObjectsMappingProperties, diff --git a/src/core/server/plugins/discovery/plugin_manifest_parser.ts b/src/core/server/plugins/discovery/plugin_manifest_parser.ts index 7ac629534ba08..b59418a67219e 100644 --- a/src/core/server/plugins/discovery/plugin_manifest_parser.ts +++ b/src/core/server/plugins/discovery/plugin_manifest_parser.ts @@ -48,6 +48,8 @@ const KNOWN_MANIFEST_FIELDS = (() => { extraPublicDirs: true, requiredBundles: true, serviceFolders: true, + owner: true, + description: true, }; return new Set(Object.keys(manifestFields)); @@ -187,6 +189,8 @@ export async function parseManifest( ui: includesUiPlugin, server: includesServerPlugin, extraPublicDirs: manifest.extraPublicDirs, + owner: manifest.owner, + description: manifest.description, }; } diff --git a/src/core/server/plugins/types.ts b/src/core/server/plugins/types.ts index 6b50b5e820665..0cdc806e997ef 100644 --- a/src/core/server/plugins/types.ts +++ b/src/core/server/plugins/types.ts @@ -208,6 +208,27 @@ export interface PluginManifest { * folders will cause your plugin API reference to be broken up into sub sections. */ readonly serviceFolders?: readonly string[]; + + /** + * TODO: make required once all internal plugins have this specified. + */ + readonly owner?: { + /** + * The name of the team that currently owns this plugin. + */ + readonly name: string; + /** + * All internal plugins should have a github team specified. GitHub teams can be viewed here: + * https://github.com/orgs/elastic/teams + */ + readonly githubTeam?: string; + }; + + /** + * TODO: make required once all plugins specify this. + * A brief description of what this plugin does and any capabilities it provides. + */ + readonly description?: string; } /** diff --git a/src/core/server/rendering/views/styles.tsx b/src/core/server/rendering/views/styles.tsx index 105f94df9218f..fbeab4fb4388f 100644 --- a/src/core/server/rendering/views/styles.tsx +++ b/src/core/server/rendering/views/styles.tsx @@ -52,7 +52,6 @@ const InlineStyles: FC<{ darkMode: boolean }> = ({ darkMode }) => { .kbnWelcomeView { line-height: 1.5; - background-color: ${darkMode ? '#1D1E24' : '#FFF'}; height: 100%; display: -webkit-box; display: -webkit-flex; diff --git a/src/core/server/saved_objects/index.ts b/src/core/server/saved_objects/index.ts index 2af25e0cdef3f..b1b1584d7de88 100644 --- a/src/core/server/saved_objects/index.ts +++ b/src/core/server/saved_objects/index.ts @@ -72,8 +72,6 @@ export type { } from './service/lib/repository'; export type { - SavedObjectsCoreFieldMapping, - SavedObjectsComplexFieldMapping, SavedObjectsFieldMapping, SavedObjectsMappingProperties, SavedObjectsTypeMappingDefinition, diff --git a/src/core/server/saved_objects/mappings/index.ts b/src/core/server/saved_objects/mappings/index.ts index bf1029e9f3b81..5da185ace79c6 100644 --- a/src/core/server/saved_objects/mappings/index.ts +++ b/src/core/server/saved_objects/mappings/index.ts @@ -8,8 +8,6 @@ export { getTypes, getProperty, getRootProperties, getRootPropertiesObjects } from './lib'; export type { - SavedObjectsComplexFieldMapping, - SavedObjectsCoreFieldMapping, SavedObjectsTypeMappingDefinition, SavedObjectsTypeMappingDefinitions, SavedObjectsMappingProperties, diff --git a/src/core/server/saved_objects/mappings/lib/get_property.test.ts b/src/core/server/saved_objects/mappings/lib/get_property.test.ts index dab712bbb87ad..8732b5e07d3fa 100644 --- a/src/core/server/saved_objects/mappings/lib/get_property.test.ts +++ b/src/core/server/saved_objects/mappings/lib/get_property.test.ts @@ -34,7 +34,7 @@ const MAPPINGS = { }, }, }, -}; +} as const; function runTest(key: string | string[], mapping: IndexMapping | SavedObjectsFieldMapping) { expect(typeof key === 'string' || Array.isArray(key)).toBeTruthy(); diff --git a/src/core/server/saved_objects/mappings/lib/get_property.ts b/src/core/server/saved_objects/mappings/lib/get_property.ts index c2daa1e70a898..2a9993bc175ca 100644 --- a/src/core/server/saved_objects/mappings/lib/get_property.ts +++ b/src/core/server/saved_objects/mappings/lib/get_property.ts @@ -7,7 +7,7 @@ */ import { toPath } from 'lodash'; -import { SavedObjectsCoreFieldMapping, SavedObjectsFieldMapping, IndexMapping } from '../types'; +import { SavedObjectsFieldMapping, IndexMapping } from '../types'; function getPropertyMappingFromObjectMapping( mapping: IndexMapping | SavedObjectsFieldMapping, @@ -15,7 +15,7 @@ function getPropertyMappingFromObjectMapping( ): SavedObjectsFieldMapping | undefined { const props = (mapping && (mapping as IndexMapping).properties) || - (mapping && (mapping as SavedObjectsCoreFieldMapping).fields); + (mapping && (mapping as SavedObjectsFieldMapping).fields); if (!props) { return undefined; diff --git a/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.test.ts b/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.test.ts index 2daca3a1fdd83..cbc6808418bc0 100644 --- a/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.test.ts +++ b/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.test.ts @@ -15,7 +15,7 @@ test(`returns single object with properties`, () => { properties: {}, }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({ @@ -32,7 +32,7 @@ test(`returns single object with type === 'object'`, () => { type: 'object', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({ @@ -75,7 +75,7 @@ test(`returns two objects with type === 'object'`, () => { type: 'object', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({ @@ -95,7 +95,7 @@ test(`excludes objects without properties and type of keyword`, () => { type: 'keyword', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({}); @@ -111,7 +111,7 @@ test(`excludes two objects without properties and type of keyword`, () => { type: 'keyword', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({}); @@ -127,7 +127,7 @@ test(`includes one object with properties and excludes one object without proper type: 'keyword', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({ @@ -147,7 +147,7 @@ test(`includes one object with type === 'object' and excludes one object without type: 'keyword', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({ @@ -170,7 +170,7 @@ test('excludes references and migrationVersion which are part of the blacklist', type: 'object', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({ foo: { diff --git a/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.ts b/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.ts index 3a25865c03b26..54ea4eafc186f 100644 --- a/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.ts +++ b/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.ts @@ -6,11 +6,7 @@ * Side Public License, v 1. */ -import { - SavedObjectsComplexFieldMapping, - IndexMapping, - SavedObjectsMappingProperties, -} from '../types'; +import { SavedObjectsFieldMapping, IndexMapping, SavedObjectsMappingProperties } from '../types'; import { getRootProperties } from './get_root_properties'; /** @@ -36,7 +32,7 @@ export function getRootPropertiesObjects(mappings: IndexMapping) { // we consider the existence of the properties or type of object to designate that this is an object datatype if ( !omittedRootProps.includes(key) && - ((value as SavedObjectsComplexFieldMapping).properties || value.type === 'object') + ((value as SavedObjectsFieldMapping).properties || value.type === 'object') ) { acc[key] = value; } diff --git a/src/core/server/saved_objects/mappings/types.ts b/src/core/server/saved_objects/mappings/types.ts index 25fb61de93518..e2ad2a91fd000 100644 --- a/src/core/server/saved_objects/mappings/types.ts +++ b/src/core/server/saved_objects/mappings/types.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import type { estypes } from '@elastic/elasticsearch'; /** * Describe a saved object type mapping. * @@ -96,9 +97,17 @@ export interface SavedObjectsMappingProperties { * * @public */ -export type SavedObjectsFieldMapping = - | SavedObjectsCoreFieldMapping - | SavedObjectsComplexFieldMapping; +export type SavedObjectsFieldMapping = estypes.MappingProperty & { + /** + * The dynamic property of the mapping, either `false` or `'strict'`. If + * unspecified `dynamic: 'strict'` will be inherited from the top-level + * index mappings. + * + * Note: To limit the number of mapping fields Saved Object types should + * *never* use `dynamic: true`. + */ + dynamic?: false | 'strict'; +}; /** @internal */ export interface IndexMapping { @@ -114,42 +123,3 @@ export interface IndexMappingMeta { // the md5 hash of that mapping's value when the index was created. migrationMappingPropertyHashes?: { [k: string]: string }; } - -/** - * See {@link SavedObjectsFieldMapping} for documentation. - * - * @public - */ -export interface SavedObjectsCoreFieldMapping { - type: string; - null_value?: number | boolean | string; - index?: boolean; - doc_values?: boolean; - fields?: { - [subfield: string]: { - type: string; - ignore_above?: number; - }; - }; -} - -/** - * See {@link SavedObjectsFieldMapping} for documentation. - * - * @public - */ -export interface SavedObjectsComplexFieldMapping { - /** - * The dynamic property of the mapping, either `false` or `'strict'`. If - * unspecified `dynamic: 'strict'` will be inherited from the top-level - * index mappings. - * - * Note: To limit the number of mapping fields Saved Object types should - * *never* use `dynamic: true`. - */ - dynamic?: false | 'strict'; - enabled?: boolean; - doc_values?: boolean; - type?: string; - properties: SavedObjectsMappingProperties; -} diff --git a/src/core/server/saved_objects/migrations/core/build_active_mappings.test.ts b/src/core/server/saved_objects/migrations/core/build_active_mappings.test.ts index 5465da2f620ad..a39fff20abbe7 100644 --- a/src/core/server/saved_objects/migrations/core/build_active_mappings.test.ts +++ b/src/core/server/saved_objects/migrations/core/build_active_mappings.test.ts @@ -19,19 +19,19 @@ describe('buildActiveMappings', () => { const properties = { aaa: { type: 'text' }, bbb: { type: 'long' }, - }; + } as const; expect(buildActiveMappings(properties)).toMatchSnapshot(); }); test('disallows duplicate mappings', () => { - const properties = { type: { type: 'long' } }; + const properties = { type: { type: 'long' } } as const; expect(() => buildActiveMappings(properties)).toThrow(/Cannot redefine core mapping \"type\"/); }); test('disallows mappings with leading underscore', () => { - const properties = { _hm: { type: 'keyword' } }; + const properties = { _hm: { type: 'keyword' } } as const; expect(() => buildActiveMappings(properties)).toThrow( /Invalid mapping \"_hm\"\. Mappings cannot start with _/ @@ -60,7 +60,7 @@ describe('buildActiveMappings', () => { aaa: { type: 'keyword', fields: { a: { type: 'keyword' }, b: { type: 'text' } } }, bbb: { fields: { b: { type: 'text' }, a: { type: 'keyword' } }, type: 'keyword' }, ccc: { fields: { b: { type: 'text' }, a: { type: 'text' } }, type: 'keyword' }, - }; + } as const; const mappings = buildActiveMappings(properties); const hashes = mappings._meta!.migrationMappingPropertyHashes!; diff --git a/src/core/server/saved_objects/migrations/core/build_index_map.test.ts b/src/core/server/saved_objects/migrations/core/build_index_map.test.ts index c7a3251e33ab1..731b7f8c029c2 100644 --- a/src/core/server/saved_objects/migrations/core/build_index_map.test.ts +++ b/src/core/server/saved_objects/migrations/core/build_index_map.test.ts @@ -36,7 +36,7 @@ test('mappings without index pattern goes to default index', () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, @@ -48,7 +48,7 @@ test('mappings without index pattern goes to default index', () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, @@ -69,7 +69,7 @@ test(`mappings with custom index pattern doesn't go to default index`, () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, @@ -81,7 +81,7 @@ test(`mappings with custom index pattern doesn't go to default index`, () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, @@ -103,7 +103,7 @@ test('creating a script gets added to the index pattern', () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, @@ -116,7 +116,7 @@ test('creating a script gets added to the index pattern', () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, @@ -144,18 +144,18 @@ test('throws when two scripts are defined for an index pattern', () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, type2: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, - }; + } as const; expect(() => createIndexMap({ kibanaIndexName: defaultIndex, diff --git a/src/core/server/saved_objects/migrations/core/elastic_index.test.ts b/src/core/server/saved_objects/migrations/core/elastic_index.test.ts index 1d2ec6abc0dd1..c9c24cc85a452 100644 --- a/src/core/server/saved_objects/migrations/core/elastic_index.test.ts +++ b/src/core/server/saved_objects/migrations/core/elastic_index.test.ts @@ -40,10 +40,10 @@ describe('ElasticIndex', () => { return elasticsearchClientMock.createSuccessTransportRequestPromise({ [index]: { aliases: { foo: index }, - mappings: { dynamic: 'strict', properties: { a: 'b' } }, + mappings: { dynamic: 'strict', properties: { a: 'b' } as any }, settings: {}, }, - } as estypes.GetIndexResponse); + } as estypes.IndicesGetResponse); }); const info = await Index.fetchInfo(client, '.baz'); @@ -164,7 +164,7 @@ describe('ElasticIndex', () => { client.tasks.get.mockResolvedValue( elasticsearchClientMock.createSuccessTransportRequestPromise({ completed: true, - } as estypes.GetTaskResponse) + } as estypes.TaskGetResponse) ); const info = { @@ -175,7 +175,7 @@ describe('ElasticIndex', () => { dynamic: 'strict' as const, properties: { foo: { type: 'keyword' } }, }, - }; + } as const; await Index.convertToAlias( client, @@ -248,7 +248,7 @@ describe('ElasticIndex', () => { reason: 'all shards failed', failed_shards: [], }, - } as estypes.GetTaskResponse) + } as estypes.TaskGetResponse) ); const info = { diff --git a/src/core/server/saved_objects/migrations/core/elastic_index.ts b/src/core/server/saved_objects/migrations/core/elastic_index.ts index 76fdd5e73d804..296a4cee07c11 100644 --- a/src/core/server/saved_objects/migrations/core/elastic_index.ts +++ b/src/core/server/saved_objects/migrations/core/elastic_index.ts @@ -32,7 +32,7 @@ export interface FullIndexInfo { // saved objects which are no longer used. These saved objects will still be // kept in the outdated index for backup purposes, but won't be available in // the upgraded index. -export const excludeUnusedTypesQuery: estypes.QueryContainer = { +export const excludeUnusedTypesQuery: estypes.QueryDslQueryContainer = { bool: { must_not: [ // https://github.com/elastic/kibana/issues/91869 @@ -401,7 +401,6 @@ async function reindex( task_id: String(task), }); - // @ts-expect-error @elastic/elasticsearch GetTaskResponse doesn't contain `error` property const e = body.error; if (e) { throw new Error(`Re-index failed [${e.type}] ${e.reason} :: ${JSON.stringify(e)}`); diff --git a/src/core/server/saved_objects/migrations/core/index_migrator.test.ts b/src/core/server/saved_objects/migrations/core/index_migrator.test.ts index fcc03f363139b..64d4fa3609e90 100644 --- a/src/core/server/saved_objects/migrations/core/index_migrator.test.ts +++ b/src/core/server/saved_objects/migrations/core/index_migrator.test.ts @@ -450,7 +450,7 @@ function withIndex( client.tasks.get.mockReturnValue( elasticsearchClientMock.createSuccessTransportRequestPromise({ completed: true, - } as estypes.GetTaskResponse) + } as estypes.TaskGetResponse) ); client.search.mockReturnValue( elasticsearchClientMock.createSuccessTransportRequestPromise(searchResult(0) as any) diff --git a/src/core/server/saved_objects/migrations/core/migration_context.test.ts b/src/core/server/saved_objects/migrations/core/migration_context.test.ts index 5f2e8a37ec427..240b41266abb6 100644 --- a/src/core/server/saved_objects/migrations/core/migration_context.test.ts +++ b/src/core/server/saved_objects/migrations/core/migration_context.test.ts @@ -31,7 +31,7 @@ describe('disableUnknownTypeMappingFields', () => { }, }, }, - }; + } as const; const activeMappings = { _meta: { migrationMappingPropertyHashes: { @@ -46,7 +46,7 @@ describe('disableUnknownTypeMappingFields', () => { }, }, }, - }; + } as const; const targetMappings = disableUnknownTypeMappingFields(activeMappings, sourceMappings); it('disables complex field mappings from unknown types in the source mappings', () => { diff --git a/src/core/server/saved_objects/migrations/kibana/kibana_migrator.test.ts b/src/core/server/saved_objects/migrations/kibana/kibana_migrator.test.ts index 37cea5d2de3d2..d0cc52f2dd9bd 100644 --- a/src/core/server/saved_objects/migrations/kibana/kibana_migrator.test.ts +++ b/src/core/server/saved_objects/migrations/kibana/kibana_migrator.test.ts @@ -320,7 +320,11 @@ const mockV2MigrationOptions = () => { ) ); options.client.indices.addBlock.mockReturnValue( - elasticsearchClientMock.createSuccessTransportRequestPromise({ acknowledged: true }) + elasticsearchClientMock.createSuccessTransportRequestPromise({ + acknowledged: true, + shards_acknowledged: true, + indices: [], + }) ); options.client.reindex.mockReturnValue( elasticsearchClientMock.createSuccessTransportRequestPromise({ @@ -333,7 +337,7 @@ const mockV2MigrationOptions = () => { error: undefined, failures: [], task: { description: 'task description' } as any, - } as estypes.GetTaskResponse) + } as estypes.TaskGetResponse) ); options.client.search = jest diff --git a/src/core/server/saved_objects/migrationsv2/actions/create_index.ts b/src/core/server/saved_objects/migrationsv2/actions/create_index.ts index 47ee44e762db7..8e5042a5ff8fe 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/create_index.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/create_index.ts @@ -24,8 +24,8 @@ import { } from './constants'; import { waitForIndexStatusYellow } from './wait_for_index_status_yellow'; -function aliasArrayToRecord(aliases: string[]): Record { - const result: Record = {}; +function aliasArrayToRecord(aliases: string[]): Record { + const result: Record = {}; for (const alias of aliases) { result[alias] = {}; } diff --git a/src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts b/src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts index b508a6198bfb3..3fa4d59e383bf 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts @@ -242,9 +242,7 @@ describe('migration actions', () => { it('rejects if there is a non-retryable error', async () => { expect.assertions(1); const task = removeWriteBlock({ client, index: 'no_such_index' }); - await expect(task()).rejects.toMatchInlineSnapshot( - `[ResponseError: index_not_found_exception]` - ); + await expect(task()).rejects.toThrow('index_not_found_exception'); }); }); @@ -264,7 +262,7 @@ describe('migration actions', () => { // Allocate 1 replica so that this index stays yellow number_of_replicas: '1', // Disable all shard allocation so that the index status is red - index: { routing: { allocation: { enable: 'none' } } }, + routing: { allocation: { enable: 'none' } }, }, }, }, @@ -284,7 +282,7 @@ describe('migration actions', () => { index: 'red_then_yellow_index', body: { // Enable all shard allocation so that the index status turns yellow - index: { routing: { allocation: { enable: 'all' } } }, + settings: { routing: { allocation: { enable: 'all' } } }, }, }); @@ -354,7 +352,7 @@ describe('migration actions', () => { index: 'clone_red_then_yellow_index', body: { // Enable all shard allocation so that the index status goes yellow - index: { routing: { allocation: { enable: 'all' } } }, + settings: { routing: { allocation: { enable: 'all' } } }, }, }); indexYellow = true; @@ -859,9 +857,7 @@ describe('migration actions', () => { sourceIndex: 'no_such_index', targetIndex: 'existing_index_2', }); - await expect(task()).rejects.toMatchInlineSnapshot( - `[ResponseError: index_not_found_exception]` - ); + await expect(task()).rejects.toThrow('index_not_found_exception'); task = verifyReindex({ client, @@ -1142,10 +1138,7 @@ describe('migration actions', () => { timeout: '10s', }); - await expect(task()).rejects.toMatchInlineSnapshot(` - [Error: pickupUpdatedMappings task failed with the following error: - {"type":"index_not_found_exception","reason":"no such index [no_such_index]","resource.type":"index_or_alias","resource.id":"no_such_index","index_uuid":"_na_","index":"no_such_index"}] - `); + await expect(task()).rejects.toThrow('index_not_found_exception'); }); it('resolves left wait_for_task_completion_timeout when the task does not complete within the timeout', async () => { const res = (await pickupUpdatedMappings( @@ -1433,7 +1426,7 @@ describe('migration actions', () => { index: 'red_then_yellow_index', body: { // Disable all shard allocation so that the index status is red - index: { routing: { allocation: { enable: 'all' } } }, + settings: { routing: { allocation: { enable: 'all' } } }, }, }); indexYellow = true; @@ -1455,7 +1448,7 @@ describe('migration actions', () => { // failure await expect( createIndex({ client, indexName: 'existing_index_2_alias', mappings: undefined as any })() - ).rejects.toMatchInlineSnapshot(`[ResponseError: invalid_index_name_exception]`); + ).rejects.toThrow('invalid_index_name_exception'); }); }); diff --git a/src/core/server/saved_objects/migrationsv2/actions/read_with_pit.ts b/src/core/server/saved_objects/migrationsv2/actions/read_with_pit.ts index 16f1df05f26b3..b101e7db0141c 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/read_with_pit.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/read_with_pit.ts @@ -28,7 +28,7 @@ export interface ReadWithPit { export interface ReadWithPitParams { client: ElasticsearchClient; pitId: string; - query: estypes.QueryContainer; + query: estypes.QueryDslQueryContainer; batchSize: number; searchAfter?: number[]; seqNoPrimaryTerm?: boolean; diff --git a/src/core/server/saved_objects/migrationsv2/actions/reindex.ts b/src/core/server/saved_objects/migrationsv2/actions/reindex.ts index ca8d3b594703c..e9cfb4b61dace 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/reindex.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/reindex.ts @@ -32,7 +32,7 @@ export interface ReindexParams { * are no longer used. These saved objects will still be kept in the outdated * index for backup purposes, but won't be available in the upgraded index. */ - unusedTypesQuery: estypes.QueryContainer; + unusedTypesQuery: estypes.QueryDslQueryContainer; } /** * Reindex documents from the `sourceIndex` into the `targetIndex`. Returns a diff --git a/src/core/server/saved_objects/migrationsv2/actions/remove_write_block.ts b/src/core/server/saved_objects/migrationsv2/actions/remove_write_block.ts index c55e4a235fbf1..b5bf64d5c29f7 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/remove_write_block.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/remove_write_block.ts @@ -39,7 +39,7 @@ export const removeWriteBlock = ({ // Don't change any existing settings preserve_existing: true, body: { - index: { + settings: { blocks: { write: false, }, diff --git a/src/core/server/saved_objects/migrationsv2/actions/search_for_outdated_documents.ts b/src/core/server/saved_objects/migrationsv2/actions/search_for_outdated_documents.ts index 7406cd35b1593..c27170a78245b 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/search_for_outdated_documents.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/search_for_outdated_documents.ts @@ -24,7 +24,7 @@ export interface SearchResponse { export interface SearchForOutdatedDocumentsOptions { batchSize: number; targetIndex: string; - outdatedDocumentsQuery?: estypes.QueryContainer; + outdatedDocumentsQuery?: estypes.QueryDslQueryContainer; } /** diff --git a/src/core/server/saved_objects/migrationsv2/actions/wait_for_reindex_task.ts b/src/core/server/saved_objects/migrationsv2/actions/wait_for_reindex_task.ts index fcadb5e80298a..18cf3350292b5 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/wait_for_reindex_task.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/wait_for_reindex_task.ts @@ -42,7 +42,7 @@ export const waitForReindexTask = flow( if (res.error.value.type === 'index_not_found_exception') { return TaskEither.left({ type: 'index_not_found_exception' as const, - index: res.error.value.index, + index: res.error.value.index!, }); } else { throw new Error('Reindex failed with the following error:\n' + JSON.stringify(res.error)); diff --git a/src/core/server/saved_objects/migrationsv2/actions/wait_for_task.ts b/src/core/server/saved_objects/migrationsv2/actions/wait_for_task.ts index 4e3631797e34b..0cdaa88c535ab 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/wait_for_task.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/wait_for_task.ts @@ -16,7 +16,7 @@ import { } from './catch_retryable_es_client_errors'; /** @internal */ export interface WaitForTaskResponse { - error: Option.Option<{ type: string; reason: string; index: string }>; + error: Option.Option<{ type: string; reason: string; index?: string }>; completed: boolean; failures: Option.Option; description?: string; @@ -84,7 +84,6 @@ export const waitForTask = ({ const failures = body.response?.failures ?? []; return Either.right({ completed: body.completed, - // @ts-expect-error @elastic/elasticsearch GetTaskResponse doesn't declare `error` property error: Option.fromNullable(body.error), failures: failures.length > 0 ? Option.some(failures) : Option.none, description: body.task.description, diff --git a/src/core/server/saved_objects/migrationsv2/integration_tests/archives/7.13.0_so_with_multiple_namespaces.zip b/src/core/server/saved_objects/migrationsv2/integration_tests/archives/7.13.0_so_with_multiple_namespaces.zip deleted file mode 100644 index a92211c16c559..0000000000000 Binary files a/src/core/server/saved_objects/migrationsv2/integration_tests/archives/7.13.0_so_with_multiple_namespaces.zip and /dev/null differ diff --git a/src/core/server/saved_objects/migrationsv2/integration_tests/archives/7.13.0_with_corrupted_so.zip b/src/core/server/saved_objects/migrationsv2/integration_tests/archives/7.13.0_with_corrupted_so.zip index c6c89ac2879b2..44f2fc9ba19eb 100644 Binary files a/src/core/server/saved_objects/migrationsv2/integration_tests/archives/7.13.0_with_corrupted_so.zip and b/src/core/server/saved_objects/migrationsv2/integration_tests/archives/7.13.0_with_corrupted_so.zip differ diff --git a/src/core/server/saved_objects/migrationsv2/integration_tests/archives/7.13.2_so_with_multiple_namespaces.zip b/src/core/server/saved_objects/migrationsv2/integration_tests/archives/7.13.2_so_with_multiple_namespaces.zip new file mode 100644 index 0000000000000..e4dce85f15e38 Binary files /dev/null and b/src/core/server/saved_objects/migrationsv2/integration_tests/archives/7.13.2_so_with_multiple_namespaces.zip differ diff --git a/src/core/server/saved_objects/migrationsv2/integration_tests/cleanup.test.ts b/src/core/server/saved_objects/migrationsv2/integration_tests/cleanup.test.ts index 91d86353b48fa..83d97555a4798 100644 --- a/src/core/server/saved_objects/migrationsv2/integration_tests/cleanup.test.ts +++ b/src/core/server/saved_objects/migrationsv2/integration_tests/cleanup.test.ts @@ -53,8 +53,7 @@ function createRoot() { ); } -// FAILING: https://github.com/elastic/kibana/issues/98352 -describe.skip('migration v2', () => { +describe('migration v2', () => { let esServer: kbnTestServer.TestElasticsearchUtils; let root: Root; @@ -78,7 +77,7 @@ describe.skip('migration v2', () => { adjustTimeout: (t: number) => jest.setTimeout(t), settings: { es: { - license: 'trial', + license: 'basic', // original SO: // { // _index: '.kibana_7.13.0_001', diff --git a/src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts b/src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts index 5e4b8feefbd95..f9d8e7cc4fbaa 100644 --- a/src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts +++ b/src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts @@ -157,7 +157,10 @@ describe('migration v2', () => { const response = body[migratedIndex]; expect(response).toBeDefined(); - expect(Object.keys(response.aliases).sort()).toEqual(['.kibana', `.kibana_${kibanaVersion}`]); + expect(Object.keys(response.aliases!).sort()).toEqual([ + '.kibana', + `.kibana_${kibanaVersion}`, + ]); }); it('copies all the document of the previous index to the new one', async () => { @@ -216,7 +219,10 @@ describe('migration v2', () => { const response = body[migratedIndex]; expect(response).toBeDefined(); - expect(Object.keys(response.aliases).sort()).toEqual(['.kibana', `.kibana_${kibanaVersion}`]); + expect(Object.keys(response.aliases!).sort()).toEqual([ + '.kibana', + `.kibana_${kibanaVersion}`, + ]); }); it('copies all the document of the previous index to the new one', async () => { diff --git a/src/core/server/saved_objects/migrationsv2/integration_tests/rewriting_id.test.ts b/src/core/server/saved_objects/migrationsv2/integration_tests/rewriting_id.test.ts index 0f4085f6186be..759a9572d733b 100644 --- a/src/core/server/saved_objects/migrationsv2/integration_tests/rewriting_id.test.ts +++ b/src/core/server/saved_objects/migrationsv2/integration_tests/rewriting_id.test.ts @@ -89,7 +89,7 @@ function createRoot() { } // FAILING: https://github.com/elastic/kibana/issues/98351 -describe.skip('migration v2', () => { +describe('migration v2', () => { let esServer: kbnTestServer.TestElasticsearchUtils; let root: Root; @@ -114,7 +114,7 @@ describe.skip('migration v2', () => { adjustTimeout: (t: number) => jest.setTimeout(t), settings: { es: { - license: 'trial', + license: 'basic', // original SO: // [ // { id: 'foo:1', type: 'foo', foo: { name: 'Foo 1 default' } }, @@ -133,7 +133,7 @@ describe.skip('migration v2', () => { // namespace: 'spacex', // }, // ]; - dataArchive: Path.join(__dirname, 'archives', '7.13.0_so_with_multiple_namespaces.zip'), + dataArchive: Path.join(__dirname, 'archives', '7.13.2_so_with_multiple_namespaces.zip'), }, }, }); diff --git a/src/core/server/saved_objects/migrationsv2/model.test.ts b/src/core/server/saved_objects/migrationsv2/model.test.ts index 186cb24b4a34a..86dc590aabdad 100644 --- a/src/core/server/saved_objects/migrationsv2/model.test.ts +++ b/src/core/server/saved_objects/migrationsv2/model.test.ts @@ -244,7 +244,7 @@ describe('migrations v2 model', () => { disabled_saved_object_type: '7997cf5a56cc02bdc9c93361bde732b0', }, }, - }; + } as const; test('INIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT if .kibana is already pointing to the target index', () => { const res: ResponseType<'INIT'> = Either.right({ @@ -683,7 +683,7 @@ describe('migrations v2 model', () => { disabled_saved_object_type: '7997cf5a56cc02bdc9c93361bde732b0', }, }, - }; + } as const; const waitForYellowSourceState: WaitForYellowSourceState = { ...baseState, diff --git a/src/core/server/saved_objects/migrationsv2/types.ts b/src/core/server/saved_objects/migrationsv2/types.ts index adcd2ad32fd24..1151e8337d3d5 100644 --- a/src/core/server/saved_objects/migrationsv2/types.ts +++ b/src/core/server/saved_objects/migrationsv2/types.ts @@ -53,7 +53,7 @@ export interface BaseState extends ControlState { readonly tempIndexMappings: IndexMapping; /** Script to apply to a legacy index before it can be used as a migration source */ readonly preMigrationScript: Option.Option; - readonly outdatedDocumentsQuery: estypes.QueryContainer; + readonly outdatedDocumentsQuery: estypes.QueryDslQueryContainer; readonly retryCount: number; readonly retryDelay: number; /** @@ -112,7 +112,7 @@ export interface BaseState extends ControlState { * are no longer used. These saved objects will still be kept in the outdated * index for backup purposes, but won't be available in the upgraded index. */ - readonly unusedTypesQuery: estypes.QueryContainer; + readonly unusedTypesQuery: estypes.QueryDslQueryContainer; } export interface InitState extends BaseState { @@ -132,7 +132,7 @@ export interface PostInitState extends BaseState { /** The target index is the index to which the migration writes */ readonly targetIndex: string; readonly versionIndexReadyActions: Option.Option; - readonly outdatedDocumentsQuery: estypes.QueryContainer; + readonly outdatedDocumentsQuery: estypes.QueryDslQueryContainer; } export interface DoneState extends PostInitState { diff --git a/src/core/server/saved_objects/saved_objects_type_registry.ts b/src/core/server/saved_objects/saved_objects_type_registry.ts index a63837132b652..ba5960c59239d 100644 --- a/src/core/server/saved_objects/saved_objects_type_registry.ts +++ b/src/core/server/saved_objects/saved_objects_type_registry.ts @@ -33,7 +33,7 @@ export class SavedObjectTypeRegistry { throw new Error(`Type '${type.name}' is already registered`); } validateType(type); - this.types.set(type.name, deepFreeze(type)); + this.types.set(type.name, deepFreeze(type) as SavedObjectsType); } /** diff --git a/src/core/server/saved_objects/service/lib/aggregations/validation.test.ts b/src/core/server/saved_objects/service/lib/aggregations/validation.test.ts index 57421db76f5b6..53f1b5c9d78c5 100644 --- a/src/core/server/saved_objects/service/lib/aggregations/validation.test.ts +++ b/src/core/server/saved_objects/service/lib/aggregations/validation.test.ts @@ -9,7 +9,7 @@ import type { estypes } from '@elastic/elasticsearch'; import { validateAndConvertAggregations } from './validation'; -type AggsMap = Record; +type AggsMap = Record; const mockMappings = { properties: { @@ -19,7 +19,9 @@ const mockMappings = { references: { type: 'nested', properties: { - id: 'keyword', + id: { + type: 'keyword', + }, }, }, foo: { @@ -31,7 +33,7 @@ const mockMappings = { type: 'text', }, bytes: { - type: 'number', + type: 'integer', }, }, }, @@ -73,7 +75,7 @@ const mockMappings = { }, }, }, -}; +} as const; describe('validateAndConvertAggregations', () => { it('validates a simple aggregations', () => { diff --git a/src/core/server/saved_objects/service/lib/aggregations/validation.ts b/src/core/server/saved_objects/service/lib/aggregations/validation.ts index cd41a23f4a28b..5ef89f297a796 100644 --- a/src/core/server/saved_objects/service/lib/aggregations/validation.ts +++ b/src/core/server/saved_objects/service/lib/aggregations/validation.ts @@ -37,9 +37,9 @@ interface ValidationContext { */ export const validateAndConvertAggregations = ( allowedTypes: string[], - aggs: Record, + aggs: Record, indexMapping: IndexMapping -): Record => { +): Record => { return validateAggregations(aggs, { allowedTypes, indexMapping, @@ -53,16 +53,15 @@ export const validateAndConvertAggregations = ( * Or a nested record of aggregation (`SearchRequest.body.aggs.myAggregation.aggs`) */ const validateAggregations = ( - aggregations: Record, + aggregations: Record, context: ValidationContext ) => { - return Object.entries(aggregations).reduce>( - (memo, [aggrName, aggrContainer]) => { - memo[aggrName] = validateAggregation(aggrContainer, childContext(context, aggrName)); - return memo; - }, - {} - ); + return Object.entries(aggregations).reduce< + Record + >((memo, [aggrName, aggrContainer]) => { + memo[aggrName] = validateAggregation(aggrContainer, childContext(context, aggrName)); + return memo; + }, {}); }; /** @@ -70,7 +69,7 @@ const validateAggregations = ( * from a nested aggregation record, including its potential nested aggregations. */ const validateAggregation = ( - aggregation: estypes.AggregationContainer, + aggregation: estypes.AggregationsAggregationContainer, context: ValidationContext ) => { const container = validateAggregationContainer(aggregation, context); @@ -93,10 +92,10 @@ const validateAggregation = ( * (ignoring its nested aggregations) */ const validateAggregationContainer = ( - container: estypes.AggregationContainer, + container: estypes.AggregationsAggregationContainer, context: ValidationContext ) => { - return Object.entries(container).reduce( + return Object.entries(container).reduce( (memo, [aggName, aggregation]) => { if (aggregationKeys.includes(aggName)) { return memo; diff --git a/src/core/server/saved_objects/service/lib/aggregations/validation_utils.test.ts b/src/core/server/saved_objects/service/lib/aggregations/validation_utils.test.ts index 25c3aea474ece..0425e46b4477e 100644 --- a/src/core/server/saved_objects/service/lib/aggregations/validation_utils.test.ts +++ b/src/core/server/saved_objects/service/lib/aggregations/validation_utils.test.ts @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -import { IndexMapping } from '../../../mappings'; import { isRootLevelAttribute, rewriteRootLevelAttribute, @@ -14,7 +13,7 @@ import { rewriteObjectTypeAttribute, } from './validation_utils'; -const mockMappings: IndexMapping = { +const mockMappings = { properties: { updated_at: { type: 'date', @@ -28,7 +27,7 @@ const mockMappings: IndexMapping = { type: 'text', }, bytes: { - type: 'number', + type: 'integer', }, }, }, @@ -70,7 +69,7 @@ const mockMappings: IndexMapping = { }, }, }, -}; +} as const; describe('isRootLevelAttribute', () => { it('returns true when referring to a path to a valid root level field', () => { diff --git a/src/core/server/saved_objects/service/lib/filter_utils.test.ts b/src/core/server/saved_objects/service/lib/filter_utils.test.ts index 2ef5219ccfff1..e6934398862dc 100644 --- a/src/core/server/saved_objects/service/lib/filter_utils.test.ts +++ b/src/core/server/saved_objects/service/lib/filter_utils.test.ts @@ -31,7 +31,7 @@ const mockMappings = { type: 'text', }, bytes: { - type: 'number', + type: 'integer', }, }, }, @@ -90,7 +90,7 @@ const mockMappings = { }, }, }, -}; +} as const; describe('Filter Utils', () => { describe('#validateConvertFilterToKueryNode', () => { diff --git a/src/core/server/saved_objects/service/lib/repository.ts b/src/core/server/saved_objects/service/lib/repository.ts index c626a2b2acfb5..6b51bd57248a1 100644 --- a/src/core/server/saved_objects/service/lib/repository.ts +++ b/src/core/server/saved_objects/service/lib/repository.ts @@ -672,7 +672,6 @@ export class SavedObjectsRepository { } const deleteDocNotFound = body.result === 'not_found'; - // @ts-expect-error 'error' does not exist on type 'DeleteResponse' const deleteIndexNotFound = body.error && body.error.type === 'index_not_found_exception'; if (deleteDocNotFound || deleteIndexNotFound) { // see "404s from missing index" above @@ -897,7 +896,7 @@ export class SavedObjectsRepository { per_page: perPage, total: body.hits.total, saved_objects: body.hits.hits.map( - (hit: estypes.Hit): SavedObjectsFindResult => ({ + (hit: estypes.SearchHit): SavedObjectsFindResult => ({ // @ts-expect-error @elastic/elasticsearch declared Id as string | number ...this._rawToSavedObject(hit), score: hit._score!, @@ -1835,13 +1834,9 @@ export class SavedObjectsRepository { ...(preference ? { preference } : {}), }; - const { body, statusCode } = await this.client.openPointInTime( - // @ts-expect-error @elastic/elasticsearch OpenPointInTimeRequest.index expected to accept string[] - esOptions, - { - ignore: [404], - } - ); + const { body, statusCode } = await this.client.openPointInTime(esOptions, { + ignore: [404], + }); if (statusCode === 404) { throw SavedObjectsErrorHelpers.createGenericNotFoundError(); } diff --git a/src/core/server/saved_objects/service/lib/search_dsl/search_dsl.ts b/src/core/server/saved_objects/service/lib/search_dsl/search_dsl.ts index 64b3dd428fb8b..3196a59ca39ee 100644 --- a/src/core/server/saved_objects/service/lib/search_dsl/search_dsl.ts +++ b/src/core/server/saved_objects/service/lib/search_dsl/search_dsl.ts @@ -26,7 +26,7 @@ interface GetSearchDslOptions { rootSearchFields?: string[]; searchAfter?: estypes.Id[]; sortField?: string; - sortOrder?: estypes.SortOrder; + sortOrder?: estypes.SearchSortOrder; namespaces?: string[]; pit?: SavedObjectsPitParams; typeToNamespacesMap?: Map; diff --git a/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.test.ts b/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.test.ts index 1376f0d50a9da..e2a21cc03ce3b 100644 --- a/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.test.ts +++ b/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.test.ts @@ -50,7 +50,7 @@ const MAPPINGS = { }, }, }, -}; +} as const; describe('searchDsl/getSortParams', () => { describe('type, no sortField', () => { diff --git a/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.ts b/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.ts index 64849c308f3f0..592110a5413ec 100644 --- a/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.ts +++ b/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.ts @@ -16,8 +16,8 @@ export function getSortingParams( mappings: IndexMapping, type: string | string[], sortField?: string, - sortOrder?: estypes.SortOrder -): { sort?: estypes.SortContainer[] } { + sortOrder?: estypes.SearchSortOrder +): { sort?: estypes.SearchSortContainer[] } { if (!sortField) { return {}; } diff --git a/src/core/server/saved_objects/service/lib/update_objects_spaces.ts b/src/core/server/saved_objects/service/lib/update_objects_spaces.ts index 079549265385c..3131d0240f96b 100644 --- a/src/core/server/saved_objects/service/lib/update_objects_spaces.ts +++ b/src/core/server/saved_objects/service/lib/update_objects_spaces.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { BulkOperationContainer, MultiGetOperation } from '@elastic/elasticsearch/api/types'; +import type { estypes } from '@elastic/elasticsearch'; import intersection from 'lodash/intersection'; import type { ISavedObjectTypeRegistry } from '../../saved_objects_type_registry'; @@ -173,7 +173,7 @@ export async function updateObjectsSpaces({ }; }); - const bulkGetDocs = expectedBulkGetResults.reduce((acc, x) => { + const bulkGetDocs = expectedBulkGetResults.reduce((acc, x) => { if (isRight(x) && x.value.esRequestIndex !== undefined) { acc.push({ _id: serializer.generateRawId(undefined, x.value.type, x.value.id), @@ -192,7 +192,7 @@ export async function updateObjectsSpaces({ const time = new Date().toISOString(); let bulkOperationRequestIndexCounter = 0; - const bulkOperationParams: BulkOperationContainer[] = []; + const bulkOperationParams: estypes.BulkOperationContainer[] = []; const expectedBulkOperationResults: Either[] = expectedBulkGetResults.map( (expectedBulkGetResult) => { if (isLeft(expectedBulkGetResult)) { diff --git a/src/core/server/saved_objects/types.ts b/src/core/server/saved_objects/types.ts index d3bfdcc6923dc..964ba671b5964 100644 --- a/src/core/server/saved_objects/types.ts +++ b/src/core/server/saved_objects/types.ts @@ -80,7 +80,7 @@ export interface SavedObjectsFindOptions { page?: number; perPage?: number; sortField?: string; - sortOrder?: estypes.SortOrder; + sortOrder?: estypes.SearchSortOrder; /** * An array of fields to include in the results * @example @@ -137,7 +137,7 @@ export interface SavedObjectsFindOptions { * * @alpha */ - aggs?: Record; + aggs?: Record; namespaces?: string[]; /** * This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index 379e4147ae024..ce13174ee19cc 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -1917,11 +1917,16 @@ export interface PluginInitializerContext { export interface PluginManifest { // Warning: (ae-unresolved-link) The @link reference could not be resolved: Reexported declarations are not supported readonly configPath: ConfigPath; + readonly description?: string; // @deprecated readonly extraPublicDirs?: string[]; readonly id: PluginName; readonly kibanaVersion: string; readonly optionalPlugins: readonly PluginName[]; + readonly owner?: { + readonly name: string; + readonly githubTeam?: string; + }; readonly requiredBundles: readonly string[]; readonly requiredPlugins: readonly PluginName[]; readonly server: boolean; @@ -2361,38 +2366,6 @@ export interface SavedObjectsCollectMultiNamespaceReferencesResponse { objects: SavedObjectReferenceWithContext[]; } -// @public -export interface SavedObjectsComplexFieldMapping { - // (undocumented) - doc_values?: boolean; - dynamic?: false | 'strict'; - // (undocumented) - enabled?: boolean; - // (undocumented) - properties: SavedObjectsMappingProperties; - // (undocumented) - type?: string; -} - -// @public -export interface SavedObjectsCoreFieldMapping { - // (undocumented) - doc_values?: boolean; - // (undocumented) - fields?: { - [subfield: string]: { - type: string; - ignore_above?: number; - }; - }; - // (undocumented) - index?: boolean; - // (undocumented) - null_value?: number | boolean | string; - // (undocumented) - type: string; -} - // @public (undocumented) export interface SavedObjectsCreateOptions extends SavedObjectsBaseOptions { coreMigrationVersion?: string; @@ -2554,12 +2527,14 @@ export interface SavedObjectsExportTransformContext { } // @public -export type SavedObjectsFieldMapping = SavedObjectsCoreFieldMapping | SavedObjectsComplexFieldMapping; +export type SavedObjectsFieldMapping = estypes.MappingProperty & { + dynamic?: false | 'strict'; +}; // @public (undocumented) export interface SavedObjectsFindOptions { // @alpha - aggs?: Record; + aggs?: Record; defaultSearchOperator?: 'AND' | 'OR'; fields?: string[]; // Warning: (ae-forgotten-export) The symbol "KueryNode" needs to be exported by the entry point index.d.ts @@ -2583,7 +2558,7 @@ export interface SavedObjectsFindOptions { // (undocumented) sortField?: string; // (undocumented) - sortOrder?: estypes.SortOrder; + sortOrder?: estypes.SearchSortOrder; // (undocumented) type: string | string[]; typeToNamespacesMap?: Map; @@ -3290,9 +3265,9 @@ export const validBodyOutput: readonly ["data", "stream"]; // // 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:301:3 - (ae-forgotten-export) The symbol "KibanaResponse" needs to be exported by the entry point index.d.ts -// src/core/server/plugins/types.ts:326:3 - (ae-forgotten-export) The symbol "KibanaConfigType" needs to be exported by the entry point index.d.ts -// src/core/server/plugins/types.ts:326:3 - (ae-forgotten-export) The symbol "SharedGlobalConfigKeys" needs to be exported by the entry point index.d.ts -// src/core/server/plugins/types.ts:329:3 - (ae-forgotten-export) The symbol "SavedObjectsConfigType" needs to be exported by the entry point index.d.ts -// src/core/server/plugins/types.ts:434:5 - (ae-unresolved-link) The @link reference could not be resolved: The package "kibana" does not have an export "create" +// src/core/server/plugins/types.ts:347:3 - (ae-forgotten-export) The symbol "KibanaConfigType" needs to be exported by the entry point index.d.ts +// src/core/server/plugins/types.ts:347:3 - (ae-forgotten-export) The symbol "SharedGlobalConfigKeys" needs to be exported by the entry point index.d.ts +// src/core/server/plugins/types.ts:350:3 - (ae-forgotten-export) The symbol "SavedObjectsConfigType" needs to be exported by the entry point index.d.ts +// src/core/server/plugins/types.ts:455:5 - (ae-unresolved-link) The @link reference could not be resolved: The package "kibana" does not have an export "create" ``` diff --git a/src/dev/build/lib/version_info.ts b/src/dev/build/lib/version_info.ts index 6be34a54e24f8..9ad20b4a6935b 100644 --- a/src/dev/build/lib/version_info.ts +++ b/src/dev/build/lib/version_info.ts @@ -7,6 +7,9 @@ */ import execa from 'execa'; +import fs from 'fs'; +import { join } from 'path'; +import { REPO_ROOT } from '@kbn/utils'; import { getBuildNumber } from './get_build_number'; interface Options { @@ -27,11 +30,12 @@ export async function getVersionInfo({ isRelease, versionQualifier, pkg }: Optio isRelease ? '' : '-SNAPSHOT' ); + const buildSha = fs.existsSync(join(REPO_ROOT, '.git')) + ? (await execa('git', ['rev-parse', 'HEAD'], { cwd: REPO_ROOT })).stdout + : process.env.GIT_COMMIT || process.env.BUILDKITE_COMMIT || ''; + return { - buildSha: - process.env.GIT_COMMIT || - process.env.BUILDKITE_COMMIT || - (await execa('git', ['rev-parse', 'HEAD'])).stdout, + buildSha, buildVersion, buildNumber: await getBuildNumber(), }; diff --git a/src/plugins/advanced_settings/public/management_app/advanced_settings.tsx b/src/plugins/advanced_settings/public/management_app/advanced_settings.tsx index c7a8c0a6135c7..1391312df5231 100644 --- a/src/plugins/advanced_settings/public/management_app/advanced_settings.tsx +++ b/src/plugins/advanced_settings/public/management_app/advanced_settings.tsx @@ -269,6 +269,7 @@ export class AdvancedSettings extends Component
- - - - + + - +

General

-
- - - - - - - , - "settingsCount": -1, - } + + + + + + + + + , + "settingsCount": -1, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

Dashboard

-
-
-
- + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

X-pack

-
- - - - - - - , - "settingsCount": 9, - } + + + + + + + + + , + "settingsCount": 9, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + @@ -269,52 +272,53 @@ exports[`Form should not render no settings message when instructed not to 1`] = exports[`Form should render no settings message when there are no settings 1`] = `
- - - - + + - +

General

-
- - - - - - - , - "settingsCount": -1, - } + + + + + + + + + , + "settingsCount": -1, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

Dashboard

-
-
-
- + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

X-pack

-
- - - - - - - , - "settingsCount": 9, - } + + + + + + + + + , + "settingsCount": 9, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + @@ -535,52 +541,53 @@ exports[`Form should render no settings message when there are no settings 1`] = exports[`Form should render normally 1`] = `
- - - - + + - +

General

-
- - - - - - - , - "settingsCount": -1, - } + + + + + + + + + , + "settingsCount": -1, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

Dashboard

-
-
-
- + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

X-pack

-
- - - - - - - , - "settingsCount": 9, - } + + + + + + + + + , + "settingsCount": 9, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + @@ -801,52 +810,53 @@ exports[`Form should render normally 1`] = ` exports[`Form should render read-only when saving is disabled 1`] = `
- - - - + + - +

General

-
- - - - - - - , - "settingsCount": -1, - } + + + + + + + + + , + "settingsCount": -1, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

Dashboard

-
-
-
- + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

X-pack

-
- - - - - - - , - "settingsCount": 9, - } + + + + + + + + + , + "settingsCount": 9, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + diff --git a/src/plugins/advanced_settings/public/management_app/components/form/form.tsx b/src/plugins/advanced_settings/public/management_app/components/form/form.tsx index d953bb8f6a6f6..0b08a317e87c9 100644 --- a/src/plugins/advanced_settings/public/management_app/components/form/form.tsx +++ b/src/plugins/advanced_settings/public/management_app/components/form/form.tsx @@ -11,16 +11,16 @@ import React, { PureComponent, Fragment } from 'react'; import { EuiFlexGroup, EuiFlexItem, - EuiForm, + EuiSplitPanel, EuiLink, - EuiPanel, + EuiCallOut, EuiSpacer, - EuiText, EuiTextColor, EuiBottomBar, EuiButton, EuiToolTip, EuiButtonEmpty, + EuiTitle, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { isEmpty } from 'lodash'; @@ -47,6 +47,7 @@ interface FormProps { dockLinks: DocLinksStart['links']; toasts: ToastsStart; trackUiMetric?: (metricType: UiCounterMetricType, eventName: string | string[]) => void; + queryText?: string; } interface FormState { @@ -241,17 +242,18 @@ export class Form extends PureComponent { renderCategory(category: Category, settings: FieldSetting[], totalSettings: number) { return ( - - - - - + + + + +

{getCategoryName(category)}

-
- {this.renderClearQueryLink(totalSettings, settings.length)} -
-
- + + + {this.renderClearQueryLink(totalSettings, settings.length)} + + + {settings.map((setting) => { return ( { /> ); })} -
-
+ +
); @@ -276,22 +278,28 @@ export class Form extends PureComponent { maybeRenderNoSettings(clearQuery: FormProps['clearQuery']) { if (this.props.showNoResultsMessage) { return ( - - - - - ), - }} - /> - + + + + + ), + queryText: {this.props.queryText}, + }} + /> + + } + /> ); } return null; diff --git a/src/plugins/bfetch/kibana.json b/src/plugins/bfetch/kibana.json index 9f9f2176af671..6d37d68ffd584 100644 --- a/src/plugins/bfetch/kibana.json +++ b/src/plugins/bfetch/kibana.json @@ -3,5 +3,10 @@ "version": "kibana", "server": true, "ui": true, - "requiredBundles": ["kibanaUtils"] + "requiredBundles": ["kibanaUtils"], + "owner": { + "name": "App Services", + "githubTeam": "kibana-app-services" + }, + "description": "Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back." } diff --git a/src/plugins/dashboard/server/usage/dashboard_telemetry.test.ts b/src/plugins/dashboard/server/usage/dashboard_telemetry.test.ts index 1cfa9d862e6b9..60f1f7eb0955c 100644 --- a/src/plugins/dashboard/server/usage/dashboard_telemetry.test.ts +++ b/src/plugins/dashboard/server/usage/dashboard_telemetry.test.ts @@ -72,6 +72,22 @@ const lensXYSeriesB = ({ visualization: { preferredSeriesType: 'seriesB', }, + datasourceStates: { + indexpattern: { + layers: { + first: { + columns: { + first: { + operationType: 'terms', + }, + second: { + operationType: 'formula', + }, + }, + }, + }, + }, + }, }, }, }, @@ -144,6 +160,7 @@ describe('dashboard telemetry', () => { expect(collectorData.lensByValue.a).toBe(3); expect(collectorData.lensByValue.seriesA).toBe(2); expect(collectorData.lensByValue.seriesB).toBe(1); + expect(collectorData.lensByValue.formula).toBe(1); }); it('handles misshapen lens panels', () => { diff --git a/src/plugins/dashboard/server/usage/dashboard_telemetry.ts b/src/plugins/dashboard/server/usage/dashboard_telemetry.ts index 912dc04d16d09..fb1ddff469f57 100644 --- a/src/plugins/dashboard/server/usage/dashboard_telemetry.ts +++ b/src/plugins/dashboard/server/usage/dashboard_telemetry.ts @@ -27,6 +27,16 @@ interface LensPanel extends SavedDashboardPanel730ToLatest { visualization?: { preferredSeriesType?: string; }; + datasourceStates?: { + indexpattern?: { + layers: Record< + string, + { + columns: Record; + } + >; + }; + }; }; }; }; @@ -109,6 +119,19 @@ export const collectByValueLensInfo: DashboardCollectorFunction = (panels, colle } collectorData.lensByValue[type] = collectorData.lensByValue[type] + 1; + + const hasFormula = Object.values( + lensPanel.embeddableConfig.attributes.state?.datasourceStates?.indexpattern?.layers || {} + ).some((layer) => + Object.values(layer.columns).some((column) => column.operationType === 'formula') + ); + + if (hasFormula && !collectorData.lensByValue.formula) { + collectorData.lensByValue.formula = 0; + } + if (hasFormula) { + collectorData.lensByValue.formula++; + } } } }; 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 2a7f2458a27de..85562435e68d0 100644 --- a/src/plugins/data/common/es_query/filters/phrase_filter.ts +++ b/src/plugins/data/common/es_query/filters/phrase_filter.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import { get, isPlainObject } from 'lodash'; import { Filter, FilterMeta } from './meta_filter'; import { IIndexPattern, IFieldType } from '../../index_patterns'; @@ -23,7 +23,7 @@ export type PhraseFilter = Filter & { script?: { script: { source?: any; - lang?: string; + lang?: estypes.ScriptLanguage; params: any; }; }; diff --git a/src/plugins/data/common/es_query/filters/range_filter.ts b/src/plugins/data/common/es_query/filters/range_filter.ts index fb8426655583e..a082b93c0a79a 100644 --- a/src/plugins/data/common/es_query/filters/range_filter.ts +++ b/src/plugins/data/common/es_query/filters/range_filter.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import { map, reduce, mapValues, get, keys, pickBy } from 'lodash'; import { Filter, FilterMeta } from './meta_filter'; import { IIndexPattern, IFieldType } from '../../index_patterns'; @@ -63,7 +63,7 @@ export type RangeFilter = Filter & script?: { script: { params: any; - lang: string; + lang: estypes.ScriptLanguage; source: any; }; }; diff --git a/src/plugins/data/common/field_formats/converters/duration.test.ts b/src/plugins/data/common/field_formats/converters/duration.test.ts index 72551f4b7b236..9ea9919e757de 100644 --- a/src/plugins/data/common/field_formats/converters/duration.test.ts +++ b/src/plugins/data/common/field_formats/converters/duration.test.ts @@ -130,11 +130,11 @@ describe('Duration Format', () => { fixtures: [ { input: -60, - output: '-60 Seconds', + output: '-60 seconds', }, { input: -32.333, - output: '-32 Seconds', + output: '-32 seconds', }, ], }); @@ -147,15 +147,15 @@ describe('Duration Format', () => { fixtures: [ { input: 1988, - output: '0.00 Milliseconds', + output: '0.00 milliseconds', }, { input: 658, - output: '0.00 Milliseconds', + output: '0.00 milliseconds', }, { input: 3857, - output: '0.00 Milliseconds', + output: '0.00 milliseconds', }, ], }); @@ -168,15 +168,15 @@ describe('Duration Format', () => { fixtures: [ { input: 1988, - output: '1.99 Milliseconds', + output: '1.99 milliseconds', }, { input: 658, - output: '0.66 Milliseconds', + output: '0.66 milliseconds', }, { input: 3857, - output: '3.86 Milliseconds', + output: '3.86 milliseconds', }, ], }); @@ -189,19 +189,19 @@ describe('Duration Format', () => { fixtures: [ { input: 1988, - output: '2.0 Milliseconds', + output: '2.0 milliseconds', }, { input: 0, - output: '0.0 Milliseconds', + output: '0.0 milliseconds', }, { input: 658, - output: '0.7 Milliseconds', + output: '0.7 milliseconds', }, { input: 3857, - output: '3.9 Milliseconds', + output: '3.9 milliseconds', }, ], }); @@ -214,15 +214,15 @@ describe('Duration Format', () => { fixtures: [ { input: 600, - output: '10 Minutes', + output: '10 minutes', }, { input: 30, - output: '30 Seconds', + output: '30 seconds', }, { input: 3000, - output: '50 Minutes', + output: '50 minutes', }, ], }); diff --git a/src/plugins/data/common/field_formats/converters/duration.ts b/src/plugins/data/common/field_formats/converters/duration.ts index c9a7091db8471..71ac022ba5e5c 100644 --- a/src/plugins/data/common/field_formats/converters/duration.ts +++ b/src/plugins/data/common/field_formats/converters/duration.ts @@ -263,7 +263,7 @@ export class DurationFormat extends FieldFormat { const precise = human || humanPrecise ? formatted : formatted.toFixed(outputPrecision); const type = outputFormats.find(({ method }) => method === outputFormat); - const unitText = useShortSuffix ? type?.shortText : type?.text; + const unitText = useShortSuffix ? type?.shortText : type?.text.toLowerCase(); const suffix = showSuffix && unitText && !human ? `${includeSpace}${unitText}` : ''; @@ -294,7 +294,7 @@ function formatDuration( const getUnitText = (method: string) => { const type = outputFormats.find(({ method: methodT }) => method === methodT); - return useShortSuffix ? type?.shortText : type?.text; + return useShortSuffix ? type?.shortText : type?.text.toLowerCase(); }; for (let i = 0; i < units.length; i++) { diff --git a/src/plugins/data/common/index_patterns/fields/__snapshots__/index_pattern_field.test.ts.snap b/src/plugins/data/common/index_patterns/fields/__snapshots__/index_pattern_field.test.ts.snap index 6b1d01e5ba142..681aba41a609c 100644 --- a/src/plugins/data/common/index_patterns/fields/__snapshots__/index_pattern_field.test.ts.snap +++ b/src/plugins/data/common/index_patterns/fields/__snapshots__/index_pattern_field.test.ts.snap @@ -16,7 +16,7 @@ Object { "esTypes": Array [ "keyword", ], - "lang": "lang", + "lang": "java", "name": "name", "readFromDocValues": false, "script": "script", @@ -58,7 +58,7 @@ Object { }, }, "isMapped": undefined, - "lang": "lang", + "lang": "java", "name": "name", "readFromDocValues": false, "runtimeField": Object { diff --git a/src/plugins/data/common/index_patterns/fields/index_pattern_field.test.ts b/src/plugins/data/common/index_patterns/fields/index_pattern_field.test.ts index 48342a9e02a2b..73f015ca5517c 100644 --- a/src/plugins/data/common/index_patterns/fields/index_pattern_field.test.ts +++ b/src/plugins/data/common/index_patterns/fields/index_pattern_field.test.ts @@ -24,7 +24,7 @@ describe('Field', function () { name: 'name', type: 'string', script: 'script', - lang: 'lang', + lang: 'java' as const, count: 1, esTypes: ['text'], // note, this will get replaced by the runtime field type aggregatable: true, diff --git a/src/plugins/data/common/index_patterns/fields/types.ts b/src/plugins/data/common/index_patterns/fields/types.ts index 565dd6d926948..0fb7a46c2cf73 100644 --- a/src/plugins/data/common/index_patterns/fields/types.ts +++ b/src/plugins/data/common/index_patterns/fields/types.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import { FieldSpec, IFieldSubType, IndexPattern } from '../..'; /** @@ -16,7 +16,7 @@ export interface IFieldType { name: string; type: string; script?: string; - lang?: string; + lang?: estypes.ScriptLanguage; count?: number; // esTypes might be undefined on old index patterns that have not been refreshed since we added // this prop. It is also undefined on scripted fields. diff --git a/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts b/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts index c897cdbce2309..0c3a9901f8c8c 100644 --- a/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts +++ b/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts @@ -364,7 +364,6 @@ export class IndexPattern implements IIndexPattern { * @param name Field name * @param runtimeField Runtime field definition */ - addRuntimeField(name: string, runtimeField: RuntimeField) { const existingField = this.getFieldByName(name); if (existingField) { @@ -384,11 +383,41 @@ export class IndexPattern implements IIndexPattern { } /** - * Remove a runtime field - removed from mapped field or removed unmapped - * field as appropriate - * @param name Field name + * Checks if runtime field exists + * @param name + */ + hasRuntimeField(name: string): boolean { + return !!this.runtimeFieldMap[name]; + } + + /** + * Returns runtime field if exists + * @param name + */ + getRuntimeField(name: string): RuntimeField | null { + return this.runtimeFieldMap[name] ?? null; + } + + /** + * Replaces all existing runtime fields with new fields + * @param newFields */ + replaceAllRuntimeFields(newFields: Record) { + const oldRuntimeFieldNames = Object.keys(this.runtimeFieldMap); + oldRuntimeFieldNames.forEach((name) => { + this.removeRuntimeField(name); + }); + Object.entries(newFields).forEach(([name, field]) => { + this.addRuntimeField(name, field); + }); + } + + /** + * Remove a runtime field - removed from mapped field or removed unmapped + * field as appropriate. Doesn't clear associated field attributes. + * @param name - Field name to remove + */ removeRuntimeField(name: string) { const existingField = this.getFieldByName(name); if (existingField) { @@ -396,9 +425,6 @@ export class IndexPattern implements IIndexPattern { // mapped field, remove runtimeField def existingField.runtimeField = undefined; } else { - // runtimeField only - this.setFieldCustomLabel(name, null); - this.deleteFieldFormat(name); this.fields.remove(existingField); } } diff --git a/src/plugins/data/common/index_patterns/types.ts b/src/plugins/data/common/index_patterns/types.ts index 0fcdea1a878eb..07aa8967b905e 100644 --- a/src/plugins/data/common/index_patterns/types.ts +++ b/src/plugins/data/common/index_patterns/types.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import { ToastInputFields, ErrorToastOptions } from 'src/core/public/notifications'; // eslint-disable-next-line import type { SavedObject } from 'src/core/server'; @@ -167,7 +167,7 @@ export type FieldSpecConflictDescriptions = Record; export interface FieldSpecExportFmt { count?: number; script?: string; - lang?: string; + lang?: estypes.ScriptLanguage; conflictDescriptions?: FieldSpecConflictDescriptions; name: string; type: KBN_FIELD_TYPES; @@ -197,7 +197,7 @@ export interface FieldSpec { * Scripted field langauge * Painless is the only valid scripted field language */ - lang?: string; + lang?: estypes.ScriptLanguage; conflictDescriptions?: Record; format?: SerializedFieldFormat; name: string; diff --git a/src/plugins/data/common/search/aggs/agg_configs.ts b/src/plugins/data/common/search/aggs/agg_configs.ts index 6f8a8d38a4a28..8593a0b0ed0fa 100644 --- a/src/plugins/data/common/search/aggs/agg_configs.ts +++ b/src/plugins/data/common/search/aggs/agg_configs.ts @@ -10,7 +10,7 @@ import moment from 'moment'; import _, { cloneDeep } from 'lodash'; import { i18n } from '@kbn/i18n'; import { Assign } from '@kbn/utility-types'; -import { Aggregate, Bucket } from '@elastic/elasticsearch/api/types'; +import type { estypes } from '@elastic/elasticsearch'; import { IEsSearchResponse, @@ -57,7 +57,9 @@ export interface AggConfigsOptions { export type CreateAggConfigParams = Assign; -export type GenericBucket = Bucket & { [property: string]: Aggregate }; +export type GenericBucket = estypes.AggregationsBucket & { + [property: string]: estypes.AggregationsAggregate; +}; /** * @name AggConfigs @@ -412,7 +414,7 @@ export class AggConfigs { const transformedRawResponse = cloneDeep(response.rawResponse); if (!transformedRawResponse.aggregations) { transformedRawResponse.aggregations = { - doc_count: response.rawResponse.hits?.total as Aggregate, + doc_count: response.rawResponse.hits?.total as estypes.AggregationsAggregate, }; } const aggCursor = transformedRawResponse.aggregations!; diff --git a/src/plugins/data/common/search/aggs/utils/time_splits.ts b/src/plugins/data/common/search/aggs/utils/time_splits.ts index 4ac47efaea347..75c1c091e0756 100644 --- a/src/plugins/data/common/search/aggs/utils/time_splits.ts +++ b/src/plugins/data/common/search/aggs/utils/time_splits.ts @@ -8,12 +8,7 @@ import moment from 'moment'; import _, { isArray } from 'lodash'; -import { - Aggregate, - FiltersAggregate, - FiltersBucketItem, - MultiBucketAggregate, -} from '@elastic/elasticsearch/api/types'; +import type { estypes } from '@elastic/elasticsearch'; import { AggGroupNames } from '../agg_groups'; import { GenericBucket, AggConfigs, getTime, AggConfig } from '../../../../common'; @@ -156,12 +151,15 @@ import { IBucketAggConfig } from '../buckets'; } // ... * ``` - * - * + * + * * @param aggConfigs The agg configs instance * @param aggCursor The root aggregations object from the response which will be mutated in place */ -export function mergeTimeShifts(aggConfigs: AggConfigs, aggCursor: Record) { +export function mergeTimeShifts( + aggConfigs: AggConfigs, + aggCursor: Record +) { const timeShifts = aggConfigs.getTimeShifts(); const hasMultipleTimeShifts = Object.keys(timeShifts).length > 1; const requestAggs = aggConfigs.getRequestAggs(); @@ -200,7 +198,7 @@ export function mergeTimeShifts(aggConfigs: AggConfigs, aggCursor: Record @@ -212,7 +210,7 @@ export function mergeTimeShifts(aggConfigs: AggConfigs, aggCursor: Record bucketAgg.type.orderBuckets(bucketAgg, a, b)); } else if (baseBuckets && buckets && !isArray(baseBuckets)) { @@ -249,7 +247,10 @@ export function mergeTimeShifts(aggConfigs: AggConfigs, aggCursor: Record, aggIndex: number): undefined => { + const transformTimeShift = ( + cursor: Record, + aggIndex: number + ): undefined => { const shouldSplit = aggConfigs.aggs[aggIndex].type.splitForTimeShift( aggConfigs.aggs[aggIndex], aggConfigs @@ -257,10 +258,8 @@ export function mergeTimeShifts(aggConfigs: AggConfigs, aggCursor: Record; + const timeShiftedBuckets = (cursor.time_offset_split as estypes.AggregationsFiltersAggregate) + .buckets as Record; const subTree = {}; Object.entries(timeShifts).forEach(([key, shift]) => { mergeAggLevel( @@ -301,7 +300,7 @@ export function mergeTimeShifts(aggConfigs: AggConfigs, aggCursor: Record { expect(actual[0].functions[0]).toHaveProperty('name', 'kibanaFilter'); expect(actual[0].functions[0].arguments).toMatchInlineSnapshot(` Object { + "disabled": Array [ + false, + ], "negate": Array [ false, ], @@ -35,6 +38,9 @@ describe('interpreter/functions#filtersToAst', () => { expect(actual[1].functions[0]).toHaveProperty('name', 'kibanaFilter'); expect(actual[1].functions[0].arguments).toMatchInlineSnapshot(` Object { + "disabled": Array [ + false, + ], "negate": Array [ true, ], diff --git a/src/plugins/data/common/search/expressions/filters_to_ast.ts b/src/plugins/data/common/search/expressions/filters_to_ast.ts index a4dd959caecf6..edcf884b3ed31 100644 --- a/src/plugins/data/common/search/expressions/filters_to_ast.ts +++ b/src/plugins/data/common/search/expressions/filters_to_ast.ts @@ -17,6 +17,7 @@ export const filtersToAst = (filters: Filter[] | Filter) => { buildExpressionFunction('kibanaFilter', { query: JSON.stringify(restOfFilter), negate: filter.meta.negate, + disabled: filter.meta.disabled, }), ]); }); diff --git a/src/plugins/data/common/search/expressions/kibana_filter.ts b/src/plugins/data/common/search/expressions/kibana_filter.ts index 6d6f70fa8d1d6..c94a3763ee084 100644 --- a/src/plugins/data/common/search/expressions/kibana_filter.ts +++ b/src/plugins/data/common/search/expressions/kibana_filter.ts @@ -13,6 +13,7 @@ import { KibanaFilter } from './kibana_context_type'; interface Arguments { query: string; negate?: boolean; + disabled?: boolean; } export type ExpressionFunctionKibanaFilter = ExpressionFunctionDefinition< @@ -45,6 +46,13 @@ export const kibanaFilterFunction: ExpressionFunctionKibanaFilter = { defaultMessage: 'Should the filter be negated', }), }, + disabled: { + types: ['boolean'], + default: false, + help: i18n.translate('data.search.functions.kibanaFilter.disabled.help', { + defaultMessage: 'Should the filter be disabled', + }), + }, }, fn(input, args) { @@ -53,7 +61,7 @@ export const kibanaFilterFunction: ExpressionFunctionKibanaFilter = { meta: { negate: args.negate || false, alias: '', - disabled: false, + disabled: args.disabled || false, }, ...JSON.parse(args.query), }; diff --git a/src/plugins/data/common/search/search_source/types.ts b/src/plugins/data/common/search/search_source/types.ts index 507fda0dc9e47..40e92f45af143 100644 --- a/src/plugins/data/common/search/search_source/types.ts +++ b/src/plugins/data/common/search/search_source/types.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import { NameList } from 'elasticsearch'; import { IAggConfigs } from 'src/plugins/data/public'; import { Query } from '../..'; @@ -156,7 +156,7 @@ export interface ShardFailure { type: string; }; reason: string; - lang?: string; + lang?: estypes.ScriptLanguage; script?: string; script_stack?: string[]; type: string; diff --git a/src/plugins/data/kibana.json b/src/plugins/data/kibana.json index 4e9e4c318c957..e425d0701155b 100644 --- a/src/plugins/data/kibana.json +++ b/src/plugins/data/kibana.json @@ -3,19 +3,14 @@ "version": "kibana", "server": true, "ui": true, - "requiredPlugins": [ - "bfetch", - "expressions", - "uiActions", - "share", - "inspector" - ], + "requiredPlugins": ["bfetch", "expressions", "uiActions", "share", "inspector"], "serviceFolders": ["search", "index_patterns", "query", "autocomplete", "ui", "field_formats"], "optionalPlugins": ["usageCollection"], "extraPublicDirs": ["common"], - "requiredBundles": [ - "kibanaUtils", - "kibanaReact", - "inspector" - ] + "requiredBundles": ["kibanaUtils", "kibanaReact", "inspector"], + "owner": { + "name": "App Services", + "githubTeam": "kibana-app-services" + }, + "description": "Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters." } diff --git a/src/plugins/data/public/autocomplete/providers/kql_query_suggestion/field.test.ts b/src/plugins/data/public/autocomplete/providers/kql_query_suggestion/field.test.ts index f1eced06a33ea..84ed4315ee16f 100644 --- a/src/plugins/data/public/autocomplete/providers/kql_query_suggestion/field.test.ts +++ b/src/plugins/data/public/autocomplete/providers/kql_query_suggestion/field.test.ts @@ -41,6 +41,7 @@ describe('Kuery field suggestions', () => { querySuggestionsArgs, mockKueryNode({ prefix, suffix }) ); + // @ts-expect-error indexPatternResponse is not properly typed json const filterableFields = indexPatternResponse.fields.filter(indexPatternsUtils.isFilterable); expect(suggestions.length).toBe(filterableFields.length); diff --git a/src/plugins/data/public/public.api.md b/src/plugins/data/public/public.api.md index 9f5c2ef5fad3d..67534577d99fc 100644 --- a/src/plugins/data/public/public.api.md +++ b/src/plugins/data/public/public.api.md @@ -7,13 +7,11 @@ import { $Values } from '@kbn/utility-types'; import { Action } from 'history'; import { Adapters as Adapters_2 } from 'src/plugins/inspector/common'; -import { Aggregate } from '@elastic/elasticsearch/api/types'; import { ApiResponse } from '@elastic/elasticsearch/lib/Transport'; import { ApplicationStart } from 'kibana/public'; import { Assign } from '@kbn/utility-types'; import { BfetchPublicSetup } from 'src/plugins/bfetch/public'; import Boom from '@hapi/boom'; -import { Bucket } from '@elastic/elasticsearch/api/types'; import { ConfigDeprecationProvider } from '@kbn/config'; import { CoreSetup } from 'src/core/public'; import { CoreSetup as CoreSetup_2 } from 'kibana/public'; @@ -1245,7 +1243,7 @@ export interface IFieldType { // (undocumented) format?: any; // (undocumented) - lang?: string; + lang?: estypes.ScriptLanguage; // (undocumented) name: string; // (undocumented) @@ -1415,6 +1413,7 @@ export class IndexPattern implements IIndexPattern { typeMeta?: string | undefined; type?: string | undefined; }; + getRuntimeField(name: string): RuntimeField | null; // @deprecated (undocumented) getScriptedFields(): IndexPatternField[]; getSourceFiltering(): { @@ -1422,6 +1421,7 @@ export class IndexPattern implements IIndexPattern { }; // (undocumented) getTimeField(): IndexPatternField | undefined; + hasRuntimeField(name: string): boolean; // (undocumented) id?: string; // @deprecated (undocumented) @@ -1435,6 +1435,7 @@ export class IndexPattern implements IIndexPattern { removeRuntimeField(name: string): void; // @deprecated removeScriptedField(fieldName: string): void; + replaceAllRuntimeFields(newFields: Record): void; resetOriginalSavedObjectBody: () => void; // (undocumented) protected setFieldAttrs(fieldName: string, attrName: K, value: FieldAttrSet[K]): void; @@ -1520,8 +1521,8 @@ export class IndexPatternField implements IFieldType { // (undocumented) get filterable(): boolean; get isMapped(): boolean | undefined; - get lang(): string | undefined; - set lang(lang: string | undefined); + get lang(): "painless" | "expression" | "mustache" | "java" | undefined; + set lang(lang: "painless" | "expression" | "mustache" | "java" | undefined); // (undocumented) get name(): string; // (undocumented) @@ -1545,7 +1546,7 @@ export class IndexPatternField implements IFieldType { toJSON(): { count: number; script: string | undefined; - lang: string | undefined; + lang: "painless" | "expression" | "mustache" | "java" | undefined; conflictDescriptions: Record | undefined; name: string; type: string; @@ -1990,7 +1991,7 @@ export type PhraseFilter = Filter & { script?: { script: { source?: any; - lang?: string; + lang?: estypes.ScriptLanguage; params: any; }; }; @@ -2208,7 +2209,7 @@ export type RangeFilter = Filter & EsRangeFilter & { script?: { script: { params: any; - lang: string; + lang: estypes.ScriptLanguage; source: any; }; }; @@ -2254,7 +2255,7 @@ export interface Reason { reason: string; }; // (undocumented) - lang?: string; + lang?: estypes.ScriptLanguage; // (undocumented) position?: { offset: number; diff --git a/src/plugins/data/public/search/errors/painless_error.test.tsx b/src/plugins/data/public/search/errors/painless_error.test.tsx index f07f078ea03a3..833573786594b 100644 --- a/src/plugins/data/public/search/errors/painless_error.test.tsx +++ b/src/plugins/data/public/search/errors/painless_error.test.tsx @@ -23,6 +23,7 @@ describe('PainlessError', () => { const e = new PainlessError({ statusCode: 400, message: 'search_phase_execution_exception', + // @ts-expect-error searchPhaseException is not properly typed json attributes: searchPhaseException.error, }); const component = mount(e.getErrorMessage(startMock.application)); diff --git a/src/plugins/data/public/search/errors/types.ts b/src/plugins/data/public/search/errors/types.ts index 445293fe47ea3..13c5d0c242ed0 100644 --- a/src/plugins/data/public/search/errors/types.ts +++ b/src/plugins/data/public/search/errors/types.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import { KibanaServerError } from '../../../../kibana_utils/common'; export interface FailedShard { @@ -24,7 +24,7 @@ export interface Reason { start: number; end: number; }; - lang?: string; + lang?: estypes.ScriptLanguage; script?: string; caused_by?: { type: string; diff --git a/src/plugins/data/public/search/search_interceptor/search_interceptor.test.ts b/src/plugins/data/public/search/search_interceptor/search_interceptor.test.ts index dfbc912453d6e..fe66d4b6e9937 100644 --- a/src/plugins/data/public/search/search_interceptor/search_interceptor.test.ts +++ b/src/plugins/data/public/search/search_interceptor/search_interceptor.test.ts @@ -135,6 +135,7 @@ describe('SearchInterceptor', () => { new PainlessError({ statusCode: 400, message: 'search_phase_execution_exception', + // @ts-expect-error searchPhaseException is not properly typed json attributes: searchPhaseException.error, }) ); diff --git a/src/plugins/data/public/ui/shard_failure_modal/shard_failure_types.ts b/src/plugins/data/public/ui/shard_failure_modal/shard_failure_types.ts index c34a47dc1c6dd..83e4abf55d525 100644 --- a/src/plugins/data/public/ui/shard_failure_modal/shard_failure_types.ts +++ b/src/plugins/data/public/ui/shard_failure_modal/shard_failure_types.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; export interface ShardFailureRequest { docvalue_fields: string[]; _source: unknown; @@ -24,7 +24,7 @@ export interface ShardFailure { type: string; }; reason: string; - lang?: string; + lang?: estypes.ScriptLanguage; script?: string; script_stack?: string[]; type: string; diff --git a/src/plugins/data/server/autocomplete/value_suggestions_route.ts b/src/plugins/data/server/autocomplete/value_suggestions_route.ts index b2568a5a43611..8fa14f8cbbd42 100644 --- a/src/plugins/data/server/autocomplete/value_suggestions_route.ts +++ b/src/plugins/data/server/autocomplete/value_suggestions_route.ts @@ -78,7 +78,7 @@ async function getBody( { timeout, terminate_after }: Record, field: IFieldType | string, query: string, - filters: estypes.QueryContainer[] = [] + filters: estypes.QueryDslQueryContainer[] = [] ) { const isFieldObject = (f: any): f is IFieldType => Boolean(f && f.name); diff --git a/src/plugins/data/server/index_patterns/fetcher/lib/field_capabilities/field_caps_response.ts b/src/plugins/data/server/index_patterns/fetcher/lib/field_capabilities/field_caps_response.ts index c4c1ffa3cf9f9..6db9254b81528 100644 --- a/src/plugins/data/server/index_patterns/fetcher/lib/field_capabilities/field_caps_response.ts +++ b/src/plugins/data/server/index_patterns/fetcher/lib/field_capabilities/field_caps_response.ts @@ -69,7 +69,7 @@ import { FieldDescriptor } from '../../../fetcher'; * @return {Array} */ export function readFieldCapsResponse( - fieldCapsResponse: estypes.FieldCapabilitiesResponse + fieldCapsResponse: estypes.FieldCapsResponse ): FieldDescriptor[] { const capsByNameThenType = fieldCapsResponse.fields; diff --git a/src/plugins/data/server/index_patterns/routes.ts b/src/plugins/data/server/index_patterns/routes.ts index 9bff590b54f1c..d2d8cb82cf646 100644 --- a/src/plugins/data/server/index_patterns/routes.ts +++ b/src/plugins/data/server/index_patterns/routes.ts @@ -21,6 +21,11 @@ import { registerDeleteScriptedFieldRoute } from './routes/scripted_fields/delet import { registerUpdateScriptedFieldRoute } from './routes/scripted_fields/update_scripted_field'; import type { DataPluginStart, DataPluginStartDependencies } from '../plugin'; import { registerManageDefaultIndexPatternRoutes } from './routes/default_index_pattern'; +import { registerCreateRuntimeFieldRoute } from './routes/runtime_fields/create_runtime_field'; +import { registerGetRuntimeFieldRoute } from './routes/runtime_fields/get_runtime_field'; +import { registerDeleteRuntimeFieldRoute } from './routes/runtime_fields/delete_runtime_field'; +import { registerPutRuntimeFieldRoute } from './routes/runtime_fields/put_runtime_field'; +import { registerUpdateRuntimeFieldRoute } from './routes/runtime_fields/update_runtime_field'; export function registerRoutes( http: HttpServiceSetup, @@ -55,6 +60,13 @@ export function registerRoutes( registerDeleteScriptedFieldRoute(router, getStartServices); registerUpdateScriptedFieldRoute(router, getStartServices); + // Runtime Fields API + registerCreateRuntimeFieldRoute(router, getStartServices); + registerGetRuntimeFieldRoute(router, getStartServices); + registerDeleteRuntimeFieldRoute(router, getStartServices); + registerPutRuntimeFieldRoute(router, getStartServices); + registerUpdateRuntimeFieldRoute(router, getStartServices); + router.get( { path: '/api/index_patterns/_fields_for_wildcard', diff --git a/src/plugins/data/server/index_patterns/routes/create_index_pattern.ts b/src/plugins/data/server/index_patterns/routes/create_index_pattern.ts index d076733462622..7049903f84e8c 100644 --- a/src/plugins/data/server/index_patterns/routes/create_index_pattern.ts +++ b/src/plugins/data/server/index_patterns/routes/create_index_pattern.ts @@ -9,7 +9,11 @@ import { schema } from '@kbn/config-schema'; import { IndexPatternSpec } from 'src/plugins/data/common'; import { handleErrors } from './util/handle_errors'; -import { fieldSpecSchema, serializedFieldFormatSchema } from './util/schemas'; +import { + fieldSpecSchema, + runtimeFieldSpecSchema, + serializedFieldFormatSchema, +} from './util/schemas'; import { IRouter, StartServicesAccessor } from '../../../../../core/server'; import type { DataPluginStart, DataPluginStartDependencies } from '../../plugin'; @@ -39,6 +43,7 @@ const indexPatternSpecSchema = schema.object({ ) ), allowNoIndex: schema.maybe(schema.boolean()), + runtimeFieldMap: schema.maybe(schema.recordOf(schema.string(), runtimeFieldSpecSchema)), }); export const registerCreateIndexPatternRoute = ( @@ -66,6 +71,7 @@ export const registerCreateIndexPatternRoute = ( elasticsearchClient ); const body = req.body; + const indexPattern = await indexPatternsService.createAndSave( body.index_pattern as IndexPatternSpec, body.override, diff --git a/src/plugins/data/server/index_patterns/routes/runtime_fields/create_runtime_field.ts b/src/plugins/data/server/index_patterns/routes/runtime_fields/create_runtime_field.ts new file mode 100644 index 0000000000000..faf6d87b6d10b --- /dev/null +++ b/src/plugins/data/server/index_patterns/routes/runtime_fields/create_runtime_field.ts @@ -0,0 +1,74 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { schema } from '@kbn/config-schema'; +import { handleErrors } from '../util/handle_errors'; +import { runtimeFieldSpecSchema } from '../util/schemas'; +import { IRouter, StartServicesAccessor } from '../../../../../../core/server'; +import type { DataPluginStart, DataPluginStartDependencies } from '../../../plugin'; + +export const registerCreateRuntimeFieldRoute = ( + router: IRouter, + getStartServices: StartServicesAccessor +) => { + router.post( + { + path: '/api/index_patterns/index_pattern/{id}/runtime_field', + validate: { + params: schema.object({ + id: schema.string({ + minLength: 1, + maxLength: 1_000, + }), + }), + body: schema.object({ + name: schema.string({ + minLength: 1, + maxLength: 1_000, + }), + runtimeField: runtimeFieldSpecSchema, + }), + }, + }, + + handleErrors(async (ctx, req, res) => { + const savedObjectsClient = ctx.core.savedObjects.client; + const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; + const [, , { indexPatterns }] = await getStartServices(); + const indexPatternsService = await indexPatterns.indexPatternsServiceFactory( + savedObjectsClient, + elasticsearchClient + ); + const id = req.params.id; + const { name, runtimeField } = req.body; + + const indexPattern = await indexPatternsService.get(id); + + if (indexPattern.fields.getByName(name)) { + throw new Error(`Field [name = ${name}] already exists.`); + } + + indexPattern.addRuntimeField(name, runtimeField); + + const addedField = indexPattern.fields.getByName(name); + if (!addedField) throw new Error(`Could not create a field [name = ${name}].`); + + await indexPatternsService.updateSavedObject(indexPattern); + + const savedField = indexPattern.fields.getByName(name); + if (!savedField) throw new Error(`Could not create a field [name = ${name}].`); + + return res.ok({ + body: { + field: savedField.toSpec(), + index_pattern: indexPattern.toSpec(), + }, + }); + }) + ); +}; diff --git a/src/plugins/data/server/index_patterns/routes/runtime_fields/delete_runtime_field.ts b/src/plugins/data/server/index_patterns/routes/runtime_fields/delete_runtime_field.ts new file mode 100644 index 0000000000000..58b8529d7cf5a --- /dev/null +++ b/src/plugins/data/server/index_patterns/routes/runtime_fields/delete_runtime_field.ts @@ -0,0 +1,64 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { schema } from '@kbn/config-schema'; +import { ErrorIndexPatternFieldNotFound } from '../../error'; +import { handleErrors } from '../util/handle_errors'; +import { IRouter, StartServicesAccessor } from '../../../../../../core/server'; +import type { DataPluginStart, DataPluginStartDependencies } from '../../../plugin'; + +export const registerDeleteRuntimeFieldRoute = ( + router: IRouter, + getStartServices: StartServicesAccessor +) => { + router.delete( + { + path: '/api/index_patterns/index_pattern/{id}/runtime_field/{name}', + validate: { + params: schema.object({ + id: schema.string({ + minLength: 1, + maxLength: 1_000, + }), + name: schema.string({ + minLength: 1, + maxLength: 1_000, + }), + }), + }, + }, + handleErrors(async (ctx, req, res) => { + const savedObjectsClient = ctx.core.savedObjects.client; + const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; + const [, , { indexPatterns }] = await getStartServices(); + const indexPatternsService = await indexPatterns.indexPatternsServiceFactory( + savedObjectsClient, + elasticsearchClient + ); + const id = req.params.id; + const name = req.params.name; + + const indexPattern = await indexPatternsService.get(id); + const field = indexPattern.fields.getByName(name); + + if (!field) { + throw new ErrorIndexPatternFieldNotFound(id, name); + } + + if (!field.runtimeField) { + throw new Error('Only runtime fields can be deleted.'); + } + + indexPattern.removeRuntimeField(name); + + await indexPatternsService.updateSavedObject(indexPattern); + + return res.ok(); + }) + ); +}; diff --git a/src/plugins/data/server/index_patterns/routes/runtime_fields/get_runtime_field.ts b/src/plugins/data/server/index_patterns/routes/runtime_fields/get_runtime_field.ts new file mode 100644 index 0000000000000..6bc2bf396c0b4 --- /dev/null +++ b/src/plugins/data/server/index_patterns/routes/runtime_fields/get_runtime_field.ts @@ -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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { schema } from '@kbn/config-schema'; +import { ErrorIndexPatternFieldNotFound } from '../../error'; +import { handleErrors } from '../util/handle_errors'; +import { IRouter, StartServicesAccessor } from '../../../../../../core/server'; +import type { DataPluginStart, DataPluginStartDependencies } from '../../../plugin'; + +export const registerGetRuntimeFieldRoute = ( + router: IRouter, + getStartServices: StartServicesAccessor +) => { + router.get( + { + path: '/api/index_patterns/index_pattern/{id}/runtime_field/{name}', + validate: { + params: schema.object({ + id: schema.string({ + minLength: 1, + maxLength: 1_000, + }), + name: schema.string({ + minLength: 1, + maxLength: 1_000, + }), + }), + }, + }, + + handleErrors(async (ctx, req, res) => { + const savedObjectsClient = ctx.core.savedObjects.client; + const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; + const [, , { indexPatterns }] = await getStartServices(); + const indexPatternsService = await indexPatterns.indexPatternsServiceFactory( + savedObjectsClient, + elasticsearchClient + ); + const id = req.params.id; + const name = req.params.name; + + const indexPattern = await indexPatternsService.get(id); + + const field = indexPattern.fields.getByName(name); + + if (!field) { + throw new ErrorIndexPatternFieldNotFound(id, name); + } + + if (!field.runtimeField) { + throw new Error('Only runtime fields can be retrieved.'); + } + + return res.ok({ + body: { + field: field.toSpec(), + runtimeField: indexPattern.getRuntimeField(name), + }, + }); + }) + ); +}; diff --git a/src/plugins/data/server/index_patterns/routes/runtime_fields/put_runtime_field.ts b/src/plugins/data/server/index_patterns/routes/runtime_fields/put_runtime_field.ts new file mode 100644 index 0000000000000..a5e92fa5a36ec --- /dev/null +++ b/src/plugins/data/server/index_patterns/routes/runtime_fields/put_runtime_field.ts @@ -0,0 +1,76 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { schema } from '@kbn/config-schema'; +import { handleErrors } from '../util/handle_errors'; +import { runtimeFieldSpecSchema } from '../util/schemas'; +import { IRouter, StartServicesAccessor } from '../../../../../../core/server'; +import type { DataPluginStart, DataPluginStartDependencies } from '../../../plugin'; + +export const registerPutRuntimeFieldRoute = ( + router: IRouter, + getStartServices: StartServicesAccessor +) => { + router.put( + { + path: '/api/index_patterns/index_pattern/{id}/runtime_field', + validate: { + params: schema.object({ + id: schema.string({ + minLength: 1, + maxLength: 1_000, + }), + }), + body: schema.object({ + name: schema.string({ + minLength: 1, + maxLength: 1_000, + }), + runtimeField: runtimeFieldSpecSchema, + }), + }, + }, + handleErrors(async (ctx, req, res) => { + const savedObjectsClient = ctx.core.savedObjects.client; + const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; + const [, , { indexPatterns }] = await getStartServices(); + const indexPatternsService = await indexPatterns.indexPatternsServiceFactory( + savedObjectsClient, + elasticsearchClient + ); + const id = req.params.id; + const { name, runtimeField } = req.body; + + const indexPattern = await indexPatternsService.get(id); + + const oldFieldObject = indexPattern.fields.getByName(name); + + if (oldFieldObject && !oldFieldObject.runtimeField) { + throw new Error('Only runtime fields can be updated'); + } + + if (oldFieldObject) { + indexPattern.removeRuntimeField(name); + } + + indexPattern.addRuntimeField(name, runtimeField); + + await indexPatternsService.updateSavedObject(indexPattern); + + const fieldObject = indexPattern.fields.getByName(name); + if (!fieldObject) throw new Error(`Could not create a field [name = ${name}].`); + + return res.ok({ + body: { + field: fieldObject.toSpec(), + index_pattern: indexPattern.toSpec(), + }, + }); + }) + ); +}; diff --git a/src/plugins/data/server/index_patterns/routes/runtime_fields/update_runtime_field.ts b/src/plugins/data/server/index_patterns/routes/runtime_fields/update_runtime_field.ts new file mode 100644 index 0000000000000..3f3aae46c4388 --- /dev/null +++ b/src/plugins/data/server/index_patterns/routes/runtime_fields/update_runtime_field.ts @@ -0,0 +1,84 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { schema } from '@kbn/config-schema'; +import { RuntimeField } from 'src/plugins/data/common'; +import { ErrorIndexPatternFieldNotFound } from '../../error'; +import { handleErrors } from '../util/handle_errors'; +import { runtimeFieldSpec, runtimeFieldSpecTypeSchema } from '../util/schemas'; +import { IRouter, StartServicesAccessor } from '../../../../../../core/server'; +import type { DataPluginStart, DataPluginStartDependencies } from '../../../plugin'; + +export const registerUpdateRuntimeFieldRoute = ( + router: IRouter, + getStartServices: StartServicesAccessor +) => { + router.post( + { + path: '/api/index_patterns/index_pattern/{id}/runtime_field/{name}', + validate: { + params: schema.object({ + id: schema.string({ + minLength: 1, + maxLength: 1_000, + }), + name: schema.string({ + minLength: 1, + maxLength: 1_000, + }), + }), + body: schema.object({ + name: schema.never(), + runtimeField: schema.object({ + ...runtimeFieldSpec, + // We need to overwrite the below fields on top of `runtimeFieldSpec`, + // because some fields would be optional + type: schema.maybe(runtimeFieldSpecTypeSchema), + }), + }), + }, + }, + handleErrors(async (ctx, req, res) => { + const savedObjectsClient = ctx.core.savedObjects.client; + const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; + const [, , { indexPatterns }] = await getStartServices(); + const indexPatternsService = await indexPatterns.indexPatternsServiceFactory( + savedObjectsClient, + elasticsearchClient + ); + const id = req.params.id; + const name = req.params.name; + const runtimeField = req.body.runtimeField as Partial; + + const indexPattern = await indexPatternsService.get(id); + const existingRuntimeField = indexPattern.getRuntimeField(name); + + if (!existingRuntimeField) { + throw new ErrorIndexPatternFieldNotFound(id, name); + } + + indexPattern.removeRuntimeField(name); + indexPattern.addRuntimeField(name, { + ...existingRuntimeField, + ...runtimeField, + }); + + await indexPatternsService.updateSavedObject(indexPattern); + + const fieldObject = indexPattern.fields.getByName(name); + if (!fieldObject) throw new Error(`Could not create a field [name = ${name}].`); + + return res.ok({ + body: { + field: fieldObject.toSpec(), + index_pattern: indexPattern.toSpec(), + }, + }); + }) + ); +}; diff --git a/src/plugins/data/server/index_patterns/routes/update_index_pattern.ts b/src/plugins/data/server/index_patterns/routes/update_index_pattern.ts index c1509b9b848be..1c88550c154c5 100644 --- a/src/plugins/data/server/index_patterns/routes/update_index_pattern.ts +++ b/src/plugins/data/server/index_patterns/routes/update_index_pattern.ts @@ -8,7 +8,11 @@ import { schema } from '@kbn/config-schema'; import { handleErrors } from './util/handle_errors'; -import { fieldSpecSchema, serializedFieldFormatSchema } from './util/schemas'; +import { + fieldSpecSchema, + runtimeFieldSpecSchema, + serializedFieldFormatSchema, +} from './util/schemas'; import { IRouter, StartServicesAccessor } from '../../../../../core/server'; import type { DataPluginStart, DataPluginStartDependencies } from '../../plugin'; @@ -28,6 +32,7 @@ const indexPatternUpdateSchema = schema.object({ fieldFormats: schema.maybe(schema.recordOf(schema.string(), serializedFieldFormatSchema)), fields: schema.maybe(schema.recordOf(schema.string(), fieldSpecSchema)), allowNoIndex: schema.maybe(schema.boolean()), + runtimeFieldMap: schema.maybe(schema.recordOf(schema.string(), runtimeFieldSpecSchema)), }); export const registerUpdateIndexPatternRoute = ( @@ -78,6 +83,7 @@ export const registerUpdateIndexPatternRoute = ( type, typeMeta, fields, + runtimeFieldMap, }, } = req.body; @@ -131,6 +137,11 @@ export const registerUpdateIndexPatternRoute = ( ); } + if (runtimeFieldMap !== undefined) { + changeCount++; + indexPattern.replaceAllRuntimeFields(runtimeFieldMap); + } + if (changeCount < 1) { throw new Error('Index pattern change set is empty.'); } diff --git a/src/plugins/data/server/index_patterns/routes/util/schemas.ts b/src/plugins/data/server/index_patterns/routes/util/schemas.ts index d916423c4fc69..79ee1ffa1ab97 100644 --- a/src/plugins/data/server/index_patterns/routes/util/schemas.ts +++ b/src/plugins/data/server/index_patterns/routes/util/schemas.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import { schema } from '@kbn/config-schema'; +import { schema, Type } from '@kbn/config-schema'; +import { RUNTIME_FIELD_TYPES, RuntimeType } from '../../../../common'; export const serializedFieldFormatSchema = schema.object({ id: schema.maybe(schema.string()), @@ -52,4 +53,24 @@ export const fieldSpecSchemaFields = { shortDotsEnable: schema.maybe(schema.boolean()), }; -export const fieldSpecSchema = schema.object(fieldSpecSchemaFields); +export const fieldSpecSchema = schema.object(fieldSpecSchemaFields, { + // Allow and ignore unknowns to make fields transient. + // Because `fields` have a bunch of calculated fields + // this allows to retrieve an index pattern and then to re-create by using the retrieved payload + unknowns: 'ignore', +}); + +export const runtimeFieldSpecTypeSchema = schema.oneOf( + RUNTIME_FIELD_TYPES.map((runtimeFieldType) => schema.literal(runtimeFieldType)) as [ + Type + ] +); +export const runtimeFieldSpec = { + type: runtimeFieldSpecTypeSchema, + script: schema.maybe( + schema.object({ + source: schema.string(), + }) + ), +}; +export const runtimeFieldSpecSchema = schema.object(runtimeFieldSpec); diff --git a/src/plugins/data/server/search/routes/call_msearch.ts b/src/plugins/data/server/search/routes/call_msearch.ts index 0c238adf831bd..4a7db9517c688 100644 --- a/src/plugins/data/server/search/routes/call_msearch.ts +++ b/src/plugins/data/server/search/routes/call_msearch.ts @@ -8,7 +8,8 @@ import { Observable } from 'rxjs'; import { first } from 'rxjs/operators'; -import { IUiSettingsClient, IScopedClusterClient, SharedGlobalConfig } from 'src/core/server'; +import type { IUiSettingsClient, IScopedClusterClient, SharedGlobalConfig } from 'src/core/server'; +import type { estypes } from '@elastic/elasticsearch'; import type { MsearchRequestBody, MsearchResponse } from '../../../common/search/search_source'; import { getKbnServerError } from '../../../../kibana_utils/server'; @@ -78,7 +79,9 @@ export function getCallMsearch(dependencies: CallMsearchDependencies) { body: { ...response, body: { - responses: response.body.responses?.map((r) => shimHitsTotal(r)), + responses: response.body.responses?.map((r) => + shimHitsTotal(r as estypes.SearchResponse) + ), }, }, }; diff --git a/src/plugins/data/server/search/routes/msearch.test.ts b/src/plugins/data/server/search/routes/msearch.test.ts index 6ae8612cceb1e..303f83582f737 100644 --- a/src/plugins/data/server/search/routes/msearch.test.ts +++ b/src/plugins/data/server/search/routes/msearch.test.ts @@ -116,7 +116,7 @@ describe('msearch route', () => { const error: any = mockResponse.customError.mock.calls[0][0]; expect(error.statusCode).toBe(400); - expect(error.body.message).toBe('json_e_o_f_exception'); + expect(error.body.message).toMatch(/json_e_o_f_exception/); expect(error.body.attributes).toBe(jsonEofException.error); }); diff --git a/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.ts b/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.ts index 0e3acedfe12f6..91de0fca3674c 100644 --- a/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.ts +++ b/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.ts @@ -54,7 +54,8 @@ export const eqlSearchStrategyProvider = ( }; const promise = id ? client.get({ ...params, id }, request.options) - : client.search(params as EqlSearchStrategyRequest['params'], request.options); + : // @ts-expect-error EqlRequestParams | undefined is not assignable to EqlRequestParams + client.search(params as EqlSearchStrategyRequest['params'], request.options); const response = await shimAbortSignal(promise, options.abortSignal); return toEqlKibanaSearchResponse(response as ApiResponse); }; diff --git a/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.test.ts b/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.test.ts index 216318339622f..56b26a7ebe02c 100644 --- a/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.test.ts +++ b/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.test.ts @@ -293,7 +293,7 @@ describe('ES search strategy', () => { expect(mockGetCaller).toBeCalled(); const request = mockGetCaller.mock.calls[0][0]; - expect(request).toEqual({ id, body: { keep_alive: keepAlive } }); + expect(request).toEqual({ id, keep_alive: keepAlive }); }); it('throws normalized error on ElasticsearchClientError', async () => { diff --git a/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.ts b/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.ts index ab6162f756ea8..d6af00ada80fa 100644 --- a/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.ts +++ b/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.ts @@ -177,7 +177,7 @@ export const enhancedEsSearchStrategyProvider = ( const client = useInternalUser ? esClient.asInternalUser : esClient.asCurrentUser; await client.asyncSearch.get({ id, - body: { keep_alive: keepAlive }, + keep_alive: keepAlive, }); } catch (e) { throw getKbnServerError(e); diff --git a/src/plugins/data/server/server.api.md b/src/plugins/data/server/server.api.md index f57ba27488103..783bd8d2fcd0e 100644 --- a/src/plugins/data/server/server.api.md +++ b/src/plugins/data/server/server.api.md @@ -6,10 +6,8 @@ import { $Values } from '@kbn/utility-types'; import { Adapters } from 'src/plugins/inspector/common'; -import { Aggregate } from '@elastic/elasticsearch/api/types'; import { Assign } from '@kbn/utility-types'; import { BfetchServerSetup } from 'src/plugins/bfetch/server'; -import { Bucket } from '@elastic/elasticsearch/api/types'; import { ConfigDeprecationProvider } from '@kbn/config'; import { CoreSetup } from 'src/core/server'; import { CoreSetup as CoreSetup_2 } from 'kibana/server'; @@ -713,7 +711,7 @@ export interface IFieldType { // (undocumented) format?: any; // (undocumented) - lang?: string; + lang?: estypes.ScriptLanguage; // (undocumented) name: string; // (undocumented) @@ -818,6 +816,7 @@ export class IndexPattern implements IIndexPattern { typeMeta?: string | undefined; type?: string | undefined; }; + getRuntimeField(name: string): RuntimeField | null; // @deprecated (undocumented) getScriptedFields(): IndexPatternField[]; getSourceFiltering(): { @@ -825,6 +824,7 @@ export class IndexPattern implements IIndexPattern { }; // (undocumented) getTimeField(): IndexPatternField | undefined; + hasRuntimeField(name: string): boolean; // (undocumented) id?: string; // @deprecated (undocumented) @@ -838,6 +838,7 @@ export class IndexPattern implements IIndexPattern { removeRuntimeField(name: string): void; // @deprecated removeScriptedField(fieldName: string): void; + replaceAllRuntimeFields(newFields: Record): void; resetOriginalSavedObjectBody: () => void; // (undocumented) protected setFieldAttrs(fieldName: string, attrName: K, value: FieldAttrSet[K]): void; @@ -1420,22 +1421,22 @@ export const shimAbortSignal: (promise: TransportRequestPromise, signal?: export function shimHitsTotal(response: estypes.SearchResponse, { legacyHitsTotal }?: ISearchOptions): { hits: { total: any; - hits: estypes.Hit[]; + hits: estypes.SearchHit[]; max_score?: number | undefined; }; took: number; timed_out: boolean; _shards: estypes.ShardStatistics; - aggregations?: Record | undefined; + aggregations?: Record | undefined; _clusters?: estypes.ClusterStatistics | undefined; documents?: unknown[] | undefined; fields?: Record | undefined; max_score?: number | undefined; num_reduce_phases?: number | undefined; - profile?: estypes.Profile | undefined; + profile?: estypes.SearchProfile | undefined; pit_id?: string | undefined; _scroll_id?: string | undefined; - suggest?: Record[]> | undefined; + suggest?: Record[]> | undefined; terminated_early?: boolean | undefined; }; diff --git a/src/plugins/discover/public/application/angular/create_discover_grid_directive.tsx b/src/plugins/discover/public/application/angular/create_discover_grid_directive.tsx index 1fc8edcb4d065..810be94ce24b0 100644 --- a/src/plugins/discover/public/application/angular/create_discover_grid_directive.tsx +++ b/src/plugins/discover/public/application/angular/create_discover_grid_directive.tsx @@ -51,5 +51,6 @@ export function createDiscoverGridDirective(reactDirective: any) { ['settings', { watchDepth: 'reference' }], ['showTimeCol', { watchDepth: 'value' }], ['sort', { watchDepth: 'value' }], + ['className', { watchDepth: 'value' }], ]); } diff --git a/src/plugins/discover/public/application/angular/doc_table/create_doc_table_embeddable.tsx b/src/plugins/discover/public/application/angular/doc_table/create_doc_table_embeddable.tsx new file mode 100644 index 0000000000000..19913ed6de870 --- /dev/null +++ b/src/plugins/discover/public/application/angular/doc_table/create_doc_table_embeddable.tsx @@ -0,0 +1,85 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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, { useRef, useEffect } from 'react'; +import { I18nProvider } from '@kbn/i18n/react'; +import { IScope } from 'angular'; +import { getServices } from '../../../kibana_services'; +import { DocTableLegacyProps, injectAngularElement } from './create_doc_table_react'; + +type AngularEmbeddableScope = IScope & { renderProps?: DocTableEmbeddableProps }; + +export interface DocTableEmbeddableProps extends Partial { + refs: HTMLElement; +} + +function getRenderFn(domNode: Element, props: DocTableEmbeddableProps) { + const directive = { + template: ``, + }; + + return async () => { + try { + const injector = await getServices().getEmbeddableInjector(); + return await injectAngularElement(domNode, directive.template, props, injector); + } catch (e) { + // eslint-disable-next-line no-console + console.error(e); + throw e; + } + }; +} + +export function DiscoverDocTableEmbeddable(props: DocTableEmbeddableProps) { + return ( + + + + ); +} + +function DocTableLegacyInner(renderProps: DocTableEmbeddableProps) { + const scope = useRef(); + + useEffect(() => { + if (renderProps.refs && !scope.current) { + const fn = getRenderFn(renderProps.refs, renderProps); + fn().then((newScope) => { + scope.current = newScope; + }); + } else if (scope?.current) { + scope.current.renderProps = { ...renderProps }; + scope.current.$applyAsync(); + } + }, [renderProps]); + + useEffect(() => { + return () => { + scope.current?.$destroy(); + }; + }, []); + return ; +} diff --git a/src/plugins/discover/public/application/angular/doc_table/create_doc_table_react.tsx b/src/plugins/discover/public/application/angular/doc_table/create_doc_table_react.tsx index 1135d79b6b69e..681418c1bd7cf 100644 --- a/src/plugins/discover/public/application/angular/doc_table/create_doc_table_react.tsx +++ b/src/plugins/discover/public/application/angular/doc_table/create_doc_table_react.tsx @@ -21,7 +21,7 @@ export interface DocTableLegacyProps { searchDescription?: string; searchTitle?: string; onFilter: (field: IndexPatternField | string, value: string, type: '+' | '-') => void; - rows: estypes.Hit[]; + rows: estypes.SearchHit[]; indexPattern: IIndexPattern; minimumVisibleRows?: number; onAddColumn?: (column: string) => void; diff --git a/src/plugins/discover/public/application/angular/doc_table/index.ts b/src/plugins/discover/public/application/angular/doc_table/index.ts index 2aaf5a8bda7b6..3a8f170f8680d 100644 --- a/src/plugins/discover/public/application/angular/doc_table/index.ts +++ b/src/plugins/discover/public/application/angular/doc_table/index.ts @@ -9,3 +9,4 @@ export { createDocTableDirective } from './doc_table'; export { getSort, getSortArray } from './lib/get_sort'; export { getSortForSearchSource } from './lib/get_sort_for_search_source'; +export { getDefaultSort } from './lib/get_default_sort'; diff --git a/src/plugins/discover/public/application/apps/main/components/layout/discover_layout.tsx b/src/plugins/discover/public/application/apps/main/components/layout/discover_layout.tsx index ce987e2870466..0430614d413b6 100644 --- a/src/plugins/discover/public/application/apps/main/components/layout/discover_layout.tsx +++ b/src/plugins/discover/public/application/apps/main/components/layout/discover_layout.tsx @@ -346,6 +346,7 @@ export function DiscoverLayout({ verticalPosition={contentCentered ? 'center' : undefined} horizontalPosition={contentCentered ? 'center' : undefined} paddingSize="none" + hasShadow={false} className={classNames('dscPageContent', { 'dscPageContent--centered': contentCentered, })} diff --git a/src/plugins/discover/public/application/components/discover_grid/discover_grid.tsx b/src/plugins/discover/public/application/components/discover_grid/discover_grid.tsx index 65a6ee80564e9..f1c56b7a57195 100644 --- a/src/plugins/discover/public/application/components/discover_grid/discover_grid.tsx +++ b/src/plugins/discover/public/application/components/discover_grid/discover_grid.tsx @@ -51,6 +51,10 @@ export interface DiscoverGridProps { * Determines which element labels the grid for ARIA */ ariaLabelledBy: string; + /** + * Optional class name to apply + */ + className?: string; /** * Determines which columns are displayed */ @@ -175,6 +179,7 @@ export const DiscoverGrid = ({ isSortEnabled = true, isPaginationEnabled = true, controlColumnIds = ['openDetails', 'select'], + className, }: DiscoverGridProps) => { const [selectedDocs, setSelectedDocs] = useState([]); const [isFilterActive, setIsFilterActive] = useState(false); @@ -284,6 +289,7 @@ export const DiscoverGrid = ({ ), [displayedColumns, indexPattern, showTimeCol, settings, defaultColumns, isSortEnabled] ); + const schemaDetectors = useMemo(() => getSchemaDetectors(), []); const columnsVisibility = useMemo( () => ({ @@ -368,6 +374,7 @@ export const DiscoverGrid = ({ data-title={searchTitle} data-description={searchDescription} data-document-number={displayedRows.length} + className={className} > { + const props = getProps(); + const component = mountWithIntl(); + findTestSubject(component, 'docTableDetailsFlyout').simulate('keydown', { key: 'ArrowRight' }); + expect(props.setExpandedDoc).toHaveBeenCalledWith(expect.objectContaining({ _id: '2' })); + component.setProps({ ...props, hit: props.hits[1] }); + findTestSubject(component, 'docTableDetailsFlyout').simulate('keydown', { key: 'ArrowLeft' }); + expect(props.setExpandedDoc).toHaveBeenCalledWith(expect.objectContaining({ _id: '1' })); + }); + + it('should not navigate with keypresses when already at the border of documents', () => { + const props = getProps(); + const component = mountWithIntl(); + findTestSubject(component, 'docTableDetailsFlyout').simulate('keydown', { key: 'ArrowLeft' }); + expect(props.setExpandedDoc).not.toHaveBeenCalled(); + component.setProps({ ...props, hit: props.hits[props.hits.length - 1] }); + findTestSubject(component, 'docTableDetailsFlyout').simulate('keydown', { key: 'ArrowRight' }); + expect(props.setExpandedDoc).not.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 3894127891041..aaae9afe6531a 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 @@ -21,6 +21,7 @@ import { EuiPortal, EuiPagination, EuiHideFor, + keys, } from '@elastic/eui'; import { DocViewer } from '../doc_viewer/doc_viewer'; import { IndexPattern } from '../../../kibana_services'; @@ -87,9 +88,25 @@ export function DiscoverGridFlyout({ [hits, setExpandedDoc] ); + const onKeyDown = useCallback( + (ev: React.KeyboardEvent) => { + if (ev.key === keys.ARROW_LEFT || ev.key === keys.ARROW_RIGHT) { + ev.preventDefault(); + ev.stopPropagation(); + setPage(activePage + (ev.key === keys.ARROW_RIGHT ? 1 : -1)); + } + }, + [activePage, setPage] + ); + return ( - + { settings?: DiscoverGridSettings; description?: string; - sort?: SortOrder[]; sharedItemTitle?: string; inspectorAdapters?: Adapters; - setSortOrder?: (sortPair: SortOrder[]) => void; - setColumns?: (columns: string[]) => void; - removeColumn?: (column: string) => void; - addColumn?: (column: string) => void; - moveColumn?: (column: string, index: number) => void; + filter?: (field: IFieldType, value: string[], operator: string) => void; hits?: ElasticSearchHit[]; - indexPattern?: IndexPattern; totalHitCount?: number; - isLoading?: boolean; - showTimeCol?: boolean; - useNewFieldsApi?: boolean; + onMoveColumn?: (column: string, index: number) => void; } interface SearchEmbeddableConfig { - $rootScope: ng.IRootScopeService; - $compile: ng.ICompileService; savedSearch: SavedSearch; editUrl: string; editPath: string; @@ -77,17 +66,13 @@ interface SearchEmbeddableConfig { services: DiscoverServices; } -export class SearchEmbeddable +export class SavedSearchEmbeddable extends Embeddable implements ISearchEmbeddable { private readonly savedSearch: SavedSearch; - private $rootScope: ng.IRootScopeService; - private $compile: ng.ICompileService; private inspectorAdapters: Adapters; - private searchScope?: SearchScope; private panelTitle: string = ''; - private filtersSearchSource?: ISearchSource; - private searchInstance?: JQLite; + private filtersSearchSource!: ISearchSource; private subscription?: Subscription; public readonly type = SEARCH_EMBEDDABLE_TYPE; private filterManager: FilterManager; @@ -98,11 +83,12 @@ export class SearchEmbeddable private prevFilters?: Filter[]; private prevQuery?: Query; private prevSearchSessionId?: string; + private searchProps?: SearchProps; + + private node?: HTMLElement; constructor( { - $rootScope, - $compile, savedSearch, editUrl, editPath, @@ -130,164 +116,24 @@ export class SearchEmbeddable this.services = services; this.filterManager = filterManager; this.savedSearch = savedSearch; - this.$rootScope = $rootScope; - this.$compile = $compile; this.inspectorAdapters = { requests: new RequestAdapter(), }; - this.initializeSearchScope(); + this.initializeSearchEmbeddableProps(); this.subscription = this.getUpdated$().subscribe(() => { this.panelTitle = this.output.title || ''; - if (this.searchScope) { - this.pushContainerStateParamsToScope(this.searchScope); + if (this.searchProps) { + this.pushContainerStateParamsToProps(this.searchProps); } }); } - public getInspectorAdapters() { - return this.inspectorAdapters; - } - - public getSavedSearch() { - return this.savedSearch; - } - - /** - * - * @param {Element} domNode - */ - public render(domNode: HTMLElement) { - if (!this.searchScope) { - throw new Error('Search scope not defined'); - } - this.searchInstance = this.$compile( - this.services.uiSettings.get('doc_table:legacy') ? searchTemplate : searchTemplateGrid - )(this.searchScope); - const rootNode = angular.element(domNode); - rootNode.append(this.searchInstance); - - this.pushContainerStateParamsToScope(this.searchScope); - } - - public destroy() { - super.destroy(); - this.savedSearch.destroy(); - if (this.searchInstance) { - this.searchInstance.remove(); - } - if (this.searchScope) { - this.searchScope.$destroy(); - delete this.searchScope; - } - if (this.subscription) { - this.subscription.unsubscribe(); - } - - if (this.abortController) this.abortController.abort(); - } - - private initializeSearchScope() { - const searchScope: SearchScope = (this.searchScope = this.$rootScope.$new()); - - searchScope.description = this.savedSearch.description; - searchScope.inspectorAdapters = this.inspectorAdapters; - - const { searchSource } = this.savedSearch; - const indexPattern = (searchScope.indexPattern = searchSource.getField('index'))!; - - if (!this.savedSearch.sort || !this.savedSearch.sort.length) { - this.savedSearch.sort = getDefaultSort( - indexPattern, - getServices().uiSettings.get(SORT_DEFAULT_ORDER_SETTING, 'desc') - ); - } - - const timeRangeSearchSource = searchSource.create(); - timeRangeSearchSource.setField('filter', () => { - if (!this.searchScope || !this.input.timeRange) return; - return this.services.timefilter.createFilter(indexPattern, this.input.timeRange); - }); - - this.filtersSearchSource = searchSource.create(); - this.filtersSearchSource.setParent(timeRangeSearchSource); - - searchSource.setParent(this.filtersSearchSource); - - this.pushContainerStateParamsToScope(searchScope); - - searchScope.setSortOrder = (sort) => { - this.updateInput({ sort }); - }; - - searchScope.isLoading = true; - - const useNewFieldsApi = !getServices().uiSettings.get(SEARCH_FIELDS_FROM_SOURCE, false); - searchScope.useNewFieldsApi = useNewFieldsApi; - - searchScope.addColumn = (columnName: string) => { - if (!searchScope.columns) { - return; - } - const columns = columnActions.addColumn(searchScope.columns, columnName, useNewFieldsApi); - this.updateInput({ columns }); - }; - - searchScope.removeColumn = (columnName: string) => { - if (!searchScope.columns) { - return; - } - const columns = columnActions.removeColumn(searchScope.columns, columnName, useNewFieldsApi); - this.updateInput({ columns }); - }; - - searchScope.moveColumn = (columnName, newIndex: number) => { - if (!searchScope.columns) { - return; - } - const columns = columnActions.moveColumn(searchScope.columns, columnName, newIndex); - this.updateInput({ columns }); - }; - - searchScope.setColumns = (columns: string[]) => { - this.updateInput({ columns }); - }; - - if (this.savedSearch.grid) { - searchScope.settings = this.savedSearch.grid; - } - searchScope.showTimeCol = !this.services.uiSettings.get(DOC_HIDE_TIME_COLUMN_SETTING, false); - - searchScope.filter = async (field, value, operator) => { - let filters = esFilters.generateFilters( - this.filterManager, - field, - value, - operator, - indexPattern.id! - ); - filters = filters.map((filter) => ({ - ...filter, - $state: { store: esFilters.FilterStateStore.APP_STATE }, - })); - - await this.executeTriggerActions(APPLY_FILTER_TRIGGER, { - embeddable: this, - filters, - }); - }; - } - - public reload() { - if (this.searchScope) - this.pushContainerStateParamsToScope(this.searchScope, { forceFetch: true }); - } - private fetch = async () => { const searchSessionId = this.input.searchSessionId; const useNewFieldsApi = !this.services.uiSettings.get(SEARCH_FIELDS_FROM_SOURCE, false); - if (!this.searchScope) return; + if (!this.searchProps) return; const { searchSource } = this.savedSearch; @@ -299,8 +145,8 @@ export class SearchEmbeddable searchSource.setField( 'sort', getSortForSearchSource( - this.searchScope.sort, - this.searchScope.indexPattern, + this.searchProps!.sort, + this.searchProps!.indexPattern, this.services.uiSettings.get(SORT_DEFAULT_ORDER_SETTING) ) ); @@ -310,8 +156,8 @@ export class SearchEmbeddable searchSource.setField('fields', [fields]); } else { searchSource.removeField('fields'); - if (this.searchScope.indexPattern) { - const fieldNames = this.searchScope.indexPattern.fields.map((field) => field.name); + if (this.searchProps.indexPattern) { + const fieldNames = this.searchProps.indexPattern.fields.map((field) => field.name); searchSource.setField('fieldsFromSource', fieldNames); } } @@ -319,9 +165,8 @@ export class SearchEmbeddable // Log request to inspector this.inspectorAdapters.requests!.reset(); - this.searchScope.$apply(() => { - this.searchScope!.isLoading = true; - }); + this.searchProps!.isLoading = true; + this.updateOutput({ loading: true, error: undefined }); try { @@ -344,64 +189,222 @@ export class SearchEmbeddable .toPromise(); this.updateOutput({ loading: false, error: undefined }); - // Apply the changes to the angular scope - this.searchScope.$apply(() => { - this.searchScope!.hits = resp.hits.hits; - this.searchScope!.totalHitCount = resp.hits.total as number; - this.searchScope!.isLoading = false; - }); + this.searchProps!.rows = resp.hits.hits; + this.searchProps!.totalHitCount = resp.hits.total as number; + this.searchProps!.isLoading = false; } catch (error) { this.updateOutput({ loading: false, error }); - this.searchScope.$apply(() => { - this.searchScope!.isLoading = false; - }); + + this.searchProps!.isLoading = false; } }; - private pushContainerStateParamsToScope( - searchScope: SearchScope, + private initializeSearchEmbeddableProps() { + const { searchSource } = this.savedSearch; + + const indexPattern = searchSource.getField('index'); + + if (!indexPattern) { + return; + } + + if (!this.savedSearch.sort || !this.savedSearch.sort.length) { + this.savedSearch.sort = getDefaultSort( + indexPattern, + getServices().uiSettings.get(SORT_DEFAULT_ORDER_SETTING, 'desc') + ); + } + + const props: SearchProps = { + columns: this.savedSearch.columns, + indexPattern, + isLoading: false, + sort: getDefaultSort( + indexPattern, + getServices().uiSettings.get(SORT_DEFAULT_ORDER_SETTING, 'desc') + ), + rows: [], + searchDescription: this.savedSearch.description, + description: this.savedSearch.description, + inspectorAdapters: this.inspectorAdapters, + searchTitle: this.savedSearch.lastSavedTitle, + services: this.services, + onAddColumn: (columnName: string) => { + if (!props.columns) { + return; + } + const updatedColumns = columnActions.addColumn(props.columns, columnName, true); + this.updateInput({ columns: updatedColumns }); + }, + onRemoveColumn: (columnName: string) => { + if (!props.columns) { + return; + } + const updatedColumns = columnActions.removeColumn(props.columns, columnName, true); + this.updateInput({ columns: updatedColumns }); + }, + onMoveColumn: (columnName: string, newIndex: number) => { + if (!props.columns) { + return; + } + const columns = columnActions.moveColumn(props.columns, columnName, newIndex); + this.updateInput({ columns }); + }, + onSetColumns: (columns: string[]) => { + this.updateInput({ columns }); + }, + onSort: (sort: string[][]) => { + const sortOrderArr: SortOrder[] = []; + sort.forEach((arr) => { + sortOrderArr.push(arr as SortOrder); + }); + this.updateInput({ sort: sortOrderArr }); + }, + sampleSize: 500, + onFilter: async (field, value, operator) => { + let filters = esFilters.generateFilters( + this.filterManager, + // @ts-expect-error + field, + value, + operator, + indexPattern.id! + ); + filters = filters.map((filter) => ({ + ...filter, + $state: { store: esFilters.FilterStateStore.APP_STATE }, + })); + + await this.executeTriggerActions(APPLY_FILTER_TRIGGER, { + embeddable: this, + filters, + }); + }, + useNewFieldsApi: !this.services.uiSettings.get(SEARCH_FIELDS_FROM_SOURCE, false), + showTimeCol: !this.services.uiSettings.get(DOC_HIDE_TIME_COLUMN_SETTING, false), + ariaLabelledBy: 'documentsAriaLabel', + }; + + const timeRangeSearchSource = searchSource.create(); + timeRangeSearchSource.setField('filter', () => { + if (!this.searchProps || !this.input.timeRange) return; + return this.services.timefilter.createFilter(indexPattern, this.input.timeRange); + }); + + this.filtersSearchSource = searchSource.create(); + this.filtersSearchSource.setParent(timeRangeSearchSource); + + searchSource.setParent(this.filtersSearchSource); + + this.pushContainerStateParamsToProps(props); + + props.isLoading = true; + + if (this.savedSearch.grid) { + props.settings = this.savedSearch.grid; + } + } + + private async pushContainerStateParamsToProps( + searchProps: SearchProps, { forceFetch = false }: { forceFetch: boolean } = { forceFetch: false } ) { const isFetchRequired = !esFilters.onlyDisabledFiltersChanged(this.input.filters, this.prevFilters) || - !_.isEqual(this.prevQuery, this.input.query) || - !_.isEqual(this.prevTimeRange, this.input.timeRange) || - !_.isEqual(searchScope.sort, this.input.sort || this.savedSearch.sort) || + !isEqual(this.prevQuery, this.input.query) || + !isEqual(this.prevTimeRange, this.input.timeRange) || + !isEqual(searchProps.sort, this.input.sort || this.savedSearch.sort) || this.prevSearchSessionId !== this.input.searchSessionId; // If there is column or sort data on the panel, that means the original columns or sort settings have // been overridden in a dashboard. - searchScope.columns = handleSourceColumnState( + searchProps.columns = handleSourceColumnState( { columns: this.input.columns || this.savedSearch.columns }, this.services.core.uiSettings ).columns; + const savedSearchSort = this.savedSearch.sort && this.savedSearch.sort.length ? this.savedSearch.sort : getDefaultSort( - this.searchScope?.indexPattern, + this.searchProps?.indexPattern, getServices().uiSettings.get(SORT_DEFAULT_ORDER_SETTING, 'desc') ); - searchScope.sort = this.input.sort || savedSearchSort; - searchScope.sharedItemTitle = this.panelTitle; - + searchProps.sort = this.input.sort || savedSearchSort; + searchProps.sharedItemTitle = this.panelTitle; if (forceFetch || isFetchRequired) { - this.filtersSearchSource!.setField('filter', this.input.filters); - this.filtersSearchSource!.setField('query', this.input.query); + this.filtersSearchSource.setField('filter', this.input.filters); + this.filtersSearchSource.setField('query', this.input.query); if (this.input.query?.query || this.input.filters?.length) { - this.filtersSearchSource!.setField('highlightAll', true); + this.filtersSearchSource.setField('highlightAll', true); } else { - this.filtersSearchSource!.removeField('highlightAll'); + this.filtersSearchSource.removeField('highlightAll'); } this.prevFilters = this.input.filters; this.prevQuery = this.input.query; this.prevTimeRange = this.input.timeRange; this.prevSearchSessionId = this.input.searchSessionId; - this.fetch(); - } else if (this.searchScope) { - // trigger a digest cycle to make sure non-fetch relevant changes are propagated - this.searchScope.$applyAsync(); + this.searchProps = searchProps; + await this.fetch(); + } else if (this.searchProps && this.node) { + this.searchProps = searchProps; + } + + if (this.node) { + this.renderReactComponent(this.node, this.searchProps!); + } + } + + /** + * + * @param {Element} domNode + */ + public async render(domNode: HTMLElement) { + if (!this.searchProps) { + throw new Error('Search props not defined'); + } + if (this.node) { + ReactDOM.unmountComponentAtNode(this.node); + } + this.node = domNode; + } + + private renderReactComponent(domNode: HTMLElement, searchProps: SearchProps) { + if (!this.searchProps) { + return; + } + const useLegacyTable = this.services.uiSettings.get(DOC_TABLE_LEGACY); + const props = { + searchProps, + useLegacyTable, + refs: domNode, + }; + ReactDOM.render(, domNode); + } + + public reload() { + if (this.searchProps) { + this.pushContainerStateParamsToProps(this.searchProps, { forceFetch: true }); } } + + public getSavedSearch(): SavedSearch { + return this.savedSearch; + } + + public getInspectorAdapters() { + return this.inspectorAdapters; + } + + public destroy() { + super.destroy(); + this.savedSearch.destroy(); + if (this.searchProps) { + delete this.searchProps; + } + this.subscription?.unsubscribe(); + + if (this.abortController) this.abortController.abort(); + } } diff --git a/src/plugins/discover/public/application/embeddable/saved_search_embeddable_component.tsx b/src/plugins/discover/public/application/embeddable/saved_search_embeddable_component.tsx new file mode 100644 index 0000000000000..5b2a2635d04bd --- /dev/null +++ b/src/plugins/discover/public/application/embeddable/saved_search_embeddable_component.tsx @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; + +import { DiscoverGridEmbeddable } from '../angular/create_discover_grid_directive'; +import { DiscoverDocTableEmbeddable } from '../angular/doc_table/create_doc_table_embeddable'; +import { DiscoverGridProps } from '../components/discover_grid/discover_grid'; +import { SearchProps } from './saved_search_embeddable'; + +interface SavedSearchEmbeddableComponentProps { + searchProps: SearchProps; + useLegacyTable: boolean; + refs: HTMLElement; +} + +const DiscoverDocTableEmbeddableMemoized = React.memo(DiscoverDocTableEmbeddable); +const DiscoverGridEmbeddableMemoized = React.memo(DiscoverGridEmbeddable); + +export function SavedSearchEmbeddableComponent({ + searchProps, + useLegacyTable, + refs, +}: SavedSearchEmbeddableComponentProps) { + if (useLegacyTable) { + const docTableProps = { + ...searchProps, + refs, + }; + return ; + } + const discoverGridProps = searchProps as DiscoverGridProps; + return ; +} diff --git a/src/plugins/discover/public/application/embeddable/search_embeddable_factory.ts b/src/plugins/discover/public/application/embeddable/search_embeddable_factory.ts index 77da138d118dd..360844976284e 100644 --- a/src/plugins/discover/public/application/embeddable/search_embeddable_factory.ts +++ b/src/plugins/discover/public/application/embeddable/search_embeddable_factory.ts @@ -18,8 +18,9 @@ import { import { TimeRange } from '../../../../data/public'; -import { SearchInput, SearchOutput, SearchEmbeddable } from './types'; +import { SearchInput, SearchOutput } from './types'; import { SEARCH_EMBEDDABLE_TYPE } from './constants'; +import { SavedSearchEmbeddable } from './saved_search_embeddable'; interface StartServices { executeTriggerActions: UiActionsStart['executeTriggerActions']; @@ -27,7 +28,7 @@ interface StartServices { } export class SearchEmbeddableFactory - implements EmbeddableFactoryDefinition { + implements EmbeddableFactoryDefinition { public readonly type = SEARCH_EMBEDDABLE_TYPE; private $injector: auto.IInjectorService | null; private getInjector: () => Promise | null; @@ -65,14 +66,11 @@ export class SearchEmbeddableFactory savedObjectId: string, input: Partial & { id: string; timeRange: TimeRange }, parent?: Container - ): Promise => { + ): Promise => { if (!this.$injector) { this.$injector = await this.getInjector(); } - const $injector = this.$injector as auto.IInjectorService; - const $compile = $injector.get('$compile'); - const $rootScope = $injector.get('$rootScope'); const filterManager = getServices().filterManager; const url = await getServices().getSavedSearchUrlById(savedObjectId); @@ -81,12 +79,12 @@ export class SearchEmbeddableFactory const savedObject = await getServices().getSavedSearchById(savedObjectId); const indexPattern = savedObject.searchSource.getField('index'); const { executeTriggerActions } = await this.getStartServices(); - const { SearchEmbeddable: SearchEmbeddableClass } = await import('./search_embeddable'); - return new SearchEmbeddableClass( + const { SavedSearchEmbeddable: SavedSearchEmbeddableClass } = await import( + './saved_search_embeddable' + ); + return new SavedSearchEmbeddableClass( { savedSearch: savedObject, - $rootScope, - $compile, editUrl, editPath: url, filterManager, diff --git a/src/plugins/discover/public/application/embeddable/search_template.html b/src/plugins/discover/public/application/embeddable/search_template.html deleted file mode 100644 index 3e37b3645650f..0000000000000 --- a/src/plugins/discover/public/application/embeddable/search_template.html +++ /dev/null @@ -1,21 +0,0 @@ - - diff --git a/src/plugins/discover/public/application/embeddable/search_template_datagrid.html b/src/plugins/discover/public/application/embeddable/search_template_datagrid.html deleted file mode 100644 index 8ad7938350d9c..0000000000000 --- a/src/plugins/discover/public/application/embeddable/search_template_datagrid.html +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/src/plugins/discover/public/application/helpers/columns.test.ts b/src/plugins/discover/public/application/helpers/columns.test.ts index df3884ab98bcf..6b6125193b5f3 100644 --- a/src/plugins/discover/public/application/helpers/columns.test.ts +++ b/src/plugins/discover/public/application/helpers/columns.test.ts @@ -43,4 +43,9 @@ describe('getDisplayedColumns', () => { ] `); }); + test('returns the same instance of ["_source"] over multiple calls', async () => { + const result = getDisplayedColumns([], indexPatternWithTimefieldMock); + const result2 = getDisplayedColumns([], indexPatternWithTimefieldMock); + expect(result).toBe(result2); + }); }); diff --git a/src/plugins/discover/public/application/helpers/columns.ts b/src/plugins/discover/public/application/helpers/columns.ts index 426059060f329..6e77717c5cf05 100644 --- a/src/plugins/discover/public/application/helpers/columns.ts +++ b/src/plugins/discover/public/application/helpers/columns.ts @@ -8,6 +8,11 @@ import { IndexPattern } from '../../../../data/common'; +// We store this outside the function as a constant, so we're not creating a new array every time +// the function is returning this. A changing array might cause the data grid to think it got +// new columns, and thus performing worse than using the same array over multiple renders. +const SOURCE_ONLY = ['_source']; + /** * Function to provide fallback when * 1) no columns are given @@ -19,5 +24,5 @@ export function getDisplayedColumns(stateColumns: string[] = [], indexPattern: I // check if all columns where removed except the configured timeField (this can't be removed) !(stateColumns.length === 1 && stateColumns[0] === indexPattern.timeFieldName) ? stateColumns - : ['_source']; + : SOURCE_ONLY; } diff --git a/src/plugins/embeddable/common/lib/migrate.ts b/src/plugins/embeddable/common/lib/migrate.ts index 0a9cd0760eb2c..fb8ea5cf2cd84 100644 --- a/src/plugins/embeddable/common/lib/migrate.ts +++ b/src/plugins/embeddable/common/lib/migrate.ts @@ -26,9 +26,11 @@ export const getMigrateFunction = (embeddables: CommonEmbeddableStartContract) = updatedInput.enhancements = {}; Object.keys(enhancements).forEach((key) => { if (!enhancements[key]) return; - (updatedInput.enhancements! as Record)[key] = embeddables - .getEnhancement(key) - .migrations[version](enhancements[key] as SerializableState); + const enhancementDefinition = embeddables.getEnhancement(key); + const migratedEnhancement = enhancementDefinition?.migrations?.[version] + ? enhancementDefinition.migrations[version](enhancements[key] as SerializableState) + : enhancements[key]; + (updatedInput.enhancements! as Record)[key] = migratedEnhancement; }); return updatedInput; diff --git a/src/plugins/embeddable/public/plugin.test.ts b/src/plugins/embeddable/public/plugin.test.ts index 2e7d8c73cfc6d..53302e8e6870c 100644 --- a/src/plugins/embeddable/public/plugin.test.ts +++ b/src/plugins/embeddable/public/plugin.test.ts @@ -184,4 +184,12 @@ describe('embeddable enhancements', () => { embeddableState.enhancements.test ); }); + + test('doesnt fail if there is no migration function registered for specific version', () => { + expect(() => { + start.migrate(embeddableState, '7.10.0'); + }).not.toThrow(); + + expect(start.migrate(embeddableState, '7.10.0')).toEqual(embeddableState); + }); }); diff --git a/src/plugins/expressions/common/execution/execution.test.ts b/src/plugins/expressions/common/execution/execution.test.ts index 69687f75f3098..feff425cc48ed 100644 --- a/src/plugins/expressions/common/execution/execution.test.ts +++ b/src/plugins/expressions/common/execution/execution.test.ts @@ -834,8 +834,8 @@ describe('Execution', () => { expect((chain[0].arguments.val[0] as ExpressionAstExpression).chain[0].debug!.args).toEqual( { - name: 'foo', - value: 5, + name: ['foo'], + value: [5], } ); }); diff --git a/src/plugins/expressions/common/executor/executor.test.ts b/src/plugins/expressions/common/executor/executor.test.ts index 6175c9e170a90..3c24a3c24e01b 100644 --- a/src/plugins/expressions/common/executor/executor.test.ts +++ b/src/plugins/expressions/common/executor/executor.test.ts @@ -52,12 +52,6 @@ describe('Executor', () => { executor.registerFunction(expressionFunctions.clog); }); - test('can register all functions', () => { - const executor = new Executor(); - for (const functionDefinition of expressionFunctions.functionSpecs) - executor.registerFunction(functionDefinition); - }); - test('can retrieve all functions', () => { const executor = new Executor(); executor.registerFunction(expressionFunctions.clog); @@ -67,12 +61,24 @@ describe('Executor', () => { test('can retrieve all functions - 2', () => { const executor = new Executor(); - for (const functionDefinition of expressionFunctions.functionSpecs) + const functionSpecs = [ + expressionFunctions.clog, + expressionFunctions.font, + expressionFunctions.variableSet, + expressionFunctions.variable, + expressionFunctions.theme, + expressionFunctions.cumulativeSum, + expressionFunctions.derivative, + expressionFunctions.movingAverage, + expressionFunctions.mapColumn, + expressionFunctions.math, + ]; + for (const functionDefinition of functionSpecs) { executor.registerFunction(functionDefinition); + } const functions = executor.getFunctions(); - expect(Object.keys(functions).sort()).toEqual( - expressionFunctions.functionSpecs.map((spec) => spec.name).sort() - ); + + expect(Object.keys(functions).sort()).toEqual(functionSpecs.map((spec) => spec.name).sort()); }); }); diff --git a/src/plugins/expressions/common/executor/executor.ts b/src/plugins/expressions/common/executor/executor.ts index 1eea51a0e1ec4..a307172aff973 100644 --- a/src/plugins/expressions/common/executor/executor.ts +++ b/src/plugins/expressions/common/executor/executor.ts @@ -19,7 +19,6 @@ import { ExpressionType } from '../expression_types/expression_type'; import { AnyExpressionTypeDefinition } from '../expression_types/types'; import { ExpressionAstExpression, ExpressionAstFunction } from '../ast'; import { ExpressionValueError, typeSpecs } from '../expression_types/specs'; -import { functionSpecs } from '../expression_functions/specs'; import { getByAlias } from '../util'; import { SavedObjectReference } from '../../../../core/types'; import { PersistableStateService, SerializableState } from '../../../kibana_utils/common'; @@ -85,7 +84,7 @@ export class Executor = Record { const executor = new Executor(state); for (const type of typeSpecs) executor.registerType(type); - for (const func of functionSpecs) executor.registerFunction(func); + return executor; } diff --git a/src/plugins/expressions/common/expression_functions/specs/index.ts b/src/plugins/expressions/common/expression_functions/specs/index.ts index 9408b3a433712..20a6f9aac4567 100644 --- a/src/plugins/expressions/common/expression_functions/specs/index.ts +++ b/src/plugins/expressions/common/expression_functions/specs/index.ts @@ -6,31 +6,6 @@ * Side Public License, v 1. */ -import { clog } from './clog'; -import { font } from './font'; -import { variableSet } from './var_set'; -import { variable } from './var'; -import { AnyExpressionFunctionDefinition } from '../types'; -import { theme } from './theme'; -import { cumulativeSum } from './cumulative_sum'; -import { derivative } from './derivative'; -import { movingAverage } from './moving_average'; -import { mapColumn } from './map_column'; -import { math } from './math'; - -export const functionSpecs: AnyExpressionFunctionDefinition[] = [ - clog, - font, - variableSet, - variable, - theme, - cumulativeSum, - derivative, - movingAverage, - mapColumn, - math, -]; - export * from './clog'; export * from './font'; export * from './var_set'; @@ -39,5 +14,6 @@ export * from './theme'; export * from './cumulative_sum'; export * from './derivative'; export * from './moving_average'; +export * from './ui_setting'; export { mapColumn, MapColumnArguments } from './map_column'; export { math, MathArguments, MathInput } from './math'; diff --git a/src/plugins/expressions/common/expression_functions/specs/map_column.ts b/src/plugins/expressions/common/expression_functions/specs/map_column.ts index 7939441ff0d60..7ea96ee7fdde8 100644 --- a/src/plugins/expressions/common/expression_functions/specs/map_column.ts +++ b/src/plugins/expressions/common/expression_functions/specs/map_column.ts @@ -6,16 +6,16 @@ * Side Public License, v 1. */ -import { Observable } from 'rxjs'; -import { take } from 'rxjs/operators'; +import { Observable, defer, of, zip } from 'rxjs'; +import { map } from 'rxjs/operators'; import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from '../types'; -import { Datatable, getType } from '../../expression_types'; +import { Datatable, DatatableColumn, getType } from '../../expression_types'; export interface MapColumnArguments { id?: string | null; name: string; - expression?(datatable: Datatable): Observable; + expression(datatable: Datatable): Observable; copyMetaFrom?: string | null; } @@ -23,7 +23,7 @@ export const mapColumn: ExpressionFunctionDefinition< 'mapColumn', Datatable, MapColumnArguments, - Promise + Observable > = { name: 'mapColumn', aliases: ['mc'], // midnight commander. So many times I've launched midnight commander instead of moving a file. @@ -80,57 +80,56 @@ export const mapColumn: ExpressionFunctionDefinition< default: null, }, }, - fn: (input, args) => { - const expression = (...params: Parameters['expression']>) => - args - .expression?.(...params) - .pipe(take(1)) - .toPromise() ?? Promise.resolve(null); + fn(input, args) { + const existingColumnIndex = input.columns.findIndex(({ id, name }) => + args.id ? id === args.id : name === args.name + ); + const id = input.columns[existingColumnIndex]?.id ?? args.id ?? args.name; - const columns = [...input.columns]; - const existingColumnIndex = columns.findIndex(({ id, name }) => { - if (args.id) { - return id === args.id; - } - return name === args.name; - }); - const columnId = - existingColumnIndex === -1 ? args.id ?? args.name : columns[existingColumnIndex].id; - - const rowPromises = input.rows.map((row) => { - return expression({ - type: 'datatable', - columns, - rows: [row], - }).then((val) => ({ - ...row, - [columnId]: val, - })); - }); + return defer(() => { + const rows$ = input.rows.length + ? zip( + ...input.rows.map((row) => + args + .expression({ + type: 'datatable', + columns: [...input.columns], + rows: [row], + }) + .pipe(map((value) => ({ ...row, [id]: value }))) + ) + ) + : of([]); - return Promise.all(rowPromises).then((rows) => { - const type = rows.length ? getType(rows[0][columnId]) : 'null'; - const newColumn = { - id: columnId, - name: args.name, - meta: { type }, - }; - if (args.copyMetaFrom) { - const metaSourceFrom = columns.find(({ id }) => id === args.copyMetaFrom); - newColumn.meta = { ...newColumn.meta, ...(metaSourceFrom?.meta || {}) }; - } + return rows$.pipe( + map((rows) => { + const type = getType(rows[0]?.[id]); + const newColumn: DatatableColumn = { + id, + name: args.name, + meta: { type, params: { id: type } }, + }; + if (args.copyMetaFrom) { + const metaSourceFrom = input.columns.find( + ({ id: columnId }) => columnId === args.copyMetaFrom + ); + newColumn.meta = { ...newColumn.meta, ...(metaSourceFrom?.meta ?? {}) }; + } - if (existingColumnIndex === -1) { - columns.push(newColumn); - } else { - columns[existingColumnIndex] = newColumn; - } + const columns = [...input.columns]; + if (existingColumnIndex === -1) { + columns.push(newColumn); + } else { + columns[existingColumnIndex] = newColumn; + } - return { - type: 'datatable', - columns, - rows, - } as Datatable; + return { + columns, + rows, + type: 'datatable', + }; + }) + ); }); }, }; diff --git a/src/plugins/expressions/common/expression_functions/specs/tests/map_column.test.ts b/src/plugins/expressions/common/expression_functions/specs/tests/map_column.test.ts index f5c1f3838f66c..bd934745fed72 100644 --- a/src/plugins/expressions/common/expression_functions/specs/tests/map_column.test.ts +++ b/src/plugins/expressions/common/expression_functions/specs/tests/map_column.test.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import { of } from 'rxjs'; +import { of, Observable } from 'rxjs'; +import { TestScheduler } from 'rxjs/testing'; import { Datatable } from '../../../expression_types'; import { mapColumn, MapColumnArguments } from '../map_column'; import { emptyTable, functionWrapper, testTable } from './utils'; @@ -16,138 +17,227 @@ const pricePlusTwo = (datatable: Datatable) => of(datatable.rows[0].price + 2); describe('mapColumn', () => { const fn = functionWrapper(mapColumn); const runFn = (input: Datatable, args: MapColumnArguments) => - fn(input, args) as Promise; + fn(input, args) as Observable; + let testScheduler: TestScheduler; - it('returns a datatable with a new column with the values from mapping a function over each row in a datatable', async () => { - const arbitraryRowIndex = 2; - const result = await runFn(testTable, { - id: 'pricePlusTwo', - name: 'pricePlusTwo', - expression: pricePlusTwo, - }); - - expect(result.type).toBe('datatable'); - expect(result.columns).toEqual([ - ...testTable.columns, - { id: 'pricePlusTwo', name: 'pricePlusTwo', meta: { type: 'number' } }, - ]); - expect(result.columns[result.columns.length - 1]).toHaveProperty('name', 'pricePlusTwo'); - expect(result.rows[arbitraryRowIndex]).toHaveProperty('pricePlusTwo'); + beforeEach(() => { + testScheduler = new TestScheduler((actual, expected) => expect(actual).toStrictEqual(expected)); }); - it('allows the id arg to be optional, looking up by name instead', async () => { - const result = await runFn(testTable, { name: 'name label', expression: pricePlusTwo }); - const nameColumnIndex = result.columns.findIndex(({ name }) => name === 'name label'); - const arbitraryRowIndex = 4; - - expect(result.type).toBe('datatable'); - expect(result.columns).toHaveLength(testTable.columns.length); - expect(result.columns[nameColumnIndex]).toHaveProperty('id', 'name'); - expect(result.columns[nameColumnIndex]).toHaveProperty('name', 'name label'); - expect(result.columns[nameColumnIndex].meta).toHaveProperty('type', 'number'); - expect(result.rows[arbitraryRowIndex]).toHaveProperty('name', 202); - expect(result.rows[arbitraryRowIndex]).not.toHaveProperty('name label'); + it('returns a datatable with a new column with the values from mapping a function over each row in a datatable', () => { + testScheduler.run(({ expectObservable }) => { + expectObservable( + runFn(testTable, { + id: 'pricePlusTwo', + name: 'pricePlusTwo', + expression: pricePlusTwo, + }) + ).toBe('(0|)', [ + expect.objectContaining({ + type: 'datatable', + columns: [ + ...testTable.columns, + { + id: 'pricePlusTwo', + name: 'pricePlusTwo', + meta: { type: 'number', params: { id: 'number' } }, + }, + ], + rows: expect.arrayContaining([ + expect.objectContaining({ + pricePlusTwo: expect.anything(), + }), + ]), + }), + ]); + }); }); - it('allows a duplicate name when the ids are different', async () => { - const result = await runFn(testTable, { - id: 'new', - name: 'name label', - expression: pricePlusTwo, + it('allows the id arg to be optional, looking up by name instead', () => { + testScheduler.run(({ expectObservable }) => { + expectObservable(runFn(testTable, { name: 'name label', expression: pricePlusTwo })).toBe( + '(0|)', + [ + expect.objectContaining({ + type: 'datatable', + columns: expect.arrayContaining([ + expect.objectContaining({ + id: 'name', + name: 'name label', + meta: expect.objectContaining({ type: 'number' }), + }), + ]), + rows: expect.arrayContaining([ + expect.objectContaining({ + name: 202, + }), + ]), + }), + ] + ); }); - const nameColumnIndex = result.columns.findIndex(({ id }) => id === 'new'); - const arbitraryRowIndex = 4; - - expect(result.type).toBe('datatable'); - expect(result.columns).toHaveLength(testTable.columns.length + 1); - expect(result.columns[nameColumnIndex]).toHaveProperty('id', 'new'); - expect(result.columns[nameColumnIndex]).toHaveProperty('name', 'name label'); - expect(result.columns[nameColumnIndex].meta).toHaveProperty('type', 'number'); - expect(result.rows[arbitraryRowIndex]).toHaveProperty('new', 202); }); - it('adds a column to empty tables', async () => { - const result = await runFn(emptyTable, { name: 'name', expression: pricePlusTwo }); + it('allows a duplicate name when the ids are different', () => { + testScheduler.run(({ expectObservable }) => { + expectObservable( + runFn(testTable, { + id: 'new', + name: 'name label', + expression: pricePlusTwo, + }) + ).toBe('(0|)', [ + expect.objectContaining({ + type: 'datatable', + columns: expect.arrayContaining([ + expect.objectContaining({ + id: 'new', + name: 'name label', + meta: expect.objectContaining({ type: 'number' }), + }), + ]), + rows: expect.arrayContaining([ + expect.objectContaining({ + new: 202, + }), + ]), + }), + ]); + }); + }); - expect(result.type).toBe('datatable'); - expect(result.columns).toHaveLength(1); - expect(result.columns[0]).toHaveProperty('name', 'name'); - expect(result.columns[0].meta).toHaveProperty('type', 'null'); + it('overwrites existing column with the new column if an existing column name is provided', () => { + testScheduler.run(({ expectObservable }) => { + expectObservable(runFn(testTable, { name: 'name', expression: pricePlusTwo })).toBe('(0|)', [ + expect.objectContaining({ + type: 'datatable', + columns: expect.arrayContaining([ + expect.objectContaining({ + name: 'name', + meta: expect.objectContaining({ type: 'number' }), + }), + ]), + rows: expect.arrayContaining([ + expect.objectContaining({ + name: 202, + }), + ]), + }), + ]); + }); }); - it('should assign specific id, different from name, when id arg is passed for new columns', async () => { - const result = await runFn(emptyTable, { name: 'name', id: 'myid', expression: pricePlusTwo }); + it('adds a column to empty tables', () => { + testScheduler.run(({ expectObservable }) => { + expectObservable(runFn(emptyTable, { name: 'name', expression: pricePlusTwo })).toBe('(0|)', [ + expect.objectContaining({ + type: 'datatable', + columns: [ + expect.objectContaining({ + name: 'name', + meta: expect.objectContaining({ type: 'null' }), + }), + ], + }), + ]); + }); + }); - expect(result.type).toBe('datatable'); - expect(result.columns).toHaveLength(1); - expect(result.columns[0]).toHaveProperty('name', 'name'); - expect(result.columns[0]).toHaveProperty('id', 'myid'); - expect(result.columns[0].meta).toHaveProperty('type', 'null'); + it('should assign specific id, different from name, when id arg is passed for copied column', () => { + testScheduler.run(({ expectObservable }) => { + expectObservable( + runFn(testTable, { name: 'name', id: 'myid', expression: pricePlusTwo }) + ).toBe('(0|)', [ + expect.objectContaining({ + type: 'datatable', + columns: expect.arrayContaining([ + expect.objectContaining({ + id: 'myid', + name: 'name', + meta: expect.objectContaining({ type: 'number' }), + }), + ]), + }), + ]); + }); }); - it('should copy over the meta information from the specified column', async () => { - const result = await runFn( - { - ...testTable, - columns: [ - ...testTable.columns, - // add a new entry + it('should copy over the meta information from the specified column', () => { + testScheduler.run(({ expectObservable }) => { + expectObservable( + runFn( { - id: 'myId', - name: 'myName', - meta: { type: 'date', params: { id: 'number', params: { digits: 2 } } }, + ...testTable, + columns: [ + ...testTable.columns, + // add a new entry + { + id: 'myId', + name: 'myName', + meta: { type: 'date', params: { id: 'number', params: { digits: 2 } } }, + }, + ], + rows: testTable.rows.map((row) => ({ ...row, myId: Date.now() })), }, - ], - rows: testTable.rows.map((row) => ({ ...row, myId: Date.now() })), - }, - { name: 'name', copyMetaFrom: 'myId', expression: pricePlusTwo } - ); - const nameColumnIndex = result.columns.findIndex(({ name }) => name === 'name'); - - expect(result.type).toBe('datatable'); - expect(result.columns[nameColumnIndex]).toEqual({ - id: 'name', - name: 'name', - meta: { type: 'date', params: { id: 'number', params: { digits: 2 } } }, + { name: 'name', copyMetaFrom: 'myId', expression: pricePlusTwo } + ) + ).toBe('(0|)', [ + expect.objectContaining({ + type: 'datatable', + columns: expect.arrayContaining([ + expect.objectContaining({ + id: 'name', + name: 'name', + meta: { type: 'date', params: { id: 'number', params: { digits: 2 } } }, + }), + ]), + }), + ]); }); }); - it('should be resilient if the references column for meta information does not exists', async () => { - const result = await runFn(emptyTable, { - name: 'name', - copyMetaFrom: 'time', - expression: pricePlusTwo, + it('should be resilient if the references column for meta information does not exists', () => { + testScheduler.run(({ expectObservable }) => { + expectObservable( + runFn(emptyTable, { + name: 'name', + copyMetaFrom: 'time', + expression: pricePlusTwo, + }) + ).toBe('(0|)', [ + expect.objectContaining({ + type: 'datatable', + columns: [ + expect.objectContaining({ + id: 'name', + name: 'name', + meta: expect.objectContaining({ type: 'null' }), + }), + ], + }), + ]); }); - - expect(result.type).toBe('datatable'); - expect(result.columns).toHaveLength(1); - expect(result.columns[0]).toHaveProperty('name', 'name'); - expect(result.columns[0]).toHaveProperty('id', 'name'); - expect(result.columns[0].meta).toHaveProperty('type', 'null'); }); - it('should correctly infer the type fromt he first row if the references column for meta information does not exists', async () => { - const result = await runFn( - { ...emptyTable, rows: [...emptyTable.rows, { value: 5 }] }, - { name: 'value', copyMetaFrom: 'time', expression: pricePlusTwo } - ); - - expect(result.type).toBe('datatable'); - expect(result.columns).toHaveLength(1); - expect(result.columns[0]).toHaveProperty('name', 'value'); - expect(result.columns[0]).toHaveProperty('id', 'value'); - expect(result.columns[0].meta).toHaveProperty('type', 'number'); - }); - - describe('expression', () => { - it('maps null values to the new column', async () => { - const result = await runFn(testTable, { name: 'empty' }); - const emptyColumnIndex = result.columns.findIndex(({ name }) => name === 'empty'); - const arbitraryRowIndex = 8; - - expect(result.columns[emptyColumnIndex]).toHaveProperty('name', 'empty'); - expect(result.columns[emptyColumnIndex].meta).toHaveProperty('type', 'null'); - expect(result.rows[arbitraryRowIndex]).toHaveProperty('empty', null); + it('should correctly infer the type fromt he first row if the references column for meta information does not exists', () => { + testScheduler.run(({ expectObservable }) => { + expectObservable( + runFn( + { ...emptyTable, rows: [...emptyTable.rows, { value: 5 }] }, + { name: 'value', copyMetaFrom: 'time', expression: pricePlusTwo } + ) + ).toBe('(0|)', [ + expect.objectContaining({ + type: 'datatable', + columns: [ + expect.objectContaining({ + id: 'value', + name: 'value', + meta: expect.objectContaining({ type: 'number' }), + }), + ], + }), + ]); }); }); }); diff --git a/src/plugins/expressions/common/expression_functions/specs/tests/ui_setting.test.ts b/src/plugins/expressions/common/expression_functions/specs/tests/ui_setting.test.ts new file mode 100644 index 0000000000000..fb2c87588a4d4 --- /dev/null +++ b/src/plugins/expressions/common/expression_functions/specs/tests/ui_setting.test.ts @@ -0,0 +1,78 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +jest.mock('../../../../common'); + +import { IUiSettingsClient } from 'src/core/public'; +import { getUiSettingFn } from '../ui_setting'; + +describe('uiSetting', () => { + describe('fn', () => { + let getStartDependencies: jest.MockedFunction< + Parameters[0]['getStartDependencies'] + >; + let uiSetting: ReturnType; + let uiSettings: jest.Mocked; + + beforeEach(() => { + uiSettings = ({ + get: jest.fn(), + } as unknown) as jest.Mocked; + getStartDependencies = (jest.fn(async () => ({ + uiSettings, + })) as unknown) as typeof getStartDependencies; + + uiSetting = getUiSettingFn({ getStartDependencies }); + }); + + it('should return a value', () => { + uiSettings.get.mockReturnValueOnce('value'); + + expect(uiSetting.fn(null, { parameter: 'something' }, {} as any)).resolves.toEqual({ + type: 'ui_setting', + key: 'something', + value: 'value', + }); + }); + + it('should pass a default value', async () => { + await uiSetting.fn(null, { parameter: 'something', default: 'default' }, {} as any); + + expect(uiSettings.get).toHaveBeenCalledWith('something', 'default'); + }); + + it('should throw an error when parameter does not exist', () => { + uiSettings.get.mockImplementationOnce(() => { + throw new Error(); + }); + + expect(uiSetting.fn(null, { parameter: 'something' }, {} as any)).rejects.toEqual( + new Error('Invalid parameter "something".') + ); + }); + + it('should get a request instance on the server-side', async () => { + const request = {}; + await uiSetting.fn(null, { parameter: 'something' }, { + getKibanaRequest: () => request, + } as any); + + const [[getKibanaRequest]] = getStartDependencies.mock.calls; + + expect(getKibanaRequest()).toBe(request); + }); + + it('should throw an error if request is not provided on the server-side', async () => { + await uiSetting.fn(null, { parameter: 'something' }, {} as any); + + const [[getKibanaRequest]] = getStartDependencies.mock.calls; + + expect(getKibanaRequest).toThrow(); + }); + }); +}); diff --git a/src/plugins/expressions/common/expression_functions/specs/tests/var_set.test.ts b/src/plugins/expressions/common/expression_functions/specs/tests/var_set.test.ts index 0a9f022ce89ca..cdcae61215fa4 100644 --- a/src/plugins/expressions/common/expression_functions/specs/tests/var_set.test.ts +++ b/src/plugins/expressions/common/expression_functions/specs/tests/var_set.test.ts @@ -9,6 +9,8 @@ import { functionWrapper } from './utils'; import { variableSet } from '../var_set'; import { ExecutionContext } from '../../../execution/types'; +import { createUnitTestExecutor } from '../../../test_helpers'; +import { first } from 'rxjs/operators'; describe('expression_functions', () => { describe('var_set', () => { @@ -32,21 +34,49 @@ describe('expression_functions', () => { }); it('updates a variable', () => { - const actual = fn(input, { name: 'test', value: 2 }, context); + const actual = fn(input, { name: ['test'], value: [2] }, context); expect(variables.test).toEqual(2); expect(actual).toEqual(input); }); it('sets a new variable', () => { - const actual = fn(input, { name: 'new', value: 3 }, context); + const actual = fn(input, { name: ['new'], value: [3] }, context); expect(variables.new).toEqual(3); expect(actual).toEqual(input); }); it('stores context if value is not set', () => { - const actual = fn(input, { name: 'test' }, context); + const actual = fn(input, { name: ['test'], value: [] }, context); expect(variables.test).toEqual(input); expect(actual).toEqual(input); }); + + it('sets multiple variables', () => { + const actual = fn(input, { name: ['new1', 'new2', 'new3'], value: [1, , 3] }, context); + expect(variables.new1).toEqual(1); + expect(variables.new2).toEqual(input); + expect(variables.new3).toEqual(3); + expect(actual).toEqual(input); + }); + + describe('running function thru executor', () => { + const executor = createUnitTestExecutor(); + executor.registerFunction(variableSet); + + it('sets the variables', async () => { + const vars = {}; + const result = await executor + .run('var_set name=test1 name=test2 value=1', 2, { variables: vars }) + .pipe(first()) + .toPromise(); + + expect(result).toEqual(2); + + expect(vars).toEqual({ + test1: 1, + test2: 2, + }); + }); + }); }); }); diff --git a/src/plugins/expressions/common/expression_functions/specs/ui_setting.ts b/src/plugins/expressions/common/expression_functions/specs/ui_setting.ts new file mode 100644 index 0000000000000..8e352e12d49c5 --- /dev/null +++ b/src/plugins/expressions/common/expression_functions/specs/ui_setting.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 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. + */ + +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import type { KibanaRequest } from 'src/core/server'; +import { i18n } from '@kbn/i18n'; +import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; +import { UiSetting } from '../../expression_types/specs/ui_setting'; + +interface UiSettingsClient { + get(key: string, defaultValue?: T): T | Promise; +} + +interface UiSettingStartDependencies { + uiSettings: UiSettingsClient; +} + +interface UiSettingFnArguments { + getStartDependencies(getKibanaRequest: () => KibanaRequest): Promise; +} + +export interface UiSettingArguments { + default?: unknown; + parameter: string; +} + +export type ExpressionFunctionUiSetting = ExpressionFunctionDefinition< + 'uiSetting', + unknown, + UiSettingArguments, + Promise +>; + +export function getUiSettingFn({ + getStartDependencies, +}: UiSettingFnArguments): ExpressionFunctionUiSetting { + return { + name: 'uiSetting', + help: i18n.translate('expressions.functions.uiSetting.help', { + defaultMessage: 'Returns a UI settings parameter value.', + }), + args: { + default: { + help: i18n.translate('expressions.functions.uiSetting.args.default', { + defaultMessage: 'A default value in case of the parameter is not set.', + }), + }, + parameter: { + aliases: ['_'], + help: i18n.translate('expressions.functions.uiSetting.args.parameter', { + defaultMessage: 'The parameter name.', + }), + required: true, + types: ['string'], + }, + }, + async fn(input, { default: defaultValue, parameter }, { getKibanaRequest }) { + const { uiSettings } = await getStartDependencies(() => { + const request = getKibanaRequest?.(); + if (!request) { + throw new Error( + i18n.translate('expressions.functions.uiSetting.error.kibanaRequest', { + defaultMessage: + 'A KibanaRequest is required to get UI settings on the server. ' + + 'Please provide a request object to the expression execution params.', + }) + ); + } + + return request; + }); + + try { + return { + type: 'ui_setting', + key: parameter, + value: await uiSettings.get(parameter, defaultValue), + }; + } catch { + throw new Error( + i18n.translate('expressions.functions.uiSetting.error.parameter', { + defaultMessage: 'Invalid parameter "{parameter}".', + values: { parameter }, + }) + ); + } + }, + }; +} diff --git a/src/plugins/expressions/common/expression_functions/specs/var_set.ts b/src/plugins/expressions/common/expression_functions/specs/var_set.ts index 490c7781a01a1..f3ac6a2ab80d4 100644 --- a/src/plugins/expressions/common/expression_functions/specs/var_set.ts +++ b/src/plugins/expressions/common/expression_functions/specs/var_set.ts @@ -10,8 +10,8 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from '../types'; interface Arguments { - name: string; - value?: any; + name: string[]; + value: any[]; } export type ExpressionFunctionVarSet = ExpressionFunctionDefinition< @@ -31,12 +31,14 @@ export const variableSet: ExpressionFunctionVarSet = { types: ['string'], aliases: ['_'], required: true, + multi: true, help: i18n.translate('expressions.functions.varset.name.help', { defaultMessage: 'Specify the name of the variable.', }), }, value: { aliases: ['val'], + multi: true, help: i18n.translate('expressions.functions.varset.val.help', { defaultMessage: 'Specify the value for the variable. When unspecified, the input context is used.', @@ -45,7 +47,9 @@ export const variableSet: ExpressionFunctionVarSet = { }, fn(input, args, context) { const variables: Record = context.variables; - variables[args.name] = args.value === undefined ? input : args.value; + args.name.forEach((name, i) => { + variables[name] = args.value[i] === undefined ? input : args.value[i]; + }); return input; }, }; diff --git a/src/plugins/expressions/common/expression_functions/types.ts b/src/plugins/expressions/common/expression_functions/types.ts index b91e16d1804aa..e1378a27bdfc2 100644 --- a/src/plugins/expressions/common/expression_functions/types.ts +++ b/src/plugins/expressions/common/expression_functions/types.ts @@ -6,9 +6,8 @@ * Side Public License, v 1. */ -import { UnwrapPromiseOrReturn } from '@kbn/utility-types'; import { ArgumentType } from './arguments'; -import { TypeToString } from '../types/common'; +import { TypeToString, TypeString, UnmappedTypeStrings } from '../types/common'; import { ExecutionContext } from '../execution/types'; import { ExpressionFunctionClog, @@ -47,7 +46,7 @@ export interface ExpressionFunctionDefinition< /** * Name of type of value this function outputs. */ - type?: TypeToString>; + type?: TypeString | UnmappedTypeStrings; /** * List of allowed type names for input value of this function. If this diff --git a/src/plugins/expressions/common/expression_types/specs/index.ts b/src/plugins/expressions/common/expression_types/specs/index.ts index 70427f8b337d8..c990d74672fcc 100644 --- a/src/plugins/expressions/common/expression_types/specs/index.ts +++ b/src/plugins/expressions/common/expression_types/specs/index.ts @@ -21,6 +21,7 @@ import { shape } from './shape'; import { string } from './string'; import { style } from './style'; import { AnyExpressionTypeDefinition } from '../types'; +import { uiSetting } from './ui_setting'; export const typeSpecs: AnyExpressionTypeDefinition[] = [ boolean, @@ -37,6 +38,7 @@ export const typeSpecs: AnyExpressionTypeDefinition[] = [ shape, string, style, + uiSetting, ]; export * from './boolean'; @@ -53,3 +55,4 @@ export * from './render'; export * from './shape'; export * from './string'; export * from './style'; +export * from './ui_setting'; diff --git a/src/plugins/expressions/common/expression_types/specs/tests/ui_setting.test.ts b/src/plugins/expressions/common/expression_types/specs/tests/ui_setting.test.ts new file mode 100644 index 0000000000000..a0a3d0d396b6e --- /dev/null +++ b/src/plugins/expressions/common/expression_types/specs/tests/ui_setting.test.ts @@ -0,0 +1,79 @@ +/* + * Copyright 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 { UiSetting, uiSetting } from '../ui_setting'; + +function createUiSetting(value: unknown, key = 'something'): UiSetting { + return { + key, + value, + type: 'ui_setting', + }; +} + +describe('uiSetting', () => { + describe('to', () => { + describe('render', () => { + it.each` + value | expected + ${{ a: 'b' }} | ${JSON.stringify({ a: 'b' })} + ${null} | ${''} + ${'something'} | ${'something'} + `('should render "$value" as "$expected"', ({ expected, value }) => { + expect(uiSetting.to?.render(createUiSetting(value), {})).toHaveProperty( + 'value.text', + expected + ); + }); + }); + + describe('datatable', () => { + it('should use parameter name as a datatable column', () => { + expect(uiSetting.to?.datatable(createUiSetting('value', 'column'), {})).toHaveProperty( + 'columns.0', + expect.objectContaining({ id: 'column', name: 'column' }) + ); + }); + + it.each` + value | type + ${null} | ${'null'} + ${undefined} | ${'null'} + ${'something'} | ${'string'} + ${['123']} | ${'string'} + ${123} | ${'number'} + ${[123]} | ${'number'} + ${true} | ${'boolean'} + ${{ a: 'b' }} | ${'object'} + ${[]} | ${'unknown'} + `('should determine $type type', ({ value, type }) => { + expect(uiSetting.to?.datatable(createUiSetting(value, 'column'), {})).toHaveProperty( + 'columns.0.meta.type', + type + ); + }); + + it('should put a value into a row', () => { + expect(uiSetting.to?.datatable(createUiSetting('value'), {})).toHaveProperty( + 'rows.0.something', + 'value' + ); + }); + + it('should put an array value into multiple rows', () => { + expect(uiSetting.to?.datatable(createUiSetting(['a', 'b']), {})).toHaveProperty( + 'rows', + expect.arrayContaining([ + expect.objectContaining({ something: 'a' }), + expect.objectContaining({ something: 'b' }), + ]) + ); + }); + }); + }); +}); diff --git a/src/plugins/expressions/common/expression_types/specs/ui_setting.ts b/src/plugins/expressions/common/expression_types/specs/ui_setting.ts new file mode 100644 index 0000000000000..aaea92e89a832 --- /dev/null +++ b/src/plugins/expressions/common/expression_types/specs/ui_setting.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 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 { Datatable, DatatableColumnType } from './datatable'; +import { ExpressionTypeDefinition, ExpressionValueBoxed } from '../types'; +import { ExpressionValueRender } from './render'; + +const name = 'ui_setting'; + +function getType(value: unknown): DatatableColumnType { + if (value == null) { + return 'null'; + } + + if (Array.isArray(value)) { + return value.length ? getType(value[0]) : 'unknown'; + } + + if (['boolean', 'number', 'object', 'string'].includes(typeof value)) { + return typeof value as DatatableColumnType; + } + + return 'unknown'; +} + +export type UiSetting = ExpressionValueBoxed<'ui_setting', { key: string; value: unknown }>; + +export const uiSetting: ExpressionTypeDefinition<'ui_setting', UiSetting> = { + name, + to: { + boolean({ value }) { + return Boolean(value); + }, + number({ value }) { + return Number(value); + }, + string({ value }) { + return String(value ?? ''); + }, + render({ value }): ExpressionValueRender<{ text: string }> { + return { + type: 'render', + as: 'text', + value: { + text: + typeof value === 'object' && value !== null + ? JSON.stringify(value) + : String(value ?? ''), + }, + }; + }, + datatable({ key, value }): Datatable { + return { + type: 'datatable', + columns: [{ id: key, name: key, meta: { type: getType(value) } }], + rows: (Array.isArray(value) ? value : [value]).map((cell) => ({ [key]: cell })), + }; + }, + }, +}; diff --git a/src/plugins/expressions/common/service/expressions_services.ts b/src/plugins/expressions/common/service/expressions_services.ts index d57c1748954ab..a8839c9b0d71e 100644 --- a/src/plugins/expressions/common/service/expressions_services.ts +++ b/src/plugins/expressions/common/service/expressions_services.ts @@ -19,6 +19,18 @@ import { AnyExpressionFunctionDefinition } from '../expression_functions'; import { SavedObjectReference } from '../../../../core/types'; import { PersistableStateService, SerializableState } from '../../../kibana_utils/common'; import { Adapters } from '../../../inspector/common/adapters'; +import { + clog, + font, + variableSet, + variable, + theme, + cumulativeSum, + derivative, + movingAverage, + mapColumn, + math, +} from '../expression_functions'; /** * The public contract that `ExpressionsService` provides to other plugins @@ -269,7 +281,7 @@ export class ExpressionsService implements PersistableStateService { const executor = this.executor.fork(); const renderers = this.renderers; - const fork = new ExpressionsService({ executor, renderers }); + const fork = new (this.constructor as typeof ExpressionsService)({ executor, renderers }); return fork; }; @@ -318,7 +330,22 @@ export class ExpressionsService implements PersistableStateService) { + return getCommonUiSettingFn({ + async getStartDependencies() { + const [{ uiSettings }] = await getStartServices(); + + return { uiSettings }; + }, + }); +} diff --git a/src/plugins/expressions/public/plugin.test.ts b/src/plugins/expressions/public/plugin.test.ts index b83c92f5d1a96..93353ebbb51b6 100644 --- a/src/plugins/expressions/public/plugin.test.ts +++ b/src/plugins/expressions/public/plugin.test.ts @@ -8,7 +8,7 @@ import { expressionsPluginMock } from './mocks'; import { add } from '../common/test_helpers/expression_functions/add'; -import { ExpressionsService } from '../common'; +import { ExpressionsService } from './services'; describe('ExpressionsPublicPlugin', () => { test('can instantiate from mocks', async () => { diff --git a/src/plugins/expressions/public/plugin.ts b/src/plugins/expressions/public/plugin.ts index 2410ad8741312..37d519ac45133 100644 --- a/src/plugins/expressions/public/plugin.ts +++ b/src/plugins/expressions/public/plugin.ts @@ -6,9 +6,15 @@ * Side Public License, v 1. */ +import { pick } from 'lodash'; import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from 'src/core/public'; -import { ExpressionsService, ExpressionsServiceSetup, ExpressionsServiceStart } from '../common'; -import { setRenderersRegistry, setNotifications, setExpressionsService } from './services'; +import { ExpressionsServiceSetup, ExpressionsServiceStart } from '../common'; +import { + ExpressionsService, + setRenderersRegistry, + setNotifications, + setExpressionsService, +} from './services'; import { ReactExpressionRenderer } from './react_expression_renderer'; import { ExpressionLoader, IExpressionLoader, loader } from './loader'; import { render, ExpressionRenderHandler } from './render'; @@ -51,7 +57,7 @@ export class ExpressionsPublicPlugin implements Plugin>; name: Name; - type?: TypeToString>; + type?: TypeString | UnmappedTypeStrings; } // @public @@ -612,8 +612,8 @@ export class ExpressionsService implements PersistableStateService) => Record; diff --git a/src/plugins/expressions/public/services/expressions_services.ts b/src/plugins/expressions/public/services/expressions_services.ts new file mode 100644 index 0000000000000..388af81629c31 --- /dev/null +++ b/src/plugins/expressions/public/services/expressions_services.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { CoreSetup } from 'src/core/public'; +import { ExpressionsService as CommonExpressionsService } from '../../common'; +import { getUiSettingFn } from '../expression_functions'; + +export class ExpressionsService extends CommonExpressionsService { + setup({ getStartServices }: Pick) { + this.registerFunction(getUiSettingFn({ getStartServices })); + + return super.setup(); + } +} diff --git a/src/plugins/expressions/public/services.ts b/src/plugins/expressions/public/services/index.ts similarity index 87% rename from src/plugins/expressions/public/services.ts rename to src/plugins/expressions/public/services/index.ts index a700e54d77e19..db473037a0a4a 100644 --- a/src/plugins/expressions/public/services.ts +++ b/src/plugins/expressions/public/services/index.ts @@ -7,8 +7,8 @@ */ import { NotificationsStart } from 'kibana/public'; -import { createGetterSetter } from '../../kibana_utils/public'; -import { ExpressionsService, ExpressionRendererRegistry } from '../common'; +import { createGetterSetter } from '../../../kibana_utils/public'; +import { ExpressionsService, ExpressionRendererRegistry } from '../../common'; export const [getNotifications, setNotifications] = createGetterSetter( 'Notifications' @@ -23,3 +23,5 @@ export const [ getExpressionsService, setExpressionsService, ] = createGetterSetter('ExpressionsService'); + +export * from './expressions_services'; diff --git a/src/plugins/expressions/server/expression_functions/index.ts b/src/plugins/expressions/server/expression_functions/index.ts new file mode 100644 index 0000000000000..eb36291c613c6 --- /dev/null +++ b/src/plugins/expressions/server/expression_functions/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 * from './ui_setting'; diff --git a/src/plugins/expressions/server/expression_functions/ui_setting.ts b/src/plugins/expressions/server/expression_functions/ui_setting.ts new file mode 100644 index 0000000000000..0d3d5b1c1f997 --- /dev/null +++ b/src/plugins/expressions/server/expression_functions/ui_setting.ts @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { CoreSetup } from 'src/core/server'; +import { getUiSettingFn as getCommonUiSettingFn } from '../../common'; + +export function getUiSettingFn({ getStartServices }: Pick) { + return getCommonUiSettingFn({ + async getStartDependencies(getKibanaRequest) { + const [{ savedObjects, uiSettings }] = await getStartServices(); + const savedObjectsClient = savedObjects.getScopedClient(getKibanaRequest()); + const uiSettingsClient = uiSettings.asScopedToClient(savedObjectsClient); + + return { uiSettings: uiSettingsClient }; + }, + }); +} diff --git a/src/plugins/expressions/server/plugin.ts b/src/plugins/expressions/server/plugin.ts index 2c638d496ece6..2e45daf6e0f8c 100644 --- a/src/plugins/expressions/server/plugin.ts +++ b/src/plugins/expressions/server/plugin.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import { pick } from 'lodash'; import { CoreStart, CoreSetup, Plugin, PluginInitializerContext } from 'src/core/server'; import { ExpressionsService, ExpressionsServiceSetup, ExpressionsServiceStart } from '../common'; @@ -24,7 +25,7 @@ export class ExpressionsServerPlugin environment: 'server', }); - const setup = this.expressions.setup(); + const setup = this.expressions.setup(pick(core, 'getStartServices')); return Object.freeze(setup); } diff --git a/src/plugins/expressions/server/server.api.md b/src/plugins/expressions/server/server.api.md index 12af0480fac93..bc0980121b827 100644 --- a/src/plugins/expressions/server/server.api.md +++ b/src/plugins/expressions/server/server.api.md @@ -347,7 +347,7 @@ export interface ExpressionFunctionDefinition>; name: Name; - type?: TypeToString>; + type?: TypeString | UnmappedTypeStrings; } // @public diff --git a/src/plugins/expressions/server/services/expressions_services.ts b/src/plugins/expressions/server/services/expressions_services.ts new file mode 100644 index 0000000000000..914745436f151 --- /dev/null +++ b/src/plugins/expressions/server/services/expressions_services.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { CoreSetup } from 'src/core/server'; +import { ExpressionsService as CommonExpressionsService } from '../../common'; +import { getUiSettingFn } from '../expression_functions'; + +export class ExpressionsService extends CommonExpressionsService { + setup({ getStartServices }: Pick) { + this.registerFunction(getUiSettingFn({ getStartServices })); + + return super.setup(); + } +} diff --git a/src/plugins/expressions/server/services/index.ts b/src/plugins/expressions/server/services/index.ts new file mode 100644 index 0000000000000..c239c4efdb02c --- /dev/null +++ b/src/plugins/expressions/server/services/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 * from './expressions_services'; diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/confirmation_modal/confirmation_modal.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/confirmation_modal/confirmation_modal.test.tsx index 96f78a088fff4..bacab18d28509 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/confirmation_modal/confirmation_modal.test.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/confirmation_modal/confirmation_modal.test.tsx @@ -15,6 +15,7 @@ describe('DeleteScritpedFieldConfirmationModal', () => { test('should render normally', () => { const component = shallow( {}} hideDeleteConfirmationModal={() => {}} diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.test.tsx index 83ac96f6c1695..5a9f4eb871181 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.test.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.test.tsx @@ -15,6 +15,7 @@ import { IIndexPattern } from 'src/plugins/data/public'; const getIndexPatternMock = (mockedFields: any = {}) => ({ ...mockedFields } as IIndexPattern); +// @ts-expect-error invalid lang type const items: ScriptedFieldItem[] = [{ name: '1', lang: 'Elastic', script: '' }]; describe('Table', () => { diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_field_table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_field_table.test.tsx index 08a5f22723628..e6aa87172ca0b 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_field_table.test.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_field_table.test.tsx @@ -155,6 +155,7 @@ describe('ScriptedFieldsTable', () => { ); await component.update(); // Fire `componentWillMount()` + // @ts-expect-error lang is not valid component.instance().startDeleteField({ name: 'ScriptedField', lang: '', script: '' }); await component.update(); @@ -179,6 +180,7 @@ describe('ScriptedFieldsTable', () => { ); await component.update(); // Fire `componentWillMount()` + // @ts-expect-error lang is not valid component.instance().startDeleteField({ name: 'ScriptedField', lang: '', script: '' }); await component.update(); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx index 77ba2f734d3fe..7fd5170b669f7 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx @@ -65,7 +65,7 @@ export class ScriptedFieldsTable extends Component< const supportedLangs = getSupportedScriptingLanguages(); for (const field of fields) { - const lang: string = field.lang; + const lang = field.lang; if (deprecatedLangs.includes(lang) || !supportedLangs.includes(lang)) { deprecatedLangsInUse.push(lang); } diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/types.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/types.ts index 3348f5eb052eb..5c6adc824d225 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/types.ts +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/types.ts @@ -5,10 +5,10 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; /** @internal **/ export interface ScriptedFieldItem { name: string; - lang: string; + lang: estypes.ScriptLanguage; script: string; } diff --git a/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx index f0da57a5f9b6f..b05ddaed064cd 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import React, { PureComponent, Fragment } from 'react'; import { intersection, union, get } from 'lodash'; @@ -100,7 +100,7 @@ export interface FieldEditorState { isReady: boolean; isCreating: boolean; isDeprecatedLang: boolean; - scriptingLangs: string[]; + scriptingLangs: estypes.ScriptLanguage[]; fieldTypes: string[]; fieldTypeFormats: FieldTypeFormat[]; existingFieldNames: string[]; @@ -131,8 +131,8 @@ export class FieldEditor extends PureComponent { + onLangChange = (lang: estypes.ScriptLanguage) => { const { spec } = this.state; const fieldTypes = get(FIELD_TYPES_BY_LANG, lang, DEFAULT_FIELD_TYPES); spec.lang = lang; @@ -373,7 +374,7 @@ export class FieldEditor extends PureComponent { - this.onLangChange(e.target.value); + this.onLangChange(e.target.value as estypes.ScriptLanguage); }} /> diff --git a/src/plugins/index_pattern_management/public/components/index_pattern_table/empty_state/__snapshots__/empty_state.test.tsx.snap b/src/plugins/index_pattern_management/public/components/index_pattern_table/empty_state/__snapshots__/empty_state.test.tsx.snap index 645694371f905..1310488c65fab 100644 --- a/src/plugins/index_pattern_management/public/components/index_pattern_table/empty_state/__snapshots__/empty_state.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/index_pattern_table/empty_state/__snapshots__/empty_state.test.tsx.snap @@ -59,7 +59,6 @@ exports[`EmptyState should render normally 1`] = ` } - isDisabled={false} onClick={[Function]} title={ { docLinks={docLinks} onRefresh={() => {}} navigateToApp={async () => {}} - getMlCardState={() => MlCardState.ENABLED} canSave={true} /> ); @@ -48,7 +46,6 @@ describe('EmptyState', () => { docLinks={docLinks} onRefresh={onRefreshHandler} navigateToApp={async () => {}} - getMlCardState={() => MlCardState.ENABLED} canSave={true} /> ); diff --git a/src/plugins/index_pattern_management/public/components/index_pattern_table/empty_state/empty_state.tsx b/src/plugins/index_pattern_management/public/components/index_pattern_table/empty_state/empty_state.tsx index 438eb8a031993..240e732752916 100644 --- a/src/plugins/index_pattern_management/public/components/index_pattern_table/empty_state/empty_state.tsx +++ b/src/plugins/index_pattern_management/public/components/index_pattern_table/empty_state/empty_state.tsx @@ -8,7 +8,6 @@ import './empty_state.scss'; import React from 'react'; -import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { DocLinksStart, ApplicationStart } from 'kibana/public'; import { @@ -28,60 +27,18 @@ import { } from '@elastic/eui'; import { useHistory } from 'react-router-dom'; import { reactRouterNavigate } from '../../../../../../plugins/kibana_react/public'; -import { MlCardState } from '../../../types'; export const EmptyState = ({ onRefresh, navigateToApp, docLinks, - getMlCardState, canSave, }: { onRefresh: () => void; navigateToApp: ApplicationStart['navigateToApp']; docLinks: DocLinksStart; - getMlCardState: () => MlCardState; canSave: boolean; }) => { - const mlCard = ( - - navigateToApp('ml', { path: '#/filedatavisualizer' })} - className="inpEmptyState__card" - betaBadgeLabel={ - getMlCardState() === MlCardState.ENABLED - ? undefined - : i18n.translate( - 'indexPatternManagement.createIndexPattern.emptyState.basicLicenseLabel', - { - defaultMessage: 'Basic', - } - ) - } - betaBadgeTooltipContent={i18n.translate( - 'indexPatternManagement.createIndexPattern.emptyState.basicLicenseDescription', - { - defaultMessage: 'This feature requires a Basic license.', - } - )} - isDisabled={getMlCardState() === MlCardState.DISABLED} - icon={} - title={ - - } - description={ - - } - /> - - ); - const createAnyway = ( - {getMlCardState() !== MlCardState.HIDDEN ? mlCard : <>} + + navigateToApp('home', { path: '#/tutorial_directory/fileDataViz' })} + className="inpEmptyState__card" + icon={} + title={ + + } + description={ + + } + /> + { application, http, data, - getMlCardState, } = useKibana().services; const [indexPatterns, setIndexPatterns] = useState([]); const [creationOptions, setCreationOptions] = useState([]); @@ -182,7 +181,6 @@ export const IndexPatternTable = ({ canSave, history }: Props) => { onRefresh={loadSources} docLinks={docLinks} navigateToApp={application.navigateToApp} - getMlCardState={getMlCardState} canSave={canSave} /> ); diff --git a/src/plugins/index_pattern_management/public/index.ts b/src/plugins/index_pattern_management/public/index.ts index 94611705a9390..726c055d1b8c3 100644 --- a/src/plugins/index_pattern_management/public/index.ts +++ b/src/plugins/index_pattern_management/public/index.ts @@ -30,5 +30,3 @@ export { IndexPatternCreationOption, IndexPatternListConfig, } from './service'; - -export { MlCardState } from './types'; diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index 355f529fe0f75..ec5b7c74020a5 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -23,7 +23,7 @@ import { CreateIndexPatternWizardWithRouter, } from '../components'; import { IndexPatternManagementStartDependencies, IndexPatternManagementStart } from '../plugin'; -import { IndexPatternManagmentContext, MlCardState } from '../types'; +import { IndexPatternManagmentContext } from '../types'; const readOnlyBadge = { text: i18n.translate('indexPatternManagement.indexPatterns.badge.readOnly.text', { @@ -37,8 +37,7 @@ const readOnlyBadge = { export async function mountManagementSection( getStartServices: StartServicesAccessor, - params: ManagementAppMountParams, - getMlCardState: () => MlCardState + params: ManagementAppMountParams ) { const [ { chrome, application, uiSettings, notifications, overlays, http, docLinks }, @@ -63,7 +62,6 @@ export async function mountManagementSection( indexPatternFieldEditor, indexPatternManagementStart: indexPatternManagementStart as IndexPatternManagementStart, setBreadcrumbs: params.setBreadcrumbs, - getMlCardState, fieldFormatEditors: indexPatternFieldEditor.fieldFormatEditors, }; diff --git a/src/plugins/index_pattern_management/public/mocks.ts b/src/plugins/index_pattern_management/public/mocks.ts index 3462131e50463..6c709fb14f08d 100644 --- a/src/plugins/index_pattern_management/public/mocks.ts +++ b/src/plugins/index_pattern_management/public/mocks.ts @@ -26,9 +26,6 @@ const createSetupContract = (): IndexPatternManagementSetup => ({ list: { addListConfig: jest.fn(), } as any, - environment: { - update: jest.fn(), - }, }); const createStartContract = (): IndexPatternManagementStart => ({ @@ -93,7 +90,6 @@ const createIndexPatternManagmentContext = (): { indexPatternFieldEditor, indexPatternManagementStart: createStartContract(), setBreadcrumbs: () => {}, - getMlCardState: () => 2, fieldFormatEditors: indexPatternFieldEditor.fieldFormatEditors, }; }; diff --git a/src/plugins/index_pattern_management/public/plugin.ts b/src/plugins/index_pattern_management/public/plugin.ts index ed92172c8b91c..e3c156927bfac 100644 --- a/src/plugins/index_pattern_management/public/plugin.ts +++ b/src/plugins/index_pattern_management/public/plugin.ts @@ -77,9 +77,7 @@ export class IndexPatternManagementPlugin mount: async (params) => { const { mountManagementSection } = await import('./management_app'); - return mountManagementSection(core.getStartServices, params, () => - this.indexPatternManagementService.environmentService.getEnvironment().ml() - ); + return mountManagementSection(core.getStartServices, params); }, }); diff --git a/src/plugins/index_pattern_management/public/scripting_languages/index.ts b/src/plugins/index_pattern_management/public/scripting_languages/index.ts index c6b2f3c4b6b27..aeb38c8172be0 100644 --- a/src/plugins/index_pattern_management/public/scripting_languages/index.ts +++ b/src/plugins/index_pattern_management/public/scripting_languages/index.ts @@ -5,15 +5,15 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import { i18n } from '@kbn/i18n'; import { HttpStart, NotificationsStart } from 'src/core/public'; -export function getSupportedScriptingLanguages(): string[] { +export function getSupportedScriptingLanguages(): estypes.ScriptLanguage[] { return ['painless']; } -export function getDeprecatedScriptingLanguages(): string[] { +export function getDeprecatedScriptingLanguages(): estypes.ScriptLanguage[] { return []; } diff --git a/src/plugins/index_pattern_management/public/service/environment/environment.mock.ts b/src/plugins/index_pattern_management/public/service/environment/environment.mock.ts deleted file mode 100644 index 1eaab2eaccc11..0000000000000 --- a/src/plugins/index_pattern_management/public/service/environment/environment.mock.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import type { PublicMethodsOf } from '@kbn/utility-types'; -import { EnvironmentService, EnvironmentServiceSetup } from './environment'; -import { MlCardState } from '../../types'; - -const createSetupMock = (): jest.Mocked => { - const setup = { - update: jest.fn(), - }; - return setup; -}; - -const createMock = (): jest.Mocked> => { - const service = { - setup: jest.fn(), - getEnvironment: jest.fn(() => ({ - ml: () => MlCardState.ENABLED, - })), - }; - service.setup.mockImplementation(createSetupMock); - return service; -}; - -export const environmentServiceMock = { - createSetup: createSetupMock, - create: createMock, -}; diff --git a/src/plugins/index_pattern_management/public/service/environment/environment.test.ts b/src/plugins/index_pattern_management/public/service/environment/environment.test.ts deleted file mode 100644 index 9e571374b4784..0000000000000 --- a/src/plugins/index_pattern_management/public/service/environment/environment.test.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { EnvironmentService } from './environment'; -import { MlCardState } from '../../types'; - -describe('EnvironmentService', () => { - describe('setup', () => { - test('allows multiple update calls', () => { - const setup = new EnvironmentService().setup(); - expect(() => { - setup.update({ ml: () => MlCardState.ENABLED }); - }).not.toThrow(); - }); - }); - - describe('getEnvironment', () => { - test('returns default values', () => { - const service = new EnvironmentService(); - expect(service.getEnvironment().ml()).toEqual(MlCardState.DISABLED); - }); - - test('returns last state of update calls', () => { - let cardState = MlCardState.DISABLED; - const service = new EnvironmentService(); - const setup = service.setup(); - setup.update({ ml: () => cardState }); - expect(service.getEnvironment().ml()).toEqual(MlCardState.DISABLED); - cardState = MlCardState.ENABLED; - expect(service.getEnvironment().ml()).toEqual(MlCardState.ENABLED); - }); - }); -}); diff --git a/src/plugins/index_pattern_management/public/service/environment/environment.ts b/src/plugins/index_pattern_management/public/service/environment/environment.ts deleted file mode 100644 index 7bf0c1eb52068..0000000000000 --- a/src/plugins/index_pattern_management/public/service/environment/environment.ts +++ /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 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 { MlCardState } from '../../types'; - -/** @public */ -export interface Environment { - /** - * Flag whether ml features should be advertised - */ - readonly ml: () => MlCardState; -} - -export class EnvironmentService { - private environment = { - ml: () => MlCardState.DISABLED, - }; - - public setup() { - return { - /** - * Update the environment to influence how available features are presented. - * @param update - */ - update: (update: Partial) => { - this.environment = Object.assign({}, this.environment, update); - }, - }; - } - - public getEnvironment() { - return this.environment; - } -} - -export type EnvironmentServiceSetup = ReturnType; diff --git a/src/plugins/index_pattern_management/public/service/index_pattern_management_service.ts b/src/plugins/index_pattern_management/public/service/index_pattern_management_service.ts index 15be7f11892e4..f30ccfcb9f3ed 100644 --- a/src/plugins/index_pattern_management/public/service/index_pattern_management_service.ts +++ b/src/plugins/index_pattern_management/public/service/index_pattern_management_service.ts @@ -9,7 +9,6 @@ import { HttpSetup } from '../../../../core/public'; import { IndexPatternCreationManager, IndexPatternCreationConfig } from './creation'; import { IndexPatternListManager, IndexPatternListConfig } from './list'; -import { EnvironmentService } from './environment'; interface SetupDependencies { httpClient: HttpSetup; } @@ -22,12 +21,10 @@ interface SetupDependencies { export class IndexPatternManagementService { indexPatternCreationManager: IndexPatternCreationManager; indexPatternListConfig: IndexPatternListManager; - environmentService: EnvironmentService; constructor() { this.indexPatternCreationManager = new IndexPatternCreationManager(); this.indexPatternListConfig = new IndexPatternListManager(); - this.environmentService = new EnvironmentService(); } public setup({ httpClient }: SetupDependencies) { @@ -40,7 +37,6 @@ export class IndexPatternManagementService { return { creation: creationManagerSetup, list: indexPatternListConfigSetup, - environment: this.environmentService.setup(), }; } diff --git a/src/plugins/index_pattern_management/public/types.ts b/src/plugins/index_pattern_management/public/types.ts index 58a138df633fd..a61eeb99b25a5 100644 --- a/src/plugins/index_pattern_management/public/types.ts +++ b/src/plugins/index_pattern_management/public/types.ts @@ -33,14 +33,7 @@ export interface IndexPatternManagmentContext { indexPatternFieldEditor: IndexPatternFieldEditorStart; indexPatternManagementStart: IndexPatternManagementStart; setBreadcrumbs: ManagementAppMountParams['setBreadcrumbs']; - getMlCardState: () => MlCardState; fieldFormatEditors: IndexPatternFieldEditorStart['fieldFormatEditors']; } export type IndexPatternManagmentContextValue = KibanaReactContextValue; - -export enum MlCardState { - HIDDEN, - DISABLED, - ENABLED, -} diff --git a/src/plugins/kibana_react/public/code_editor/__snapshots__/code_editor.test.tsx.snap b/src/plugins/kibana_react/public/code_editor/__snapshots__/code_editor.test.tsx.snap index a779ef540d72e..d4fb5a708e440 100644 --- a/src/plugins/kibana_react/public/code_editor/__snapshots__/code_editor.test.tsx.snap +++ b/src/plugins/kibana_react/public/code_editor/__snapshots__/code_editor.test.tsx.snap @@ -11,6 +11,7 @@ exports[`is rendered 1`] = ` onChange={[Function]} options={ Object { + "matchBrackets": "never", "minimap": Object { "enabled": false, }, @@ -39,6 +40,7 @@ exports[`is rendered 1`] = ` nodeType="div" onResize={[Function]} querySelector={null} + refreshMode="debounce" refreshRate={1000} skipOnMount={false} targetDomEl={null} diff --git a/src/plugins/kibana_react/public/code_editor/code_editor.tsx b/src/plugins/kibana_react/public/code_editor/code_editor.tsx index 55e10e7861e51..251f05950da22 100644 --- a/src/plugins/kibana_react/public/code_editor/code_editor.tsx +++ b/src/plugins/kibana_react/public/code_editor/code_editor.tsx @@ -187,10 +187,16 @@ export class CodeEditor extends React.Component { wordBasedSuggestions: false, wordWrap: 'on', wrappingIndent: 'indent', + matchBrackets: 'never', ...options, }} /> - + ); } diff --git a/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts b/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts index 1fa7d8e846c9d..e7c6b53ff97b3 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts @@ -148,6 +148,7 @@ export const applicationUsageSchema = { maps: commonSchema, ml: commonSchema, monitoring: commonSchema, + observabilityCases: commonSchema, 'observability-overview': commonSchema, osquery: commonSchema, security_account: commonSchema, diff --git a/src/plugins/management/common/locator.test.ts b/src/plugins/management/common/locator.test.ts new file mode 100644 index 0000000000000..dda393a4203ec --- /dev/null +++ b/src/plugins/management/common/locator.test.ts @@ -0,0 +1,53 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { MANAGEMENT_APP_ID } from './contants'; +import { ManagementAppLocator, MANAGEMENT_APP_LOCATOR } from './locator'; + +test('locator has the right ID', () => { + const locator = new ManagementAppLocator(); + + expect(locator.id).toBe(MANAGEMENT_APP_LOCATOR); +}); + +test('returns management app ID', async () => { + const locator = new ManagementAppLocator(); + const location = await locator.getLocation({ + sectionId: 'a', + appId: 'b', + }); + + expect(location).toMatchObject({ + app: MANAGEMENT_APP_ID, + }); +}); + +test('returns Kibana location for section ID and app ID pair', async () => { + const locator = new ManagementAppLocator(); + const location = await locator.getLocation({ + sectionId: 'ingest', + appId: 'index', + }); + + expect(location).toMatchObject({ + route: '/ingest/index', + state: {}, + }); +}); + +test('when app ID is not provided, returns path to just the section ID', async () => { + const locator = new ManagementAppLocator(); + const location = await locator.getLocation({ + sectionId: 'data', + }); + + expect(location).toMatchObject({ + route: '/data', + state: {}, + }); +}); diff --git a/src/plugins/management/common/locator.ts b/src/plugins/management/common/locator.ts new file mode 100644 index 0000000000000..4a4a50f468adc --- /dev/null +++ b/src/plugins/management/common/locator.ts @@ -0,0 +1,32 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { SerializableState } from 'src/plugins/kibana_utils/common'; +import { LocatorDefinition } from 'src/plugins/share/common'; +import { MANAGEMENT_APP_ID } from './contants'; + +export const MANAGEMENT_APP_LOCATOR = 'MANAGEMENT_APP_LOCATOR'; + +export interface ManagementAppLocatorParams extends SerializableState { + sectionId: string; + appId?: string; +} + +export class ManagementAppLocator implements LocatorDefinition { + public readonly id = MANAGEMENT_APP_LOCATOR; + + public readonly getLocation = async (params: ManagementAppLocatorParams) => { + const route = `/${params.sectionId}${params.appId ? '/' + params.appId : ''}`; + + return { + app: MANAGEMENT_APP_ID, + route, + state: {}, + }; + }; +} diff --git a/src/plugins/management/kibana.json b/src/plugins/management/kibana.json index 6c8574f024229..44c3f861709ce 100644 --- a/src/plugins/management/kibana.json +++ b/src/plugins/management/kibana.json @@ -3,6 +3,6 @@ "version": "kibana", "server": true, "ui": true, - "optionalPlugins": ["home"], + "optionalPlugins": ["home", "share"], "requiredBundles": ["kibanaReact", "kibanaUtils", "home"] } diff --git a/src/plugins/management/public/components/landing/landing.tsx b/src/plugins/management/public/components/landing/landing.tsx index 5e361cfaff87d..4683185a5a783 100644 --- a/src/plugins/management/public/components/landing/landing.tsx +++ b/src/plugins/management/public/components/landing/landing.tsx @@ -8,15 +8,7 @@ import React from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; - -import { - EuiHorizontalRule, - EuiIcon, - EuiPageContent, - EuiSpacer, - EuiText, - EuiTitle, -} from '@elastic/eui'; +import { EuiEmptyPrompt, EuiHorizontalRule, EuiPageContent } from '@elastic/eui'; interface ManagementLandingPageProps { version: string; @@ -27,39 +19,37 @@ export const ManagementLandingPage = ({ version, setBreadcrumbs }: ManagementLan setBreadcrumbs(); return ( - -
-
- - - -

- -

-
- + + - -
- - - - -

- -

-
-
+ + } + body={ + <> +

+ +

+ +

+ +

+ + } + />
); }; diff --git a/src/plugins/management/public/components/management_app/management_app.tsx b/src/plugins/management/public/components/management_app/management_app.tsx index 350e2f3de0cdf..23d0a29083747 100644 --- a/src/plugins/management/public/components/management_app/management_app.tsx +++ b/src/plugins/management/public/components/management_app/management_app.tsx @@ -5,20 +5,23 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ +import './management_app.scss'; import React, { useState, useEffect, useCallback } from 'react'; import { AppMountParameters, ChromeBreadcrumb, ScopedHistory } from 'kibana/public'; import { I18nProvider } from '@kbn/i18n/react'; -import { EuiPage } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; import { ManagementSection, MANAGEMENT_BREADCRUMB } from '../../utils'; import { ManagementRouter } from './management_router'; -import { ManagementSidebarNav } from '../management_sidebar_nav'; -import { reactRouterNavigate } from '../../../../kibana_react/public'; +import { managementSidebarNav } from '../management_sidebar_nav/management_sidebar_nav'; +import { + KibanaPageTemplate, + KibanaPageTemplateProps, + reactRouterNavigate, +} from '../../../../kibana_react/public'; import { SectionsServiceStart } from '../../types'; -import './management_app.scss'; - interface ManagementAppProps { appBasePath: string; history: AppMountParameters['history']; @@ -64,10 +67,30 @@ export const ManagementApp = ({ dependencies, history }: ManagementAppProps) => return null; } + const solution: KibanaPageTemplateProps['solutionNav'] = { + name: i18n.translate('management.nav.label', { + defaultMessage: 'Management', + }), + icon: 'managementApp', + 'data-test-subj': 'mgtSideBarNav', + items: managementSidebarNav({ + selectedId, + sections, + history, + }), + }; + return ( - - + sections={sections} dependencies={dependencies} /> - + ); }; diff --git a/src/plugins/management/public/components/management_app/management_router.tsx b/src/plugins/management/public/components/management_app/management_router.tsx index b3f978d5c6cd2..5ec1253ba77ef 100644 --- a/src/plugins/management/public/components/management_app/management_router.tsx +++ b/src/plugins/management/public/components/management_app/management_router.tsx @@ -8,7 +8,6 @@ import React, { memo } from 'react'; import { Route, Router, Switch } from 'react-router-dom'; -import { EuiPageBody } from '@elastic/eui'; import { AppMountParameters, ChromeBreadcrumb, ScopedHistory } from 'kibana/public'; import { ManagementAppWrapper } from '../management_app_wrapper'; import { ManagementLandingPage } from '../landing'; @@ -26,36 +25,34 @@ interface ManagementRouterProps { export const ManagementRouter = memo( ({ dependencies, history, setBreadcrumbs, onAppMounted, sections }: ManagementRouterProps) => ( - - - {sections.map((section) => - section - .getAppsEnabled() - .map((app) => ( - ( - - )} - /> - )) - )} - ( - + {sections.map((section) => + section + .getAppsEnabled() + .map((app) => ( + ( + + )} /> - )} - /> - - + )) + )} + ( + + )} + /> + ) ); diff --git a/src/plugins/management/public/components/management_app_wrapper/management_app_wrapper.tsx b/src/plugins/management/public/components/management_app_wrapper/management_app_wrapper.tsx index 8e0043937303f..72bfe609c141a 100644 --- a/src/plugins/management/public/components/management_app_wrapper/management_app_wrapper.tsx +++ b/src/plugins/management/public/components/management_app_wrapper/management_app_wrapper.tsx @@ -9,8 +9,10 @@ import React, { createRef, Component } from 'react'; import { ChromeBreadcrumb, AppMountParameters, ScopedHistory } from 'kibana/public'; +import classNames from 'classnames'; import { ManagementApp } from '../../utils'; import { Unmount } from '../../types'; +import { APP_WRAPPER_CLASS } from '../../../../../../src/core/public'; interface ManagementSectionWrapperProps { app: ManagementApp; @@ -53,6 +55,12 @@ export class ManagementAppWrapper extends Component; + return ( +
+ ); } } diff --git a/src/plugins/management/public/components/management_sidebar_nav/index.ts b/src/plugins/management/public/components/management_sidebar_nav/index.ts index 5bb80adf3e8ba..9cee992a17948 100644 --- a/src/plugins/management/public/components/management_sidebar_nav/index.ts +++ b/src/plugins/management/public/components/management_sidebar_nav/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export { ManagementSidebarNav } from './management_sidebar_nav'; +export { managementSidebarNav } from './management_sidebar_nav'; diff --git a/src/plugins/management/public/components/management_sidebar_nav/management_sidebar_nav.tsx b/src/plugins/management/public/components/management_sidebar_nav/management_sidebar_nav.tsx index 1b40bfcca3c63..bf1b81061f6a9 100644 --- a/src/plugins/management/public/components/management_sidebar_nav/management_sidebar_nav.tsx +++ b/src/plugins/management/public/components/management_sidebar_nav/management_sidebar_nav.tsx @@ -6,24 +6,13 @@ * Side Public License, v 1. */ -import React, { useState } from 'react'; -import { i18n } from '@kbn/i18n'; +import React from 'react'; import { sortBy } from 'lodash'; -import { - EuiIcon, - EuiSideNav, - EuiScreenReaderOnly, - EuiSideNavItemType, - EuiFlexGroup, - EuiFlexItem, - EuiToolTip, -} from '@elastic/eui'; +import { EuiIcon, EuiSideNavItemType, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; import { AppMountParameters } from 'kibana/public'; import { ManagementApp, ManagementSection } from '../../utils'; -import './management_sidebar_nav.scss'; - import { ManagementItem } from '../../utils/management_item'; import { reactRouterNavigate } from '../../../../kibana_react/public'; @@ -33,24 +22,12 @@ interface ManagementSidebarNavProps { selectedId: string; } -const headerLabel = i18n.translate('management.nav.label', { - defaultMessage: 'Management', -}); - -const navMenuLabel = i18n.translate('management.nav.menu', { - defaultMessage: 'Management menu', -}); - /** @internal **/ -export const ManagementSidebarNav = ({ +export const managementSidebarNav = ({ selectedId, sections, history, }: ManagementSidebarNavProps) => { - const HEADER_ID = 'stack-management-nav-header'; - const [isSideNavOpenOnMobile, setIsSideNavOpenOnMobile] = useState(false); - const toggleOpenOnMobile = () => setIsSideNavOpenOnMobile(!isSideNavOpenOnMobile); - const sectionsToNavItems = (managementSections: ManagementSection[]) => { const sortedManagementSections = sortBy(managementSections, 'order'); @@ -83,11 +60,11 @@ export const ManagementSidebarNav = ({ const TooltipWrapper = ({ text, tip }: TooltipWrapperProps) => ( - + {text} - + @@ -109,19 +86,5 @@ export const ManagementSidebarNav = ({ }; }; - return ( - <> - -

{headerLabel}

-
- - - ); + return sectionsToNavItems(sections); }; diff --git a/src/plugins/management/public/mocks/index.ts b/src/plugins/management/public/mocks/index.ts index 4dcdd22d5d209..70d853f32dfcc 100644 --- a/src/plugins/management/public/mocks/index.ts +++ b/src/plugins/management/public/mocks/index.ts @@ -30,6 +30,14 @@ const createSetupContract = (): ManagementSetup => ({ stack: createManagementSectionMock(), } as unknown) as DefinedSections, }, + locator: { + getLocation: jest.fn(async () => ({ + app: 'MANAGEMENT', + route: '', + state: {}, + })), + navigate: jest.fn(), + }, }); const createStartContract = (): ManagementStart => ({ diff --git a/src/plugins/management/public/plugin.ts b/src/plugins/management/public/plugin.ts index 1f96ec87171c5..3289b2f6f5446 100644 --- a/src/plugins/management/public/plugin.ts +++ b/src/plugins/management/public/plugin.ts @@ -8,6 +8,7 @@ import { i18n } from '@kbn/i18n'; import { BehaviorSubject } from 'rxjs'; +import type { SharePluginSetup, SharePluginStart } from 'src/plugins/share/public'; import { ManagementSetup, ManagementStart } from './types'; import { FeatureCatalogueCategory, HomePublicPluginSetup } from '../../home/public'; import { @@ -24,6 +25,7 @@ import { } from '../../../core/public'; import { MANAGEMENT_APP_ID } from '../common/contants'; +import { ManagementAppLocator } from '../common/locator'; import { ManagementSectionsService, getSectionsServiceStartPrivate, @@ -32,9 +34,21 @@ import { ManagementSection } from './utils'; interface ManagementSetupDependencies { home?: HomePublicPluginSetup; + share: SharePluginSetup; } -export class ManagementPlugin implements Plugin { +interface ManagementStartDependencies { + share: SharePluginStart; +} + +export class ManagementPlugin + implements + Plugin< + ManagementSetup, + ManagementStart, + ManagementSetupDependencies, + ManagementStartDependencies + > { private readonly managementSections = new ManagementSectionsService(); private readonly appUpdater = new BehaviorSubject(() => { @@ -58,8 +72,9 @@ export class ManagementPlugin implements Plugin; } export interface DefinedSections { diff --git a/src/plugins/management/server/plugin.ts b/src/plugins/management/server/plugin.ts index 5bb6a14e0b450..349cab6206bab 100644 --- a/src/plugins/management/server/plugin.ts +++ b/src/plugins/management/server/plugin.ts @@ -7,21 +7,37 @@ */ import { PluginInitializerContext, CoreSetup, CoreStart, Plugin, Logger } from 'kibana/server'; +import { LocatorPublic } from 'src/plugins/share/common'; +import type { SharePluginSetup } from 'src/plugins/share/server'; +import { ManagementAppLocator, ManagementAppLocatorParams } from '../common/locator'; import { capabilitiesProvider } from './capabilities_provider'; -export class ManagementServerPlugin implements Plugin { +interface ManagementSetupDependencies { + share: SharePluginSetup; +} + +export interface ManagementSetup { + locator: LocatorPublic; +} + +export class ManagementServerPlugin + implements Plugin { private readonly logger: Logger; constructor(initializerContext: PluginInitializerContext) { this.logger = initializerContext.logger.get(); } - public setup(core: CoreSetup) { + public setup(core: CoreSetup, { share }: ManagementSetupDependencies) { this.logger.debug('management: Setup'); + const locator = share.url.locators.create(new ManagementAppLocator()); + core.capabilities.registerProvider(capabilitiesProvider); - return {}; + return { + locator, + }; } public start(core: CoreStart) { diff --git a/src/plugins/security_oss/kibana.json b/src/plugins/security_oss/kibana.json index 70e37d586f1db..c93b5c3b60714 100644 --- a/src/plugins/security_oss/kibana.json +++ b/src/plugins/security_oss/kibana.json @@ -1,5 +1,10 @@ { "id": "securityOss", + "owner": { + "name": "Platform Security", + "githubTeam": "kibana-security" + }, + "description": "This plugin exposes a limited set of security functionality to OSS plugins.", "version": "8.0.0", "kibanaVersion": "kibana", "configPath": ["security"], diff --git a/src/plugins/share/common/index.ts b/src/plugins/share/common/index.ts new file mode 100644 index 0000000000000..8b5d8d4557194 --- /dev/null +++ b/src/plugins/share/common/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { LocatorDefinition, LocatorPublic } from './url_service'; diff --git a/src/plugins/share/public/index.ts b/src/plugins/share/public/index.ts index 46fad0dee13b0..d13bb15f8c72c 100644 --- a/src/plugins/share/public/index.ts +++ b/src/plugins/share/public/index.ts @@ -7,10 +7,12 @@ */ export { CSV_QUOTE_VALUES_SETTING, CSV_SEPARATOR_SETTING } from '../common/constants'; +export { LocatorDefinition } from '../common/url_service'; export { UrlGeneratorStateMapping } from './url_generators/url_generator_definition'; export { SharePluginSetup, SharePluginStart } from './plugin'; + export { ShareContext, ShareMenuProvider, diff --git a/src/plugins/share/server/index.ts b/src/plugins/share/server/index.ts index d1a0ed1f016f0..d820a362131a4 100644 --- a/src/plugins/share/server/index.ts +++ b/src/plugins/share/server/index.ts @@ -9,6 +9,8 @@ import { PluginInitializerContext } from '../../../core/server'; import { SharePlugin } from './plugin'; +export { SharePluginSetup, SharePluginStart } from './plugin'; + export { CSV_QUOTE_VALUES_SETTING, CSV_SEPARATOR_SETTING } from '../common/constants'; export function plugin(initializerContext: PluginInitializerContext) { diff --git a/src/plugins/spaces_oss/kibana.json b/src/plugins/spaces_oss/kibana.json index e048fb7ffb79c..10127634618f1 100644 --- a/src/plugins/spaces_oss/kibana.json +++ b/src/plugins/spaces_oss/kibana.json @@ -1,5 +1,10 @@ { "id": "spacesOss", + "owner": { + "name": "Platform Security", + "githubTeam": "kibana-security" + }, + "description": "This plugin exposes a limited set of spaces functionality to OSS plugins.", "version": "kibana", "server": false, "ui": true, diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index 7b6c4ba9788f1..51df1d3162b7c 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -3970,6 +3970,137 @@ } } }, + "observabilityCases": { + "properties": { + "appId": { + "type": "keyword", + "_meta": { + "description": "The application being tracked" + } + }, + "viewId": { + "type": "keyword", + "_meta": { + "description": "Always `main`" + } + }, + "clicks_total": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application since we started counting them" + } + }, + "clicks_7_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application over the last 7 days" + } + }, + "clicks_30_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application over the last 30 days" + } + }, + "clicks_90_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application over the last 90 days" + } + }, + "minutes_on_screen_total": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen since we started counting them." + } + }, + "minutes_on_screen_7_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen over the last 7 days" + } + }, + "minutes_on_screen_30_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen over the last 30 days" + } + }, + "minutes_on_screen_90_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen over the last 90 days" + } + }, + "views": { + "type": "array", + "items": { + "properties": { + "appId": { + "type": "keyword", + "_meta": { + "description": "The application being tracked" + } + }, + "viewId": { + "type": "keyword", + "_meta": { + "description": "The application view being tracked" + } + }, + "clicks_total": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application sub view since we started counting them" + } + }, + "clicks_7_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the active application sub view over the last 7 days" + } + }, + "clicks_30_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the active application sub view over the last 30 days" + } + }, + "clicks_90_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the active application sub view over the last 90 days" + } + }, + "minutes_on_screen_total": { + "type": "float", + "_meta": { + "description": "Minutes the application sub view is active and on-screen since we started counting them." + } + }, + "minutes_on_screen_7_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen active application sub view over the last 7 days" + } + }, + "minutes_on_screen_30_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen active application sub view over the last 30 days" + } + }, + "minutes_on_screen_90_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen active application sub view over the last 90 days" + } + } + } + } + } + } + }, "observability-overview": { "properties": { "appId": { 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 7fd6ca4080d6a..bacfa5e77107f 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 @@ -188,7 +188,7 @@ describe('get_local_stats', () => { describe('handleLocalStats', () => { it('returns expected object without xpack or kibana data', () => { const result = handleLocalStats( - clusterInfo as estypes.RootNodeInfoResponse, + clusterInfo as estypes.InfoResponse, clusterStatsWithNodesUsage, void 0, void 0, @@ -205,7 +205,7 @@ describe('get_local_stats', () => { it('returns expected object with xpack', () => { const result = handleLocalStats( - clusterInfo as estypes.RootNodeInfoResponse, + clusterInfo as estypes.InfoResponse, clusterStatsWithNodesUsage, void 0, void 0, diff --git a/src/plugins/telemetry/server/telemetry_collection/get_local_stats.ts b/src/plugins/telemetry/server/telemetry_collection/get_local_stats.ts index 7fdcb50b704af..7860949e098aa 100644 --- a/src/plugins/telemetry/server/telemetry_collection/get_local_stats.ts +++ b/src/plugins/telemetry/server/telemetry_collection/get_local_stats.ts @@ -28,7 +28,7 @@ import { getDataTelemetry, DATA_TELEMETRY_ID, DataTelemetryPayload } from './get */ export function handleLocalStats( // eslint-disable-next-line @typescript-eslint/naming-convention - { cluster_name, cluster_uuid, version }: estypes.RootNodeInfoResponse, + { cluster_name, cluster_uuid, version }: estypes.InfoResponse, { _nodes, cluster_name: clusterName, ...clusterStats }: ClusterStats, kibana: KibanaUsageStats | undefined, dataTelemetry: DataTelemetryPayload | undefined, diff --git a/src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.ts b/src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.ts index c35b8a3d24498..0d58d80ed5965 100644 --- a/src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.ts +++ b/src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.ts @@ -14,7 +14,7 @@ import { TIMEOUT } from './constants'; * Data returned by GET /_nodes/usage, but flattened as an array of {@link estypes.NodeUsageInformation} * with the node ID set in the field `node_id`. */ -export interface NodeUsage extends estypes.NodeUsageInformation { +export interface NodeUsage extends estypes.NodesUsageNodeUsage { /** * The Node ID as reported by ES */ diff --git a/src/plugins/telemetry/tsconfig.json b/src/plugins/telemetry/tsconfig.json index 3b043b8aab895..710e209537b8e 100644 --- a/src/plugins/telemetry/tsconfig.json +++ b/src/plugins/telemetry/tsconfig.json @@ -8,7 +8,14 @@ "declarationMap": true, "isolatedModules": true }, - "include": ["public/**/**/*", "server/**/**/*", "common/**/*", "../../../typings/**/*"], + "include": [ + "public/**/**/*", + "server/**/**/*", + "common/**/*", + "../../../typings/**/*", + "schema/oss_plugins.json", + "schema/oss_root.json", + ], "references": [ { "path": "../../core/tsconfig.json" }, { "path": "../../plugins/kibana_react/tsconfig.json" }, diff --git a/src/plugins/vis_type_tagcloud/public/components/tag_cloud.test.js b/src/plugins/vis_type_tagcloud/public/components/tag_cloud.test.js index 2fb2be0ace7cd..eb575457146c5 100644 --- a/src/plugins/vis_type_tagcloud/public/components/tag_cloud.test.js +++ b/src/plugins/vis_type_tagcloud/public/components/tag_cloud.test.js @@ -150,7 +150,8 @@ describe('tag cloud tests', () => { }); [5, 100, 200, 300, 500].forEach((timeout) => { - describe(`should only send single renderComplete event at the very end, using ${timeout}ms timeout`, () => { + // FLAKY: https://github.com/elastic/kibana/issues/94043 + describe.skip(`should only send single renderComplete event at the very end, using ${timeout}ms timeout`, () => { beforeEach(async () => { //TagCloud takes at least 600ms to complete (due to d3 animation) //renderComplete should only notify at the last one diff --git a/src/plugins/vis_type_timeseries/common/fields_utils.test.ts b/src/plugins/vis_type_timeseries/common/fields_utils.test.ts index 9550697e22851..f056c38b0c0c3 100644 --- a/src/plugins/vis_type_timeseries/common/fields_utils.test.ts +++ b/src/plugins/vis_type_timeseries/common/fields_utils.test.ts @@ -12,7 +12,7 @@ import type { FieldSpec } from '../../data/common'; describe('fields_utils', () => { describe('toSanitizedFieldType', () => { const mockedField = { - lang: 'lang', + lang: 'painless', conflictDescriptions: {}, aggregatable: true, name: 'name', diff --git a/src/plugins/vis_type_vega/public/data_model/types.ts b/src/plugins/vis_type_vega/public/data_model/types.ts index 255bd9774f9df..9e3cf0a5421c1 100644 --- a/src/plugins/vis_type_vega/public/data_model/types.ts +++ b/src/plugins/vis_type_vega/public/data_model/types.ts @@ -17,7 +17,7 @@ import { EmsFileParser } from './ems_file_parser'; import { UrlParser } from './url_parser'; interface Body { - aggs?: Record; + aggs?: Record; query?: Query; timeout?: string; } diff --git a/test/accessibility/apps/discover.ts b/test/accessibility/apps/discover.ts index 67abe15ea537a..6705598ef6e74 100644 --- a/test/accessibility/apps/discover.ts +++ b/test/accessibility/apps/discover.ts @@ -19,8 +19,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('Discover a11y tests', () => { before(async () => { - await esArchiver.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.load('test/functional/fixtures/es_archiver/discover'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.update({ defaultIndex: 'logstash-*', 'doc_table:legacy': true, @@ -30,7 +30,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); after(async () => { - await esArchiver.unload('logstash_functional'); + await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); }); it('Discover main page', async () => { diff --git a/test/accessibility/apps/management.ts b/test/accessibility/apps/management.ts index 82b3479362298..e71f6bb3ebfee 100644 --- a/test/accessibility/apps/management.ts +++ b/test/accessibility/apps/management.ts @@ -13,11 +13,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const a11y = getService('a11y'); + const testSubjects = getService('testSubjects'); describe('Management', () => { before(async () => { - await esArchiver.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.load('test/functional/fixtures/es_archiver/discover'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.update({ defaultIndex: 'logstash-*', }); @@ -25,7 +26,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); after(async () => { - await esArchiver.unload('logstash_functional'); + await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); }); it('main view', async () => { @@ -43,6 +44,27 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await a11y.testAppSnapshot(); }); + it('Index pattern field editor - initial view', async () => { + await PageObjects.settings.clickAddField(); + await a11y.testAppSnapshot(); + }); + + it('Index pattern field editor - all options shown', async () => { + await PageObjects.settings.setFieldName('test'); + await PageObjects.settings.setFieldType('Keyword'); + await PageObjects.settings.setFieldScript("emit('hello world')"); + await PageObjects.settings.toggleRow('formatRow'); + await PageObjects.settings.setFieldFormat('string'); + await PageObjects.settings.toggleRow('customLabelRow'); + await PageObjects.settings.setCustomLabel('custom label'); + await testSubjects.click('toggleAdvancedSetting'); + + await a11y.testAppSnapshot(); + + await testSubjects.click('euiFlyoutCloseButton'); + await PageObjects.settings.closeIndexPatternFieldEditor(); + }); + it('Open create index pattern wizard', async () => { await PageObjects.settings.clickKibanaIndexPatterns(); await PageObjects.settings.clickAddNewIndexPatternButton(); diff --git a/test/accessibility/apps/visualize.ts b/test/accessibility/apps/visualize.ts index e493b288eaa89..6478907fcb96a 100644 --- a/test/accessibility/apps/visualize.ts +++ b/test/accessibility/apps/visualize.ts @@ -15,7 +15,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('Visualize', () => { before(async () => { - await esArchiver.loadIfNeeded('discover'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/discover'); await PageObjects.common.navigateToApp('visualize'); }); diff --git a/test/api_integration/apis/index_patterns/es_errors/errors.js b/test/api_integration/apis/index_patterns/es_errors/errors.js index fab59ef256a05..1a48b391ae87d 100644 --- a/test/api_integration/apis/index_patterns/es_errors/errors.js +++ b/test/api_integration/apis/index_patterns/es_errors/errors.js @@ -27,12 +27,14 @@ export default function ({ getService }) { let indexNotFoundError; let docNotFoundError; before(async () => { - await esArchiver.load('index_patterns/basic_index'); + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); indexNotFoundError = await getIndexNotFoundError(es); docNotFoundError = await getDocNotFoundError(es); }); after(async () => { - await esArchiver.unload('index_patterns/basic_index'); + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); }); describe('isEsIndexNotFoundError()', () => { diff --git a/test/api_integration/apis/index_patterns/fields_api/update_fields/main.ts b/test/api_integration/apis/index_patterns/fields_api/update_fields/main.ts index c75b6c607f56e..16861f3c28051 100644 --- a/test/api_integration/apis/index_patterns/fields_api/update_fields/main.ts +++ b/test/api_integration/apis/index_patterns/fields_api/update_fields/main.ts @@ -18,10 +18,11 @@ export default function ({ getService }: FtrProviderContext) { let indexPattern: any; before(async () => { - await esArchiver.load('index_patterns/basic_index'); + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); indexPattern = ( await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, index_pattern: { title: basicIndex, }, @@ -30,7 +31,9 @@ export default function ({ getService }: FtrProviderContext) { }); after(async () => { - await esArchiver.unload('index_patterns/basic_index'); + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); if (indexPattern) { await supertest.delete('/api/index_patterns/index_pattern/' + indexPattern.id); diff --git a/test/api_integration/apis/index_patterns/fields_for_time_pattern_route/pattern.js b/test/api_integration/apis/index_patterns/fields_for_time_pattern_route/pattern.js index e14086f9d973a..8d72cbd2fb37f 100644 --- a/test/api_integration/apis/index_patterns/fields_for_time_pattern_route/pattern.js +++ b/test/api_integration/apis/index_patterns/fields_for_time_pattern_route/pattern.js @@ -13,8 +13,12 @@ export default function ({ getService }) { const esArchiver = getService('esArchiver'); describe('pattern', () => { - before(() => esArchiver.load('index_patterns/daily_index')); - after(() => esArchiver.unload('index_patterns/daily_index')); + before(() => + esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/daily_index') + ); + after(() => + esArchiver.unload('test/api_integration/fixtures/es_archiver/index_patterns/daily_index') + ); it('matches indices with compatible patterns', () => supertest diff --git a/test/api_integration/apis/index_patterns/fields_for_time_pattern_route/query_params.js b/test/api_integration/apis/index_patterns/fields_for_time_pattern_route/query_params.js index 3ccf6a7791f6c..481f433deeb73 100644 --- a/test/api_integration/apis/index_patterns/fields_for_time_pattern_route/query_params.js +++ b/test/api_integration/apis/index_patterns/fields_for_time_pattern_route/query_params.js @@ -13,8 +13,12 @@ export default function ({ getService }) { const esArchiver = getService('esArchiver'); describe('query params', () => { - before(() => esArchiver.load('index_patterns/daily_index')); - after(() => esArchiver.unload('index_patterns/daily_index')); + before(() => + esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/daily_index') + ); + after(() => + esArchiver.unload('test/api_integration/fixtures/es_archiver/index_patterns/daily_index') + ); it('requires `pattern` query param', () => supertest diff --git a/test/api_integration/apis/index_patterns/fields_for_wildcard_route/conflicts.js b/test/api_integration/apis/index_patterns/fields_for_wildcard_route/conflicts.js index a06c37ea84b4c..f050e2a0626d3 100644 --- a/test/api_integration/apis/index_patterns/fields_for_wildcard_route/conflicts.js +++ b/test/api_integration/apis/index_patterns/fields_for_wildcard_route/conflicts.js @@ -13,8 +13,12 @@ export default function ({ getService }) { const esArchiver = getService('esArchiver'); describe('conflicts', () => { - before(() => esArchiver.load('index_patterns/conflicts')); - after(() => esArchiver.unload('index_patterns/conflicts')); + before(() => + esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/conflicts') + ); + after(() => + esArchiver.unload('test/api_integration/fixtures/es_archiver/index_patterns/conflicts') + ); it('flags fields with mismatched types as conflicting', () => supertest diff --git a/test/api_integration/apis/index_patterns/fields_for_wildcard_route/params.js b/test/api_integration/apis/index_patterns/fields_for_wildcard_route/params.js index 61b795ed67d33..5b82473721be8 100644 --- a/test/api_integration/apis/index_patterns/fields_for_wildcard_route/params.js +++ b/test/api_integration/apis/index_patterns/fields_for_wildcard_route/params.js @@ -12,8 +12,12 @@ export default function ({ getService }) { const randomness = getService('randomness'); describe('params', () => { - before(() => esArchiver.load('index_patterns/basic_index')); - after(() => esArchiver.unload('index_patterns/basic_index')); + before(() => + esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index') + ); + after(() => + esArchiver.unload('test/api_integration/fixtures/es_archiver/index_patterns/basic_index') + ); it('requires a pattern query param', () => supertest.get('/api/index_patterns/_fields_for_wildcard').query({}).expect(400)); diff --git a/test/api_integration/apis/index_patterns/fields_for_wildcard_route/response.js b/test/api_integration/apis/index_patterns/fields_for_wildcard_route/response.js index 87c5aa535ccd9..913db9aee9c0f 100644 --- a/test/api_integration/apis/index_patterns/fields_for_wildcard_route/response.js +++ b/test/api_integration/apis/index_patterns/fields_for_wildcard_route/response.js @@ -67,8 +67,12 @@ export default function ({ getService }) { ]; describe('fields_for_wildcard_route response', () => { - before(() => esArchiver.load('index_patterns/basic_index')); - after(() => esArchiver.unload('index_patterns/basic_index')); + before(() => + esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index') + ); + after(() => + esArchiver.unload('test/api_integration/fixtures/es_archiver/index_patterns/basic_index') + ); it('returns a flattened version of the fields in es', async () => { await supertest diff --git a/test/api_integration/apis/index_patterns/index.js b/test/api_integration/apis/index_patterns/index.js index 9c1e1bba0ab9a..656b4e506fa23 100644 --- a/test/api_integration/apis/index_patterns/index.js +++ b/test/api_integration/apis/index_patterns/index.js @@ -15,5 +15,7 @@ export default function ({ loadTestFile }) { loadTestFile(require.resolve('./scripted_fields_crud')); loadTestFile(require.resolve('./fields_api')); loadTestFile(require.resolve('./default_index_pattern')); + loadTestFile(require.resolve('./runtime_fields_crud')); + loadTestFile(require.resolve('./integration')); }); } diff --git a/test/api_integration/apis/index_patterns/index_pattern_crud/create_index_pattern/main.ts b/test/api_integration/apis/index_patterns/index_pattern_crud/create_index_pattern/main.ts index 91f165dbdda7c..500a642f60850 100644 --- a/test/api_integration/apis/index_patterns/index_pattern_crud/create_index_pattern/main.ts +++ b/test/api_integration/apis/index_patterns/index_pattern_crud/create_index_pattern/main.ts @@ -78,11 +78,15 @@ export default function ({ getService }: FtrProviderContext) { describe('creating fields', () => { before(async () => { - await esArchiver.load('index_patterns/basic_index'); + await esArchiver.load( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); }); after(async () => { - await esArchiver.unload('index_patterns/basic_index'); + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); }); it('can specify optional fields attribute when creating an index pattern', async () => { @@ -113,7 +117,7 @@ export default function ({ getService }: FtrProviderContext) { expect(response.body.index_pattern.fields.bar.type).to.be('boolean'); }); - it('Can add scripted fields, other fields created from es index', async () => { + it('can add scripted fields, other fields created from es index', async () => { const title = `basic_index*`; const response = await supertest.post('/api/index_patterns/index_pattern').send({ override: true, @@ -155,6 +159,32 @@ export default function ({ getService }: FtrProviderContext) { expect(response.body.index_pattern.fields.bar.esTypes[0]).to.be('test-type'); expect(response.body.index_pattern.fields.bar.scripted).to.be(true); }); + + it('can add runtime fields', async () => { + const title = `basic_index*`; + const response = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, + index_pattern: { + title, + runtimeFieldMap: { + runtimeFoo: { + type: 'keyword', + script: { + source: 'emit(doc["foo"].value)', + }, + }, + }, + }, + }); + + expect(response.status).to.be(200); + expect(response.body.index_pattern.title).to.be(title); + + expect(response.body.index_pattern.runtimeFieldMap.runtimeFoo.type).to.be('keyword'); + expect(response.body.index_pattern.runtimeFieldMap.runtimeFoo.script.source).to.be( + 'emit(doc["foo"].value)' + ); + }); }); it('can specify optional typeMeta attribute when creating an index pattern', async () => { diff --git a/test/api_integration/apis/index_patterns/index_pattern_crud/create_index_pattern/validation.ts b/test/api_integration/apis/index_patterns/index_pattern_crud/create_index_pattern/validation.ts index 2f62ea231b722..598001644eedb 100644 --- a/test/api_integration/apis/index_patterns/index_pattern_crud/create_index_pattern/validation.ts +++ b/test/api_integration/apis/index_patterns/index_pattern_crud/create_index_pattern/validation.ts @@ -64,5 +64,25 @@ export default function ({ getService }: FtrProviderContext) { '[request body.refresh_fields]: expected value of type [boolean] but got [number]' ); }); + + it('returns an error when unknown runtime field type', async () => { + const title = `basic_index*`; + const response = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, + index_pattern: { + title, + runtimeFieldMap: { + runtimeFoo: { + type: 'wrong-type', + script: { + source: 'emit(doc["foo"].value)', + }, + }, + }, + }, + }); + + expect(response.status).to.be(400); + }); }); } diff --git a/test/api_integration/apis/index_patterns/index_pattern_crud/update_index_pattern/main.ts b/test/api_integration/apis/index_patterns/index_pattern_crud/update_index_pattern/main.ts index cd34724e6cda3..7532278d7eb12 100644 --- a/test/api_integration/apis/index_patterns/index_pattern_crud/update_index_pattern/main.ts +++ b/test/api_integration/apis/index_patterns/index_pattern_crud/update_index_pattern/main.ts @@ -284,5 +284,53 @@ export default function ({ getService }: FtrProviderContext) { expect(response3.body.index_pattern.intervalName).to.be('intervalName2'); expect(response3.body.index_pattern.typeMeta.baz).to.be('qux'); }); + + it('can update runtime fields', async () => { + const title = `basic_index*`; + const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, + index_pattern: { + title, + runtimeFieldMap: { + runtimeFoo: { + type: 'keyword', + script: { + source: 'emit(doc["foo"].value)', + }, + }, + }, + }, + }); + + expect(response1.status).to.be(200); + expect(response1.body.index_pattern.title).to.be(title); + + expect(response1.body.index_pattern.runtimeFieldMap.runtimeFoo.type).to.be('keyword'); + expect(response1.body.index_pattern.runtimeFieldMap.runtimeFoo.script.source).to.be( + 'emit(doc["foo"].value)' + ); + + const id = response1.body.index_pattern.id; + const response2 = await supertest.post('/api/index_patterns/index_pattern/' + id).send({ + index_pattern: { + runtimeFieldMap: { + runtimeBar: { + type: 'keyword', + script: { + source: 'emit(doc["foo"].value)', + }, + }, + }, + }, + }); + + expect(response2.body.index_pattern.runtimeFieldMap.runtimeBar.type).to.be('keyword'); + expect(response2.body.index_pattern.runtimeFieldMap.runtimeFoo).to.be(undefined); + + const response3 = await supertest.get('/api/index_patterns/index_pattern/' + id); + + expect(response3.body.index_pattern.runtimeFieldMap.runtimeBar.type).to.be('keyword'); + expect(response3.body.index_pattern.runtimeFieldMap.runtimeFoo).to.be(undefined); + }); }); } diff --git a/test/api_integration/apis/index_patterns/integration/index.ts b/test/api_integration/apis/index_patterns/integration/index.ts new file mode 100644 index 0000000000000..6fd5f644ae894 --- /dev/null +++ b/test/api_integration/apis/index_patterns/integration/index.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 { FtrProviderContext } from '../../../ftr_provider_context'; + +/** + * Test usage of different index patterns APIs in combination + */ +export default function ({ loadTestFile }: FtrProviderContext) { + describe('integration', () => { + loadTestFile(require.resolve('./integration')); + }); +} diff --git a/test/api_integration/apis/index_patterns/integration/integration.ts b/test/api_integration/apis/index_patterns/integration/integration.ts new file mode 100644 index 0000000000000..22f0755373323 --- /dev/null +++ b/test/api_integration/apis/index_patterns/integration/integration.ts @@ -0,0 +1,119 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import _ from 'lodash'; +import { FtrProviderContext } from '../../../ftr_provider_context'; + +/** + * Test usage of different index patterns APIs in combination + */ +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const esArchiver = getService('esArchiver'); + + describe('integration', () => { + before(async () => { + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); + }); + + after(async () => { + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); + }); + + it('create an index pattern, add a runtime field, add a field formatter, then re-create the same index pattern', async () => { + const title = `basic_index*`; + const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, + index_pattern: { + title, + }, + }); + const id = response1.body.index_pattern.id; + const response2 = await supertest + .post(`/api/index_patterns/index_pattern/${id}/runtime_field`) + .send({ + name: 'runtimeBar', + runtimeField: { + type: 'long', + script: { + source: "emit(doc['field_name'].value)", + }, + }, + }); + + expect(response2.status).to.be(200); + + const response3 = await supertest + .post(`/api/index_patterns/index_pattern/${response1.body.index_pattern.id}/fields`) + .send({ + fields: { + runtimeBar: { + count: 123, + customLabel: 'test', + }, + }, + }); + + expect(response3.status).to.be(200); + + const response4 = await supertest + .post(`/api/index_patterns/index_pattern/${response1.body.index_pattern.id}/fields`) + .send({ + fields: { + runtimeBar: { + format: { + id: 'duration', + params: { inputFormat: 'milliseconds', outputFormat: 'humanizePrecise' }, + }, + }, + }, + }); + + expect(response4.status).to.be(200); + + const response5 = await supertest.get( + '/api/index_patterns/index_pattern/' + response1.body.index_pattern.id + ); + + expect(response5.status).to.be(200); + + const resultIndexPattern = response5.body.index_pattern; + + const runtimeField = resultIndexPattern.fields.runtimeBar; + expect(runtimeField.name).to.be('runtimeBar'); + expect(runtimeField.runtimeField.type).to.be('long'); + expect(runtimeField.runtimeField.script.source).to.be("emit(doc['field_name'].value)"); + expect(runtimeField.scripted).to.be(false); + + expect(resultIndexPattern.fieldFormats.runtimeBar.id).to.be('duration'); + expect(resultIndexPattern.fieldFormats.runtimeBar.params.inputFormat).to.be('milliseconds'); + expect(resultIndexPattern.fieldFormats.runtimeBar.params.outputFormat).to.be( + 'humanizePrecise' + ); + + expect(resultIndexPattern.fieldAttrs.runtimeBar.count).to.be(123); + expect(resultIndexPattern.fieldAttrs.runtimeBar.customLabel).to.be('test'); + + // check that retrieved object is transient and a clone can be created + const response6 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, + index_pattern: resultIndexPattern, + }); + + expect(response6.status).to.be(200); + const recreatedIndexPattern = response6.body.index_pattern; + + expect(_.omit(recreatedIndexPattern, 'version')).to.eql( + _.omit(resultIndexPattern, 'version') + ); + }); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/create_runtime_field/errors.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/create_runtime_field/errors.ts new file mode 100644 index 0000000000000..8ce9e3b36b5c8 --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/create_runtime_field/errors.ts @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + + describe('errors', () => { + it('returns an error field object is not provided', async () => { + const title = `foo-${Date.now()}-${Math.random()}*`; + const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + index_pattern: { + title, + }, + }); + const id = response1.body.index_pattern.id; + const response2 = await supertest + .post(`/api/index_patterns/index_pattern/${id}/runtime_field`) + .send({}); + + expect(response2.status).to.be(400); + expect(response2.body.statusCode).to.be(400); + expect(response2.body.message).to.be( + '[request body.name]: expected value of type [string] but got [undefined]' + ); + }); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/create_runtime_field/index.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/create_runtime_field/index.ts new file mode 100644 index 0000000000000..2cb90ca087f49 --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/create_runtime_field/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('create_runtime_field', () => { + loadTestFile(require.resolve('./errors')); + loadTestFile(require.resolve('./main')); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/create_runtime_field/main.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/create_runtime_field/main.ts new file mode 100644 index 0000000000000..e262b9d838e97 --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/create_runtime_field/main.ts @@ -0,0 +1,95 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const esArchiver = getService('esArchiver'); + + describe('main', () => { + before(async () => { + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); + }); + + after(async () => { + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); + }); + + it('can create a new runtime field', async () => { + const title = `basic_index*`; + const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, + index_pattern: { + title, + }, + }); + const id = response1.body.index_pattern.id; + const response2 = await supertest + .post(`/api/index_patterns/index_pattern/${id}/runtime_field`) + .send({ + name: 'runtimeBar', + runtimeField: { + type: 'long', + script: { + source: "emit(doc['field_name'].value)", + }, + }, + }); + + expect(response2.status).to.be(200); + expect(response2.body.field.name).to.be('runtimeBar'); + expect(response2.body.field.runtimeField.type).to.be('long'); + expect(response2.body.field.runtimeField.script.source).to.be( + "emit(doc['field_name'].value)" + ); + expect(response2.body.field.scripted).to.be(false); + }); + + it('newly created runtime field is available in the index_pattern object', async () => { + const title = `basic_index`; + const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, + index_pattern: { + title, + }, + }); + + await supertest + .post(`/api/index_patterns/index_pattern/${response1.body.index_pattern.id}/runtime_field`) + .send({ + name: 'runtimeBar', + runtimeField: { + type: 'long', + script: { + source: "emit(doc['field_name'].value)", + }, + }, + }); + + const response2 = await supertest.get( + '/api/index_patterns/index_pattern/' + response1.body.index_pattern.id + ); + + expect(response2.status).to.be(200); + + const field = response2.body.index_pattern.fields.runtimeBar; + + expect(field.name).to.be('runtimeBar'); + expect(field.runtimeField.type).to.be('long'); + expect(field.runtimeField.script.source).to.be("emit(doc['field_name'].value)"); + expect(field.scripted).to.be(false); + await supertest.delete( + '/api/index_patterns/index_pattern/' + response1.body.index_pattern.id + ); + }); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/delete_runtime_field/errors.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/delete_runtime_field/errors.ts new file mode 100644 index 0000000000000..b41a630889ff8 --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/delete_runtime_field/errors.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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const supertest = getService('supertest'); + + describe('errors', () => { + const basicIndex = 'b*sic_index'; + let indexPattern: any; + + before(async () => { + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); + + indexPattern = ( + await supertest.post('/api/index_patterns/index_pattern').send({ + index_pattern: { + title: basicIndex, + }, + }) + ).body.index_pattern; + }); + + after(async () => { + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); + + if (indexPattern) { + await supertest.delete('/api/index_patterns/index_pattern/' + indexPattern.id); + } + }); + + it('returns 404 error on non-existing index_pattern', async () => { + const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`; + const response = await supertest.delete( + `/api/index_patterns/index_pattern/${id}/runtime_field/foo` + ); + + expect(response.status).to.be(404); + }); + + it('returns 404 error on non-existing runtime field', async () => { + const response1 = await supertest.delete( + `/api/index_patterns/index_pattern/${indexPattern.id}/runtime_field/test` + ); + + expect(response1.status).to.be(404); + }); + + it('returns error when attempting to delete a field which is not a runtime field', async () => { + const response2 = await supertest.delete( + `/api/index_patterns/index_pattern/${indexPattern.id}/runtime_field/foo` + ); + + expect(response2.status).to.be(400); + expect(response2.body.statusCode).to.be(400); + expect(response2.body.message).to.be('Only runtime fields can be deleted.'); + }); + + it('returns error when ID is too long', async () => { + const id = `xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx`; + const response = await supertest.delete( + `/api/index_patterns/index_pattern/${id}/runtime_field/foo` + ); + + expect(response.status).to.be(400); + expect(response.body.message).to.be( + '[request params.id]: value has length [1759] but it must have a maximum length of [1000].' + ); + }); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/delete_runtime_field/index.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/delete_runtime_field/index.ts new file mode 100644 index 0000000000000..a14201e750dda --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/delete_runtime_field/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('delete_runtime_field', () => { + loadTestFile(require.resolve('./errors')); + loadTestFile(require.resolve('./main')); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/delete_runtime_field/main.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/delete_runtime_field/main.ts new file mode 100644 index 0000000000000..3c74aa336e440 --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/delete_runtime_field/main.ts @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const esArchiver = getService('esArchiver'); + + describe('main', () => { + before(async () => { + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); + }); + + after(async () => { + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); + }); + + it('can delete a runtime field', async () => { + const title = `basic_index*`; + const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, + index_pattern: { + title, + runtimeFieldMap: { + runtimeBar: { + type: 'long', + script: { + source: "emit(doc['field_name'].value)", + }, + }, + }, + }, + }); + + const response2 = await supertest.get( + '/api/index_patterns/index_pattern/' + response1.body.index_pattern.id + ); + + expect(typeof response2.body.index_pattern.fields.runtimeBar).to.be('object'); + + const response3 = await supertest.delete( + `/api/index_patterns/index_pattern/${response1.body.index_pattern.id}/runtime_field/runtimeBar` + ); + + expect(response3.status).to.be(200); + + const response4 = await supertest.get( + '/api/index_patterns/index_pattern/' + response1.body.index_pattern.id + ); + + expect(typeof response4.body.index_pattern.fields.runtimeBar).to.be('undefined'); + await supertest.delete( + '/api/index_patterns/index_pattern/' + response1.body.index_pattern.id + ); + }); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/get_runtime_field/errors.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/get_runtime_field/errors.ts new file mode 100644 index 0000000000000..3608089e4641a --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/get_runtime_field/errors.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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const supertest = getService('supertest'); + + describe('errors', () => { + const basicIndex = '*asic_index'; + let indexPattern: any; + + before(async () => { + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); + + indexPattern = ( + await supertest.post('/api/index_patterns/index_pattern').send({ + index_pattern: { + title: basicIndex, + }, + }) + ).body.index_pattern; + }); + + after(async () => { + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); + + if (indexPattern) { + await supertest.delete('/api/index_patterns/index_pattern/' + indexPattern.id); + } + }); + + it('returns 404 error on non-existing index_pattern', async () => { + const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`; + const response = await supertest.get( + `/api/index_patterns/index_pattern/${id}/runtime_field/foo` + ); + + expect(response.status).to.be(404); + }); + + it('returns 404 error on non-existing runtime field', async () => { + const response1 = await supertest.get( + `/api/index_patterns/index_pattern/${indexPattern.id}/runtime_field/sf` + ); + + expect(response1.status).to.be(404); + }); + + it('returns error when ID is too long', async () => { + const id = `xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx`; + const response = await supertest.get( + `/api/index_patterns/index_pattern/${id}/runtime_field/foo` + ); + + expect(response.status).to.be(400); + expect(response.body.message).to.be( + '[request params.id]: value has length [1759] but it must have a maximum length of [1000].' + ); + }); + + it('returns error when attempting to fetch a field which is not a runtime field', async () => { + const response2 = await supertest.get( + `/api/index_patterns/index_pattern/${indexPattern.id}/runtime_field/foo` + ); + + expect(response2.status).to.be(400); + expect(response2.body.statusCode).to.be(400); + expect(response2.body.message).to.be('Only runtime fields can be retrieved.'); + }); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/get_runtime_field/index.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/get_runtime_field/index.ts new file mode 100644 index 0000000000000..2e48ba64841ee --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/get_runtime_field/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('get_runtime_field', () => { + loadTestFile(require.resolve('./errors')); + loadTestFile(require.resolve('./main')); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/get_runtime_field/main.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/get_runtime_field/main.ts new file mode 100644 index 0000000000000..fa0283d69d8e3 --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/get_runtime_field/main.ts @@ -0,0 +1,71 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const esArchiver = getService('esArchiver'); + + describe('main', () => { + before(async () => { + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); + }); + + after(async () => { + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); + }); + + it('can fetch a runtime field', async () => { + const title = `basic_index*`; + const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, + index_pattern: { + title, + runtimeFieldMap: { + runtimeFoo: { + type: 'keyword', + script: { + source: "emit(doc['field_name'].value)", + }, + }, + runtimeBar: { + type: 'keyword', + script: { + source: "emit(doc['field_name'].value)", + }, + }, + }, + }, + }); + + expect(response1.status).to.be(200); + + const response2 = await supertest.get( + '/api/index_patterns/index_pattern/' + + response1.body.index_pattern.id + + '/runtime_field/runtimeFoo' + ); + + expect(response2.status).to.be(200); + expect(typeof response2.body.field).to.be('object'); + expect(response2.body.field.name).to.be('runtimeFoo'); + expect(response2.body.field.type).to.be('string'); + expect(response2.body.field.scripted).to.be(false); + expect(response2.body.field.runtimeField.script.source).to.be( + "emit(doc['field_name'].value)" + ); + await supertest.delete( + '/api/index_patterns/index_pattern/' + response1.body.index_pattern.id + ); + }); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/index.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/index.ts new file mode 100644 index 0000000000000..7a727a3e86755 --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/index.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('runtime_fields_crud', () => { + loadTestFile(require.resolve('./create_runtime_field')); + loadTestFile(require.resolve('./get_runtime_field')); + loadTestFile(require.resolve('./delete_runtime_field')); + loadTestFile(require.resolve('./put_runtime_field')); + loadTestFile(require.resolve('./update_runtime_field')); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/put_runtime_field/errors.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/put_runtime_field/errors.ts new file mode 100644 index 0000000000000..9faca08238033 --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/put_runtime_field/errors.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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const esArchiver = getService('esArchiver'); + + describe('errors', () => { + before(async () => { + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); + }); + + after(async () => { + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); + }); + + it('returns 404 error on non-existing index_pattern', async () => { + const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`; + const response = await supertest + .put(`/api/index_patterns/index_pattern/${id}/runtime_field`) + .send({ + name: 'runtimeBar', + runtimeField: { + type: 'long', + script: { + source: "emit(doc['field_name'].value)", + }, + }, + }); + + expect(response.status).to.be(404); + }); + + it('returns error on non-runtime field update attempt', async () => { + const title = `basic_index`; + const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, + index_pattern: { + title, + }, + }); + + const response2 = await supertest + .put(`/api/index_patterns/index_pattern/${response1.body.index_pattern.id}/runtime_field`) + .send({ + name: 'bar', + runtimeField: { + type: 'long', + script: { + source: "emit(doc['field_name'].value)", + }, + }, + }); + + expect(response2.status).to.be(400); + expect(response2.body.message).to.be('Only runtime fields can be updated'); + }); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/put_runtime_field/index.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/put_runtime_field/index.ts new file mode 100644 index 0000000000000..724f18e57f3ef --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/put_runtime_field/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('put_runtime_field', () => { + loadTestFile(require.resolve('./errors')); + loadTestFile(require.resolve('./main')); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/put_runtime_field/main.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/put_runtime_field/main.ts new file mode 100644 index 0000000000000..92d8c6fd6d3c2 --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/put_runtime_field/main.ts @@ -0,0 +1,122 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const esArchiver = getService('esArchiver'); + + describe('main', () => { + before(async () => { + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); + }); + + after(async () => { + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); + }); + + it('can overwrite an existing field', async () => { + const title = `basic_index`; + const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, + index_pattern: { + title, + runtimeFieldMap: { + runtimeFoo: { + type: 'keyword', + script: { + source: "doc['field_name'].value", + }, + }, + runtimeBar: { + type: 'keyword', + script: { + source: "doc['field_name'].value", + }, + }, + }, + }, + }); + + const response2 = await supertest + .put(`/api/index_patterns/index_pattern/${response1.body.index_pattern.id}/runtime_field`) + .send({ + name: 'runtimeFoo', + runtimeField: { + type: 'long', + script: { + source: "doc['field_name'].value", + }, + }, + }); + + expect(response2.status).to.be(200); + + const response3 = await supertest.get( + '/api/index_patterns/index_pattern/' + + response1.body.index_pattern.id + + '/runtime_field/runtimeFoo' + ); + + expect(response3.status).to.be(200); + expect(response3.body.field.type).to.be('number'); + + const response4 = await supertest.get( + '/api/index_patterns/index_pattern/' + + response1.body.index_pattern.id + + '/runtime_field/runtimeBar' + ); + + expect(response4.status).to.be(200); + expect(response4.body.field.type).to.be('string'); + }); + + it('can add a new runtime field', async () => { + const title = `basic_index`; + const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, + index_pattern: { + title, + runtimeFieldMap: { + runtimeFoo: { + type: 'keyword', + script: { + source: "doc['field_name'].value", + }, + }, + }, + }, + }); + + await supertest + .put(`/api/index_patterns/index_pattern/${response1.body.index_pattern.id}/runtime_field`) + .send({ + name: 'runtimeBar', + runtimeField: { + type: 'long', + script: { + source: "doc['field_name'].value", + }, + }, + }); + + const response2 = await supertest.get( + '/api/index_patterns/index_pattern/' + + response1.body.index_pattern.id + + '/runtime_field/runtimeBar' + ); + + expect(response2.status).to.be(200); + expect(typeof response2.body.field.runtimeField).to.be('object'); + }); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/update_runtime_field/errors.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/update_runtime_field/errors.ts new file mode 100644 index 0000000000000..3980821c0fd09 --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/update_runtime_field/errors.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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + + describe('errors', () => { + it('returns 404 error on non-existing index_pattern', async () => { + const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`; + const response = await supertest + .post(`/api/index_patterns/index_pattern/${id}/runtime_field/foo`) + .send({ + runtimeField: { + script: { + source: "doc['something_new'].value", + }, + }, + }); + + expect(response.status).to.be(404); + }); + + it('returns error when field name is specified', async () => { + const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`; + const response = await supertest + .post(`/api/index_patterns/index_pattern/${id}/runtime_field/foo`) + .send({ + name: 'foo', + runtimeField: { + script: { + source: "doc['something_new'].value", + }, + }, + }); + + expect(response.status).to.be(400); + expect(response.body.statusCode).to.be(400); + expect(response.body.message).to.be( + "[request body.name]: a value wasn't expected to be present" + ); + }); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/update_runtime_field/index.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/update_runtime_field/index.ts new file mode 100644 index 0000000000000..f5d556ca9994a --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/update_runtime_field/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('update_runtime_field', () => { + loadTestFile(require.resolve('./errors')); + loadTestFile(require.resolve('./main')); + }); +} diff --git a/test/api_integration/apis/index_patterns/runtime_fields_crud/update_runtime_field/main.ts b/test/api_integration/apis/index_patterns/runtime_fields_crud/update_runtime_field/main.ts new file mode 100644 index 0000000000000..6b924570a0e45 --- /dev/null +++ b/test/api_integration/apis/index_patterns/runtime_fields_crud/update_runtime_field/main.ts @@ -0,0 +1,76 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const esArchiver = getService('esArchiver'); + + describe('main', () => { + before(async () => { + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); + }); + + after(async () => { + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); + }); + + it('can update an existing field', async () => { + const title = `basic_index`; + const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, + index_pattern: { + title, + runtimeFieldMap: { + runtimeFoo: { + type: 'keyword', + script: { + source: "doc['field_name'].value", + }, + }, + runtimeBar: { + type: 'keyword', + script: { + source: "doc['field_name'].value", + }, + }, + }, + }, + }); + + const response2 = await supertest + .post( + `/api/index_patterns/index_pattern/${response1.body.index_pattern.id}/runtime_field/runtimeFoo` + ) + .send({ + runtimeField: { + script: { + source: "doc['something_new'].value", + }, + }, + }); + + expect(response2.status).to.be(200); + + const response3 = await supertest.get( + '/api/index_patterns/index_pattern/' + + response1.body.index_pattern.id + + '/runtime_field/runtimeFoo' + ); + + expect(response3.status).to.be(200); + expect(response3.body.field.type).to.be('string'); + expect(response3.body.field.runtimeField.type).to.be('keyword'); + expect(response3.body.field.runtimeField.script.source).to.be("doc['something_new'].value"); + }); + }); +} diff --git a/test/api_integration/apis/index_patterns/scripted_fields_crud/create_scripted_field/main.ts b/test/api_integration/apis/index_patterns/scripted_fields_crud/create_scripted_field/main.ts index a5ed61d8ab9af..663deae1d3476 100644 --- a/test/api_integration/apis/index_patterns/scripted_fields_crud/create_scripted_field/main.ts +++ b/test/api_integration/apis/index_patterns/scripted_fields_crud/create_scripted_field/main.ts @@ -15,11 +15,13 @@ export default function ({ getService }: FtrProviderContext) { describe('main', () => { before(async () => { - await esArchiver.load('index_patterns/basic_index'); + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); }); after(async () => { - await esArchiver.unload('index_patterns/basic_index'); + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); }); it('can create a new scripted field', async () => { @@ -52,6 +54,7 @@ export default function ({ getService }: FtrProviderContext) { it('newly created scripted field is materialized in the index_pattern object', async () => { const title = `basic_index`; const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, index_pattern: { title, }, diff --git a/test/api_integration/apis/index_patterns/scripted_fields_crud/delete_scripted_field/errors.ts b/test/api_integration/apis/index_patterns/scripted_fields_crud/delete_scripted_field/errors.ts index f0787500d505c..2b35f1ec50e91 100644 --- a/test/api_integration/apis/index_patterns/scripted_fields_crud/delete_scripted_field/errors.ts +++ b/test/api_integration/apis/index_patterns/scripted_fields_crud/delete_scripted_field/errors.ts @@ -18,7 +18,7 @@ export default function ({ getService }: FtrProviderContext) { let indexPattern: any; before(async () => { - await esArchiver.load('index_patterns/basic_index'); + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); indexPattern = ( await supertest.post('/api/index_patterns/index_pattern').send({ @@ -30,7 +30,9 @@ export default function ({ getService }: FtrProviderContext) { }); after(async () => { - await esArchiver.unload('index_patterns/basic_index'); + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); if (indexPattern) { await supertest.delete('/api/index_patterns/index_pattern/' + indexPattern.id); diff --git a/test/api_integration/apis/index_patterns/scripted_fields_crud/delete_scripted_field/main.ts b/test/api_integration/apis/index_patterns/scripted_fields_crud/delete_scripted_field/main.ts index 40f57cd914a2f..b9ce3e84d5390 100644 --- a/test/api_integration/apis/index_patterns/scripted_fields_crud/delete_scripted_field/main.ts +++ b/test/api_integration/apis/index_patterns/scripted_fields_crud/delete_scripted_field/main.ts @@ -15,16 +15,19 @@ export default function ({ getService }: FtrProviderContext) { describe('main', () => { before(async () => { - await esArchiver.load('index_patterns/basic_index'); + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); }); after(async () => { - await esArchiver.unload('index_patterns/basic_index'); + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); }); it('can remove a scripted field', async () => { const title = `basic_index`; const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, index_pattern: { title, fields: { diff --git a/test/api_integration/apis/index_patterns/scripted_fields_crud/get_scripted_field/errors.ts b/test/api_integration/apis/index_patterns/scripted_fields_crud/get_scripted_field/errors.ts index ef2fbc5258d66..be9d213a32845 100644 --- a/test/api_integration/apis/index_patterns/scripted_fields_crud/get_scripted_field/errors.ts +++ b/test/api_integration/apis/index_patterns/scripted_fields_crud/get_scripted_field/errors.ts @@ -18,7 +18,7 @@ export default function ({ getService }: FtrProviderContext) { let indexPattern: any; before(async () => { - await esArchiver.load('index_patterns/basic_index'); + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); indexPattern = ( await supertest.post('/api/index_patterns/index_pattern').send({ @@ -30,7 +30,9 @@ export default function ({ getService }: FtrProviderContext) { }); after(async () => { - await esArchiver.unload('index_patterns/basic_index'); + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); if (indexPattern) { await supertest.delete('/api/index_patterns/index_pattern/' + indexPattern.id); diff --git a/test/api_integration/apis/index_patterns/scripted_fields_crud/get_scripted_field/main.ts b/test/api_integration/apis/index_patterns/scripted_fields_crud/get_scripted_field/main.ts index 7fff720e5195f..c38c3a01708a7 100644 --- a/test/api_integration/apis/index_patterns/scripted_fields_crud/get_scripted_field/main.ts +++ b/test/api_integration/apis/index_patterns/scripted_fields_crud/get_scripted_field/main.ts @@ -15,16 +15,19 @@ export default function ({ getService }: FtrProviderContext) { describe('main', () => { before(async () => { - await esArchiver.load('index_patterns/basic_index'); + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); }); after(async () => { - await esArchiver.unload('index_patterns/basic_index'); + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); }); it('can fetch a scripted field', async () => { const title = `basic_index`; const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, index_pattern: { title, fields: { diff --git a/test/api_integration/apis/index_patterns/scripted_fields_crud/put_scripted_field/main.ts b/test/api_integration/apis/index_patterns/scripted_fields_crud/put_scripted_field/main.ts index dec20961b0de0..16b1958306818 100644 --- a/test/api_integration/apis/index_patterns/scripted_fields_crud/put_scripted_field/main.ts +++ b/test/api_integration/apis/index_patterns/scripted_fields_crud/put_scripted_field/main.ts @@ -15,16 +15,19 @@ export default function ({ getService }: FtrProviderContext) { describe('main', () => { before(async () => { - await esArchiver.load('index_patterns/basic_index'); + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); }); after(async () => { - await esArchiver.unload('index_patterns/basic_index'); + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); }); it('can overwrite an existing field', async () => { const title = `basic_index`; const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, index_pattern: { title, fields: { diff --git a/test/api_integration/apis/index_patterns/scripted_fields_crud/update_scripted_field/main.ts b/test/api_integration/apis/index_patterns/scripted_fields_crud/update_scripted_field/main.ts index ac6b11522124b..4ffc98e0660bc 100644 --- a/test/api_integration/apis/index_patterns/scripted_fields_crud/update_scripted_field/main.ts +++ b/test/api_integration/apis/index_patterns/scripted_fields_crud/update_scripted_field/main.ts @@ -15,16 +15,19 @@ export default function ({ getService }: FtrProviderContext) { describe('main', () => { before(async () => { - await esArchiver.load('index_patterns/basic_index'); + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); }); after(async () => { - await esArchiver.unload('index_patterns/basic_index'); + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); }); it('can update an existing field', async () => { const title = `basic_index`; const response1 = await supertest.post('/api/index_patterns/index_pattern').send({ + override: true, index_pattern: { title, fields: { diff --git a/test/api_integration/apis/kql_telemetry/kql_telemetry.ts b/test/api_integration/apis/kql_telemetry/kql_telemetry.ts index 09e36b9078792..5770ed0866a90 100644 --- a/test/api_integration/apis/kql_telemetry/kql_telemetry.ts +++ b/test/api_integration/apis/kql_telemetry/kql_telemetry.ts @@ -17,8 +17,16 @@ export default function ({ getService }: FtrProviderContext) { const es = getService('es'); describe('telemetry API', () => { - before(() => kibanaServer.importExport.load('saved_objects/basic')); - after(() => kibanaServer.importExport.unload('saved_objects/basic')); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); it('should increment the opt *in* counter in the .kibana/kql-telemetry document', async () => { await supertest diff --git a/test/api_integration/apis/saved_objects/bulk_create.ts b/test/api_integration/apis/saved_objects/bulk_create.ts index 1f76567e973b2..5867b8125303a 100644 --- a/test/api_integration/apis/saved_objects/bulk_create.ts +++ b/test/api_integration/apis/saved_objects/bulk_create.ts @@ -39,7 +39,10 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { KIBANA_VERSION = await getKibanaVersion(getService); await kibanaServer.spaces.create({ id: SPACE_ID, name: SPACE_ID }); - await kibanaServer.importExport.load('saved_objects/basic', { space: SPACE_ID }); + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json', + { space: SPACE_ID } + ); }); after(() => kibanaServer.spaces.delete(SPACE_ID)); diff --git a/test/api_integration/apis/saved_objects/bulk_get.ts b/test/api_integration/apis/saved_objects/bulk_get.ts index 81e86913aaf86..e349482960678 100644 --- a/test/api_integration/apis/saved_objects/bulk_get.ts +++ b/test/api_integration/apis/saved_objects/bulk_get.ts @@ -34,10 +34,16 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { KIBANA_VERSION = await getKibanaVersion(getService); - await kibanaServer.importExport.load('saved_objects/basic'); + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); }); - after(() => kibanaServer.importExport.unload('saved_objects/basic')); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); it('should return 200 with individual responses', async () => await supertest diff --git a/test/api_integration/apis/saved_objects/bulk_update.ts b/test/api_integration/apis/saved_objects/bulk_update.ts index 8740652fc3953..cf402bf2f6221 100644 --- a/test/api_integration/apis/saved_objects/bulk_update.ts +++ b/test/api_integration/apis/saved_objects/bulk_update.ts @@ -15,8 +15,16 @@ export default function ({ getService }: FtrProviderContext) { const kibanaServer = getService('kibanaServer'); describe('bulkUpdate', () => { - before(() => kibanaServer.importExport.load('saved_objects/basic')); - after(() => kibanaServer.importExport.unload('saved_objects/basic')); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); it('should return 200', async () => { const response = await supertest diff --git a/test/api_integration/apis/saved_objects/create.ts b/test/api_integration/apis/saved_objects/create.ts index dfa7ceb503dfd..00018e47c9dd3 100644 --- a/test/api_integration/apis/saved_objects/create.ts +++ b/test/api_integration/apis/saved_objects/create.ts @@ -19,10 +19,16 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { KIBANA_VERSION = await getKibanaVersion(getService); - await kibanaServer.importExport.load('saved_objects/basic'); + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); }); - after(() => kibanaServer.importExport.unload('saved_objects/basic')); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); it('should return 200', async () => { await supertest diff --git a/test/api_integration/apis/saved_objects/delete.ts b/test/api_integration/apis/saved_objects/delete.ts index 9a4525df1b5f7..fc38050deabff 100644 --- a/test/api_integration/apis/saved_objects/delete.ts +++ b/test/api_integration/apis/saved_objects/delete.ts @@ -14,8 +14,16 @@ export default function ({ getService }: FtrProviderContext) { const kibanaServer = getService('kibanaServer'); describe('delete', () => { - before(() => kibanaServer.importExport.load('saved_objects/basic')); - after(() => kibanaServer.importExport.unload('saved_objects/basic')); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); it('should return 200 when deleting a doc', async () => await supertest diff --git a/test/api_integration/apis/saved_objects/export.ts b/test/api_integration/apis/saved_objects/export.ts index c42afd4e773c5..6314fbbe675d0 100644 --- a/test/api_integration/apis/saved_objects/export.ts +++ b/test/api_integration/apis/saved_objects/export.ts @@ -24,7 +24,10 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { KIBANA_VERSION = await getKibanaVersion(getService); await kibanaServer.spaces.create({ id: SPACE_ID, name: SPACE_ID }); - await kibanaServer.importExport.load('saved_objects/basic', { space: SPACE_ID }); + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json', + { space: SPACE_ID } + ); }); after(() => kibanaServer.spaces.delete(SPACE_ID)); diff --git a/test/api_integration/apis/saved_objects/find.ts b/test/api_integration/apis/saved_objects/find.ts index 02fa2d325f171..a38043c7c9352 100644 --- a/test/api_integration/apis/saved_objects/find.ts +++ b/test/api_integration/apis/saved_objects/find.ts @@ -18,12 +18,18 @@ export default function ({ getService }: FtrProviderContext) { describe('find', () => { before(async () => { await kibanaServer.spaces.create({ id: SPACE_ID, name: SPACE_ID }); - await kibanaServer.importExport.load('saved_objects/basic', { space: SPACE_ID }); + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json', + { space: SPACE_ID } + ); await kibanaServer.spaces.create({ id: `${SPACE_ID}-foo`, name: `${SPACE_ID}-foo` }); - await kibanaServer.importExport.load('saved_objects/basic/foo-ns', { - space: `${SPACE_ID}-foo`, - }); + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic/foo-ns.json', + { + space: `${SPACE_ID}-foo`, + } + ); }); after(async () => { @@ -255,10 +261,18 @@ export default function ({ getService }: FtrProviderContext) { }); describe('`has_reference` and `has_reference_operator` parameters', () => { - before(() => kibanaServer.importExport.load('saved_objects/references', { space: SPACE_ID })); - after(() => - kibanaServer.importExport.unload('saved_objects/references', { space: SPACE_ID }) - ); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/references.json', + { space: SPACE_ID } + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/references.json', + { space: SPACE_ID } + ); + }); it('search for a reference', async () => { await supertest @@ -319,12 +333,18 @@ export default function ({ getService }: FtrProviderContext) { }); describe('searching for special characters', () => { - before(() => - kibanaServer.importExport.load('saved_objects/find_edgecases', { space: SPACE_ID }) - ); - after(() => - kibanaServer.importExport.unload('saved_objects/find_edgecases', { space: SPACE_ID }) - ); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/find_edgecases.json', + { space: SPACE_ID } + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/find_edgecases.json', + { space: SPACE_ID } + ); + }); it('can search for objects with dashes', async () => await supertest diff --git a/test/api_integration/apis/saved_objects/get.ts b/test/api_integration/apis/saved_objects/get.ts index 77d7b4faacb41..8122308e44930 100644 --- a/test/api_integration/apis/saved_objects/get.ts +++ b/test/api_integration/apis/saved_objects/get.ts @@ -19,9 +19,15 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { KIBANA_VERSION = await getKibanaVersion(getService); - await kibanaServer.importExport.load('saved_objects/basic'); + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); }); - after(() => kibanaServer.importExport.unload('saved_objects/basic')); it('should return 200', async () => await supertest diff --git a/test/api_integration/apis/saved_objects/import.ts b/test/api_integration/apis/saved_objects/import.ts index 8d3c0b7bbcea3..c899f082ec4d3 100644 --- a/test/api_integration/apis/saved_objects/import.ts +++ b/test/api_integration/apis/saved_objects/import.ts @@ -43,8 +43,16 @@ export default function ({ getService }: FtrProviderContext) { }; describe('with basic data existing', () => { - before(() => kibanaServer.importExport.load('saved_objects/basic')); - after(() => kibanaServer.importExport.unload('saved_objects/basic')); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); it('should return 415 when no file passed in', async () => { await supertest diff --git a/test/api_integration/apis/saved_objects/migrations.ts b/test/api_integration/apis/saved_objects/migrations.ts index d009a66e9df55..0877998ca6c1f 100644 --- a/test/api_integration/apis/saved_objects/migrations.ts +++ b/test/api_integration/apis/saved_objects/migrations.ts @@ -87,7 +87,7 @@ export default ({ getService }: FtrProviderContext) => { const mappingProperties = { foo: { properties: { name: { type: 'text' } } }, bar: { properties: { mynum: { type: 'integer' } } }, - }; + } as const; const savedObjectTypes: SavedObjectsType[] = [ { @@ -221,7 +221,7 @@ export default ({ getService }: FtrProviderContext) => { const mappingProperties = { foo: { properties: { name: { type: 'text' } } }, bar: { properties: { mynum: { type: 'integer' } } }, - }; + } as const; let savedObjectTypes: SavedObjectsType[] = [ { @@ -357,7 +357,7 @@ export default ({ getService }: FtrProviderContext) => { const mappingProperties = { 'fleet-agent-event': { properties: { name: { type: 'text' } } }, bar: { properties: { mynum: { type: 'integer' } } }, - }; + } as const; let savedObjectTypes: SavedObjectsType[] = [ FLEET_AGENT_EVENT_TYPE, @@ -417,7 +417,7 @@ export default ({ getService }: FtrProviderContext) => { const mappingProperties = { foo: { properties: { name: { type: 'text' } } }, - }; + } as const; const savedObjectTypes: SavedObjectsType[] = [ { @@ -510,7 +510,7 @@ export default ({ getService }: FtrProviderContext) => { foo: { properties: { name: { type: 'text' } } }, bar: { properties: { nomnom: { type: 'integer' } } }, baz: { properties: { title: { type: 'keyword' } } }, - }; + } as const; const savedObjectTypes: SavedObjectsType[] = [ { @@ -677,7 +677,7 @@ async function createIndex({ coreMigrationVersion: { type: 'keyword', }, - }; + } as const; await esClient.indices.create({ index, body: { mappings: { dynamic: 'strict', properties } }, diff --git a/test/api_integration/apis/saved_objects/resolve.ts b/test/api_integration/apis/saved_objects/resolve.ts index fcfef0aeb6b58..a00a44f98223d 100644 --- a/test/api_integration/apis/saved_objects/resolve.ts +++ b/test/api_integration/apis/saved_objects/resolve.ts @@ -22,8 +22,16 @@ export default function ({ getService }: FtrProviderContext) { }); describe('with kibana index', () => { - before(() => kibanaServer.importExport.load('saved_objects/basic')); - after(() => kibanaServer.importExport.unload('saved_objects/basic')); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); it('should return 200', async () => await supertest diff --git a/test/api_integration/apis/saved_objects/resolve_import_errors.ts b/test/api_integration/apis/saved_objects/resolve_import_errors.ts index 43ff01d321f9f..7ca61a26a11c1 100644 --- a/test/api_integration/apis/saved_objects/resolve_import_errors.ts +++ b/test/api_integration/apis/saved_objects/resolve_import_errors.ts @@ -36,7 +36,10 @@ export default function ({ getService }: FtrProviderContext) { describe('with basic data existing', () => { before(async () => { await kibanaServer.spaces.create({ id: SPACE_ID, name: SPACE_ID }); - await kibanaServer.importExport.load('saved_objects/basic', { space: SPACE_ID }); + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json', + { space: SPACE_ID } + ); }); after(() => kibanaServer.spaces.delete(SPACE_ID)); diff --git a/test/api_integration/apis/saved_objects/update.ts b/test/api_integration/apis/saved_objects/update.ts index 75b8651ee64a7..1c73d0788e51c 100644 --- a/test/api_integration/apis/saved_objects/update.ts +++ b/test/api_integration/apis/saved_objects/update.ts @@ -14,8 +14,16 @@ export default function ({ getService }: FtrProviderContext) { const kibanaServer = getService('kibanaServer'); describe('update', () => { - before(() => kibanaServer.importExport.load('saved_objects/basic')); - after(() => kibanaServer.importExport.unload('saved_objects/basic')); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); it('should return 200', async () => { await supertest .put(`/api/saved_objects/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab`) diff --git a/test/api_integration/apis/saved_objects_management/find.ts b/test/api_integration/apis/saved_objects_management/find.ts index df39e9b5c2a36..6e36303cc1fe0 100644 --- a/test/api_integration/apis/saved_objects_management/find.ts +++ b/test/api_integration/apis/saved_objects_management/find.ts @@ -25,8 +25,16 @@ export default function ({ getService }: FtrProviderContext) { }); describe('with kibana index', () => { - before(() => kibanaServer.importExport.load('saved_objects/basic')); - after(() => kibanaServer.importExport.unload('saved_objects/basic')); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); it('should return 200 with individual responses', async () => await supertest @@ -85,8 +93,16 @@ export default function ({ getService }: FtrProviderContext) { }); describe('`hasReference` and `hasReferenceOperator` parameters', () => { - before(() => kibanaServer.importExport.load('saved_objects/references')); - after(() => kibanaServer.importExport.unload('saved_objects/references')); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/references.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/references.json' + ); + }); it('search for a reference', async () => { await supertest @@ -145,8 +161,14 @@ export default function ({ getService }: FtrProviderContext) { }); describe('meta attributes injected properly', () => { - before(() => esArchiver.load('management/saved_objects/search')); - after(() => esArchiver.unload('management/saved_objects/search')); + before(() => + esArchiver.load('test/api_integration/fixtures/es_archiver/management/saved_objects/search') + ); + after(() => + esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/management/saved_objects/search' + ) + ); it('should inject meta attributes for searches', async () => await supertest diff --git a/test/api_integration/apis/saved_objects_management/get.ts b/test/api_integration/apis/saved_objects_management/get.ts index eb0b832cb2ed1..3b49a28ca4022 100644 --- a/test/api_integration/apis/saved_objects_management/get.ts +++ b/test/api_integration/apis/saved_objects_management/get.ts @@ -18,8 +18,16 @@ export default function ({ getService }: FtrProviderContext) { const existingObject = 'visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab'; const nonexistentObject = 'wigwags/foo'; - before(() => kibanaServer.importExport.load('saved_objects/basic')); - after(() => kibanaServer.importExport.unload('saved_objects/basic')); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); it('should return 200 for object that exists and inject metadata', async () => await supertest diff --git a/test/api_integration/apis/saved_objects_management/relationships.ts b/test/api_integration/apis/saved_objects_management/relationships.ts index ffc97b1385957..aa488942edbeb 100644 --- a/test/api_integration/apis/saved_objects_management/relationships.ts +++ b/test/api_integration/apis/saved_objects_management/relationships.ts @@ -43,8 +43,16 @@ export default function ({ getService }: FtrProviderContext) { }); describe('relationships', () => { - before(() => kibanaServer.importExport.load('management/saved_objects/relationships')); - after(() => kibanaServer.importExport.unload('management/saved_objects/relationships')); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/management/saved_objects/relationships.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/management/saved_objects/relationships.json' + ); + }); const baseApiUrl = `/api/kibana/management/saved_objects/relationships`; const defaultTypes = ['visualization', 'index-pattern', 'search', 'dashboard']; diff --git a/test/api_integration/apis/saved_objects_management/scroll_count.ts b/test/api_integration/apis/saved_objects_management/scroll_count.ts index 78fd316eb4ecb..088b26d8205da 100644 --- a/test/api_integration/apis/saved_objects_management/scroll_count.ts +++ b/test/api_integration/apis/saved_objects_management/scroll_count.ts @@ -19,10 +19,14 @@ export default function ({ getService }: FtrProviderContext) { describe('scroll_count', () => { before(async () => { - await esArchiver.load('management/saved_objects/scroll_count'); + await esArchiver.load( + 'test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count' + ); }); after(async () => { - await esArchiver.unload('management/saved_objects/scroll_count'); + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count' + ); }); it('returns the count for each included types', async () => { diff --git a/test/api_integration/apis/search/bsearch.ts b/test/api_integration/apis/search/bsearch.ts index 11fb74200d7dd..f80bc1d0d9dfa 100644 --- a/test/api_integration/apis/search/bsearch.ts +++ b/test/api_integration/apis/search/bsearch.ts @@ -193,13 +193,11 @@ export default function ({ getService }: FtrProviderContext) { describe('painless', () => { before(async () => { - await esArchiver.loadIfNeeded( - '../../../functional/fixtures/es_archiver/logstash_functional' - ); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); }); after(async () => { - await esArchiver.unload('../../../functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); }); it('should return 400 "search_phase_execution_exception" for Painless error in "es" strategy', async () => { const resp = await supertest.post(`/internal/bsearch`).send({ diff --git a/test/api_integration/apis/search/search.ts b/test/api_integration/apis/search/search.ts index 7ef82cd5467ab..96e7f6ab7161b 100644 --- a/test/api_integration/apis/search/search.ts +++ b/test/api_integration/apis/search/search.ts @@ -18,11 +18,11 @@ export default function ({ getService }: FtrProviderContext) { describe('search', () => { before(async () => { await esArchiver.emptyKibanaIndex(); - await esArchiver.loadIfNeeded('../../../functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); }); after(async () => { - await esArchiver.unload('../../../functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); }); describe('post', () => { it('should return 200 when correctly formatted searches are provided', async () => { diff --git a/test/api_integration/apis/search/verify_error.ts b/test/api_integration/apis/search/verify_error.ts index d6b729f59d8d4..1973fe4e4ab36 100644 --- a/test/api_integration/apis/search/verify_error.ts +++ b/test/api_integration/apis/search/verify_error.ts @@ -16,7 +16,7 @@ export const verifyErrorResponse = ( ) => { expect(r.statusCode).to.be(expectedCode); if (message) { - expect(r.message).to.be(message); + expect(r.message).to.include.string(message); } if (shouldHaveAttrs) { expect(r).to.have.property('attributes'); diff --git a/test/api_integration/apis/shorten/index.js b/test/api_integration/apis/shorten/index.js index 9af979b6af95d..86c39426205ad 100644 --- a/test/api_integration/apis/shorten/index.js +++ b/test/api_integration/apis/shorten/index.js @@ -13,8 +13,16 @@ export default function ({ getService }) { const kibanaServer = getService('kibanaServer'); describe('url shortener', () => { - before(() => kibanaServer.importExport.load('saved_objects/basic')); - after(() => kibanaServer.importExport.unload('saved_objects/basic')); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); it('generates shortened urls', async () => { const resp = await supertest diff --git a/test/api_integration/apis/stats/stats.js b/test/api_integration/apis/stats/stats.js index 2ba14e29a3d1a..61936a73da38d 100644 --- a/test/api_integration/apis/stats/stats.js +++ b/test/api_integration/apis/stats/stats.js @@ -47,8 +47,16 @@ export default function ({ getService }) { const kibanaServer = getService('kibanaServer'); describe('kibana stats api', () => { - before(() => kibanaServer.importExport.load('saved_objects/basic')); - after(() => kibanaServer.importExport.unload('saved_objects/basic')); + before(async () => { + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json' + ); + }); describe('basic', () => { it('should return the stats without cluster_uuid with no query string params', () => { diff --git a/test/api_integration/apis/suggestions/suggestions.js b/test/api_integration/apis/suggestions/suggestions.js index b3c8ae238450c..292e3f599d81a 100644 --- a/test/api_integration/apis/suggestions/suggestions.js +++ b/test/api_integration/apis/suggestions/suggestions.js @@ -13,12 +13,18 @@ export default function ({ getService }) { describe('Suggestions API', function () { before(async () => { - await esArchiver.load('index_patterns/basic_index'); - await kibanaServer.importExport.load('index_patterns/basic_kibana'); + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/index_patterns/basic_kibana.json' + ); }); after(async () => { - await esArchiver.unload('index_patterns/basic_index'); - await kibanaServer.importExport.unload('index_patterns/basic_kibana'); + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/index_patterns/basic_kibana.json' + ); }); it('should return 200 with special characters', () => diff --git a/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/data.json b/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/data.json new file mode 100644 index 0000000000000..349545be44316 --- /dev/null +++ b/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/data.json @@ -0,0 +1,239 @@ +{ + "type": "doc", + "value": { + "id": "index-pattern:8963ca30-3224-11e8-a572-ffca06da1357", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "index-pattern": { + "fields": "[{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "title": "saved_objects*" + }, + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [ + ], + "type": "index-pattern", + "updated_at": "2018-03-28T01:08:34.290Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "config:7.0.0-alpha1", + "index": ".kibana", + "source": { + "config": { + "buildNum": 8467, + "defaultIndex": "8963ca30-3224-11e8-a572-ffca06da1357", + "telemetry:optIn": false + }, + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "config": "7.13.0" + }, + "references": [ + ], + "type": "config", + "updated_at": "2018-03-28T01:08:39.248Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "search:960372e0-3224-11e8-a572-ffca06da1357", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "8963ca30-3224-11e8-a572-ffca06da1357", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "search": { + "columns": [ + "_source" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"id:3\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "_score", + "desc" + ] + ], + "title": "OneRecord", + "version": 1 + }, + "type": "search", + "updated_at": "2018-03-28T01:08:55.182Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:a42c0580-3224-11e8-a572-ffca06da1357", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "960372e0-3224-11e8-a572-ffca06da1357", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2018-03-28T01:09:18.936Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "savedSearchRefName": "search_0", + "title": "VisualizationFromSavedSearch", + "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", + "version": 1, + "visState": "{\"title\":\"VisualizationFromSavedSearch\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:add810b0-3224-11e8-a572-ffca06da1357", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "8963ca30-3224-11e8-a572-ffca06da1357", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-03-28T01:09:35.163Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Amazing Visualization", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Visualization\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:b70c7ae0-3224-11e8-a572-ffca06da1357", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_0\"},{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "timeRestore": false, + "title": "Dashboard", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "add810b0-3224-11e8-a572-ffca06da1357", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "a42c0580-3224-11e8-a572-ffca06da1357", + "name": "panel_1", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-03-28T01:09:50.606Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:d70c7ae0-3224-11e8-a572-ffca82da1357", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_0\"},{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "timeRestore": false, + "title": "Amazing Dashboard", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "add810b0-3224-11e8-a572-ffca06da1357", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "a42c0580-3224-11e8-a572-ffca06da1357", + "name": "panel_1", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-03-28T01:09:50.606Z" + }, + "type": "_doc" + } +} \ No newline at end of file diff --git a/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/data.json.gz b/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/data.json.gz deleted file mode 100644 index 1c327e7e0769b..0000000000000 Binary files a/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/data.json.gz and /dev/null differ diff --git a/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/mappings.json b/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/mappings.json index 8270c573e4c1e..f44bb7463e9eb 100644 --- a/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/mappings.json +++ b/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/mappings.json @@ -1,138 +1,332 @@ { "type": "index", "value": { - "index": ".kibana", - "settings": { - "index": { - "number_of_shards": "1", - "auto_expand_replicas": "0-1", - "number_of_replicas": "0" - } + "aliases": { + ".kibana_$KIBANA_PACKAGE_VERSION": {}, + ".kibana": {} }, + "index": ".kibana_$KIBANA_PACKAGE_VERSION_001", "mappings": { + "_meta": { + "migrationMappingPropertyHashes": { + "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", + "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", + "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", + "config": "c63748b75f39d0c54de12d12c1ccbc20", + "core-usage-stats": "3d1b76c39bfb2cc8296b024d73854724", + "coreMigrationVersion": "2f4316de49999235636386fe51dc06c1", + "dashboard": "40554caf09725935e2c02e02563a2d07", + "index-pattern": "45915a1ad866812242df474eb0479052", + "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", + "legacy-url-alias": "6155300fd11a00e23d5cbaa39f0fce0a", + "migrationVersion": "4a1746014a75ade3a714e1db5763276f", + "namespace": "2f4316de49999235636386fe51dc06c1", + "namespaces": "2f4316de49999235636386fe51dc06c1", + "originId": "2f4316de49999235636386fe51dc06c1", + "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", + "references": "7997cf5a56cc02bdc9c93361bde732b0", + "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", + "search": "db2c00e39b36f40930a3b9fc71c823e1", + "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", + "telemetry": "36a616f7026dfa617d6655df850fe16d", + "timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf", + "type": "2f4316de49999235636386fe51dc06c1", + "ui-counter": "0d409297dc5ebe1e3a1da691c6ee32e3", + "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", + "updated_at": "00da57df13e94e9d98437d13ace4bfe0", + "url": "c7f66a0df8b1b52f17c28c4adb111105", + "usage-counters": "8cc260bdceffec4ffc3ad165c97dc1b4", + "visualization": "f819cf6636b75c9e76ba733a0c6ef355" + } + }, "dynamic": "strict", "properties": { + "application_usage_daily": { + "dynamic": "false", + "properties": { + "timestamp": { + "type": "date" + } + } + }, + "application_usage_totals": { + "dynamic": "false", + "type": "object" + }, + "application_usage_transactional": { + "dynamic": "false", + "type": "object" + }, "config": { - "dynamic": "true", + "dynamic": "false", "properties": { "buildNum": { "type": "keyword" - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "telemetry:optIn": { - "type": "boolean" } } }, + "core-usage-stats": { + "dynamic": "false", + "type": "object" + }, + "coreMigrationVersion": { + "type": "keyword" + }, "dashboard": { "properties": { "description": { "type": "text" }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "optionsJSON": { + "index": false, "type": "text" }, "panelsJSON": { + "index": false, "type": "text" }, "refreshInterval": { "properties": { "display": { + "doc_values": false, + "index": false, "type": "keyword" }, "pause": { + "doc_values": false, + "index": false, "type": "boolean" }, "section": { + "doc_values": false, + "index": false, "type": "integer" }, "value": { + "doc_values": false, + "index": false, "type": "integer" } } }, "timeFrom": { + "doc_values": false, + "index": false, "type": "keyword" }, "timeRestore": { + "doc_values": false, + "index": false, "type": "boolean" }, "timeTo": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, - "uiStateJSON": { - "type": "text" - }, "version": { "type": "integer" } } }, "index-pattern": { + "dynamic": "false", "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { + "title": { "type": "text" }, - "intervalName": { + "type": { "type": "keyword" + } + } + }, + "kql-telemetry": { + "properties": { + "optInCount": { + "type": "long" }, - "notExpandable": { + "optOutCount": { + "type": "long" + } + } + }, + "legacy-url-alias": { + "dynamic": "false", + "properties": { + "disabled": { "type": "boolean" }, - "sourceFilters": { - "type": "text" + "sourceId": { + "type": "keyword" }, - "timeFieldName": { + "targetType": { "type": "keyword" + } + } + }, + "migrationVersion": { + "dynamic": "true", + "properties": { + "config": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + }, + "dashboard": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + }, + "index-pattern": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + }, + "search": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + }, + "visualization": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "namespace": { + "type": "keyword" + }, + "namespaces": { + "type": "keyword" + }, + "originId": { + "type": "keyword" + }, + "query": { + "properties": { + "description": { + "type": "text" + }, + "filters": { + "enabled": false, + "type": "object" + }, + "query": { + "properties": { + "language": { + "type": "keyword" + }, + "query": { + "index": false, + "type": "keyword" + } + } + }, + "timefilter": { + "enabled": false, + "type": "object" }, "title": { "type": "text" } } }, + "references": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + }, + "type": "nested" + }, + "sample-data-telemetry": { + "properties": { + "installCount": { + "type": "long" + }, + "unInstallCount": { + "type": "long" + } + } + }, "search": { "properties": { "columns": { + "doc_values": false, + "index": false, "type": "keyword" }, "description": { "type": "text" }, + "grid": { + "enabled": false, + "type": "object" + }, + "hideChart": { + "doc_values": false, + "index": false, + "type": "boolean" + }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "sort": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { @@ -143,16 +337,100 @@ } } }, + "search-telemetry": { + "dynamic": "false", + "type": "object" + }, "server": { + "dynamic": "false", + "type": "object" + }, + "telemetry": { "properties": { - "uuid": { + "allowChangingOptInStatus": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + }, + "lastReported": { + "type": "date" + }, + "lastVersionChecked": { + "type": "keyword" + }, + "reportFailureCount": { + "type": "integer" + }, + "reportFailureVersion": { + "type": "keyword" + }, + "sendUsageFrom": { + "type": "keyword" + }, + "userHasSeenNotice": { + "type": "boolean" + } + } + }, + "timelion-sheet": { + "properties": { + "description": { + "type": "text" + }, + "hits": { + "type": "integer" + }, + "kibanaSavedObjectMeta": { + "properties": { + "searchSourceJSON": { + "type": "text" + } + } + }, + "timelion_chart_height": { + "type": "integer" + }, + "timelion_columns": { + "type": "integer" + }, + "timelion_interval": { + "type": "keyword" + }, + "timelion_other_interval": { "type": "keyword" + }, + "timelion_rows": { + "type": "integer" + }, + "timelion_sheet": { + "type": "text" + }, + "title": { + "type": "text" + }, + "version": { + "type": "integer" } } }, "type": { "type": "keyword" }, + "ui-counter": { + "properties": { + "count": { + "type": "integer" + } + } + }, + "ui-metric": { + "properties": { + "count": { + "type": "integer" + } + } + }, "updated_at": { "type": "date" }, @@ -168,13 +446,21 @@ "type": "date" }, "url": { - "type": "text", "fields": { "keyword": { - "type": "keyword", - "ignore_above": 2048 + "ignore_above": 2048, + "type": "keyword" } - } + }, + "type": "text" + } + } + }, + "usage-counters": { + "dynamic": "false", + "properties": { + "domainId": { + "type": "keyword" } } }, @@ -186,28 +472,43 @@ "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, - "savedSearchId": { + "savedSearchRefName": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, "uiStateJSON": { + "index": false, "type": "text" }, "version": { "type": "integer" }, "visState": { + "index": false, "type": "text" } } } } + }, + "settings": { + "index": { + "auto_expand_replicas": "0-1", + "number_of_replicas": "0", + "number_of_shards": "1", + "priority": "10", + "refresh_interval": "1s", + "routing_partition_size": "1" + } } } -} +} \ No newline at end of file diff --git a/test/api_integration/fixtures/es_archiver/management/saved_objects/search/data.json b/test/api_integration/fixtures/es_archiver/management/saved_objects/search/data.json new file mode 100644 index 0000000000000..6402a255afd37 --- /dev/null +++ b/test/api_integration/fixtures/es_archiver/management/saved_objects/search/data.json @@ -0,0 +1,227 @@ +{ + "type": "doc", + "value": { + "id": "timelion-sheet:190f3e90-2ec3-11e8-ba48-69fc4e41e1f6", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + ], + "timelion-sheet": { + "description": "", + "hits": 0, + "timelion_chart_height": 275, + "timelion_columns": 2, + "timelion_interval": "auto", + "timelion_rows": 2, + "timelion_sheet": [ + ".es(*)" + ], + "title": "New TimeLion Sheet", + "version": 1 + }, + "type": "timelion-sheet", + "updated_at": "2018-03-23T17:53:30.872Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "index-pattern:8963ca30-3224-11e8-a572-ffca06da1357", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "index-pattern": { + "fields": "[{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "title": "saved_objects*" + }, + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [ + ], + "type": "index-pattern", + "updated_at": "2018-03-28T01:08:34.290Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "config:7.0.0-alpha1", + "index": ".kibana", + "source": { + "config": { + "buildNum": 8467, + "defaultIndex": "8963ca30-3224-11e8-a572-ffca06da1357", + "telemetry:optIn": false + }, + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "config": "7.13.0" + }, + "references": [ + ], + "type": "config", + "updated_at": "2018-03-28T01:08:39.248Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "search:960372e0-3224-11e8-a572-ffca06da1357", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "8963ca30-3224-11e8-a572-ffca06da1357", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "search": { + "columns": [ + "_source" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"id:3\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "_score", + "desc" + ] + ], + "title": "OneRecord", + "version": 1 + }, + "type": "search", + "updated_at": "2018-03-28T01:08:55.182Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:a42c0580-3224-11e8-a572-ffca06da1357", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "960372e0-3224-11e8-a572-ffca06da1357", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2018-03-28T01:09:18.936Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "savedSearchRefName": "search_0", + "title": "VisualizationFromSavedSearch", + "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", + "version": 1, + "visState": "{\"title\":\"VisualizationFromSavedSearch\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:add810b0-3224-11e8-a572-ffca06da1357", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "8963ca30-3224-11e8-a572-ffca06da1357", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-03-28T01:09:35.163Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Visualization", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Visualization\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:b70c7ae0-3224-11e8-a572-ffca06da1357", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_0\"},{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "timeRestore": false, + "title": "Dashboard", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "add810b0-3224-11e8-a572-ffca06da1357", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "a42c0580-3224-11e8-a572-ffca06da1357", + "name": "panel_1", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-03-28T01:09:50.606Z" + }, + "type": "_doc" + } +} \ No newline at end of file diff --git a/test/api_integration/fixtures/es_archiver/management/saved_objects/search/data.json.gz b/test/api_integration/fixtures/es_archiver/management/saved_objects/search/data.json.gz deleted file mode 100644 index 0834567abb66b..0000000000000 Binary files a/test/api_integration/fixtures/es_archiver/management/saved_objects/search/data.json.gz and /dev/null differ diff --git a/test/api_integration/fixtures/es_archiver/management/saved_objects/search/mappings.json b/test/api_integration/fixtures/es_archiver/management/saved_objects/search/mappings.json index c670508247b1a..7699a72ff7120 100644 --- a/test/api_integration/fixtures/es_archiver/management/saved_objects/search/mappings.json +++ b/test/api_integration/fixtures/es_archiver/management/saved_objects/search/mappings.json @@ -1,167 +1,336 @@ { "type": "index", "value": { - "index": ".kibana", - "settings": { - "index": { - "number_of_shards": "1", - "auto_expand_replicas": "0-1", - "number_of_replicas": "0" - } + "aliases": { + ".kibana_$KIBANA_PACKAGE_VERSION": {}, + ".kibana": {} }, + "index": ".kibana_$KIBANA_PACKAGE_VERSION_001", "mappings": { + "_meta": { + "migrationMappingPropertyHashes": { + "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", + "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", + "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", + "config": "c63748b75f39d0c54de12d12c1ccbc20", + "core-usage-stats": "3d1b76c39bfb2cc8296b024d73854724", + "coreMigrationVersion": "2f4316de49999235636386fe51dc06c1", + "dashboard": "40554caf09725935e2c02e02563a2d07", + "index-pattern": "45915a1ad866812242df474eb0479052", + "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", + "legacy-url-alias": "6155300fd11a00e23d5cbaa39f0fce0a", + "migrationVersion": "4a1746014a75ade3a714e1db5763276f", + "namespace": "2f4316de49999235636386fe51dc06c1", + "namespaces": "2f4316de49999235636386fe51dc06c1", + "originId": "2f4316de49999235636386fe51dc06c1", + "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", + "references": "7997cf5a56cc02bdc9c93361bde732b0", + "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", + "search": "db2c00e39b36f40930a3b9fc71c823e1", + "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", + "telemetry": "36a616f7026dfa617d6655df850fe16d", + "timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf", + "type": "2f4316de49999235636386fe51dc06c1", + "ui-counter": "0d409297dc5ebe1e3a1da691c6ee32e3", + "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", + "updated_at": "00da57df13e94e9d98437d13ace4bfe0", + "url": "c7f66a0df8b1b52f17c28c4adb111105", + "usage-counters": "8cc260bdceffec4ffc3ad165c97dc1b4", + "visualization": "f819cf6636b75c9e76ba733a0c6ef355" + } + }, "dynamic": "strict", "properties": { + "application_usage_daily": { + "dynamic": "false", + "properties": { + "timestamp": { + "type": "date" + } + } + }, + "application_usage_totals": { + "dynamic": "false", + "type": "object" + }, + "application_usage_transactional": { + "dynamic": "false", + "type": "object" + }, "config": { - "dynamic": "true", + "dynamic": "false", "properties": { "buildNum": { "type": "keyword" - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "telemetry:optIn": { - "type": "boolean" } } }, + "core-usage-stats": { + "dynamic": "false", + "type": "object" + }, + "coreMigrationVersion": { + "type": "keyword" + }, "dashboard": { "properties": { "description": { "type": "text" }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "optionsJSON": { + "index": false, "type": "text" }, "panelsJSON": { + "index": false, "type": "text" }, "refreshInterval": { "properties": { "display": { + "doc_values": false, + "index": false, "type": "keyword" }, "pause": { + "doc_values": false, + "index": false, "type": "boolean" }, "section": { + "doc_values": false, + "index": false, "type": "integer" }, "value": { + "doc_values": false, + "index": false, "type": "integer" } } }, "timeFrom": { + "doc_values": false, + "index": false, "type": "keyword" }, "timeRestore": { + "doc_values": false, + "index": false, "type": "boolean" }, "timeTo": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, - "uiStateJSON": { - "type": "text" - }, "version": { "type": "integer" } } }, "graph-workspace": { + "dynamic": "false", + "type": "object" + }, + "index-pattern": { + "dynamic": "false", "properties": { - "description": { + "title": { "type": "text" }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } + "type": { + "type": "keyword" + } + } + }, + "kql-telemetry": { + "properties": { + "optInCount": { + "type": "long" }, - "numLinks": { - "type": "integer" + "optOutCount": { + "type": "long" + } + } + }, + "legacy-url-alias": { + "dynamic": "false", + "properties": { + "disabled": { + "type": "boolean" }, - "numVertices": { - "type": "integer" + "sourceId": { + "type": "keyword" }, - "title": { + "targetType": { + "type": "keyword" + } + } + }, + "migrationVersion": { + "dynamic": "true", + "properties": { + "config": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, "type": "text" }, - "version": { - "type": "integer" + "dashboard": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + }, + "index-pattern": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" }, - "wsState": { + "search": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + }, + "visualization": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, "type": "text" } } }, - "index-pattern": { + "namespace": { + "type": "keyword" + }, + "namespaces": { + "type": "keyword" + }, + "originId": { + "type": "keyword" + }, + "query": { "properties": { - "fieldFormatMap": { + "description": { "type": "text" }, - "fields": { - "type": "text" + "filters": { + "enabled": false, + "type": "object" }, - "intervalName": { - "type": "keyword" + "query": { + "properties": { + "language": { + "type": "keyword" + }, + "query": { + "index": false, + "type": "keyword" + } + } }, - "notExpandable": { - "type": "boolean" + "timefilter": { + "enabled": false, + "type": "object" }, - "sourceFilters": { + "title": { "type": "text" + } + } + }, + "references": { + "properties": { + "id": { + "type": "keyword" }, - "timeFieldName": { + "name": { "type": "keyword" }, - "title": { - "type": "text" + "type": { + "type": "keyword" + } + }, + "type": "nested" + }, + "sample-data-telemetry": { + "properties": { + "installCount": { + "type": "long" + }, + "unInstallCount": { + "type": "long" } } }, "search": { "properties": { "columns": { + "doc_values": false, + "index": false, "type": "keyword" }, "description": { "type": "text" }, + "grid": { + "enabled": false, + "type": "object" + }, + "hideChart": { + "doc_values": false, + "index": false, + "type": "boolean" + }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "sort": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { @@ -172,10 +341,39 @@ } } }, + "search-telemetry": { + "dynamic": "false", + "type": "object" + }, "server": { + "dynamic": "false", + "type": "object" + }, + "telemetry": { "properties": { - "uuid": { + "allowChangingOptInStatus": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + }, + "lastReported": { + "type": "date" + }, + "lastVersionChecked": { + "type": "keyword" + }, + "reportFailureCount": { + "type": "integer" + }, + "reportFailureVersion": { "type": "keyword" + }, + "sendUsageFrom": { + "type": "keyword" + }, + "userHasSeenNotice": { + "type": "boolean" } } }, @@ -223,6 +421,20 @@ "type": { "type": "keyword" }, + "ui-counter": { + "properties": { + "count": { + "type": "integer" + } + } + }, + "ui-metric": { + "properties": { + "count": { + "type": "integer" + } + } + }, "updated_at": { "type": "date" }, @@ -238,13 +450,21 @@ "type": "date" }, "url": { - "type": "text", "fields": { "keyword": { - "type": "keyword", - "ignore_above": 2048 + "ignore_above": 2048, + "type": "keyword" } - } + }, + "type": "text" + } + } + }, + "usage-counters": { + "dynamic": "false", + "properties": { + "domainId": { + "type": "keyword" } } }, @@ -256,28 +476,43 @@ "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, - "savedSearchId": { + "savedSearchRefName": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, "uiStateJSON": { + "index": false, "type": "text" }, "version": { "type": "integer" }, "visState": { + "index": false, "type": "text" } } } } + }, + "settings": { + "index": { + "auto_expand_replicas": "0-1", + "number_of_replicas": "0", + "number_of_shards": "1", + "priority": "10", + "refresh_interval": "1s", + "routing_partition_size": "1" + } } } } \ No newline at end of file diff --git a/test/api_integration/fixtures/es_archiver/saved_objects/ui_counters/mappings.json b/test/api_integration/fixtures/es_archiver/saved_objects/ui_counters/mappings.json index 39902f8a9211a..99f2f999db988 100644 --- a/test/api_integration/fixtures/es_archiver/saved_objects/ui_counters/mappings.json +++ b/test/api_integration/fixtures/es_archiver/saved_objects/ui_counters/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "settings": { "index": { "number_of_shards": "1", diff --git a/test/api_integration/fixtures/es_archiver/saved_objects/usage_counters/mappings.json b/test/api_integration/fixtures/es_archiver/saved_objects/usage_counters/mappings.json index 14ed147b2da8e..c2ec5c8881087 100644 --- a/test/api_integration/fixtures/es_archiver/saved_objects/usage_counters/mappings.json +++ b/test/api_integration/fixtures/es_archiver/saved_objects/usage_counters/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "settings": { "index": { "number_of_shards": "1", diff --git a/test/api_integration/fixtures/es_archiver/search/count/mappings.json b/test/api_integration/fixtures/es_archiver/search/count/mappings.json index b62c5da05c2e6..41d5c07e93239 100644 --- a/test/api_integration/fixtures/es_archiver/search/count/mappings.json +++ b/test/api_integration/fixtures/es_archiver/search/count/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "settings": { "index": { "number_of_shards": "1", diff --git a/test/common/services/es_archiver.ts b/test/common/services/es_archiver.ts index 742ba74c0dcaf..d99a2e8d10236 100644 --- a/test/common/services/es_archiver.ts +++ b/test/common/services/es_archiver.ts @@ -19,15 +19,8 @@ export function EsArchiverProvider({ getService }: FtrProviderContext): EsArchiv const kibanaServer = getService('kibanaServer'); const retry = getService('retry'); - if (!config.get('esArchiver')) { - throw new Error(`esArchiver can't be used unless you specify it's config in your config file`); - } - - const dataDir = config.get('esArchiver.directory'); - const esArchiver = new EsArchiver({ client, - dataDir, log, kbnClient: kibanaServer, }); diff --git a/test/common/services/kibana_server/extend_es_archiver.js b/test/common/services/kibana_server/extend_es_archiver.ts similarity index 70% rename from test/common/services/kibana_server/extend_es_archiver.js rename to test/common/services/kibana_server/extend_es_archiver.ts index 9a06dd7b74969..98c28960bf523 100644 --- a/test/common/services/kibana_server/extend_es_archiver.js +++ b/test/common/services/kibana_server/extend_es_archiver.ts @@ -6,10 +6,23 @@ * Side Public License, v 1. */ -const ES_ARCHIVER_LOAD_METHODS = ['load', 'loadIfNeeded', 'unload', 'emptyKibanaIndex']; +import type { ProvidedType } from '@kbn/test'; + +import type { EsArchiverProvider } from '../es_archiver'; +import type { RetryService } from '../retry'; +import type { KibanaServerProvider } from './kibana_server'; + +const ES_ARCHIVER_LOAD_METHODS = ['load', 'loadIfNeeded', 'unload', 'emptyKibanaIndex'] as const; const KIBANA_INDEX = '.kibana'; -export function extendEsArchiver({ esArchiver, kibanaServer, retry, defaults }) { +interface Options { + esArchiver: ProvidedType; + kibanaServer: ProvidedType; + retry: RetryService; + defaults: Record; +} + +export function extendEsArchiver({ esArchiver, kibanaServer, retry, defaults }: Options) { // only extend the esArchiver if there are default uiSettings to restore if (!defaults) { return; @@ -18,9 +31,9 @@ export function extendEsArchiver({ esArchiver, kibanaServer, retry, defaults }) ES_ARCHIVER_LOAD_METHODS.forEach((method) => { const originalMethod = esArchiver[method]; - esArchiver[method] = async (...args) => { + esArchiver[method] = async (...args: unknown[]) => { // esArchiver methods return a stats object, with information about the indexes created - const stats = await originalMethod.apply(esArchiver, args); + const stats = await originalMethod.apply(esArchiver, args as any); const statsKeys = Object.keys(stats); const kibanaKeys = statsKeys.filter( diff --git a/test/common/services/kibana_server/index.ts b/test/common/services/kibana_server/index.ts index 7f727179032f2..2a749de2b4ce8 100644 --- a/test/common/services/kibana_server/index.ts +++ b/test/common/services/kibana_server/index.ts @@ -7,5 +7,4 @@ */ export { KibanaServerProvider } from './kibana_server'; -// @ts-ignore export { extendEsArchiver } from './extend_es_archiver'; diff --git a/test/common/services/kibana_server/kibana_server.ts b/test/common/services/kibana_server/kibana_server.ts index 63803bd511bd1..f20fa4cafa55e 100644 --- a/test/common/services/kibana_server/kibana_server.ts +++ b/test/common/services/kibana_server/kibana_server.ts @@ -22,7 +22,6 @@ export function KibanaServerProvider({ getService }: FtrProviderContext): KbnCli url, certificateAuthorities: config.get('servers.kibana.certificateAuthorities'), uiSettingDefaults: defaults, - importExportDir: config.get('kbnArchiver.directory'), }); if (defaults) { diff --git a/test/common/services/saved_object_info.ts b/test/common/services/saved_object_info.ts index 1558b364f5391..2be1763650894 100644 --- a/test/common/services/saved_object_info.ts +++ b/test/common/services/saved_object_info.ts @@ -8,7 +8,7 @@ import { inspect } from 'util'; -import { TermsAggregate } from '@elastic/elasticsearch/api/types'; +import type { estypes } from '@elastic/elasticsearch'; import { FtrService } from '../ftr_provider_context'; @@ -32,7 +32,7 @@ export class SavedObjectInfoService extends FtrService { }); const agg = body.aggregations?.savedobjs as - | TermsAggregate<{ key: string; doc_count: number }> + | estypes.AggregationsTermsAggregate<{ key: string; doc_count: number }> | undefined; if (!agg?.buckets) { diff --git a/test/examples/config.js b/test/examples/config.js index 1ee095fbdedeb..d47748e5f22a9 100644 --- a/test/examples/config.js +++ b/test/examples/config.js @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import path, { resolve } from 'path'; +import { resolve } from 'path'; import { services } from '../plugin_functional/services'; import fs from 'fs'; import { KIBANA_ROOT } from '@kbn/test'; @@ -28,6 +28,7 @@ export default async function ({ readConfigFile }) { require.resolve('./state_sync'), require.resolve('./routing'), require.resolve('./expressions_explorer'), + require.resolve('./index_pattern_field_editor_example'), ], services: { ...functionalConfig.get('services'), @@ -47,9 +48,6 @@ export default async function ({ readConfigFile }) { serverArgs: ['xpack.security.enabled=false'], }, apps: functionalConfig.get('apps'), - esArchiver: { - directory: path.resolve(__dirname, '../es_archives'), - }, screenshots: functionalConfig.get('screenshots'), junit: { reportName: 'Example plugin functional tests', diff --git a/test/examples/embeddables/dashboard.ts b/test/examples/embeddables/dashboard.ts index 69788ebad2af2..77ad5a5da9eeb 100644 --- a/test/examples/embeddables/dashboard.ts +++ b/test/examples/embeddables/dashboard.ts @@ -102,8 +102,10 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide describe('dashboard container', () => { before(async () => { - await esArchiver.loadIfNeeded('../functional/fixtures/es_archiver/dashboard/current/data'); - await esArchiver.loadIfNeeded('../functional/fixtures/es_archiver/dashboard/current/kibana'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/dashboard/current/data'); + await esArchiver.loadIfNeeded( + 'test/functional/fixtures/es_archiver/dashboard/current/kibana' + ); await PageObjects.common.navigateToApp('dashboardEmbeddableExamples'); await testSubjects.click('dashboardEmbeddableByValue'); await updateInput(JSON.stringify(testDashboardInput, null, 4)); diff --git a/test/examples/index_pattern_field_editor_example/index.ts b/test/examples/index_pattern_field_editor_example/index.ts new file mode 100644 index 0000000000000..0cd23a33c8476 --- /dev/null +++ b/test/examples/index_pattern_field_editor_example/index.ts @@ -0,0 +1,38 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { PluginFunctionalProviderContext } from 'test/plugin_functional/services'; + +// eslint-disable-next-line import/no-default-export +export default function ({ + getService, + getPageObjects, + loadTestFile, +}: PluginFunctionalProviderContext) { + const browser = getService('browser'); + const es = getService('es'); + const PageObjects = getPageObjects(['common', 'header', 'settings']); + + describe('index pattern field editor example', function () { + this.tags('ciGroup2'); + before(async () => { + await browser.setWindowSize(1300, 900); + await es.transport.request({ + path: '/blogs/_doc', + method: 'POST', + body: { user: 'matt', message: 20 }, + }); + + await PageObjects.settings.navigateTo(); + await PageObjects.settings.createIndexPattern('blogs', null); + await PageObjects.common.navigateToApp('indexPatternFieldEditorExample'); + }); + + loadTestFile(require.resolve('./index_pattern_field_editor_example')); + }); +} diff --git a/test/examples/index_pattern_field_editor_example/index_pattern_field_editor_example.ts b/test/examples/index_pattern_field_editor_example/index_pattern_field_editor_example.ts new file mode 100644 index 0000000000000..5744c8e64f5c1 --- /dev/null +++ b/test/examples/index_pattern_field_editor_example/index_pattern_field_editor_example.ts @@ -0,0 +1,24 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { PluginFunctionalProviderContext } from 'test/plugin_functional/services'; + +// eslint-disable-next-line import/no-default-export +export default function ({ getService }: PluginFunctionalProviderContext) { + const testSubjects = getService('testSubjects'); + + describe('', () => { + it('finds an index pattern', async () => { + await testSubjects.existOrFail('indexPatternTitle'); + }); + it('opens the field editor', async () => { + await testSubjects.click('addField'); + await testSubjects.existOrFail('flyoutTitle'); + }); + }); +} diff --git a/test/functional/apps/bundles/index.js b/test/functional/apps/bundles/index.js index d13e74dd4eed9..577035a8c343c 100644 --- a/test/functional/apps/bundles/index.js +++ b/test/functional/apps/bundles/index.js @@ -18,6 +18,15 @@ export default function ({ getService }) { let buildNum; before(async () => { + // Wait for status to become green + let status; + const start = Date.now(); + do { + const resp = await supertest.get('/api/status'); + status = resp.status; + // Stop polling once status stabilizes OR once 40s has passed + } while (status !== 200 && Date.now() - start < 40_000); + const resp = await supertest.get('/api/status').expect(200); buildNum = resp.body.version.build_number; }); diff --git a/test/functional/apps/context/_date_nanos.js b/test/functional/apps/context/_date_nanos.js index f5408661b9c6e..35e38abc6fdb7 100644 --- a/test/functional/apps/context/_date_nanos.js +++ b/test/functional/apps/context/_date_nanos.js @@ -22,7 +22,7 @@ export default function ({ getService, getPageObjects }) { describe('context view for date_nanos', () => { before(async function () { await security.testUser.setRoles(['kibana_admin', 'kibana_date_nanos']); - await esArchiver.loadIfNeeded('date_nanos'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/date_nanos'); await kibanaServer.uiSettings.replace({ defaultIndex: TEST_INDEX_PATTERN }); await kibanaServer.uiSettings.update({ 'context:defaultSize': `${TEST_DEFAULT_CONTEXT_SIZE}`, @@ -32,7 +32,7 @@ export default function ({ getService, getPageObjects }) { after(async function unloadMakelogs() { await security.testUser.restoreDefaults(); - await esArchiver.unload('date_nanos'); + await esArchiver.unload('test/functional/fixtures/es_archiver/date_nanos'); }); it('displays predessors - anchor - successors in right order ', async function () { diff --git a/test/functional/apps/context/_date_nanos_custom_timestamp.js b/test/functional/apps/context/_date_nanos_custom_timestamp.js index b837c55d821ac..a933c2f20b163 100644 --- a/test/functional/apps/context/_date_nanos_custom_timestamp.js +++ b/test/functional/apps/context/_date_nanos_custom_timestamp.js @@ -22,7 +22,7 @@ export default function ({ getService, getPageObjects }) { describe('context view for date_nanos with custom timestamp', () => { before(async function () { await security.testUser.setRoles(['kibana_admin', 'kibana_date_nanos_custom']); - await esArchiver.loadIfNeeded('date_nanos_custom'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/date_nanos_custom'); await kibanaServer.uiSettings.replace({ defaultIndex: TEST_INDEX_PATTERN }); await kibanaServer.uiSettings.update({ 'context:defaultSize': `${TEST_DEFAULT_CONTEXT_SIZE}`, @@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects }) { after(async function () { await security.testUser.restoreDefaults(); - await esArchiver.unload('date_nanos_custom'); + await esArchiver.unload('test/functional/fixtures/es_archiver/date_nanos_custom'); }); }); } diff --git a/test/functional/apps/context/index.js b/test/functional/apps/context/index.js index 245f88a337dce..7612dae338d9f 100644 --- a/test/functional/apps/context/index.js +++ b/test/functional/apps/context/index.js @@ -17,14 +17,14 @@ export default function ({ getService, getPageObjects, loadTestFile }) { before(async function () { await browser.setWindowSize(1200, 800); - await esArchiver.loadIfNeeded('logstash_functional'); - await esArchiver.load('visualize'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.load('test/functional/fixtures/es_archiver/visualize'); await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*' }); await PageObjects.common.navigateToApp('discover'); }); after(function unloadMakelogs() { - return esArchiver.unload('logstash_functional'); + return esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); }); loadTestFile(require.resolve('./_context_navigation')); diff --git a/test/functional/apps/dashboard/copy_panel_to.ts b/test/functional/apps/dashboard/copy_panel_to.ts index 641d520801c4d..8877e5e47bd95 100644 --- a/test/functional/apps/dashboard/copy_panel_to.ts +++ b/test/functional/apps/dashboard/copy_panel_to.ts @@ -40,7 +40,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard panel copy to', function viewEditModeTests() { before(async function () { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/create_and_add_embeddables.ts b/test/functional/apps/dashboard/create_and_add_embeddables.ts index 3de3b2f843f55..62ce68e026f72 100644 --- a/test/functional/apps/dashboard/create_and_add_embeddables.ts +++ b/test/functional/apps/dashboard/create_and_add_embeddables.ts @@ -22,7 +22,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('create and add embeddables', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/dashboard_back_button.ts b/test/functional/apps/dashboard/dashboard_back_button.ts index 7e0bf92e3292a..1e901cdbd48be 100644 --- a/test/functional/apps/dashboard/dashboard_back_button.ts +++ b/test/functional/apps/dashboard/dashboard_back_button.ts @@ -17,7 +17,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard back button', () => { before(async () => { - await esArchiver.loadIfNeeded('dashboard/current/kibana'); + await esArchiver.loadIfNeeded( + 'test/functional/fixtures/es_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/dashboard_error_handling.ts b/test/functional/apps/dashboard/dashboard_error_handling.ts index 5d3d8bd251d63..89c2d42029935 100644 --- a/test/functional/apps/dashboard/dashboard_error_handling.ts +++ b/test/functional/apps/dashboard/dashboard_error_handling.ts @@ -19,7 +19,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { */ describe('dashboard error handling', () => { before(async () => { - await esArchiver.loadIfNeeded('dashboard/current/kibana'); + await esArchiver.loadIfNeeded( + 'test/functional/fixtures/es_archiver/dashboard/current/kibana' + ); await PageObjects.common.navigateToApp('dashboard'); }); diff --git a/test/functional/apps/dashboard/dashboard_filter_bar.ts b/test/functional/apps/dashboard/dashboard_filter_bar.ts index c2d6cc4c38b6b..e1a15009afe51 100644 --- a/test/functional/apps/dashboard/dashboard_filter_bar.ts +++ b/test/functional/apps/dashboard/dashboard_filter_bar.ts @@ -31,7 +31,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard filter bar', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/dashboard_filtering.ts b/test/functional/apps/dashboard/dashboard_filtering.ts index 86c57efec818b..acb04b4946fad 100644 --- a/test/functional/apps/dashboard/dashboard_filtering.ts +++ b/test/functional/apps/dashboard/dashboard_filtering.ts @@ -54,7 +54,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', diff --git a/test/functional/apps/dashboard/dashboard_grid.ts b/test/functional/apps/dashboard/dashboard_grid.ts index 809fb6fc14001..fecec34fd91e3 100644 --- a/test/functional/apps/dashboard/dashboard_grid.ts +++ b/test/functional/apps/dashboard/dashboard_grid.ts @@ -19,7 +19,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard grid', function () { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/dashboard_options.ts b/test/functional/apps/dashboard/dashboard_options.ts index 1f62256a3fdb5..5702286bba6b6 100644 --- a/test/functional/apps/dashboard/dashboard_options.ts +++ b/test/functional/apps/dashboard/dashboard_options.ts @@ -20,7 +20,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { let originalTitles: string[] = []; before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/dashboard_query_bar.ts b/test/functional/apps/dashboard/dashboard_query_bar.ts index bf8300defc445..07fa3355c6fba 100644 --- a/test/functional/apps/dashboard/dashboard_query_bar.ts +++ b/test/functional/apps/dashboard/dashboard_query_bar.ts @@ -20,7 +20,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard query bar', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -30,7 +30,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('causes panels to reload when refresh is clicked', async () => { - await esArchiver.unload('dashboard/current/data'); + await esArchiver.unload('test/functional/fixtures/es_archiver/dashboard/current/data'); await queryBar.clickQuerySubmitButton(); await retry.tryForTime(5000, async () => { diff --git a/test/functional/apps/dashboard/dashboard_saved_query.ts b/test/functional/apps/dashboard/dashboard_saved_query.ts index bdf97e8ced140..015a00a713bdc 100644 --- a/test/functional/apps/dashboard/dashboard_saved_query.ts +++ b/test/functional/apps/dashboard/dashboard_saved_query.ts @@ -21,7 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard saved queries', function describeIndexTests() { before(async function () { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/dashboard_snapshots.ts b/test/functional/apps/dashboard/dashboard_snapshots.ts index c93636aeb63c6..3aba671c0a4b2 100644 --- a/test/functional/apps/dashboard/dashboard_snapshots.ts +++ b/test/functional/apps/dashboard/dashboard_snapshots.ts @@ -25,7 +25,7 @@ export default function ({ describe('dashboard snapshots', function describeIndexTests() { before(async function () { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/dashboard_unsaved_listing.ts b/test/functional/apps/dashboard/dashboard_unsaved_listing.ts index 1cdc4bbff2c53..2b2d96e8d723a 100644 --- a/test/functional/apps/dashboard/dashboard_unsaved_listing.ts +++ b/test/functional/apps/dashboard/dashboard_unsaved_listing.ts @@ -36,7 +36,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/dashboard_unsaved_state.ts b/test/functional/apps/dashboard/dashboard_unsaved_state.ts index fd203cd8c1356..6b71dd34b76f8 100644 --- a/test/functional/apps/dashboard/dashboard_unsaved_state.ts +++ b/test/functional/apps/dashboard/dashboard_unsaved_state.ts @@ -23,7 +23,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // FLAKY: https://github.com/elastic/kibana/issues/91191 describe.skip('dashboard unsaved panels', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/data_shared_attributes.ts b/test/functional/apps/dashboard/data_shared_attributes.ts index 2d6396be80f46..34fd4ddb346ed 100644 --- a/test/functional/apps/dashboard/data_shared_attributes.ts +++ b/test/functional/apps/dashboard/data_shared_attributes.ts @@ -21,7 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { let originalPanelTitles: string[]; before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/edit_embeddable_redirects.ts b/test/functional/apps/dashboard/edit_embeddable_redirects.ts index be540e18a503f..02f178a5153a2 100644 --- a/test/functional/apps/dashboard/edit_embeddable_redirects.ts +++ b/test/functional/apps/dashboard/edit_embeddable_redirects.ts @@ -19,7 +19,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('edit embeddable redirects', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/edit_visualizations.js b/test/functional/apps/dashboard/edit_visualizations.js index b2f21aefcf79c..507d4b8308d4c 100644 --- a/test/functional/apps/dashboard/edit_visualizations.js +++ b/test/functional/apps/dashboard/edit_visualizations.js @@ -44,7 +44,7 @@ export default function ({ getService, getPageObjects }) { describe('edit visualizations from dashboard', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/embed_mode.ts b/test/functional/apps/dashboard/embed_mode.ts index b96e957262573..943a6b3bdb469 100644 --- a/test/functional/apps/dashboard/embed_mode.ts +++ b/test/functional/apps/dashboard/embed_mode.ts @@ -28,7 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ]; before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/embeddable_data_grid.ts b/test/functional/apps/dashboard/embeddable_data_grid.ts index a9e0039de1f79..66aca561383c3 100644 --- a/test/functional/apps/dashboard/embeddable_data_grid.ts +++ b/test/functional/apps/dashboard/embeddable_data_grid.ts @@ -21,9 +21,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard embeddable data grid', () => { before(async () => { - await esArchiver.loadIfNeeded('logstash_functional'); - await esArchiver.loadIfNeeded('dashboard/current/data'); - await esArchiver.loadIfNeeded('dashboard/current/kibana'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/dashboard/current/data'); + await esArchiver.loadIfNeeded( + 'test/functional/fixtures/es_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', 'doc_table:legacy': false, diff --git a/test/functional/apps/dashboard/embeddable_library.ts b/test/functional/apps/dashboard/embeddable_library.ts index 20fe9aeb1387a..d66f6e834c367 100644 --- a/test/functional/apps/dashboard/embeddable_library.ts +++ b/test/functional/apps/dashboard/embeddable_library.ts @@ -21,7 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('embeddable library', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/embeddable_rendering.ts b/test/functional/apps/dashboard/embeddable_rendering.ts index 11807831dc352..e045b1a1e3f5e 100644 --- a/test/functional/apps/dashboard/embeddable_rendering.ts +++ b/test/functional/apps/dashboard/embeddable_rendering.ts @@ -94,7 +94,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe.skip('dashboard embeddable rendering', function describeIndexTests() { before(async () => { await security.testUser.setRoles(['kibana_admin', 'animals', 'test_logstash_reader']); - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/empty_dashboard.ts b/test/functional/apps/dashboard/empty_dashboard.ts index 2cfa6d73dcb72..46a8545b79596 100644 --- a/test/functional/apps/dashboard/empty_dashboard.ts +++ b/test/functional/apps/dashboard/empty_dashboard.ts @@ -21,7 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('empty dashboard', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/full_screen_mode.ts b/test/functional/apps/dashboard/full_screen_mode.ts index 1f63dcdafdcce..02669759f68ea 100644 --- a/test/functional/apps/dashboard/full_screen_mode.ts +++ b/test/functional/apps/dashboard/full_screen_mode.ts @@ -20,7 +20,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('full screen mode', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/index.ts b/test/functional/apps/dashboard/index.ts index 9f9422ddaec64..4b83b2ac92deb 100644 --- a/test/functional/apps/dashboard/index.ts +++ b/test/functional/apps/dashboard/index.ts @@ -15,21 +15,21 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { async function loadCurrentData() { await browser.setWindowSize(1300, 900); - await esArchiver.unload('logstash_functional'); - await esArchiver.loadIfNeeded('dashboard/current/data'); + await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/dashboard/current/data'); } async function unloadCurrentData() { - await esArchiver.unload('dashboard/current/data'); + await esArchiver.unload('test/functional/fixtures/es_archiver/dashboard/current/data'); } async function loadLogstash() { await browser.setWindowSize(1200, 900); - await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); } async function unloadLogstash() { - await esArchiver.unload('logstash_functional'); + await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); } describe('dashboard app', function () { diff --git a/test/functional/apps/dashboard/legacy_urls.ts b/test/functional/apps/dashboard/legacy_urls.ts index 9c7f472b287a7..96c7a5aac3f4b 100644 --- a/test/functional/apps/dashboard/legacy_urls.ts +++ b/test/functional/apps/dashboard/legacy_urls.ts @@ -33,7 +33,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('legacy urls', function describeIndexTests() { before(async function () { await security.testUser.setRoles(['kibana_admin', 'animals']); - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await PageObjects.common.navigateToApp('dashboard'); await PageObjects.dashboard.clickNewDashboard(); await dashboardAddPanel.addVisualization('Rendering-Test:-animal-sounds-pie'); diff --git a/test/functional/apps/dashboard/panel_expand_toggle.ts b/test/functional/apps/dashboard/panel_expand_toggle.ts index 256109c669138..00500450595eb 100644 --- a/test/functional/apps/dashboard/panel_expand_toggle.ts +++ b/test/functional/apps/dashboard/panel_expand_toggle.ts @@ -19,7 +19,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('expanding a panel', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/saved_search_embeddable.ts b/test/functional/apps/dashboard/saved_search_embeddable.ts index 098f6ccc00d94..5bcec338aad1e 100644 --- a/test/functional/apps/dashboard/saved_search_embeddable.ts +++ b/test/functional/apps/dashboard/saved_search_embeddable.ts @@ -19,9 +19,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard saved search embeddable', () => { before(async () => { - await esArchiver.loadIfNeeded('logstash_functional'); - await esArchiver.loadIfNeeded('dashboard/current/data'); - await esArchiver.loadIfNeeded('dashboard/current/kibana'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/dashboard/current/data'); + await esArchiver.loadIfNeeded( + 'test/functional/fixtures/es_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/share.ts b/test/functional/apps/dashboard/share.ts index 8191b5efb51f6..77a858b22ec79 100644 --- a/test/functional/apps/dashboard/share.ts +++ b/test/functional/apps/dashboard/share.ts @@ -16,7 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('share dashboard', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/time_zones.ts b/test/functional/apps/dashboard/time_zones.ts index a4a586cb635d5..e5c532537b6f0 100644 --- a/test/functional/apps/dashboard/time_zones.ts +++ b/test/functional/apps/dashboard/time_zones.ts @@ -27,7 +27,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { this.tags('includeFirefox'); before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/url_field_formatter.ts b/test/functional/apps/dashboard/url_field_formatter.ts index f930987f16d5f..8a4371a0adf77 100644 --- a/test/functional/apps/dashboard/url_field_formatter.ts +++ b/test/functional/apps/dashboard/url_field_formatter.ts @@ -39,7 +39,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // FLAKY: https://github.com/elastic/kibana/issues/79463 describe.skip('Changing field formatter to Url', () => { before(async function () { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/view_edit.ts b/test/functional/apps/dashboard/view_edit.ts index 9a883c5a527ff..b29b07f9df4e4 100644 --- a/test/functional/apps/dashboard/view_edit.ts +++ b/test/functional/apps/dashboard/view_edit.ts @@ -21,7 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard view edit mode', function viewEditModeTests() { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/discover/_data_grid.ts b/test/functional/apps/discover/_data_grid.ts index 366865b53fb0d..efd97fce3f7f5 100644 --- a/test/functional/apps/discover/_data_grid.ts +++ b/test/functional/apps/discover/_data_grid.ts @@ -24,8 +24,8 @@ export default function ({ before(async function () { await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.replace(defaultSettings); await PageObjects.common.navigateToApp('discover'); await PageObjects.timePicker.setDefaultAbsoluteRange(); diff --git a/test/functional/apps/discover/_data_grid_context.ts b/test/functional/apps/discover/_data_grid_context.ts index ee60660ae4a9e..3d9e01e1dee19 100644 --- a/test/functional/apps/discover/_data_grid_context.ts +++ b/test/functional/apps/discover/_data_grid_context.ts @@ -36,8 +36,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('discover data grid context tests', () => { before(async () => { await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings(); await kibanaServer.uiSettings.update(defaultSettings); await PageObjects.common.navigateToApp('discover'); diff --git a/test/functional/apps/discover/_data_grid_doc_navigation.ts b/test/functional/apps/discover/_data_grid_doc_navigation.ts index 2225cb5871f34..e3e8a20b693f8 100644 --- a/test/functional/apps/discover/_data_grid_doc_navigation.ts +++ b/test/functional/apps/discover/_data_grid_doc_navigation.ts @@ -21,8 +21,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('discover data grid doc link', function () { beforeEach(async function () { - await esArchiver.loadIfNeeded('logstash_functional'); - await esArchiver.loadIfNeeded('discover'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/discover'); await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings(); await kibanaServer.uiSettings.update(defaultSettings); await PageObjects.common.navigateToApp('discover'); diff --git a/test/functional/apps/discover/_data_grid_doc_table.ts b/test/functional/apps/discover/_data_grid_doc_table.ts index f0d6abb23d30f..00e6a5025e2af 100644 --- a/test/functional/apps/discover/_data_grid_doc_table.ts +++ b/test/functional/apps/discover/_data_grid_doc_table.ts @@ -28,8 +28,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async function () { log.debug('load kibana index with default index pattern'); await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.replace(defaultSettings); await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings(); await PageObjects.common.navigateToApp('discover'); diff --git a/test/functional/apps/discover/_data_grid_field_data.ts b/test/functional/apps/discover/_data_grid_field_data.ts index 5d73192c1608c..94e8e942f86ba 100644 --- a/test/functional/apps/discover/_data_grid_field_data.ts +++ b/test/functional/apps/discover/_data_grid_field_data.ts @@ -23,8 +23,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { this.tags('includeFirefox'); before(async function () { await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings(); await kibanaServer.uiSettings.update(defaultSettings); await PageObjects.common.navigateToApp('discover'); diff --git a/test/functional/apps/discover/_date_nanos.ts b/test/functional/apps/discover/_date_nanos.ts index 09970b3719c4e..81327d0744bfe 100644 --- a/test/functional/apps/discover/_date_nanos.ts +++ b/test/functional/apps/discover/_date_nanos.ts @@ -20,7 +20,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('date_nanos', function () { before(async function () { - await esArchiver.loadIfNeeded('date_nanos'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/date_nanos'); await kibanaServer.uiSettings.replace({ defaultIndex: 'date-nanos' }); await security.testUser.setRoles(['kibana_admin', 'kibana_date_nanos']); await PageObjects.common.navigateToApp('discover'); @@ -29,7 +29,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async function unloadMakelogs() { await security.testUser.restoreDefaults(); - await esArchiver.unload('date_nanos'); + await esArchiver.unload('test/functional/fixtures/es_archiver/date_nanos'); }); it('should show a timestamp with nanoseconds in the first result row', async function () { diff --git a/test/functional/apps/discover/_date_nanos_mixed.ts b/test/functional/apps/discover/_date_nanos_mixed.ts index a3402cc733431..7d4104c3ac344 100644 --- a/test/functional/apps/discover/_date_nanos_mixed.ts +++ b/test/functional/apps/discover/_date_nanos_mixed.ts @@ -20,7 +20,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('date_nanos_mixed', function () { before(async function () { - await esArchiver.loadIfNeeded('date_nanos_mixed'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/date_nanos_mixed'); await kibanaServer.uiSettings.replace({ defaultIndex: 'timestamp-*' }); await security.testUser.setRoles(['kibana_admin', 'kibana_date_nanos_mixed']); await PageObjects.common.navigateToApp('discover'); @@ -29,7 +29,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await security.testUser.restoreDefaults(); - esArchiver.unload('date_nanos_mixed'); + esArchiver.unload('test/functional/fixtures/es_archiver/date_nanos_mixed'); }); it('shows a list of records of indices with date & date_nanos fields in the right order', async function () { diff --git a/test/functional/apps/discover/_discover.ts b/test/functional/apps/discover/_discover.ts index b5279eaaa1f12..dce6bfba9cd99 100644 --- a/test/functional/apps/discover/_discover.ts +++ b/test/functional/apps/discover/_discover.ts @@ -29,10 +29,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async function () { log.debug('load kibana index with default index pattern'); - await kibanaServer.importExport.load('discover'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); // and load a set of makelogs data - await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.replace(defaultSettings); await PageObjects.common.navigateToApp('discover'); await PageObjects.timePicker.setDefaultAbsoluteRange(); diff --git a/test/functional/apps/discover/_discover_fields_api.ts b/test/functional/apps/discover/_discover_fields_api.ts index 0a6029a9f10e8..614a0794ffb3b 100644 --- a/test/functional/apps/discover/_discover_fields_api.ts +++ b/test/functional/apps/discover/_discover_fields_api.ts @@ -23,8 +23,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async function () { log.debug('load kibana index with default index pattern'); await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.replace(defaultSettings); log.debug('discover'); await PageObjects.common.navigateToApp('discover'); diff --git a/test/functional/apps/discover/_discover_histogram.ts b/test/functional/apps/discover/_discover_histogram.ts index e41422555f81d..d4b3758fd9b8c 100644 --- a/test/functional/apps/discover/_discover_histogram.ts +++ b/test/functional/apps/discover/_discover_histogram.ts @@ -25,16 +25,20 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('discover histogram', function describeIndexTests() { before(async () => { - await esArchiver.loadIfNeeded('logstash_functional'); - await esArchiver.load('long_window_logstash'); - await esArchiver.load('long_window_logstash_index_pattern'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.load('test/functional/fixtures/es_archiver/long_window_logstash'); + await esArchiver.load( + 'test/functional/fixtures/es_archiver/long_window_logstash_index_pattern' + ); await security.testUser.setRoles(['kibana_admin', 'long_window_logstash']); await kibanaServer.uiSettings.replace(defaultSettings); await PageObjects.common.navigateToApp('discover'); }); after(async () => { - await esArchiver.unload('long_window_logstash'); - await esArchiver.unload('long_window_logstash_index_pattern'); + await esArchiver.unload('test/functional/fixtures/es_archiver/long_window_logstash'); + await esArchiver.unload( + 'test/functional/fixtures/es_archiver/long_window_logstash_index_pattern' + ); await security.testUser.restoreDefaults(); }); diff --git a/test/functional/apps/discover/_doc_navigation.ts b/test/functional/apps/discover/_doc_navigation.ts index 90d3c4eca423a..771dac4d40a64 100644 --- a/test/functional/apps/discover/_doc_navigation.ts +++ b/test/functional/apps/discover/_doc_navigation.ts @@ -21,8 +21,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('doc link in discover', function contextSize() { before(async () => { - await esArchiver.loadIfNeeded('logstash_functional'); - await esArchiver.loadIfNeeded('discover'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/discover'); await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings(); await kibanaServer.uiSettings.update({ 'doc_table:legacy': true, diff --git a/test/functional/apps/discover/_doc_table.ts b/test/functional/apps/discover/_doc_table.ts index ae5537b690576..5d7c16c3c6408 100644 --- a/test/functional/apps/discover/_doc_table.ts +++ b/test/functional/apps/discover/_doc_table.ts @@ -30,10 +30,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async function () { log.debug('load kibana index with default index pattern'); await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('discover'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); // and load a set of makelogs data - await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.replace(defaultSettings); await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings(); log.debug('discover doc table'); diff --git a/test/functional/apps/discover/_errors.ts b/test/functional/apps/discover/_errors.ts index 8b8877016b103..f127c39fd5d9a 100644 --- a/test/functional/apps/discover/_errors.ts +++ b/test/functional/apps/discover/_errors.ts @@ -16,14 +16,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('errors', function describeIndexTests() { before(async function () { - await esArchiver.loadIfNeeded('logstash_functional'); - await esArchiver.load('invalid_scripted_field'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.load('test/functional/fixtures/es_archiver/invalid_scripted_field'); await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings(); await PageObjects.common.navigateToApp('discover'); }); after(async function () { - await esArchiver.load('empty_kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/empty_kibana'); }); describe('invalid scripted field error', () => { diff --git a/test/functional/apps/discover/_field_data.ts b/test/functional/apps/discover/_field_data.ts index 1831fb9aa73b1..338d17ba31ff4 100644 --- a/test/functional/apps/discover/_field_data.ts +++ b/test/functional/apps/discover/_field_data.ts @@ -24,8 +24,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { this.tags('includeFirefox'); before(async function () { await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*', 'discover:searchFieldsFromSource': true, diff --git a/test/functional/apps/discover/_field_data_with_fields_api.ts b/test/functional/apps/discover/_field_data_with_fields_api.ts index 319722e0c8842..110e255d18c75 100644 --- a/test/functional/apps/discover/_field_data_with_fields_api.ts +++ b/test/functional/apps/discover/_field_data_with_fields_api.ts @@ -24,8 +24,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { this.tags('includeFirefox'); before(async function () { await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*', 'discover:searchFieldsFromSource': false, diff --git a/test/functional/apps/discover/_filter_editor.ts b/test/functional/apps/discover/_filter_editor.ts index b94ba3cda4044..8bcb4382bb3bf 100644 --- a/test/functional/apps/discover/_filter_editor.ts +++ b/test/functional/apps/discover/_filter_editor.ts @@ -25,10 +25,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async function () { log.debug('load kibana index with default index pattern'); await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('discover'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); // and load a set of makelogs data - await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.replace(defaultSettings); log.debug('discover filter editor'); await PageObjects.common.navigateToApp('discover'); diff --git a/test/functional/apps/discover/_huge_fields.ts b/test/functional/apps/discover/_huge_fields.ts index b3e63e482e734..c7fe0a94b6019 100644 --- a/test/functional/apps/discover/_huge_fields.ts +++ b/test/functional/apps/discover/_huge_fields.ts @@ -19,7 +19,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe.skip('test large number of fields in sidebar', function () { before(async function () { await security.testUser.setRoles(['kibana_admin', 'test_testhuge_reader'], false); - await esArchiver.loadIfNeeded('large_fields'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/large_fields'); await PageObjects.settings.navigateTo(); await kibanaServer.uiSettings.update({ 'timepicker:timeDefaults': `{ "from": "2016-10-05T00:00:00", "to": "2016-10-06T00:00:00"}`, @@ -41,7 +41,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await security.testUser.restoreDefaults(); - await esArchiver.unload('large_fields'); + await esArchiver.unload('test/functional/fixtures/es_archiver/large_fields'); await kibanaServer.uiSettings.replace({}); }); }); diff --git a/test/functional/apps/discover/_indexpattern_with_unmapped_fields.ts b/test/functional/apps/discover/_indexpattern_with_unmapped_fields.ts index 06933e828db7e..e986429a15d26 100644 --- a/test/functional/apps/discover/_indexpattern_with_unmapped_fields.ts +++ b/test/functional/apps/discover/_indexpattern_with_unmapped_fields.ts @@ -18,7 +18,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('index pattern with unmapped fields', () => { before(async () => { - await esArchiver.loadIfNeeded('unmapped_fields'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/unmapped_fields'); await kibanaServer.uiSettings.replace({ defaultIndex: 'test-index-unmapped-fields', 'discover:searchFieldsFromSource': false, @@ -31,7 +31,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); after(async () => { - await esArchiver.unload('unmapped_fields'); + await esArchiver.unload('test/functional/fixtures/es_archiver/unmapped_fields'); }); it('unmapped fields exist on a new saved search', async () => { diff --git a/test/functional/apps/discover/_indexpattern_without_timefield.ts b/test/functional/apps/discover/_indexpattern_without_timefield.ts index a1050222937ec..ff3ad0daf69db 100644 --- a/test/functional/apps/discover/_indexpattern_without_timefield.ts +++ b/test/functional/apps/discover/_indexpattern_without_timefield.ts @@ -19,7 +19,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('indexpattern without timefield', () => { before(async () => { await security.testUser.setRoles(['kibana_admin', 'kibana_timefield']); - await esArchiver.loadIfNeeded('index_pattern_without_timefield'); + await esArchiver.loadIfNeeded( + 'test/functional/fixtures/es_archiver/index_pattern_without_timefield' + ); await kibanaServer.uiSettings.replace({ defaultIndex: 'without-timefield', 'timepicker:timeDefaults': '{ "from": "2019-01-18T19:37:13.000Z", "to": "now"}', @@ -31,7 +33,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await security.testUser.restoreDefaults(); await kibanaServer.uiSettings.unset('timepicker:timeDefaults'); await kibanaServer.uiSettings.unset('defaultIndex'); - await esArchiver.unload('index_pattern_without_timefield'); + await esArchiver.unload( + 'test/functional/fixtures/es_archiver/index_pattern_without_timefield' + ); }); it('should not display a timepicker', async () => { diff --git a/test/functional/apps/discover/_inspector.ts b/test/functional/apps/discover/_inspector.ts index 85bd163bdc50c..17f358ec74871 100644 --- a/test/functional/apps/discover/_inspector.ts +++ b/test/functional/apps/discover/_inspector.ts @@ -34,8 +34,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async () => { await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); // delete .kibana index and update configDoc await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*', diff --git a/test/functional/apps/discover/_large_string.ts b/test/functional/apps/discover/_large_string.ts index 0f6be04212a62..de3f0f2c40ae1 100644 --- a/test/functional/apps/discover/_large_string.ts +++ b/test/functional/apps/discover/_large_string.ts @@ -23,8 +23,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async function () { await security.testUser.setRoles(['kibana_admin', 'kibana_large_strings']); - await kibanaServer.importExport.load('testlargestring'); - await esArchiver.loadIfNeeded('hamlet'); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/testlargestring.json' + ); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/hamlet'); await kibanaServer.uiSettings.replace({ defaultIndex: 'testlargestring' }); }); @@ -68,7 +70,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await security.testUser.restoreDefaults(); - await esArchiver.unload('hamlet'); + await esArchiver.unload('test/functional/fixtures/es_archiver/hamlet'); await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); }); }); diff --git a/test/functional/apps/discover/_runtime_fields_editor.ts b/test/functional/apps/discover/_runtime_fields_editor.ts index 407b74c4fd018..46fe5c34f4cf3 100644 --- a/test/functional/apps/discover/_runtime_fields_editor.ts +++ b/test/functional/apps/discover/_runtime_fields_editor.ts @@ -33,8 +33,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('discover integration with runtime fields editor', function describeIndexTests() { before(async function () { - await esArchiver.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.load('test/functional/fixtures/es_archiver/discover'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.replace(defaultSettings); log.debug('discover'); await PageObjects.common.navigateToApp('discover'); @@ -120,10 +120,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await rowActions[idxToClick].click(); }); - const hasDocHit = await testSubjects.exists('doc-hit'); - expect(hasDocHit).to.be(true); - const runtimeFieldsRow = await testSubjects.exists('tableDocViewRow-discover runtimefield'); - expect(runtimeFieldsRow).to.be(true); + await retry.waitFor('doc viewer is displayed with runtime field', async () => { + const hasDocHit = await testSubjects.exists('doc-hit'); + if (!hasDocHit) { + // Maybe loading has not completed + throw new Error('test subject doc-hit is not yet displayed'); + } + const runtimeFieldsRow = await testSubjects.exists('tableDocViewRow-discover runtimefield'); + + return hasDocHit && runtimeFieldsRow; + }); }); }); } diff --git a/test/functional/apps/discover/_saved_queries.ts b/test/functional/apps/discover/_saved_queries.ts index acf78802fa18f..20f2cab907d9b 100644 --- a/test/functional/apps/discover/_saved_queries.ts +++ b/test/functional/apps/discover/_saved_queries.ts @@ -30,10 +30,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async function () { log.debug('load kibana index with default index pattern'); await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('discover'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); // and load a set of makelogs data - await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.replace(defaultSettings); log.debug('discover'); await PageObjects.common.navigateToApp('discover'); diff --git a/test/functional/apps/discover/_shared_links.ts b/test/functional/apps/discover/_shared_links.ts index 512e05e4b2d79..62364739db311 100644 --- a/test/functional/apps/discover/_shared_links.ts +++ b/test/functional/apps/discover/_shared_links.ts @@ -38,8 +38,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { log.debug('load kibana index with default index pattern'); await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.replace({ 'state:storeInSessionStorage': storeStateInSessionStorage, diff --git a/test/functional/apps/discover/_sidebar.ts b/test/functional/apps/discover/_sidebar.ts index f4b806976fc5d..8179f4e44e8b8 100644 --- a/test/functional/apps/discover/_sidebar.ts +++ b/test/functional/apps/discover/_sidebar.ts @@ -14,10 +14,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'discover', 'timePicker']); const testSubjects = getService('testSubjects'); - describe('discover sidebar', function describeIndexTests() { + // Failing: See https://github.com/elastic/kibana/issues/101449 + describe.skip('discover sidebar', function describeIndexTests() { before(async function () { - await esArchiver.loadIfNeeded('logstash_functional'); - await esArchiver.loadIfNeeded('discover'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/discover'); await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*', }); diff --git a/test/functional/apps/discover/_source_filters.ts b/test/functional/apps/discover/_source_filters.ts index 4161f7f289dbf..f3793dc3e0288 100644 --- a/test/functional/apps/discover/_source_filters.ts +++ b/test/functional/apps/discover/_source_filters.ts @@ -24,10 +24,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); log.debug('load kibana index with default index pattern'); - await esArchiver.load('visualize_source-filters'); + await esArchiver.load('test/functional/fixtures/es_archiver/visualize_source-filters'); // and load a set of makelogs data - await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.update({ 'discover:searchFieldsFromSource': false, diff --git a/test/functional/apps/discover/index.ts b/test/functional/apps/discover/index.ts index db76cd1c20c38..869fb625e8796 100644 --- a/test/functional/apps/discover/index.ts +++ b/test/functional/apps/discover/index.ts @@ -20,7 +20,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { }); after(function unloadMakelogs() { - return esArchiver.unload('logstash_functional'); + return esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); }); loadTestFile(require.resolve('./_saved_queries')); diff --git a/test/functional/apps/getting_started/_shakespeare.ts b/test/functional/apps/getting_started/_shakespeare.ts index 4bc1f54852b82..945c1fdcbdcf4 100644 --- a/test/functional/apps/getting_started/_shakespeare.ts +++ b/test/functional/apps/getting_started/_shakespeare.ts @@ -46,9 +46,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); isNewChartsLibraryEnabled = await PageObjects.visChart.isNewChartsLibraryEnabled(); await security.testUser.setRoles(['kibana_admin', 'test_shakespeare_reader']); - await esArchiver.load('empty_kibana', { skipExisting: true }); + await esArchiver.load('test/functional/fixtures/es_archiver/empty_kibana', { + skipExisting: true, + }); log.debug('Load shakespeare data'); - await esArchiver.loadIfNeeded('getting_started/shakespeare'); + await esArchiver.loadIfNeeded( + 'test/functional/fixtures/es_archiver/getting_started/shakespeare' + ); if (isNewChartsLibraryEnabled) { await kibanaServer.uiSettings.update({ diff --git a/test/functional/apps/home/_navigation.ts b/test/functional/apps/home/_navigation.ts index 401f33b789c85..a57ce0596abac 100644 --- a/test/functional/apps/home/_navigation.ts +++ b/test/functional/apps/home/_navigation.ts @@ -17,8 +17,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('Kibana browser back navigation should work', function describeIndexTests() { before(async () => { - await esArchiver.loadIfNeeded('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/discover'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); }); it('detect navigate back issues', async () => { diff --git a/test/functional/apps/management/_field_formatter.js b/test/functional/apps/management/_field_formatter.js index 49b6c162caa41..383b4faecc40c 100644 --- a/test/functional/apps/management/_field_formatter.js +++ b/test/functional/apps/management/_field_formatter.js @@ -18,7 +18,7 @@ export default function ({ getService, getPageObjects }) { before(async function () { await browser.setWindowSize(1200, 800); - await esArchiver.load('discover'); + await esArchiver.load('test/functional/fixtures/es_archiver/discover'); await kibanaServer.uiSettings.replace({}); await kibanaServer.uiSettings.update({}); }); diff --git a/test/functional/apps/management/_handle_alias.js b/test/functional/apps/management/_handle_alias.js index 6c90556d77cf0..891e59d84a04b 100644 --- a/test/functional/apps/management/_handle_alias.js +++ b/test/functional/apps/management/_handle_alias.js @@ -18,8 +18,8 @@ export default function ({ getService, getPageObjects }) { describe('Index patterns on aliases', function () { before(async function () { await security.testUser.setRoles(['kibana_admin', 'test_alias_reader']); - await esArchiver.loadIfNeeded('alias'); - await esArchiver.load('empty_kibana'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/alias'); + await esArchiver.load('test/functional/fixtures/es_archiver/empty_kibana'); await es.indices.updateAliases({ body: { actions: [ @@ -71,7 +71,7 @@ export default function ({ getService, getPageObjects }) { after(async () => { await security.testUser.restoreDefaults(); - await esArchiver.unload('alias'); + await esArchiver.unload('test/functional/fixtures/es_archiver/alias'); }); }); } diff --git a/test/functional/apps/management/_handle_version_conflict.js b/test/functional/apps/management/_handle_version_conflict.js index 2daad1e457a6b..82723ad7ce967 100644 --- a/test/functional/apps/management/_handle_version_conflict.js +++ b/test/functional/apps/management/_handle_version_conflict.js @@ -30,7 +30,7 @@ export default function ({ getService, getPageObjects }) { describe('index version conflict', function describeIndexTests() { before(async function () { await browser.setWindowSize(1200, 800); - await esArchiver.load('discover'); + await esArchiver.load('test/functional/fixtures/es_archiver/discover'); }); it('Should be able to surface version conflict notification while creating scripted field', async function () { diff --git a/test/functional/apps/management/_import_objects.ts b/test/functional/apps/management/_import_objects.ts index d9eb945be7777..0278955c577a1 100644 --- a/test/functional/apps/management/_import_objects.ts +++ b/test/functional/apps/management/_import_objects.ts @@ -27,14 +27,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('import objects', function describeIndexTests() { describe('.ndjson file', () => { beforeEach(async function () { - await esArchiver.load('management'); + await esArchiver.load('test/functional/fixtures/es_archiver/management'); await kibanaServer.uiSettings.replace({}); await PageObjects.settings.navigateTo(); await PageObjects.settings.clickKibanaSavedObjects(); }); afterEach(async function () { - await esArchiver.unload('management'); + await esArchiver.unload('test/functional/fixtures/es_archiver/management'); }); it('should import saved objects', async function () { @@ -213,14 +213,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('.json file', () => { beforeEach(async function () { - await esArchiver.load('saved_objects_imports'); + await esArchiver.load('test/functional/fixtures/es_archiver/saved_objects_imports'); await kibanaServer.uiSettings.replace({}); await PageObjects.settings.navigateTo(); await PageObjects.settings.clickKibanaSavedObjects(); }); afterEach(async function () { - await esArchiver.unload('saved_objects_imports'); + await esArchiver.unload('test/functional/fixtures/es_archiver/saved_objects_imports'); }); it('should import saved objects', async function () { diff --git a/test/functional/apps/management/_index_patterns_empty.ts b/test/functional/apps/management/_index_patterns_empty.ts index 3a09340f06ba0..038039275b843 100644 --- a/test/functional/apps/management/_index_patterns_empty.ts +++ b/test/functional/apps/management/_index_patterns_empty.ts @@ -20,14 +20,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { describe('index pattern empty view', () => { before(async () => { await esArchiver.emptyKibanaIndex(); - await esArchiver.unload('logstash_functional'); - await esArchiver.unload('makelogs'); + await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.unload('test/functional/fixtures/es_archiver/makelogs'); await kibanaServer.uiSettings.replace({}); await PageObjects.settings.navigateTo(); }); after(async () => { - await esArchiver.loadIfNeeded('makelogs'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/makelogs'); await es.transport.request({ path: '/logstash-a', method: 'DELETE', diff --git a/test/functional/apps/management/_mgmt_import_saved_objects.js b/test/functional/apps/management/_mgmt_import_saved_objects.js index 8697dc49de46a..84e57a798c006 100644 --- a/test/functional/apps/management/_mgmt_import_saved_objects.js +++ b/test/functional/apps/management/_mgmt_import_saved_objects.js @@ -19,12 +19,12 @@ export default function ({ getService, getPageObjects }) { describe('mgmt saved objects', function describeIndexTests() { beforeEach(async function () { await esArchiver.emptyKibanaIndex(); - await esArchiver.load('discover'); + await esArchiver.load('test/functional/fixtures/es_archiver/discover'); await PageObjects.settings.navigateTo(); }); afterEach(async function () { - await esArchiver.unload('discover'); + await esArchiver.unload('test/functional/fixtures/es_archiver/discover'); }); it('should import saved objects mgmt', async function () { diff --git a/test/functional/apps/management/_runtime_fields.js b/test/functional/apps/management/_runtime_fields.js index 44abf07b38ac6..105e1a394fecb 100644 --- a/test/functional/apps/management/_runtime_fields.js +++ b/test/functional/apps/management/_runtime_fields.js @@ -23,7 +23,7 @@ export default function ({ getService, getPageObjects }) { before(async function () { await browser.setWindowSize(1200, 800); - await esArchiver.load('discover'); + await esArchiver.load('test/functional/fixtures/es_archiver/discover'); // delete .kibana index and then wait for Kibana to re-create it await kibanaServer.uiSettings.replace({}); await kibanaServer.uiSettings.update({}); diff --git a/test/functional/apps/management/_scripted_fields.js b/test/functional/apps/management/_scripted_fields.js index c7a4c8c51bf44..2ff9e55c59ebb 100644 --- a/test/functional/apps/management/_scripted_fields.js +++ b/test/functional/apps/management/_scripted_fields.js @@ -46,7 +46,7 @@ export default function ({ getService, getPageObjects }) { before(async function () { await browser.setWindowSize(1200, 800); - await esArchiver.load('discover'); + await esArchiver.load('test/functional/fixtures/es_archiver/discover'); // delete .kibana index and then wait for Kibana to re-create it await kibanaServer.uiSettings.replace({}); await kibanaServer.uiSettings.update({ 'doc_table:legacy': true }); diff --git a/test/functional/apps/management/_scripted_fields_filter.js b/test/functional/apps/management/_scripted_fields_filter.js index 7ed15a6cddbca..6ced089936e5e 100644 --- a/test/functional/apps/management/_scripted_fields_filter.js +++ b/test/functional/apps/management/_scripted_fields_filter.js @@ -20,14 +20,14 @@ export default function ({ getService, getPageObjects }) { before(async function () { // delete .kibana index and then wait for Kibana to re-create it await browser.setWindowSize(1200, 800); - await esArchiver.load('management'); + await esArchiver.load('test/functional/fixtures/es_archiver/management'); await kibanaServer.uiSettings.replace({ defaultIndex: 'f1e4c910-a2e6-11e7-bb30-233be9be6a15', }); }); after(async function () { - await esArchiver.load('empty_kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/empty_kibana'); }); const scriptedPainlessFieldName = 'ram_pain1'; diff --git a/test/functional/apps/management/_test_huge_fields.js b/test/functional/apps/management/_test_huge_fields.js index dcfb8cf8b4c6b..c8710a79e4fc8 100644 --- a/test/functional/apps/management/_test_huge_fields.js +++ b/test/functional/apps/management/_test_huge_fields.js @@ -21,7 +21,7 @@ export default function ({ getService, getPageObjects }) { before(async function () { await security.testUser.setRoles(['kibana_admin', 'test_testhuge_reader'], false); await esArchiver.emptyKibanaIndex(); - await esArchiver.loadIfNeeded('large_fields'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/large_fields'); await PageObjects.settings.navigateTo(); await PageObjects.settings.createIndexPattern('testhuge', 'date'); }); @@ -33,7 +33,7 @@ export default function ({ getService, getPageObjects }) { after(async () => { await security.testUser.restoreDefaults(); - await esArchiver.unload('large_fields'); + await esArchiver.unload('test/functional/fixtures/es_archiver/large_fields'); }); }); } diff --git a/test/functional/apps/management/index.ts b/test/functional/apps/management/index.ts index ac0df0aa90c4d..c8049d2db4b28 100644 --- a/test/functional/apps/management/index.ts +++ b/test/functional/apps/management/index.ts @@ -13,12 +13,12 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { describe('management', function () { before(async () => { - await esArchiver.unload('logstash_functional'); - await esArchiver.loadIfNeeded('makelogs'); + await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/makelogs'); }); after(async () => { - await esArchiver.unload('makelogs'); + await esArchiver.unload('test/functional/fixtures/es_archiver/makelogs'); }); describe('', function () { diff --git a/test/functional/apps/saved_objects_management/edit_saved_object.ts b/test/functional/apps/saved_objects_management/edit_saved_object.ts index 89889088bd73b..a90e927416685 100644 --- a/test/functional/apps/saved_objects_management/edit_saved_object.ts +++ b/test/functional/apps/saved_objects_management/edit_saved_object.ts @@ -57,11 +57,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { describe('saved objects edition page', () => { beforeEach(async () => { - await esArchiver.load('saved_objects_management/edit_saved_object'); + await esArchiver.load( + 'test/functional/fixtures/es_archiver/saved_objects_management/edit_saved_object' + ); }); afterEach(async () => { - await esArchiver.unload('saved_objects_management/edit_saved_object'); + await esArchiver.unload( + 'test/functional/fixtures/es_archiver/saved_objects_management/edit_saved_object' + ); }); it('allows to update the saved object when submitting', async () => { diff --git a/test/functional/apps/saved_objects_management/show_relationships.ts b/test/functional/apps/saved_objects_management/show_relationships.ts index 92c65323333d0..26fd2a00430f1 100644 --- a/test/functional/apps/saved_objects_management/show_relationships.ts +++ b/test/functional/apps/saved_objects_management/show_relationships.ts @@ -15,11 +15,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { describe('saved objects relationships flyout', () => { beforeEach(async () => { - await esArchiver.load('saved_objects_management/show_relationships'); + await esArchiver.load( + 'test/functional/fixtures/es_archiver/saved_objects_management/show_relationships' + ); }); afterEach(async () => { - await esArchiver.unload('saved_objects_management/show_relationships'); + await esArchiver.unload( + 'test/functional/fixtures/es_archiver/saved_objects_management/show_relationships' + ); }); it('displays the invalid references', async () => { diff --git a/test/functional/apps/timelion/index.js b/test/functional/apps/timelion/index.js index 8fba1a5ae2e5b..b81a0e70d8a6d 100644 --- a/test/functional/apps/timelion/index.js +++ b/test/functional/apps/timelion/index.js @@ -18,7 +18,7 @@ export default function ({ getService, loadTestFile }) { before(async function () { log.debug('Starting timelion before method'); await browser.setWindowSize(1280, 800); - await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*' }); }); diff --git a/test/functional/apps/visualize/_histogram_request_start.ts b/test/functional/apps/visualize/_histogram_request_start.ts index 8b5c31701d025..28ebb25744d3f 100644 --- a/test/functional/apps/visualize/_histogram_request_start.ts +++ b/test/functional/apps/visualize/_histogram_request_start.ts @@ -26,10 +26,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('histogram agg onSearchRequestStart', function () { before(async function () { // loading back default data - await esArchiver.load('empty_kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/empty_kibana'); - await esArchiver.loadIfNeeded('logstash_functional'); - await esArchiver.loadIfNeeded('long_window_logstash'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/long_window_logstash'); await PageObjects.visualize.initTests(); log.debug('navigateToApp visualize'); diff --git a/test/functional/apps/visualize/_tsvb_chart.ts b/test/functional/apps/visualize/_tsvb_chart.ts index 690db676cb368..1d4d4fee0175e 100644 --- a/test/functional/apps/visualize/_tsvb_chart.ts +++ b/test/functional/apps/visualize/_tsvb_chart.ts @@ -127,7 +127,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('switch index patterns', () => { before(async () => { - await esArchiver.loadIfNeeded('index_pattern_without_timefield'); + await esArchiver.loadIfNeeded( + 'test/functional/fixtures/es_archiver/index_pattern_without_timefield' + ); }); beforeEach(async () => { @@ -146,7 +148,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await security.testUser.restoreDefaults(); - await esArchiver.load('empty_kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/empty_kibana'); await PageObjects.visualize.initTests(); }); diff --git a/test/functional/apps/visualize/index.ts b/test/functional/apps/visualize/index.ts index 1e0e12a7d31bb..cecd206abd1db 100644 --- a/test/functional/apps/visualize/index.ts +++ b/test/functional/apps/visualize/index.ts @@ -18,10 +18,10 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { before(async () => { log.debug('Starting visualize before method'); await browser.setWindowSize(1280, 800); - await esArchiver.load('empty_kibana'); + await esArchiver.load('test/functional/fixtures/es_archiver/empty_kibana'); - await esArchiver.loadIfNeeded('logstash_functional'); - await esArchiver.loadIfNeeded('long_window_logstash'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/long_window_logstash'); }); // TODO: Remove when vislib is removed diff --git a/test/functional/apps/visualize/input_control_vis/input_control_range.ts b/test/functional/apps/visualize/input_control_vis/input_control_range.ts index 97e746ba4a4c0..566e6f033d2fd 100644 --- a/test/functional/apps/visualize/input_control_vis/input_control_range.ts +++ b/test/functional/apps/visualize/input_control_vis/input_control_range.ts @@ -22,7 +22,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async () => { await PageObjects.visualize.initTests(); await security.testUser.setRoles(['kibana_admin', 'kibana_sample_admin']); - await esArchiver.load('kibana_sample_data_flights_index_pattern'); + await esArchiver.load( + 'test/functional/fixtures/es_archiver/kibana_sample_data_flights_index_pattern' + ); await visualize.navigateToNewVisualization(); await visualize.clickInputControlVis(); }); @@ -50,7 +52,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); after(async () => { - await esArchiver.unload('kibana_sample_data_flights_index_pattern'); + await esArchiver.unload( + 'test/functional/fixtures/es_archiver/kibana_sample_data_flights_index_pattern' + ); await security.testUser.restoreDefaults(); }); }); diff --git a/test/functional/apps/visualize/legacy/index.ts b/test/functional/apps/visualize/legacy/index.ts index 914559e5cea92..d474287860b25 100644 --- a/test/functional/apps/visualize/legacy/index.ts +++ b/test/functional/apps/visualize/legacy/index.ts @@ -21,9 +21,9 @@ export default function ({ getPageObjects, getService, loadTestFile }: FtrProvid await PageObjects.visualize.initTests(); log.debug('Starting visualize legacy before method'); await browser.setWindowSize(1280, 800); - await esArchiver.loadIfNeeded('logstash_functional'); - await esArchiver.loadIfNeeded('long_window_logstash'); - await kibanaServer.importExport.load('visualize'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/long_window_logstash'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/visualize.json'); await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*', [UI_SETTINGS.FORMAT_BYTES_DEFAULT_PATTERN]: '0,0.[000]b', diff --git a/test/functional/config.js b/test/functional/config.js index 4a6791a3bc62f..eac21e5a45618 100644 --- a/test/functional/config.js +++ b/test/functional/config.js @@ -97,6 +97,9 @@ export default async function ({ readConfigFile }) { pathname: '/app/home', hash: '/', }, + observabilityCases: { + pathname: '/app/observability/cases', + }, }, junit: { reportName: 'Chrome UI Functional Tests', diff --git a/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json b/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json new file mode 100644 index 0000000000000..139da89e58d12 --- /dev/null +++ b/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json @@ -0,0 +1,3471 @@ +{ + "type": "doc", + "value": { + "id": "search:a16d1990-3dca-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "search": { + "columns": [ + "animal", + "isDog", + "name", + "sound", + "weightLbs" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":\"weightLbs:>40\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "weightLbs", + "desc" + ] + ], + "title": "animal weights", + "version": 1 + }, + "type": "search", + "updated_at": "2018-04-11T20:55:26.317Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "config:6.3.0", + "index": ".kibana", + "source": { + "config": { + "buildNum": 8467, + "defaultIndex": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c" + }, + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "config": "7.13.0" + }, + "references": [ + ], + "type": "config", + "updated_at": "2018-04-11T20:43:55.434Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:61c58ad0-3dd3-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"animal\",\"value\":\"dog\",\"params\":{\"query\":\"dog\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"animal\":{\"query\":\"dog\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"}]", + "refreshInterval": { + "display": "Off", + "pause": false, + "value": 0 + }, + "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", + "timeRestore": true, + "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", + "title": "dashboard with filter", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "50643b60-3dd3-11e8-b2b9-5d5dc1715159", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", + "name": "2:panel_2", + "type": "search" + } + ], + "type": "dashboard", + "updated_at": "2018-04-11T21:57:52.253Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:2ae34a60-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"}]", + "timeRestore": false, + "title": "couple panels", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "145ced90-3dcb-11e8-8660-4d65aa086b3c", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "e2023110-3dcb-11e8-8660-4d65aa086b3c", + "name": "2:panel_2", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:03:29.670Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:76d03330-3dd3-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "and_descriptions_has_underscores", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "dashboard_with_underscores", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T21:58:27.555Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:9b780cd0-3dd3-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "* hi & $%!!@# 漢字 ^--=++[]{};'~`~<>?,./:\";'\\|\\\\ special chars", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:00:07.322Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:6c0b16e0-3dd3-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "dashboard-name-has-dashes", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T21:58:09.486Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:19523860-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "im empty too", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:03:00.198Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:14616b50-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "im empty", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:02:51.909Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:33bb8ad0-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"}]", + "timeRestore": false, + "title": "few panels", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "145ced90-3dcb-11e8-8660-4d65aa086b3c", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "e2023110-3dcb-11e8-8660-4d65aa086b3c", + "name": "2:panel_2", + "type": "visualization" + }, + { + "id": "4b5d6ef0-3dcb-11e8-8660-4d65aa086b3c", + "name": "3:panel_3", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:03:44.509Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:60659030-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz 2", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:04:59.443Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:65227c00-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz 3", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:07.392Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:6803a2f0-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz 4", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:12.223Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:6b18f940-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz 5", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:17.396Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:6e12ff60-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz 6", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:22.390Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:4f0fd980-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:04:30.360Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:3de0bda0-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "1", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:04:01.530Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:46c8b580-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "2", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:04:16.472Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:708fe640-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz 7", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:26.564Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:7b8d50a0-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "Hi i have a lot of words in my dashboard name! It's pretty long i wonder what it'll look like", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:45.002Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:7e42d3b0-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "bye", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:49.547Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:846988b0-3dd4-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "last", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:59.867Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:cbd3bc30-3e5a-11e8-9fc3-39e49624228e", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"weightLbs:<50\",\"language\":\"lucene\"},\"filter\":[{\"meta\":{\"negate\":true,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"name.keyword\",\"value\":\"Fee Fee\",\"params\":{\"query\":\"Fee Fee\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"name.keyword\":{\"query\":\"Fee Fee\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":true,\"useMargins\":true,\"hidePanelTitles\":true}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"}]", + "timeRestore": false, + "title": "bug", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "771b4f10-3e59-11e8-9fc3-39e49624228e", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "befdb6b0-3e59-11e8-9fc3-39e49624228e", + "name": "2:panel_2", + "type": "visualization" + }, + { + "id": "4c0c3f90-3e5a-11e8-9fc3-39e49624228e", + "name": "3:panel_3", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-04-12T14:07:12.243Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:5bac3a80-3e5b-11e8-9fc3-39e49624228e", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "dashboard with scripted filter, negated filter and query", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"weightLbs:<50\"},\"filter\":[{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":null,\"disabled\":false,\"key\":\"name.keyword\",\"negate\":true,\"params\":{\"query\":\"Fee Fee\",\"type\":\"phrase\"},\"type\":\"phrase\",\"value\":\"Fee Fee\",\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"name.keyword\":{\"query\":\"Fee Fee\",\"type\":\"phrase\"}}}},{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":\"is dog\",\"disabled\":false,\"field\":\"isDog\",\"key\":\"isDog\",\"negate\":false,\"params\":{\"value\":true},\"type\":\"phrase\",\"value\":\"true\",\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index\"},\"script\":{\"script\":{\"inline\":\"boolean compare(Supplier s, def v) {return s.get() == v;}compare(() -> { return doc['animal.keyword'].value == 'dog' }, params.value);\",\"lang\":\"painless\",\"params\":{\"value\":true}}}}],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":true,\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"4\"},\"panelIndex\":\"4\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_4\"}]", + "refreshInterval": { + "display": "Off", + "pause": false, + "section": 0, + "value": 0 + }, + "timeFrom": "Wed Apr 12 2017 10:06:21 GMT-0400", + "timeRestore": true, + "timeTo": "Thu Apr 12 2018 10:06:21 GMT-0400", + "title": "filters", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index", + "type": "index-pattern" + }, + { + "id": "771b4f10-3e59-11e8-9fc3-39e49624228e", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "4c0c3f90-3e5a-11e8-9fc3-39e49624228e", + "name": "3:panel_3", + "type": "visualization" + }, + { + "id": "50643b60-3dd3-11e8-b2b9-5d5dc1715159", + "name": "4:panel_4", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-04-12T14:11:13.576Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "index-pattern:f908c8e0-3e6d-11e8-bbb9-e15942d5d48c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "index-pattern": { + "fields": "[{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"activity level\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"barking level\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"breed\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"breed.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"size\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"size.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"trainability\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "title": "dogbreeds" + }, + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [ + ], + "type": "index-pattern", + "updated_at": "2018-04-12T16:24:29.357Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:5e085850-3e6e-11e8-bbb9-e15942d5d48c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "f908c8e0-3e6d-11e8-bbb9-e15942d5d48c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-12T16:27:17.973Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "non timebased line chart - dog data", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"non timebased line chart - dog data\",\"type\":\"line\",\"params\":{\"type\":\"line\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100,\"filter\":true},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Max trainability\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"line\",\"mode\":\"normal\",\"data\":{\"label\":\"Max trainability\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true},{\"show\":true,\"mode\":\"normal\",\"type\":\"line\",\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"data\":{\"id\":\"3\",\"label\":\"Max barking level\"},\"valueAxis\":\"ValueAxis-1\"},{\"show\":true,\"mode\":\"normal\",\"type\":\"line\",\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"data\":{\"id\":\"4\",\"label\":\"Max activity level\"},\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"trainability\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"breed.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}},{\"id\":\"3\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"barking level\"}},{\"id\":\"4\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"activity level\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:a5d56330-3e6e-11e8-bbb9-e15942d5d48c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "I have two visualizations that are created off a non time based index", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"}]", + "timeRestore": false, + "title": "Non time based", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "5e085850-3e6e-11e8-bbb9-e15942d5d48c", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "8bc8d6c0-3e6e-11e8-bbb9-e15942d5d48c", + "name": "2:panel_2", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-04-12T16:29:18.435Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:d2525040-3dcd-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "I have one of every visualization type since the last time I was created!", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":15,\"w\":24,\"h\":15,\"i\":\"4\"},\"panelIndex\":\"4\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_4\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":30,\"w\":24,\"h\":15,\"i\":\"5\"},\"panelIndex\":\"5\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_5\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":30,\"w\":24,\"h\":15,\"i\":\"6\"},\"panelIndex\":\"6\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_6\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":45,\"w\":24,\"h\":15,\"i\":\"7\"},\"panelIndex\":\"7\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_7\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":45,\"w\":24,\"h\":15,\"i\":\"8\"},\"panelIndex\":\"8\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_8\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":60,\"w\":24,\"h\":15,\"i\":\"9\"},\"panelIndex\":\"9\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_9\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":60,\"w\":24,\"h\":15,\"i\":\"10\"},\"panelIndex\":\"10\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_10\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":75,\"w\":24,\"h\":15,\"i\":\"11\"},\"panelIndex\":\"11\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_11\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":75,\"w\":24,\"h\":15,\"i\":\"12\"},\"panelIndex\":\"12\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_12\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":90,\"w\":24,\"h\":15,\"i\":\"13\"},\"panelIndex\":\"13\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_13\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":90,\"w\":24,\"h\":15,\"i\":\"14\"},\"panelIndex\":\"14\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_14\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":105,\"w\":24,\"h\":15,\"i\":\"15\"},\"panelIndex\":\"15\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_15\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":105,\"w\":24,\"h\":15,\"i\":\"16\"},\"panelIndex\":\"16\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_16\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":120,\"w\":24,\"h\":15,\"i\":\"17\"},\"panelIndex\":\"17\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_17\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":120,\"w\":24,\"h\":15,\"i\":\"18\"},\"panelIndex\":\"18\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_18\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":135,\"w\":24,\"h\":15,\"i\":\"19\"},\"panelIndex\":\"19\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_19\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":135,\"w\":24,\"h\":15,\"i\":\"20\"},\"panelIndex\":\"20\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_20\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":150,\"w\":24,\"h\":15,\"i\":\"21\"},\"panelIndex\":\"21\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_21\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":150,\"w\":24,\"h\":15,\"i\":\"22\"},\"panelIndex\":\"22\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_22\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":165,\"w\":24,\"h\":15,\"i\":\"23\"},\"panelIndex\":\"23\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_23\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"x\":24,\"y\":165,\"w\":24,\"h\":15,\"i\":\"24\"},\"panelIndex\":\"24\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_24\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"x\":0,\"y\":180,\"w\":24,\"h\":15,\"i\":\"25\"},\"panelIndex\":\"25\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_25\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"x\":24,\"y\":180,\"w\":24,\"h\":15,\"i\":\"26\"},\"panelIndex\":\"26\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_26\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":195,\"w\":24,\"h\":15,\"i\":\"27\"},\"panelIndex\":\"27\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_27\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":195,\"w\":24,\"h\":15,\"i\":\"28\"},\"panelIndex\":\"28\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_28\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":210,\"w\":24,\"h\":15,\"i\":\"29\"},\"panelIndex\":\"29\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_29\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":210,\"i\":\"30\"},\"panelIndex\":\"30\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_30\"}]", + "refreshInterval": { + "display": "Off", + "pause": false, + "value": 0 + }, + "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", + "timeRestore": true, + "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", + "title": "dashboard with everything", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "e6140540-3dca-11e8-8660-4d65aa086b3c", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "3525b840-3dcb-11e8-8660-4d65aa086b3c", + "name": "2:panel_2", + "type": "visualization" + }, + { + "id": "4b5d6ef0-3dcb-11e8-8660-4d65aa086b3c", + "name": "3:panel_3", + "type": "visualization" + }, + { + "id": "37a541c0-3dcc-11e8-8660-4d65aa086b3c", + "name": "4:panel_4", + "type": "visualization" + }, + { + "id": "ffa2e0c0-3dcb-11e8-8660-4d65aa086b3c", + "name": "5:panel_5", + "type": "visualization" + }, + { + "id": "e2023110-3dcb-11e8-8660-4d65aa086b3c", + "name": "6:panel_6", + "type": "visualization" + }, + { + "id": "145ced90-3dcb-11e8-8660-4d65aa086b3c", + "name": "7:panel_7", + "type": "visualization" + }, + { + "id": "2d1b1620-3dcd-11e8-8660-4d65aa086b3c", + "name": "8:panel_8", + "type": "visualization" + }, + { + "id": "42535e30-3dcd-11e8-8660-4d65aa086b3c", + "name": "9:panel_9", + "type": "visualization" + }, + { + "id": "42535e30-3dcd-11e8-8660-4d65aa086b3c", + "name": "10:panel_10", + "type": "visualization" + }, + { + "id": "4c0f47e0-3dcd-11e8-8660-4d65aa086b3c", + "name": "11:panel_11", + "type": "visualization" + }, + { + "id": "11ae2bd0-3dcc-11e8-8660-4d65aa086b3c", + "name": "12:panel_12", + "type": "visualization" + }, + { + "id": "3fe22200-3dcb-11e8-8660-4d65aa086b3c", + "name": "13:panel_13", + "type": "visualization" + }, + { + "id": "4ca00ba0-3dcc-11e8-8660-4d65aa086b3c", + "name": "14:panel_14", + "type": "visualization" + }, + { + "id": "78803be0-3dcd-11e8-8660-4d65aa086b3c", + "name": "15:panel_15", + "type": "visualization" + }, + { + "id": "b92ae920-3dcc-11e8-8660-4d65aa086b3c", + "name": "16:panel_16", + "type": "visualization" + }, + { + "id": "e4d8b430-3dcc-11e8-8660-4d65aa086b3c", + "name": "17:panel_17", + "type": "visualization" + }, + { + "id": "f81134a0-3dcc-11e8-8660-4d65aa086b3c", + "name": "18:panel_18", + "type": "visualization" + }, + { + "id": "cc43fab0-3dcc-11e8-8660-4d65aa086b3c", + "name": "19:panel_19", + "type": "visualization" + }, + { + "id": "02a2e4e0-3dcd-11e8-8660-4d65aa086b3c", + "name": "20:panel_20", + "type": "visualization" + }, + { + "id": "df815d20-3dcc-11e8-8660-4d65aa086b3c", + "name": "21:panel_21", + "type": "visualization" + }, + { + "id": "c40f4d40-3dcc-11e8-8660-4d65aa086b3c", + "name": "22:panel_22", + "type": "visualization" + }, + { + "id": "7fda8ee0-3dcd-11e8-8660-4d65aa086b3c", + "name": "23:panel_23", + "type": "visualization" + }, + { + "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", + "name": "24:panel_24", + "type": "search" + }, + { + "id": "be5accf0-3dca-11e8-8660-4d65aa086b3c", + "name": "25:panel_25", + "type": "search" + }, + { + "id": "ca5ada40-3dca-11e8-8660-4d65aa086b3c", + "name": "26:panel_26", + "type": "search" + }, + { + "id": "771b4f10-3e59-11e8-9fc3-39e49624228e", + "name": "27:panel_27", + "type": "visualization" + }, + { + "id": "5e085850-3e6e-11e8-bbb9-e15942d5d48c", + "name": "28:panel_28", + "type": "visualization" + }, + { + "id": "8bc8d6c0-3e6e-11e8-bbb9-e15942d5d48c", + "name": "29:panel_29", + "type": "visualization" + }, + { + "id": "befdb6b0-3e59-11e8-9fc3-39e49624228e", + "name": "30:panel_30", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-04-16T16:05:02.915Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:29bd0240-4197-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-16T16:56:53.092Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"geo.src\",\"value\":\"CN\",\"params\":{\"query\":\"CN\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"geo.src\":{\"query\":\"CN\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"bytes >= 10000\",\"language\":\"kuery\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Kuery: pie bytes with kuery and filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Kuery: pie bytes with kuery and filter\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"bytes\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":10,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "index-pattern:0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "index-pattern": { + "fieldFormatMap": "{\"machine.ram\":{\"id\":\"number\",\"params\":{\"pattern\":\"0,0.[000] b\"}}}", + "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName": "@timestamp", + "title": "logstash-*" + }, + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [ + ], + "type": "index-pattern", + "updated_at": "2018-04-16T16:57:12.263Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "search:55d37a30-4197-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "search": { + "columns": [ + "agent", + "bytes", + "clientip" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"clientip : 73.14.212.83\",\"language\":\"kuery\"},\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"range\",\"key\":\"bytes\",\"value\":\"100 to 1,000\",\"params\":{\"gte\":100,\"lt\":1000},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"range\":{\"bytes\":{\"gte\":100,\"lt\":1000}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Bytes and kuery in saved search with filter", + "version": 1 + }, + "type": "search", + "updated_at": "2018-04-16T16:58:07.059Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:b60de070-4197-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "Bytes bytes and more bytes", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":15,\"w\":17,\"h\":8,\"i\":\"4\"},\"panelIndex\":\"4\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_4\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":30,\"w\":18,\"h\":13,\"i\":\"5\"},\"panelIndex\":\"5\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_5\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":37,\"w\":24,\"h\":12,\"i\":\"6\"},\"panelIndex\":\"6\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_6\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":18,\"y\":30,\"w\":9,\"h\":7,\"i\":\"7\"},\"panelIndex\":\"7\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_7\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":28,\"y\":23,\"w\":15,\"h\":13,\"i\":\"8\"},\"panelIndex\":\"8\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_8\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":43,\"w\":24,\"h\":15,\"i\":\"9\"},\"panelIndex\":\"9\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_9\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":49,\"w\":18,\"h\":12,\"i\":\"10\"},\"panelIndex\":\"10\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_10\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":58,\"w\":24,\"h\":15,\"i\":\"11\"},\"panelIndex\":\"11\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_11\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":61,\"w\":5,\"h\":4,\"i\":\"12\"},\"panelIndex\":\"12\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_12\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":73,\"w\":17,\"h\":6,\"i\":\"13\"},\"panelIndex\":\"13\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_13\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":65,\"w\":24,\"h\":15,\"i\":\"14\"},\"panelIndex\":\"14\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_14\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":79,\"w\":24,\"h\":6,\"i\":\"15\"},\"panelIndex\":\"15\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_15\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":80,\"w\":24,\"h\":15,\"i\":\"16\"},\"panelIndex\":\"16\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_16\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":85,\"w\":13,\"h\":11,\"i\":\"17\"},\"panelIndex\":\"17\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_17\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"x\":24,\"y\":95,\"w\":23,\"h\":11,\"i\":\"18\"},\"panelIndex\":\"18\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_18\"}]", + "refreshInterval": { + "display": "Off", + "pause": false, + "value": 0 + }, + "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", + "timeRestore": true, + "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", + "title": "All about those bytes", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "7ff2c4c0-4191-11e8-bb13-d53698fb349a", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "03d2afd0-4192-11e8-bb13-d53698fb349a", + "name": "2:panel_2", + "type": "visualization" + }, + { + "id": "63983430-4192-11e8-bb13-d53698fb349a", + "name": "3:panel_3", + "type": "visualization" + }, + { + "id": "0ca8c600-4195-11e8-bb13-d53698fb349a", + "name": "4:panel_4", + "type": "visualization" + }, + { + "id": "c10c6b00-4191-11e8-bb13-d53698fb349a", + "name": "5:panel_5", + "type": "visualization" + }, + { + "id": "760a9060-4190-11e8-bb13-d53698fb349a", + "name": "6:panel_6", + "type": "visualization" + }, + { + "id": "1dcdfe30-4192-11e8-bb13-d53698fb349a", + "name": "7:panel_7", + "type": "visualization" + }, + { + "id": "584c0300-4191-11e8-bb13-d53698fb349a", + "name": "8:panel_8", + "type": "visualization" + }, + { + "id": "b3e70d00-4190-11e8-bb13-d53698fb349a", + "name": "9:panel_9", + "type": "visualization" + }, + { + "id": "df72ad40-4194-11e8-bb13-d53698fb349a", + "name": "10:panel_10", + "type": "visualization" + }, + { + "id": "9bebe980-4192-11e8-bb13-d53698fb349a", + "name": "11:panel_11", + "type": "visualization" + }, + { + "id": "9fb4c670-4194-11e8-bb13-d53698fb349a", + "name": "12:panel_12", + "type": "visualization" + }, + { + "id": "35417e50-4194-11e8-bb13-d53698fb349a", + "name": "13:panel_13", + "type": "visualization" + }, + { + "id": "039e4770-4194-11e8-bb13-d53698fb349a", + "name": "14:panel_14", + "type": "visualization" + }, + { + "id": "76c7f020-4194-11e8-bb13-d53698fb349a", + "name": "15:panel_15", + "type": "visualization" + }, + { + "id": "8090dcb0-4195-11e8-bb13-d53698fb349a", + "name": "16:panel_16", + "type": "visualization" + }, + { + "id": "29bd0240-4197-11e8-bb13-d53698fb349a", + "name": "17:panel_17", + "type": "visualization" + }, + { + "id": "55d37a30-4197-11e8-bb13-d53698fb349a", + "name": "18:panel_18", + "type": "search" + } + ], + "type": "dashboard", + "updated_at": "2018-04-16T17:00:48.503Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:78803be0-3dcd-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:32.127Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: tag cloud", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tag cloud\",\"type\":\"tagcloud\",\"params\":{\"scale\":\"linear\",\"orientation\":\"single\",\"minFontSize\":18,\"maxFontSize\":72,\"showLabel\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:3fe22200-3dcb-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:32.130Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: pie", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: pie\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"bytes\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:4ca00ba0-3dcc-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:32.131Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: region map", + "uiStateJSON": "{\"mapZoom\":2,\"mapCenter\":[8.754794702435618,-9.140625000000002]}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: region map\",\"type\":\"region_map\",\"params\":{\"legendPosition\":\"bottomright\",\"addTooltip\":true,\"colorSchema\":\"Yellow to Red\",\"selectedLayer\":{\"attribution\":\"

Made with NaturalEarth | Elastic Maps Service

\",\"name\":\"World Countries\",\"weight\":1,\"format\":{\"type\":\"geojson\"},\"url\":\"https://staging-dot-elastic-layer.appspot.com/blob/5715999101812736?elastic_tile_service_tos=agree&my_app_version=6.3.0\",\"fields\":[{\"name\":\"iso2\",\"description\":\"Two letter abbreviation\"},{\"name\":\"iso3\",\"description\":\"Three letter abbreviation\"},{\"name\":\"name\",\"description\":\"Country name\"}],\"created_at\":\"2017-07-31T16:00:19.996450\",\"tags\":[],\"id\":5715999101812736,\"layerId\":\"elastic_maps_service.World Countries\"},\"selectedJoinField\":{\"name\":\"iso2\",\"description\":\"Two letter abbreviation\"},\"isDisplayWarning\":true,\"wms\":{\"enabled\":false,\"options\":{\"format\":\"image/png\",\"transparent\":true},\"baseLayersAreLoaded\":{},\"tmsLayers\":[{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}],\"selectedTmsLayer\":{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}},\"mapZoom\":2,\"mapCenter\":[0,0],\"outlineWeight\":1,\"showAllShapes\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:11ae2bd0-3dcc-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:32.133Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: metric", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: metric\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"cardinality\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:145ced90-3dcb-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:32.134Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: heatmap", + "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"0 - 15\":\"rgb(247,252,245)\",\"15 - 30\":\"rgb(199,233,192)\",\"30 - 45\":\"rgb(116,196,118)\",\"45 - 60\":\"rgb(35,139,69)\"}}}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: heatmap\",\"type\":\"heatmap\",\"params\":{\"type\":\"heatmap\",\"addTooltip\":true,\"addLegend\":true,\"enableHover\":false,\"legendPosition\":\"right\",\"times\":[],\"colorsNumber\":4,\"colorSchema\":\"Greens\",\"setColorRange\":false,\"colorsRange\":[],\"invertColors\":false,\"percentageMode\":false,\"valueAxes\":[{\"show\":false,\"id\":\"ValueAxis-1\",\"type\":\"value\",\"scale\":{\"type\":\"linear\",\"defaultYExtents\":false},\"labels\":{\"show\":false,\"rotate\":0,\"overwriteColor\":false,\"color\":\"#555\"}}]},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"bytes\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:e2023110-3dcb-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:32.135Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: guage", + "uiStateJSON": "{\"vis\":{\"colors\":{\"0 - 50000\":\"#EF843C\",\"75000 - 10000000\":\"#3F6833\"},\"defaultColors\":{\"0 - 5000000\":\"rgb(0,104,55)\",\"50000000 - 74998990099\":\"rgb(165,0,38)\"}}}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: guage\",\"type\":\"gauge\",\"params\":{\"addLegend\":true,\"addTooltip\":true,\"gauge\":{\"backStyle\":\"Full\",\"colorSchema\":\"Green to Red\",\"colorsRange\":[{\"from\":0,\"to\":5000000},{\"from\":50000000,\"to\":74998990099}],\"extendRange\":true,\"gaugeColorMode\":\"Labels\",\"gaugeStyle\":\"Full\",\"gaugeType\":\"Arc\",\"invertColors\":false,\"labels\":{\"color\":\"black\",\"show\":true},\"orientation\":\"vertical\",\"percentageMode\":false,\"scale\":{\"color\":\"#333\",\"labels\":false,\"show\":true},\"style\":{\"bgColor\":false,\"bgFill\":\"#eee\",\"bgMask\":false,\"bgWidth\":0.9,\"fontSize\":60,\"labelColor\":true,\"mask\":false,\"maskBars\":50,\"subText\":\"\",\"width\":0.9},\"type\":\"meter\",\"alignment\":\"horizontal\"},\"isDisplayWarning\":false,\"type\":\"gauge\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"avg\",\"schema\":\"metric\",\"params\":{\"field\":\"machine.ram\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:b92ae920-3dcc-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.110Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: timelion", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: timelion\",\"type\":\"timelion\",\"params\":{\"expression\":\".es(*, metric=avg:bytes, split=ip:5)\",\"interval\":\"auto\"},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:e4d8b430-3dcc-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.106Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-guage", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-guage\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"gauge\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"},{\"id\":\"d18e5970-3dcc-11e8-a2f6-c162ca6cf6ea\",\"color\":\"rgba(160,70,216,1)\",\"split_mode\":\"filter\",\"metrics\":[{\"id\":\"d18e5971-3dcc-11e8-a2f6-c162ca6cf6ea\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"bar_color_rules\":[{\"id\":\"cd25a820-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_color_rules\":[{\"id\":\"e0be22e0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_width\":10,\"gauge_inner_width\":10,\"gauge_style\":\"half\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:4c0f47e0-3dcd-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.111Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: markdown", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: markdown\",\"type\":\"markdown\",\"params\":{\"fontSize\":20,\"openLinksInNewTab\":false,\"markdown\":\"I'm a markdown!\"},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:2d1b1620-3dcd-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "control_0_index_pattern", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "control_1_index_pattern", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "control_2_index_pattern", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.123Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: input control", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: input control\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1523481142694\",\"fieldName\":\"bytes\",\"parent\":\"\",\"label\":\"Bytes Input List\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"},{\"id\":\"1523481163654\",\"fieldName\":\"bytes\",\"parent\":\"\",\"label\":\"Bytes range\",\"type\":\"range\",\"options\":{\"decimalPlaces\":0,\"step\":1},\"indexPatternRefName\":\"control_1_index_pattern\"},{\"id\":\"1523481176519\",\"fieldName\":\"sound.keyword\",\"parent\":\"\",\"label\":\"Animal sounds\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_2_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:8bc8d6c0-3e6e-11e8-bbb9-e15942d5d48c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "f908c8e0-3e6d-11e8-bbb9-e15942d5d48c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "f908c8e0-3e6d-11e8-bbb9-e15942d5d48c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.173Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"size.keyword\",\"value\":\"extra large\",\"params\":{\"query\":\"extra large\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"size.keyword\":{\"query\":\"extra large\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: non timebased line chart - dog data - with filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{\"field\":\"trainability\"},\"schema\":\"metric\",\"type\":\"max\"},{\"enabled\":true,\"id\":\"2\",\"params\":{\"field\":\"breed.keyword\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"size\":5},\"schema\":\"segment\",\"type\":\"terms\"},{\"enabled\":true,\"id\":\"3\",\"params\":{\"field\":\"barking level\"},\"schema\":\"metric\",\"type\":\"max\"},{\"enabled\":true,\"id\":\"4\",\"params\":{\"field\":\"activity level\"},\"schema\":\"metric\",\"type\":\"max\"}],\"params\":{\"addLegend\":true,\"addTimeMarker\":false,\"addTooltip\":true,\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"labels\":{\"show\":true,\"truncate\":100,\"filter\":true},\"position\":\"bottom\",\"scale\":{\"type\":\"linear\"},\"show\":true,\"style\":{},\"title\":{},\"type\":\"category\"}],\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"legendPosition\":\"right\",\"seriesParams\":[{\"data\":{\"id\":\"1\",\"label\":\"Max trainability\"},\"drawLinesBetweenPoints\":true,\"mode\":\"normal\",\"show\":\"true\",\"showCircles\":true,\"type\":\"line\",\"valueAxis\":\"ValueAxis-1\"},{\"data\":{\"id\":\"3\",\"label\":\"Max barking level\"},\"drawLinesBetweenPoints\":true,\"mode\":\"normal\",\"show\":true,\"showCircles\":true,\"type\":\"line\",\"valueAxis\":\"ValueAxis-1\"},{\"data\":{\"id\":\"4\",\"label\":\"Max activity level\"},\"drawLinesBetweenPoints\":true,\"mode\":\"normal\",\"show\":true,\"showCircles\":true,\"type\":\"line\",\"valueAxis\":\"ValueAxis-1\"}],\"times\":[],\"type\":\"line\",\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"labels\":{\"filter\":false,\"rotate\":0,\"show\":true,\"truncate\":100},\"name\":\"LeftAxis-1\",\"position\":\"left\",\"scale\":{\"mode\":\"normal\",\"type\":\"linear\"},\"show\":true,\"style\":{},\"title\":{\"text\":\"Max trainability\"},\"type\":\"value\"}],\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"title\":\"Rendering Test: non timebased line chart - dog data - with filter\",\"type\":\"line\"}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:42535e30-3dcd-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "control_0_index_pattern", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "control_1_index_pattern", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.124Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: input control parent", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: input control parent\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1523481216736\",\"fieldName\":\"animal.keyword\",\"parent\":\"\",\"label\":\"Animal type\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"},{\"id\":\"1523481176519\",\"fieldName\":\"sound.keyword\",\"parent\":\"1523481216736\",\"label\":\"Animal sounds\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_1_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:7fda8ee0-3dcd-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.344Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: vega", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: vega\",\"type\":\"vega\",\"params\":{\"spec\":\"{\\n/*\\n\\nWelcome to Vega visualizations. Here you can design your own dataviz from scratch using a declarative language called Vega, or its simpler form Vega-Lite. In Vega, you have the full control of what data is loaded, even from multiple sources, how that data is transformed, and what visual elements are used to show it. Use help icon to view Vega examples, tutorials, and other docs. Use the wrench icon to reformat this text, or to remove comments.\\n\\nThis example graph shows the document count in all indexes in the current time range. You might need to adjust the time filter in the upper right corner.\\n*/\\n\\n $schema: https://vega.github.io/schema/vega-lite/v2.json\\n title: Event counts from all indexes\\n\\n // Define the data source\\n data: {\\n url: {\\n/*\\nAn object instead of a string for the \\\"url\\\" param is treated as an Elasticsearch query. Anything inside this object is not part of the Vega language, but only understood by Kibana and Elasticsearch server. This query counts the number of documents per time interval, assuming you have a @timestamp field in your data.\\n\\nKibana has a special handling for the fields surrounded by \\\"%\\\". They are processed before the the query is sent to Elasticsearch. This way the query becomes context aware, and can use the time range and the dashboard filters.\\n*/\\n\\n // Apply dashboard context filters when set\\n %context%: true\\n // Filter the time picker (upper right corner) with this field\\n %timefield%: @timestamp\\n\\n/*\\nSee .search() documentation for : https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search\\n*/\\n\\n // Which index to search\\n index: _all\\n // Aggregate data by the time field into time buckets, counting the number of documents in each bucket.\\n body: {\\n aggs: {\\n time_buckets: {\\n date_histogram: {\\n // Use date histogram aggregation on @timestamp field\\n field: @timestamp\\n // The interval value will depend on the daterange picker (true), or use an integer to set an approximate bucket count\\n interval: {%autointerval%: true}\\n // Make sure we get an entire range, even if it has no data\\n extended_bounds: {\\n // Use the current time range's start and end\\n min: {%timefilter%: \\\"min\\\"}\\n max: {%timefilter%: \\\"max\\\"}\\n }\\n // Use this for linear (e.g. line, area) graphs. Without it, empty buckets will not show up\\n min_doc_count: 0\\n }\\n }\\n }\\n // Speed up the response by only including aggregation results\\n size: 0\\n }\\n }\\n/*\\nElasticsearch will return results in this format:\\n\\naggregations: {\\n time_buckets: {\\n buckets: [\\n {\\n key_as_string: 2015-11-30T22:00:00.000Z\\n key: 1448920800000\\n doc_count: 0\\n },\\n {\\n key_as_string: 2015-11-30T23:00:00.000Z\\n key: 1448924400000\\n doc_count: 0\\n }\\n ...\\n ]\\n }\\n}\\n\\nFor our graph, we only need the list of bucket values. Use the format.property to discard everything else.\\n*/\\n format: {property: \\\"aggregations.time_buckets.buckets\\\"}\\n }\\n\\n // \\\"mark\\\" is the graphics element used to show our data. Other mark values are: area, bar, circle, line, point, rect, rule, square, text, and tick. See https://vega.github.io/vega-lite/docs/mark.html\\n mark: line\\n\\n // \\\"encoding\\\" tells the \\\"mark\\\" what data to use and in what way. See https://vega.github.io/vega-lite/docs/encoding.html\\n encoding: {\\n x: {\\n // The \\\"key\\\" value is the timestamp in milliseconds. Use it for X axis.\\n field: key\\n type: temporal\\n axis: {title: false} // Customize X axis format\\n }\\n y: {\\n // The \\\"doc_count\\\" is the count per bucket. Use it for Y axis.\\n field: doc_count\\n type: quantitative\\n axis: {title: \\\"Document count\\\"}\\n }\\n }\\n}\\n\"},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:02a2e4e0-3dcd-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.351Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-table", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-table\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"table\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"},{\"id\":\"d18e5970-3dcc-11e8-a2f6-c162ca6cf6ea\",\"color\":\"rgba(160,70,216,1)\",\"split_mode\":\"filter\",\"metrics\":[{\"id\":\"d18e5971-3dcc-11e8-a2f6-c162ca6cf6ea\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"bar_color_rules\":[{\"id\":\"cd25a820-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_color_rules\":[{\"id\":\"e0be22e0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_width\":10,\"gauge_inner_width\":10,\"gauge_style\":\"half\",\"markdown\":\"\\nHi Avg last bytes: {{ average_of_bytes.last.raw }}\",\"pivot_id\":\"bytes\",\"pivot_label\":\"Hello\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:f81134a0-3dcc-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.355Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-markdown", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-markdown\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"markdown\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"},{\"id\":\"d18e5970-3dcc-11e8-a2f6-c162ca6cf6ea\",\"color\":\"rgba(160,70,216,1)\",\"split_mode\":\"filter\",\"metrics\":[{\"id\":\"d18e5971-3dcc-11e8-a2f6-c162ca6cf6ea\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"bar_color_rules\":[{\"id\":\"cd25a820-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_color_rules\":[{\"id\":\"e0be22e0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_width\":10,\"gauge_inner_width\":10,\"gauge_style\":\"half\",\"markdown\":\"\\nHi Avg last bytes: {{ average_of_bytes.last.raw }}\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:df815d20-3dcc-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.349Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-topn", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-topn\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"top_n\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"},{\"id\":\"d18e5970-3dcc-11e8-a2f6-c162ca6cf6ea\",\"color\":\"rgba(160,70,216,1)\",\"split_mode\":\"filter\",\"metrics\":[{\"id\":\"d18e5971-3dcc-11e8-a2f6-c162ca6cf6ea\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"bar_color_rules\":[{\"id\":\"cd25a820-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:cc43fab0-3dcc-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.353Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-metric", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-metric\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"metric\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum_of_squares\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:c40f4d40-3dcc-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.347Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-ts", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-ts\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"timeseries\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"count\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"use_kibana_indexes\":false},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:ffa2e0c0-3dcb-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:33.153Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: goal", + "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"0 - 100\":\"rgb(0,104,55)\"}}}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: goal\",\"type\":\"goal\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"isDisplayWarning\":false,\"type\":\"gauge\",\"gauge\":{\"verticalSplit\":false,\"autoExtend\":false,\"percentageMode\":true,\"gaugeType\":\"Arc\",\"gaugeStyle\":\"Full\",\"backStyle\":\"Full\",\"orientation\":\"vertical\",\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"gaugeColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":4000}],\"invertColors\":false,\"labels\":{\"show\":true,\"color\":\"black\"},\"scale\":{\"show\":false,\"labels\":false,\"color\":\"#333\",\"width\":2},\"type\":\"meter\",\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":2,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:37a541c0-3dcc-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:33.156Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":true,\"disabled\":false,\"alias\":null,\"type\":\"range\",\"key\":\"bytes\",\"value\":\"0 to 10,000\",\"params\":{\"gte\":0,\"lt\":10000},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"range\":{\"bytes\":{\"gte\":0,\"lt\":10000}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: geo map", + "uiStateJSON": "{\"mapZoom\":4,\"mapCenter\":[35.460669951495305,-85.60546875000001]}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: geo map\",\"type\":\"tile_map\",\"params\":{\"mapType\":\"Scaled Circle Markers\",\"isDesaturated\":true,\"addTooltip\":true,\"heatClusterSize\":1.5,\"legendPosition\":\"bottomright\",\"mapZoom\":2,\"mapCenter\":[0,0],\"wms\":{\"enabled\":false,\"options\":{\"format\":\"image/png\",\"transparent\":true},\"baseLayersAreLoaded\":{},\"tmsLayers\":[{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}],\"selectedTmsLayer\":{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"geohash_grid\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.coordinates\",\"autoPrecision\":true,\"isFilteredByCollar\":true,\"useGeocentroid\":true,\"precision\":3}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:4b5d6ef0-3dcb-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:33.162Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: datatable", + "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: datatable\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"clientip\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:3525b840-3dcb-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:33.163Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: bar", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: bar\",\"type\":\"horizontal_bar\",\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":200},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":75,\"filter\":true,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"normal\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":3,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:e6140540-3dca-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:33.165Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":true,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"geo.src\",\"value\":\"CN\",\"params\":{\"query\":\"CN\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"geo.src\":{\"query\":\"CN\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: area with not filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: area with not filter\",\"type\":\"area\",\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100,\"filter\":true},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"filters\",\"schema\":\"group\",\"params\":{\"filters\":[{\"input\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"label\":\"\"},{\"input\":{\"query\":\"bytes:>10\",\"language\":\"lucene\"}}]}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:4c0c3f90-3e5a-11e8-9fc3-39e49624228e", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:33.166Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"field\":\"isDog\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"isDog\",\"value\":\"true\",\"params\":{\"value\":true},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"script\":{\"script\":{\"inline\":\"boolean compare(Supplier s, def v) {return s.get() == v;}compare(() -> { return doc['animal.keyword'].value == 'dog' }, params.value);\",\"lang\":\"painless\",\"params\":{\"value\":true}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"weightLbs:>40\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: scripted filter and query", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: scripted filter and query\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"sound.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:50643b60-3dd3-11e8-b2b9-5d5dc1715159", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:34.195Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: animal sounds pie", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: animal sounds pie\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"sound.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:771b4f10-3e59-11e8-9fc3-39e49624228e", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:34.200Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "savedSearchRefName": "search_0", + "title": "Rendering Test: animal weights linked to search", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: animal weights linked to search\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"name.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:76c7f020-4194-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:34.583Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: tsvb top n with bytes filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: tsvb top n with bytes filter\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"top_n\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"Filter Bytes Test:>100\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"split_color_mode\":\"gradient\"},{\"id\":\"4fd5b150-4194-11e8-a461-7d278185cba4\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"4fd5b151-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"Filter Bytes Test:>3000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:0ca8c600-4195-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "control_0_index_pattern", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:35.229Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: input control with filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: input control with filter\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1523896850250\",\"fieldName\":\"bytes\",\"parent\":\"\",\"label\":\"Byte Options\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":10,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:039e4770-4194-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:35.220Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: tsvb time series with bytes filter split by clientip", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: tsvb time series with bytes filter split by clientip\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"timeseries\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"terms\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"use_kibana_indexes\":false},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:760a9060-4190-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:35.235Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"geo.src\",\"value\":\"US\",\"params\":{\"query\":\"US\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"geo.src\":{\"query\":\"US\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: max bytes in US - area chart with filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: max bytes in US - area chart with filter\",\"type\":\"area\",\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100,\"filter\":true},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Max bytes\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Max bytes\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1,\"extended_bounds\":{}}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:b3e70d00-4190-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:35.236Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: standard deviation heatmap with other bucket", + "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"-4,000 - 1,000\":\"rgb(247,252,245)\",\"1,000 - 6,000\":\"rgb(199,233,192)\",\"6,000 - 11,000\":\"rgb(116,196,118)\",\"11,000 - 16,000\":\"rgb(35,139,69)\"}}}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: standard deviation heatmap with other bucket\",\"type\":\"heatmap\",\"params\":{\"type\":\"heatmap\",\"addTooltip\":true,\"addLegend\":true,\"enableHover\":false,\"legendPosition\":\"right\",\"times\":[],\"colorsNumber\":4,\"colorSchema\":\"Greens\",\"setColorRange\":false,\"colorsRange\":[],\"invertColors\":false,\"percentageMode\":false,\"valueAxes\":[{\"show\":false,\"id\":\"ValueAxis-1\",\"type\":\"value\",\"scale\":{\"type\":\"linear\",\"defaultYExtents\":false},\"labels\":{\"show\":false,\"rotate\":0,\"overwriteColor\":false,\"color\":\"#555\"}}]},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"std_dev\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":true,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":10,\"order\":\"desc\",\"orderBy\":\"_term\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:c10c6b00-4191-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:36.267Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: max bytes guage percent mode", + "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"0 - 1\":\"rgb(0,104,55)\",\"1 - 15\":\"rgb(255,255,190)\",\"15 - 100\":\"rgb(165,0,38)\"}}}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: max bytes guage percent mode\",\"type\":\"gauge\",\"params\":{\"type\":\"gauge\",\"addTooltip\":true,\"addLegend\":true,\"isDisplayWarning\":false,\"gauge\":{\"extendRange\":true,\"percentageMode\":true,\"gaugeType\":\"Arc\",\"gaugeStyle\":\"Full\",\"backStyle\":\"Full\",\"orientation\":\"vertical\",\"colorSchema\":\"Green to Red\",\"gaugeColorMode\":\"Labels\",\"colorsRange\":[{\"from\":0,\"to\":500},{\"from\":500,\"to\":7500},{\"from\":7500,\"to\":50000}],\"invertColors\":false,\"labels\":{\"show\":true,\"color\":\"black\"},\"scale\":{\"show\":true,\"labels\":false,\"color\":\"#333\"},\"type\":\"meter\",\"style\":{\"bgWidth\":0.9,\"width\":0.9,\"mask\":false,\"bgMask\":false,\"maskBars\":50,\"bgFill\":\"#eee\",\"bgColor\":false,\"subText\":\"Im subtext\",\"fontSize\":60,\"labelColor\":true},\"alignment\":\"horizontal\"}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:03d2afd0-4192-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:36.269Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: Goal unique count", + "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"0 - 10000\":\"rgb(0,104,55)\"}}}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: Goal unique count\",\"type\":\"goal\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"isDisplayWarning\":false,\"type\":\"gauge\",\"gauge\":{\"verticalSplit\":false,\"autoExtend\":false,\"percentageMode\":false,\"gaugeType\":\"Arc\",\"gaugeStyle\":\"Full\",\"backStyle\":\"Full\",\"orientation\":\"vertical\",\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"gaugeColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"invertColors\":false,\"labels\":{\"show\":true,\"color\":\"black\"},\"scale\":{\"show\":false,\"labels\":false,\"color\":\"#333\",\"width\":2},\"type\":\"meter\",\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"cardinality\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:7ff2c4c0-4191-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:36.270Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: Data table top hit with significant terms geo.src", + "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: Data table top hit with significant terms geo.src\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"top_hits\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\",\"aggregate\":\"average\",\"size\":1,\"sortField\":\"@timestamp\",\"sortOrder\":\"desc\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"significant_terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"geo.src\",\"size\":10}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:df72ad40-4194-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:36.276Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":true,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"bytes\",\"value\":\"0\",\"params\":{\"query\":0,\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"bytes\":{\"query\":0,\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: tag cloud with not 0 bytes filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: tag cloud with not 0 bytes filter\",\"type\":\"tagcloud\",\"params\":{\"scale\":\"linear\",\"orientation\":\"single\",\"minFontSize\":18,\"maxFontSize\":72,\"showLabel\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"bytes\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:63983430-4192-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:36.275Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"geo.src\",\"value\":\"US\",\"params\":{\"query\":\"US\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"geo.src\":{\"query\":\"US\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"Filter Bytes Test:>5000\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: geo map with filter and query bytes > 5000 in US geo.src, heatmap setting", + "uiStateJSON": "{\"mapZoom\":7,\"mapCenter\":[42.98857645832184,-75.49804687500001]}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: geo map with filter and query bytes > 5000 in US geo.src, heatmap setting\",\"type\":\"tile_map\",\"params\":{\"mapType\":\"Heatmap\",\"isDesaturated\":true,\"addTooltip\":true,\"heatClusterSize\":1.5,\"legendPosition\":\"bottomright\",\"mapZoom\":2,\"mapCenter\":[0,0],\"wms\":{\"enabled\":false,\"options\":{\"format\":\"image/png\",\"transparent\":true},\"baseLayersAreLoaded\":{},\"tmsLayers\":[{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}],\"selectedTmsLayer\":{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"geohash_grid\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.coordinates\",\"autoPrecision\":true,\"isFilteredByCollar\":true,\"useGeocentroid\":true,\"precision\":4}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "search:be5accf0-3dca-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "search": { + "columns": [ + "agent", + "bytes", + "clientip" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Rendering Test: saved search", + "version": 1 + }, + "type": "search", + "updated_at": "2018-04-17T15:09:39.805Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "search:ca5ada40-3dca-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "search": { + "columns": [ + "agent", + "bytes", + "clientip" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[{\"meta\":{\"negate\":false,\"type\":\"phrase\",\"key\":\"bytes\",\"value\":\"1,607\",\"params\":{\"query\":1607,\"type\":\"phrase\"},\"disabled\":false,\"alias\":null,\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"bytes\":{\"query\":1607,\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Filter Bytes Test: search with filter", + "version": 1 + }, + "type": "search", + "updated_at": "2018-04-17T15:09:55.976Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:9bebe980-4192-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T15:59:42.648Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: timelion split 5 on bytes", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: timelion split 5 on bytes\",\"type\":\"timelion\",\"params\":{\"expression\":\".es(*, split=bytes:5)\",\"interval\":\"auto\"},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:1dcdfe30-4192-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:59:56.976Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"bytes:>100\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: min bytes metric with query", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: min bytes metric with query\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"min\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:35417e50-4194-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T16:06:03.785Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: tsvb metric with custom interval and bytes filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: tsvb metric with custom interval and bytes filter\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"metric\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":1,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1d\",\"value_template\":\"{{value}} custom template\",\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:9fb4c670-4194-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T16:32:59.086Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: tsvb markdown", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: tsvb markdown\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"markdown\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"label\":\"\",\"var_name\":\"\",\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"markdown\":\"{{bytes_1000.last.formatted}}\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:befdb6b0-3e59-11e8-9fc3-39e49624228e", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T17:16:27.743Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"animal.keyword\",\"value\":\"dog\",\"params\":{\"query\":\"dog\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"animal.keyword\":{\"query\":\"dog\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"language\":\"lucene\",\"query\":\"\"}}" + }, + "savedSearchRefName": "search_0", + "title": "Filter Test: animals: linked to search with filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Test: animals: linked to search with filter\",\"type\":\"pie\",\"params\":{\"addLegend\":true,\"addTooltip\":true,\"isDonut\":true,\"labels\":{\"last_level\":true,\"show\":false,\"truncate\":100,\"values\":true},\"legendPosition\":\"right\",\"type\":\"pie\",\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"name.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:584c0300-4191-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T18:36:30.315Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"bytes:>9000\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: split by geo with query", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: split by geo with query\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"sum\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "config:7.0.0-alpha1", + "index": ".kibana", + "source": { + "config": { + "buildNum": null, + "dateFormat:tz": "UTC", + "defaultIndex": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "notifications:lifetime:banner": 3600000, + "notifications:lifetime:error": 3600000, + "notifications:lifetime:info": 3600000, + "notifications:lifetime:warning": 3600000 + }, + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "config": "7.13.0" + }, + "references": [ + ], + "type": "config", + "updated_at": "2018-04-17T19:25:03.632Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:8090dcb0-4195-11e8-bb13-d53698fb349a", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], + "type": "visualization", + "updated_at": "2018-04-17T19:28:21.967Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: vega", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: vega\",\"type\":\"vega\",\"params\":{\"spec\":\"{ \\nconfig: { kibana: { renderer: \\\"svg\\\" }},\\n/*\\n\\nWelcome to Vega visualizations. Here you can design your own dataviz from scratch using a declarative language called Vega, or its simpler form Vega-Lite. In Vega, you have the full control of what data is loaded, even from multiple sources, how that data is transformed, and what visual elements are used to show it. Use help icon to view Vega examples, tutorials, and other docs. Use the wrench icon to reformat this text, or to remove comments.\\n\\nThis example graph shows the document count in all indexes in the current time range. You might need to adjust the time filter in the upper right corner.\\n*/\\n\\n $schema: https://vega.github.io/schema/vega-lite/v2.json\\n title: Event counts from all indexes\\n\\n // Define the data source\\n data: {\\n url: {\\n/*\\nAn object instead of a string for the \\\"url\\\" param is treated as an Elasticsearch query. Anything inside this object is not part of the Vega language, but only understood by Kibana and Elasticsearch server. This query counts the number of documents per time interval, assuming you have a @timestamp field in your data.\\n\\nKibana has a special handling for the fields surrounded by \\\"%\\\". They are processed before the the query is sent to Elasticsearch. This way the query becomes context aware, and can use the time range and the dashboard filters.\\n*/\\n\\n // Apply dashboard context filters when set\\n %context%: true\\n // Filter the time picker (upper right corner) with this field\\n %timefield%: @timestamp\\n\\n/*\\nSee .search() documentation for : https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search\\n*/\\n\\n // Which index to search\\n index: _all\\n // Aggregate data by the time field into time buckets, counting the number of documents in each bucket.\\n body: {\\n aggs: {\\n time_buckets: {\\n date_histogram: {\\n // Use date histogram aggregation on @timestamp field\\n field: @timestamp\\n // The interval value will depend on the daterange picker (true), or use an integer to set an approximate bucket count\\n interval: {%autointerval%: true}\\n // Make sure we get an entire range, even if it has no data\\n extended_bounds: {\\n // Use the current time range's start and end\\n min: {%timefilter%: \\\"min\\\"}\\n max: {%timefilter%: \\\"max\\\"}\\n }\\n // Use this for linear (e.g. line, area) graphs. Without it, empty buckets will not show up\\n min_doc_count: 0\\n }\\n }\\n }\\n // Speed up the response by only including aggregation results\\n size: 0\\n }\\n }\\n/*\\nElasticsearch will return results in this format:\\n\\naggregations: {\\n time_buckets: {\\n buckets: [\\n {\\n key_as_string: 2015-11-30T22:00:00.000Z\\n key: 1448920800000\\n doc_count: 0\\n },\\n {\\n key_as_string: 2015-11-30T23:00:00.000Z\\n key: 1448924400000\\n doc_count: 0\\n }\\n ...\\n ]\\n }\\n}\\n\\nFor our graph, we only need the list of bucket values. Use the format.property to discard everything else.\\n*/\\n format: {property: \\\"aggregations.time_buckets.buckets\\\"}\\n }\\n\\n // \\\"mark\\\" is the graphics element used to show our data. Other mark values are: area, bar, circle, line, point, rect, rule, square, text, and tick. See https://vega.github.io/vega-lite/docs/mark.html\\n mark: line\\n\\n // \\\"encoding\\\" tells the \\\"mark\\\" what data to use and in what way. See https://vega.github.io/vega-lite/docs/encoding.html\\n encoding: {\\n x: {\\n // The \\\"key\\\" value is the timestamp in milliseconds. Use it for X axis.\\n field: key\\n type: temporal\\n axis: {title: false} // Customize X axis format\\n }\\n y: {\\n // The \\\"doc_count\\\" is the count per bucket. Use it for Y axis.\\n field: doc_count\\n type: quantitative\\n axis: {title: \\\"Document count\\\"}\\n }\\n }\\n}\\n\"},\"aggs\":[]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "config:6.2.4", + "index": ".kibana", + "source": { + "config": { + "buildNum": 16627, + "defaultIndex": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "xPackMonitoring:showBanner": false + }, + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "config": "7.13.0" + }, + "references": [ + ], + "type": "config", + "updated_at": "2018-05-09T20:50:57.021Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:edb65990-53ca-11e8-b481-c9426d020fcd", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-05-09T20:52:47.144Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "table created in 6_2", + "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", + "version": 1, + "visState": "{\"title\":\"table created in 6_2\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"weightLbs\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"animal.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:0644f890-53cb-11e8-b481-c9426d020fcd", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-05-09T20:53:28.345Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"weightLbs:>10\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Weight in lbs pie created in 6.2", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Weight in lbs pie created in 6.2\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"weightLbs\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:1b2f47b0-53cb-11e8-b481-c9426d020fcd", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"weightLbs:>15\"},\"filter\":[{\"meta\":{\"field\":\"isDog\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"isDog\",\"value\":\"true\",\"params\":{\"value\":true},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"script\":{\"script\":{\"inline\":\"boolean compare(Supplier s, def v) {return s.get() == v;}compare(() -> { return doc['animal.keyword'].value == 'dog' }, params.value);\",\"lang\":\"painless\",\"params\":{\"value\":true}}},\"$state\":{\"store\":\"appState\"}}],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":12,\"x\":24,\"y\":0,\"i\":\"4\"},\"panelIndex\":\"4\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_4\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":12,\"x\":0,\"y\":0,\"i\":\"5\"},\"panelIndex\":\"5\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_5\"}]", + "refreshInterval": { + "display": "Off", + "pause": false, + "value": 0 + }, + "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", + "timeRestore": true, + "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", + "title": "Animal Weights (created in 6.2)", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "edb65990-53ca-11e8-b481-c9426d020fcd", + "name": "4:panel_4", + "type": "visualization" + }, + { + "id": "0644f890-53cb-11e8-b481-c9426d020fcd", + "name": "5:panel_5", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-05-09T20:54:03.435Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "index-pattern:a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "index-pattern": { + "fieldFormatMap": "{\"weightLbs\":{\"id\":\"number\",\"params\":{\"pattern\":\"0,0.0\"}},\"is_dog\":{\"id\":\"boolean\"},\"isDog\":{\"id\":\"boolean\"}}", + "fields": "[{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"animal\",\"type\":\"string\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"animal.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"name\",\"type\":\"string\",\"count\":1,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"sound\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"sound.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"weightLbs\",\"type\":\"number\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"isDog\",\"type\":\"boolean\",\"count\":0,\"scripted\":true,\"script\":\"return doc['animal.keyword'].value == 'dog'\",\"lang\":\"painless\",\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false}]", + "timeFieldName": "@timestamp", + "title": "animals-*" + }, + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [ + ], + "type": "index-pattern", + "updated_at": "2018-05-09T20:55:44.314Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "search:6351c590-53cb-11e8-b481-c9426d020fcd", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "search": { + "columns": [ + "animal", + "sound", + "weightLbs" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":\"weightLbs:>10\"},\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"sound.keyword\",\"value\":\"growl\",\"params\":{\"query\":\"growl\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"sound.keyword\":{\"query\":\"growl\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Search created in 6.2", + "version": 1 + }, + "type": "search", + "updated_at": "2018-05-09T20:56:04.457Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "visualization:47b5cf60-9e93-11ea-853e-adc0effaf76d", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "1b1789d0-9e93-11ea-853e-adc0effaf76d", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2020-05-25T15:16:27.743Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "vis with missing index pattern", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"type\":\"pie\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}],\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"title\":\"vis with missing index pattern\"}" + } + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:502e63a0-9e93-11ea-853e-adc0effaf76d", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[]}" + }, + "optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"6cfbe6cc-1872-4cb4-9455-a02eeb75127e\"},\"panelIndex\":\"6cfbe6cc-1872-4cb4-9455-a02eeb75127e\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_6cfbe6cc-1872-4cb4-9455-a02eeb75127e\"}]", + "timeRestore": false, + "title": "dashboard with missing index pattern", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "47b5cf60-9e93-11ea-853e-adc0effaf76d", + "name": "6cfbe6cc-1872-4cb4-9455-a02eeb75127e:panel_6cfbe6cc-1872-4cb4-9455-a02eeb75127e", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2020-05-25T15:16:27.743Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "dashboard:6eb8a840-a32e-11ea-88c2-d56dd2b14bd7", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "dashboard": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\n \"query\": {\n \"language\": \"kuery\",\n \"query\": \"\"\n },\n \"filter\": [\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": true,\n \"type\": \"phrase\",\n \"key\": \"name\",\n \"params\": {\n \"query\": \"moo\"\n },\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"\n },\n \"query\": {\n \"match_phrase\": {\n \"name\": \"moo\"\n }\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n },\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": true,\n \"type\": \"phrase\",\n \"key\": \"baad-field\",\n \"params\": {\n \"query\": \"moo\"\n },\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index\"\n },\n \"query\": {\n \"match_phrase\": {\n \"baad-field\": \"moo\"\n }\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n },\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": false,\n \"type\": \"phrase\",\n \"key\": \"@timestamp\",\n \"params\": {\n \"query\": \"123\"\n },\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.filter[2].meta.index\"\n },\n \"query\": {\n \"match_phrase\": {\n \"@timestamp\": \"123\"\n }\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n },\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": false,\n \"type\": \"exists\",\n \"key\": \"extension\",\n \"value\": \"exists\",\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.filter[3].meta.index\"\n },\n \"exists\": {\n \"field\": \"extension\"\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n },\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": false,\n \"type\": \"phrase\",\n \"key\": \"banana\",\n \"params\": {\n \"query\": \"yellow\"\n }\n },\n \"query\": {\n \"match_phrase\": {\n \"banana\": \"yellow\"\n }\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n }\n ]\n}" + }, + "optionsJSON": "{\n \"hidePanelTitles\": false,\n \"useMargins\": true\n}", + "panelsJSON": "[{\"version\":\"8.0.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"94a3dc1d-508a-4d42-a480-65b158925ba0\"},\"panelIndex\":\"94a3dc1d-508a-4d42-a480-65b158925ba0\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_94a3dc1d-508a-4d42-a480-65b158925ba0\"}]", + "refreshInterval": { + "pause": true, + "value": 0 + }, + "timeFrom": "now-10y", + "timeRestore": true, + "timeTo": "now", + "title": "dashboard with bad filters", + "version": 1 + }, + "migrationVersion": { + "dashboard": "7.14.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-bad-index", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[2].meta.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[3].meta.index", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[4].meta.index", + "type": "index-pattern" + }, + { + "id": "50643b60-3dd3-11e8-b2b9-5d5dc1715159", + "name": "94a3dc1d-508a-4d42-a480-65b158925ba0:panel_94a3dc1d-508a-4d42-a480-65b158925ba0", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2020-06-04T09:26:04.272Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "config:8.0.0", + "index": ".kibana", + "source": { + "config": { + "accessibility:disableAnimations": true, + "buildNum": null, + "dateFormat:tz": "UTC", + "defaultIndex": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c" + }, + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "config": "7.13.0" + }, + "references": [ + ], + "type": "config", + "updated_at": "2020-06-04T09:22:54.572Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "ui-metric:DashboardPanelVersionInUrl:8.0.0", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + ], + "type": "ui-metric", + "ui-metric": { + "count": 15 + }, + "updated_at": "2020-06-04T09:28:06.848Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "ui-metric:kibana-user_agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36", + "index": ".kibana", + "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + ], + "type": "ui-metric", + "ui-metric": { + "count": 1 + }, + "updated_at": "2020-06-04T09:28:06.848Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "application_usage_daily:dashboards:2020-05-31", + "index": ".kibana", + "source": { + "application_usage_daily": { + "appId": "dashboards", + "minutesOnScreen": 13.956333333333333, + "numberOfClicks": 134, + "timestamp": "2020-05-31T00:00:00.000Z" + }, + "coreMigrationVersion": "7.14.0", + "references": [ + ], + "type": "application_usage_daily", + "updated_at": "2021-06-10T22:39:09.215Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "application_usage_daily:home:2020-05-31", + "index": ".kibana", + "source": { + "application_usage_daily": { + "appId": "home", + "minutesOnScreen": 0.5708666666666666, + "numberOfClicks": 1, + "timestamp": "2020-05-31T00:00:00.000Z" + }, + "coreMigrationVersion": "7.14.0", + "references": [ + ], + "type": "application_usage_daily", + "updated_at": "2021-06-10T22:39:09.215Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "application_usage_daily:management:2020-05-31", + "index": ".kibana", + "source": { + "application_usage_daily": { + "appId": "management", + "minutesOnScreen": 5.842616666666666, + "numberOfClicks": 107, + "timestamp": "2020-05-31T00:00:00.000Z" + }, + "coreMigrationVersion": "7.14.0", + "references": [ + ], + "type": "application_usage_daily", + "updated_at": "2021-06-10T22:39:09.215Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "application_usage_daily:management:2020-06-04", + "index": ".kibana", + "source": { + "application_usage_daily": { + "appId": "management", + "minutesOnScreen": 2.5120666666666667, + "numberOfClicks": 38, + "timestamp": "2020-06-04T00:00:00.000Z" + }, + "coreMigrationVersion": "7.14.0", + "references": [ + ], + "type": "application_usage_daily", + "updated_at": "2021-06-10T22:39:09.215Z" + }, + "type": "_doc" + } +} + +{ + "type": "doc", + "value": { + "id": "application_usage_daily:dashboards:2020-06-04", + "index": ".kibana", + "source": { + "application_usage_daily": { + "appId": "dashboards", + "minutesOnScreen": 9.065083333333334, + "numberOfClicks": 21, + "timestamp": "2020-06-04T00:00:00.000Z" + }, + "coreMigrationVersion": "7.14.0", + "references": [ + ], + "type": "application_usage_daily", + "updated_at": "2021-06-10T22:39:09.215Z" + }, + "type": "_doc" + } +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json.gz b/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json.gz deleted file mode 100644 index ae78761fef0d3..0000000000000 Binary files a/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json.gz and /dev/null differ diff --git a/test/functional/fixtures/es_archiver/dashboard/current/kibana/mappings.json b/test/functional/fixtures/es_archiver/dashboard/current/kibana/mappings.json index 9f5edaad0fe76..b6e225951c545 100644 --- a/test/functional/fixtures/es_archiver/dashboard/current/kibana/mappings.json +++ b/test/functional/fixtures/es_archiver/dashboard/current/kibana/mappings.json @@ -2,155 +2,139 @@ "type": "index", "value": { "aliases": { - ".kibana": { - } + ".kibana_$KIBANA_PACKAGE_VERSION": {}, + ".kibana": {} }, - "index": ".kibana_1", + "index": ".kibana_$KIBANA_PACKAGE_VERSION_001", "mappings": { "_meta": { "migrationMappingPropertyHashes": { - "application_usage_totals": "c897e4310c5f24b07caaff3db53ae2c1", - "application_usage_transactional": "965839e75f809fefe04f92dc4d99722a", - "config": "ae24d22d5986d04124cc6568f771066f", - "dashboard": "d00f614b29a80360e1190193fd333bab", - "index-pattern": "66eccb05066c5a89924f48a9e9736499", + "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", + "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", + "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", + "config": "c63748b75f39d0c54de12d12c1ccbc20", + "core-usage-stats": "3d1b76c39bfb2cc8296b024d73854724", + "coreMigrationVersion": "2f4316de49999235636386fe51dc06c1", + "dashboard": "40554caf09725935e2c02e02563a2d07", + "index-pattern": "45915a1ad866812242df474eb0479052", "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", + "legacy-url-alias": "6155300fd11a00e23d5cbaa39f0fce0a", "migrationVersion": "4a1746014a75ade3a714e1db5763276f", "namespace": "2f4316de49999235636386fe51dc06c1", "namespaces": "2f4316de49999235636386fe51dc06c1", + "originId": "2f4316de49999235636386fe51dc06c1", "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", "references": "7997cf5a56cc02bdc9c93361bde732b0", "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", - "search": "181661168bbadd1eff5902361e2a0d5c", + "search": "db2c00e39b36f40930a3b9fc71c823e1", + "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", "telemetry": "36a616f7026dfa617d6655df850fe16d", "timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf", - "tsvb-validation-telemetry": "3a37ef6c8700ae6fc97d5c7da00e9215", "type": "2f4316de49999235636386fe51dc06c1", + "ui-counter": "0d409297dc5ebe1e3a1da691c6ee32e3", "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", "updated_at": "00da57df13e94e9d98437d13ace4bfe0", - "url": "b675c3be8d76ecf029294d51dc7ec65d", - "visualization": "52d7a13ad68a150c4525b292d23e12cc" + "url": "c7f66a0df8b1b52f17c28c4adb111105", + "usage-counters": "8cc260bdceffec4ffc3ad165c97dc1b4", + "visualization": "f819cf6636b75c9e76ba733a0c6ef355" } }, "dynamic": "strict", "properties": { - "application_usage_totals": { + "application_usage_daily": { + "dynamic": "false", "properties": { - "appId": { - "type": "keyword" - }, - "minutesOnScreen": { - "type": "float" - }, - "numberOfClicks": { - "type": "long" - } - } - }, - "application_usage_transactional": { - "properties": { - "appId": { - "type": "keyword" - }, - "minutesOnScreen": { - "type": "float" - }, - "numberOfClicks": { - "type": "long" - }, "timestamp": { "type": "date" } } }, + "application_usage_totals": { + "dynamic": "false", + "type": "object" + }, + "application_usage_transactional": { + "dynamic": "false", + "type": "object" + }, "config": { - "dynamic": "true", + "dynamic": "false", "properties": { - "accessibility:disableAnimations": { - "type": "boolean" - }, "buildNum": { "type": "keyword" - }, - "dateFormat:tz": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "defaultIndex": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "notifications:lifetime:banner": { - "type": "long" - }, - "notifications:lifetime:error": { - "type": "long" - }, - "notifications:lifetime:info": { - "type": "long" - }, - "notifications:lifetime:warning": { - "type": "long" - }, - "xPackMonitoring:showBanner": { - "type": "boolean" } } }, + "core-usage-stats": { + "dynamic": "false", + "type": "object" + }, + "coreMigrationVersion": { + "type": "keyword" + }, "dashboard": { "properties": { "description": { "type": "text" }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "optionsJSON": { + "index": false, "type": "text" }, "panelsJSON": { + "index": false, "type": "text" }, "refreshInterval": { "properties": { "display": { + "doc_values": false, + "index": false, "type": "keyword" }, "pause": { + "doc_values": false, + "index": false, "type": "boolean" }, "section": { + "doc_values": false, + "index": false, "type": "integer" }, "value": { + "doc_values": false, + "index": false, "type": "integer" } } }, "timeFrom": { + "doc_values": false, + "index": false, "type": "keyword" }, "timeRestore": { + "doc_values": false, + "index": false, "type": "boolean" }, "timeTo": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { @@ -162,33 +146,13 @@ } }, "index-pattern": { + "dynamic": "false", "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, "title": { "type": "text" }, "type": { "type": "keyword" - }, - "typeMeta": { - "type": "keyword" } } }, @@ -202,9 +166,32 @@ } } }, + "legacy-url-alias": { + "dynamic": "false", + "properties": { + "disabled": { + "type": "boolean" + }, + "sourceId": { + "type": "keyword" + }, + "targetType": { + "type": "keyword" + } + } + }, "migrationVersion": { "dynamic": "true", "properties": { + "config": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + }, "dashboard": { "fields": { "keyword": { @@ -249,6 +236,9 @@ "namespaces": { "type": "keyword" }, + "originId": { + "type": "keyword" + }, "query": { "properties": { "description": { @@ -305,22 +295,38 @@ "search": { "properties": { "columns": { + "doc_values": false, + "index": false, "type": "keyword" }, "description": { "type": "text" }, + "grid": { + "enabled": false, + "type": "object" + }, + "hideChart": { + "doc_values": false, + "index": false, + "type": "boolean" + }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "sort": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { @@ -331,12 +337,13 @@ } } }, + "search-telemetry": { + "dynamic": "false", + "type": "object" + }, "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } + "dynamic": "false", + "type": "object" }, "telemetry": { "properties": { @@ -408,15 +415,19 @@ } }, "tsvb-validation-telemetry": { - "properties": { - "failedRequests": { - "type": "long" - } - } + "dynamic": "false", + "type": "object" }, "type": { "type": "keyword" }, + "ui-counter": { + "properties": { + "count": { + "type": "integer" + } + } + }, "ui-metric": { "properties": { "count": { @@ -441,6 +452,7 @@ "url": { "fields": { "keyword": { + "ignore_above": 2048, "type": "keyword" } }, @@ -448,6 +460,14 @@ } } }, + "usage-counters": { + "dynamic": "false", + "properties": { + "domainId": { + "type": "keyword" + } + } + }, "visualization": { "properties": { "description": { @@ -456,23 +476,28 @@ "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "savedSearchRefName": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, "uiStateJSON": { + "index": false, "type": "text" }, "version": { "type": "integer" }, "visState": { + "index": false, "type": "text" } } @@ -483,7 +508,10 @@ "index": { "auto_expand_replicas": "0-1", "number_of_replicas": "0", - "number_of_shards": "1" + "number_of_shards": "1", + "priority": "10", + "refresh_interval": "1s", + "routing_partition_size": "1" } } } diff --git a/test/functional/fixtures/es_archiver/dashboard/legacy/mappings.json b/test/functional/fixtures/es_archiver/dashboard/legacy/mappings.json index a89fe1dfacfc8..45b2508d38033 100644 --- a/test/functional/fixtures/es_archiver/dashboard/legacy/mappings.json +++ b/test/functional/fixtures/es_archiver/dashboard/legacy/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "mappings": { "properties": { "config": { diff --git a/test/functional/fixtures/es_archiver/deprecations_service/data.json b/test/functional/fixtures/es_archiver/deprecations_service/data.json index 31ce5af20b46c..1c36f2e177fc5 100644 --- a/test/functional/fixtures/es_archiver/deprecations_service/data.json +++ b/test/functional/fixtures/es_archiver/deprecations_service/data.json @@ -1,14 +1,18 @@ { "type": "doc", "value": { - "index": ".kibana", "id": "test-deprecations-plugin:ff3733a0-9fty-11e7-ahb3-3dcb94193fab", + "index": ".kibana", "source": { - "type": "test-deprecations-plugin", - "updated_at": "2021-02-11T18:51:23.794Z", + "coreMigrationVersion": "7.14.0", + "references": [ + ], "test-deprecations-plugin": { "title": "Test saved object" - } - } + }, + "type": "test-deprecations-plugin", + "updated_at": "2021-02-11T18:51:23.794Z" + }, + "type": "_doc" } -} +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/deprecations_service/mappings.json b/test/functional/fixtures/es_archiver/deprecations_service/mappings.json index 5f7c7e0e7b7dc..5159b946e082f 100644 --- a/test/functional/fixtures/es_archiver/deprecations_service/mappings.json +++ b/test/functional/fixtures/es_archiver/deprecations_service/mappings.json @@ -1,130 +1,286 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana_$KIBANA_PACKAGE_VERSION": {}, + ".kibana": {} + }, + "index": ".kibana_$KIBANA_PACKAGE_VERSION_001", "mappings": { + "_meta": { + "migrationMappingPropertyHashes": { + "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", + "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", + "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", + "config": "c63748b75f39d0c54de12d12c1ccbc20", + "core-usage-stats": "3d1b76c39bfb2cc8296b024d73854724", + "coreMigrationVersion": "2f4316de49999235636386fe51dc06c1", + "dashboard": "40554caf09725935e2c02e02563a2d07", + "index-pattern": "45915a1ad866812242df474eb0479052", + "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", + "legacy-url-alias": "6155300fd11a00e23d5cbaa39f0fce0a", + "migrationVersion": "4a1746014a75ade3a714e1db5763276f", + "namespace": "2f4316de49999235636386fe51dc06c1", + "namespaces": "2f4316de49999235636386fe51dc06c1", + "originId": "2f4316de49999235636386fe51dc06c1", + "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", + "references": "7997cf5a56cc02bdc9c93361bde732b0", + "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", + "search": "db2c00e39b36f40930a3b9fc71c823e1", + "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", + "telemetry": "36a616f7026dfa617d6655df850fe16d", + "timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf", + "type": "2f4316de49999235636386fe51dc06c1", + "ui-counter": "0d409297dc5ebe1e3a1da691c6ee32e3", + "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", + "updated_at": "00da57df13e94e9d98437d13ace4bfe0", + "url": "c7f66a0df8b1b52f17c28c4adb111105", + "usage-counters": "8cc260bdceffec4ffc3ad165c97dc1b4", + "visualization": "f819cf6636b75c9e76ba733a0c6ef355" + } + }, + "dynamic": "strict", "properties": { + "application_usage_daily": { + "dynamic": "false", + "properties": { + "timestamp": { + "type": "date" + } + } + }, + "application_usage_totals": { + "dynamic": "false", + "type": "object" + }, + "application_usage_transactional": { + "dynamic": "false", + "type": "object" + }, "config": { - "dynamic": "true", + "dynamic": "false", "properties": { "buildNum": { "type": "keyword" - }, - "dateFormat:tz": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" } } }, + "core-usage-stats": { + "dynamic": "false", + "type": "object" + }, + "coreMigrationVersion": { + "type": "keyword" + }, "dashboard": { - "dynamic": "strict", "properties": { "description": { "type": "text" }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "optionsJSON": { + "index": false, "type": "text" }, "panelsJSON": { + "index": false, "type": "text" }, "refreshInterval": { "properties": { "display": { + "doc_values": false, + "index": false, "type": "keyword" }, "pause": { + "doc_values": false, + "index": false, "type": "boolean" }, "section": { + "doc_values": false, + "index": false, "type": "integer" }, "value": { + "doc_values": false, + "index": false, "type": "integer" } } }, "timeFrom": { + "doc_values": false, + "index": false, "type": "keyword" }, "timeRestore": { + "doc_values": false, + "index": false, "type": "boolean" }, "timeTo": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, - "uiStateJSON": { - "type": "text" - }, "version": { "type": "integer" } } }, "index-pattern": { - "dynamic": "strict", + "dynamic": "false", "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { + "title": { "type": "text" }, - "intervalName": { + "type": { "type": "keyword" + } + } + }, + "kql-telemetry": { + "properties": { + "optInCount": { + "type": "long" }, - "notExpandable": { + "optOutCount": { + "type": "long" + } + } + }, + "legacy-url-alias": { + "dynamic": "false", + "properties": { + "disabled": { "type": "boolean" }, - "sourceFilters": { - "type": "text" + "sourceId": { + "type": "keyword" }, - "timeFieldName": { + "targetType": { "type": "keyword" + } + } + }, + "migrationVersion": { + "dynamic": "true", + "type": "object" + }, + "namespace": { + "type": "keyword" + }, + "namespaces": { + "type": "keyword" + }, + "originId": { + "type": "keyword" + }, + "query": { + "properties": { + "description": { + "type": "text" + }, + "filters": { + "enabled": false, + "type": "object" + }, + "query": { + "properties": { + "language": { + "type": "keyword" + }, + "query": { + "index": false, + "type": "keyword" + } + } + }, + "timefilter": { + "enabled": false, + "type": "object" }, "title": { "type": "text" } } }, + "references": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + }, + "type": "nested" + }, + "sample-data-telemetry": { + "properties": { + "installCount": { + "type": "long" + }, + "unInstallCount": { + "type": "long" + } + } + }, "search": { - "dynamic": "strict", "properties": { "columns": { + "doc_values": false, + "index": false, "type": "keyword" }, "description": { "type": "text" }, + "grid": { + "enabled": false, + "type": "object" + }, + "hideChart": { + "doc_values": false, + "index": false, + "type": "boolean" + }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "sort": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { @@ -135,16 +291,47 @@ } } }, + "search-telemetry": { + "dynamic": "false", + "type": "object" + }, "server": { - "dynamic": "strict", + "dynamic": "false", + "type": "object" + }, + "telemetry": { "properties": { - "uuid": { + "allowChangingOptInStatus": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + }, + "lastReported": { + "type": "date" + }, + "lastVersionChecked": { "type": "keyword" + }, + "reportFailureCount": { + "type": "integer" + }, + "reportFailureVersion": { + "type": "keyword" + }, + "sendUsageFrom": { + "type": "keyword" + }, + "userHasSeenNotice": { + "type": "boolean" } } }, + "test-deprecations-plugin": { + "dynamic": "false", + "type": "object" + }, "timelion-sheet": { - "dynamic": "strict", "properties": { "description": { "type": "text" @@ -188,8 +375,24 @@ "type": { "type": "keyword" }, + "ui-counter": { + "properties": { + "count": { + "type": "integer" + } + } + }, + "ui-metric": { + "properties": { + "count": { + "type": "integer" + } + } + }, + "updated_at": { + "type": "date" + }, "url": { - "dynamic": "strict", "properties": { "accessCount": { "type": "long" @@ -211,8 +414,15 @@ } } }, + "usage-counters": { + "dynamic": "false", + "properties": { + "domainId": { + "type": "keyword" + } + } + }, "visualization": { - "dynamic": "strict", "properties": { "description": { "type": "text" @@ -220,59 +430,28 @@ "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, - "savedSearchId": { + "savedSearchRefName": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, "uiStateJSON": { + "index": false, "type": "text" }, "version": { "type": "integer" }, "visState": { - "type": "text" - } - } - }, - "query": { - "properties": { - "title": { - "type": "text" - }, - "description": { - "type": "text" - }, - "query": { - "properties": { - "language": { - "type": "keyword" - }, - "query": { - "type": "keyword", - "index": false - } - } - }, - "filters": { - "type": "object", - "enabled": false - }, - "timefilter": { - "type": "object", - "enabled": false - } - } - }, - "test-deprecations-plugin": { - "properties": { - "title": { + "index": false, "type": "text" } } @@ -281,9 +460,13 @@ }, "settings": { "index": { + "auto_expand_replicas": "0-1", "number_of_replicas": "0", - "number_of_shards": "1" + "number_of_shards": "1", + "priority": "10", + "refresh_interval": "1s", + "routing_partition_size": "1" } } } -} +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/discover/data.json b/test/functional/fixtures/es_archiver/discover/data.json index 0f2edc8c510c3..14a9f0559c6f3 100644 --- a/test/functional/fixtures/es_archiver/discover/data.json +++ b/test/functional/fixtures/es_archiver/discover/data.json @@ -4,14 +4,21 @@ "id": "index-pattern:logstash-*", "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", "index-pattern": { + "fieldAttrs": "{\"referer\":{\"customLabel\":\"Referer custom\"}}", "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"@message\"}}},{\"name\":\"@tags\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"@tags\"}}},{\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"agent\"}}},{\"name\":\"bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"extension\"}}},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"headings\"}}},{\"name\":\"host\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"host\"}}},{\"name\":\"id\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"index\"}}},{\"name\":\"ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"links\"}}},{\"name\":\"machine.os\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"machine.os\"}}},{\"name\":\"machine.ram\",\"type\":\"number\",\"esTypes\":[\"long\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"esTypes\":[\"double\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nestedField.child\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"nestedField\"}}},{\"name\":\"phpmemory\",\"type\":\"number\",\"esTypes\":[\"long\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.article:section\"}}},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.article:tag\"}}},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:description\"}}},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:image\"}}},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:image:height\"}}},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:image:width\"}}},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:site_name\"}}},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:title\"}}},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:type\"}}},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:url\"}}},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:card\"}}},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:description\"}}},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:image\"}}},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:site\"}}},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:title\"}}},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.url\"}}},{\"name\":\"request\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"request\"}}},{\"name\":\"response\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"response\"}}},{\"name\":\"spaces\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"spaces\"}}},{\"name\":\"type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"url\"}}},{\"name\":\"utc_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"xss\"}}}]", "timeFieldName": "@timestamp", - "title": "logstash-*", - "fieldAttrs": "{\"referer\":{\"customLabel\":\"Referer custom\"}}" + "title": "logstash-*" }, + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [ + ], "type": "index-pattern" - } + }, + "type": "_doc" } } @@ -21,6 +28,17 @@ "id": "search:ab12e3c0-f231-11e6-9486-733b1ac9221a", "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], "search": { "columns": [ "_source" @@ -28,16 +46,19 @@ "description": "A Saved Search Description", "hits": 0, "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\n \"index\": \"logstash-*\",\n \"highlightAll\": true,\n \"filter\": [],\n \"query\": {\n \"query_string\": {\n \"query\": \"*\",\n \"analyze_wildcard\": true\n }\n }\n}" + "searchSourceJSON": "{\"highlightAll\":true,\"filter\":[],\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" }, "sort": [ - "@timestamp", - "desc" + [ + "@timestamp", + "desc" + ] ], "title": "A Saved Search", "version": 1 }, "type": "search" - } + }, + "type": "_doc" } -} +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/discover/mappings.json b/test/functional/fixtures/es_archiver/discover/mappings.json index 53bbe8a5baa5b..93d724aa55603 100644 --- a/test/functional/fixtures/es_archiver/discover/mappings.json +++ b/test/functional/fixtures/es_archiver/discover/mappings.json @@ -1,124 +1,305 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana_$KIBANA_PACKAGE_VERSION": {}, + ".kibana": {} + }, + "index": ".kibana_$KIBANA_PACKAGE_VERSION_001", "mappings": { + "_meta": { + "migrationMappingPropertyHashes": { + "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", + "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", + "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", + "config": "c63748b75f39d0c54de12d12c1ccbc20", + "core-usage-stats": "3d1b76c39bfb2cc8296b024d73854724", + "coreMigrationVersion": "2f4316de49999235636386fe51dc06c1", + "dashboard": "40554caf09725935e2c02e02563a2d07", + "index-pattern": "45915a1ad866812242df474eb0479052", + "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", + "legacy-url-alias": "6155300fd11a00e23d5cbaa39f0fce0a", + "migrationVersion": "4a1746014a75ade3a714e1db5763276f", + "namespace": "2f4316de49999235636386fe51dc06c1", + "namespaces": "2f4316de49999235636386fe51dc06c1", + "originId": "2f4316de49999235636386fe51dc06c1", + "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", + "references": "7997cf5a56cc02bdc9c93361bde732b0", + "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", + "search": "db2c00e39b36f40930a3b9fc71c823e1", + "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", + "telemetry": "36a616f7026dfa617d6655df850fe16d", + "timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf", + "type": "2f4316de49999235636386fe51dc06c1", + "ui-counter": "0d409297dc5ebe1e3a1da691c6ee32e3", + "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", + "updated_at": "00da57df13e94e9d98437d13ace4bfe0", + "url": "c7f66a0df8b1b52f17c28c4adb111105", + "usage-counters": "8cc260bdceffec4ffc3ad165c97dc1b4", + "visualization": "f819cf6636b75c9e76ba733a0c6ef355" + } + }, + "dynamic": "strict", "properties": { + "application_usage_daily": { + "dynamic": "false", + "properties": { + "timestamp": { + "type": "date" + } + } + }, + "application_usage_totals": { + "dynamic": "false", + "type": "object" + }, + "application_usage_transactional": { + "dynamic": "false", + "type": "object" + }, "config": { - "dynamic": "true", + "dynamic": "false", "properties": { "buildNum": { "type": "keyword" } } }, + "core-usage-stats": { + "dynamic": "false", + "type": "object" + }, + "coreMigrationVersion": { + "type": "keyword" + }, "dashboard": { - "dynamic": "strict", "properties": { "description": { "type": "text" }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "optionsJSON": { + "index": false, "type": "text" }, "panelsJSON": { + "index": false, "type": "text" }, "refreshInterval": { "properties": { "display": { + "doc_values": false, + "index": false, "type": "keyword" }, "pause": { + "doc_values": false, + "index": false, "type": "boolean" }, "section": { + "doc_values": false, + "index": false, "type": "integer" }, "value": { + "doc_values": false, + "index": false, "type": "integer" } } }, "timeFrom": { + "doc_values": false, + "index": false, "type": "keyword" }, "timeRestore": { + "doc_values": false, + "index": false, "type": "boolean" }, "timeTo": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, - "uiStateJSON": { - "type": "text" - }, "version": { "type": "integer" } } }, "index-pattern": { - "dynamic": "strict", + "dynamic": "false", "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { + "title": { "type": "text" }, - "intervalName": { + "type": { "type": "keyword" + } + } + }, + "kql-telemetry": { + "properties": { + "optInCount": { + "type": "long" }, - "notExpandable": { + "optOutCount": { + "type": "long" + } + } + }, + "legacy-url-alias": { + "dynamic": "false", + "properties": { + "disabled": { "type": "boolean" }, - "sourceFilters": { - "type": "text" + "sourceId": { + "type": "keyword" }, - "timeFieldName": { + "targetType": { "type": "keyword" + } + } + }, + "migrationVersion": { + "dynamic": "true", + "properties": { + "index-pattern": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" }, - "title": { + "search": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, "type": "text" + } + } + }, + "namespace": { + "type": "keyword" + }, + "namespaces": { + "type": "keyword" + }, + "originId": { + "type": "keyword" + }, + "query": { + "properties": { + "description": { + "type": "text" + }, + "filters": { + "enabled": false, + "type": "object" + }, + "query": { + "properties": { + "language": { + "type": "keyword" + }, + "query": { + "index": false, + "type": "keyword" + } + } + }, + "timefilter": { + "enabled": false, + "type": "object" }, - "fieldAttrs": { + "title": { "type": "text" } } }, + "references": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + }, + "type": "nested" + }, + "sample-data-telemetry": { + "properties": { + "installCount": { + "type": "long" + }, + "unInstallCount": { + "type": "long" + } + } + }, "search": { - "dynamic": "strict", "properties": { "columns": { + "doc_values": false, + "index": false, "type": "keyword" }, "description": { "type": "text" }, + "grid": { + "enabled": false, + "type": "object" + }, + "hideChart": { + "doc_values": false, + "index": false, + "type": "boolean" + }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "sort": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { @@ -129,16 +310,43 @@ } } }, + "search-telemetry": { + "dynamic": "false", + "type": "object" + }, "server": { - "dynamic": "strict", + "dynamic": "false", + "type": "object" + }, + "telemetry": { "properties": { - "uuid": { + "allowChangingOptInStatus": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + }, + "lastReported": { + "type": "date" + }, + "lastVersionChecked": { + "type": "keyword" + }, + "reportFailureCount": { + "type": "integer" + }, + "reportFailureVersion": { + "type": "keyword" + }, + "sendUsageFrom": { "type": "keyword" + }, + "userHasSeenNotice": { + "type": "boolean" } } }, "timelion-sheet": { - "dynamic": "strict", "properties": { "description": { "type": "text" @@ -182,8 +390,24 @@ "type": { "type": "keyword" }, + "ui-counter": { + "properties": { + "count": { + "type": "integer" + } + } + }, + "ui-metric": { + "properties": { + "count": { + "type": "integer" + } + } + }, + "updated_at": { + "type": "date" + }, "url": { - "dynamic": "strict", "properties": { "accessCount": { "type": "long" @@ -205,8 +429,15 @@ } } }, + "usage-counters": { + "dynamic": "false", + "properties": { + "domainId": { + "type": "keyword" + } + } + }, "visualization": { - "dynamic": "strict", "properties": { "description": { "type": "text" @@ -214,63 +445,43 @@ "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, - "savedSearchId": { + "savedSearchRefName": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, "uiStateJSON": { + "index": false, "type": "text" }, "version": { "type": "integer" }, "visState": { + "index": false, "type": "text" } } - }, - "query": { - "properties": { - "title": { - "type": "text" - }, - "description": { - "type": "text" - }, - "query": { - "properties": { - "language": { - "type": "keyword" - }, - "query": { - "type": "keyword", - "index": false - } - } - }, - "filters": { - "type": "object", - "enabled": false - }, - "timefilter": { - "type": "object", - "enabled": false - } - } } } }, "settings": { "index": { - "number_of_replicas": "1", - "number_of_shards": "1" + "auto_expand_replicas": "0-1", + "number_of_replicas": "0", + "number_of_shards": "1", + "priority": "10", + "refresh_interval": "1s", + "routing_partition_size": "1" } } } -} +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/empty_kibana/mappings.json b/test/functional/fixtures/es_archiver/empty_kibana/mappings.json index 403a891ba1175..264096beb11ee 100644 --- a/test/functional/fixtures/es_archiver/empty_kibana/mappings.json +++ b/test/functional/fixtures/es_archiver/empty_kibana/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "mappings": { "properties": { "config": { diff --git a/test/functional/fixtures/es_archiver/invalid_scripted_field/mappings.json b/test/functional/fixtures/es_archiver/invalid_scripted_field/mappings.json index 0024c6943ed1c..63cc283f96d32 100644 --- a/test/functional/fixtures/es_archiver/invalid_scripted_field/mappings.json +++ b/test/functional/fixtures/es_archiver/invalid_scripted_field/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "mappings": { "dynamic": "strict", "properties": { diff --git a/test/functional/fixtures/es_archiver/management/mappings.json b/test/functional/fixtures/es_archiver/management/mappings.json index a89fe1dfacfc8..45b2508d38033 100644 --- a/test/functional/fixtures/es_archiver/management/mappings.json +++ b/test/functional/fixtures/es_archiver/management/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "mappings": { "properties": { "config": { diff --git a/test/functional/fixtures/es_archiver/mgmt/mappings.json b/test/functional/fixtures/es_archiver/mgmt/mappings.json index 28198102d3d68..aefbd9d0ccc8a 100644 --- a/test/functional/fixtures/es_archiver/mgmt/mappings.json +++ b/test/functional/fixtures/es_archiver/mgmt/mappings.json @@ -2,8 +2,9 @@ "type": "index", "value": { "aliases": { + ".kibana": {} }, - "index": ".kibana", + "index": ".kibana_1", "mappings": { "dynamic": "strict", "properties": { diff --git a/test/functional/fixtures/es_archiver/saved_objects_imports/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_imports/mappings.json index a89fe1dfacfc8..45b2508d38033 100644 --- a/test/functional/fixtures/es_archiver/saved_objects_imports/mappings.json +++ b/test/functional/fixtures/es_archiver/saved_objects_imports/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "mappings": { "properties": { "config": { diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/edit_saved_object/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_management/edit_saved_object/mappings.json index 6a416126d7f26..05ca4d8e8307e 100644 --- a/test/functional/fixtures/es_archiver/saved_objects_management/edit_saved_object/mappings.json +++ b/test/functional/fixtures/es_archiver/saved_objects_management/edit_saved_object/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "settings": { "index": { "number_of_shards": "1", diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/data.json b/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/data.json index 7f4043958bc89..54feabcf54331 100644 --- a/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/data.json +++ b/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/data.json @@ -1,149 +1,161 @@ { "type": "doc", "value": { - "index": ".kibana", - "type": "doc", "id": "test-export-transform:type_1-obj_1", + "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + ], "test-export-transform": { - "title": "test_1-obj_1", - "enabled": true + "enabled": true, + "title": "test_1-obj_1" }, "type": "test-export-transform", - "migrationVersion": {}, "updated_at": "2018-12-21T00:43:07.096Z" - } + }, + "type": "_doc" } } { "type": "doc", "value": { - "index": ".kibana", - "type": "doc", "id": "test-export-transform:type_1-obj_2", + "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + ], "test-export-transform": { - "title": "test_1-obj_2", - "enabled": true + "enabled": true, + "title": "test_1-obj_2" }, "type": "test-export-transform", - "migrationVersion": {}, "updated_at": "2018-12-21T00:43:07.096Z" - } + }, + "type": "_doc" } } { "type": "doc", "value": { - "index": ".kibana", - "type": "doc", "id": "test-export-add:type_2-obj_1", + "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + ], "test-export-add": { "title": "test_2-obj_1" }, "type": "test-export-add", - "migrationVersion": {}, "updated_at": "2018-12-21T00:43:07.096Z" - } + }, + "type": "_doc" } } { "type": "doc", "value": { - "index": ".kibana", - "type": "doc", "id": "test-export-add:type_2-obj_2", + "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + ], "test-export-add": { "title": "test_2-obj_2" }, "type": "test-export-add", - "migrationVersion": {}, "updated_at": "2018-12-21T00:43:07.096Z" - } + }, + "type": "_doc" } } { "type": "doc", "value": { - "index": ".kibana", - "type": "doc", "id": "test-export-add-dep:type_dep-obj_1", + "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + { + "id": "type_2-obj_1", + "type": "test-export-add" + } + ], "test-export-add-dep": { "title": "type_dep-obj_1" }, "type": "test-export-add-dep", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z", - "references": [ - { - "type": "test-export-add", - "id": "type_2-obj_1" - } - ] - } + "updated_at": "2018-12-21T00:43:07.096Z" + }, + "type": "_doc" } } { "type": "doc", "value": { - "index": ".kibana", - "type": "doc", "id": "test-export-add-dep:type_dep-obj_2", + "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + { + "id": "type_2-obj_2", + "type": "test-export-add" + } + ], "test-export-add-dep": { "title": "type_dep-obj_2" }, "type": "test-export-add-dep", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z", - "references": [ - { - "type": "test-export-add", - "id": "type_2-obj_2" - } - ] - } + "updated_at": "2018-12-21T00:43:07.096Z" + }, + "type": "_doc" } } { "type": "doc", "value": { - "index": ".kibana", - "type": "doc", "id": "test-export-invalid-transform:type_3-obj_1", + "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + ], "test-export-invalid-transform": { "title": "test_2-obj_1" }, "type": "test-export-invalid-transform", - "migrationVersion": {}, "updated_at": "2018-12-21T00:43:07.096Z" - } + }, + "type": "_doc" } } { "type": "doc", "value": { - "index": ".kibana", - "type": "doc", "id": "test-export-transform-error:type_4-obj_1", + "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + ], "test-export-transform-error": { "title": "test_2-obj_1" }, "type": "test-export-transform-error", - "migrationVersion": {}, "updated_at": "2018-12-21T00:43:07.096Z" - } + }, + "type": "_doc" } -} +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/mappings.json index 43b851e817fa8..b2385a281dd23 100644 --- a/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/mappings.json +++ b/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/mappings.json @@ -1,331 +1,302 @@ { "type": "index", "value": { - "index": ".kibana", - "settings": { - "index": { - "number_of_shards": "1", - "auto_expand_replicas": "0-1", - "number_of_replicas": "0" - } + "aliases": { + ".kibana_$KIBANA_PACKAGE_VERSION": {}, + ".kibana": {} }, + "index": ".kibana_$KIBANA_PACKAGE_VERSION_001", "mappings": { + "_meta": { + "migrationMappingPropertyHashes": { + "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", + "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", + "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", + "config": "c63748b75f39d0c54de12d12c1ccbc20", + "core-usage-stats": "3d1b76c39bfb2cc8296b024d73854724", + "coreMigrationVersion": "2f4316de49999235636386fe51dc06c1", + "dashboard": "40554caf09725935e2c02e02563a2d07", + "index-pattern": "45915a1ad866812242df474eb0479052", + "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", + "legacy-url-alias": "6155300fd11a00e23d5cbaa39f0fce0a", + "migrationVersion": "4a1746014a75ade3a714e1db5763276f", + "namespace": "2f4316de49999235636386fe51dc06c1", + "namespaces": "2f4316de49999235636386fe51dc06c1", + "originId": "2f4316de49999235636386fe51dc06c1", + "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", + "references": "7997cf5a56cc02bdc9c93361bde732b0", + "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", + "search": "db2c00e39b36f40930a3b9fc71c823e1", + "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", + "telemetry": "36a616f7026dfa617d6655df850fe16d", + "timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf", + "type": "2f4316de49999235636386fe51dc06c1", + "ui-counter": "0d409297dc5ebe1e3a1da691c6ee32e3", + "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", + "updated_at": "00da57df13e94e9d98437d13ace4bfe0", + "url": "c7f66a0df8b1b52f17c28c4adb111105", + "usage-counters": "8cc260bdceffec4ffc3ad165c97dc1b4", + "visualization": "f819cf6636b75c9e76ba733a0c6ef355" + } + }, "dynamic": "strict", "properties": { - "test-export-transform": { - "properties": { - "title": { "type": "text" }, - "enabled": { "type": "boolean" } - } - }, - "test-export-add": { - "properties": { - "title": { "type": "text" } - } - }, - "test-export-add-dep": { - "properties": { - "title": { "type": "text" } - } + "apm-telemetry": { + "dynamic": "false", + "type": "object" }, - "test-export-transform-error": { + "application_usage_daily": { + "dynamic": "false", "properties": { - "title": { "type": "text" } + "timestamp": { + "type": "date" + } } }, - "test-export-invalid-transform": { - "properties": { - "title": { "type": "text" } - } + "application_usage_totals": { + "dynamic": "false", + "type": "object" }, - "apm-telemetry": { - "properties": { - "has_any_services": { - "type": "boolean" - }, - "services_per_agent": { - "properties": { - "go": { - "type": "long", - "null_value": 0 - }, - "java": { - "type": "long", - "null_value": 0 - }, - "js-base": { - "type": "long", - "null_value": 0 - }, - "nodejs": { - "type": "long", - "null_value": 0 - }, - "python": { - "type": "long", - "null_value": 0 - }, - "ruby": { - "type": "long", - "null_value": 0 - } - } - } - } + "application_usage_transactional": { + "dynamic": "false", + "type": "object" }, "canvas-workpad": { "dynamic": "false", - "properties": { - "@created": { - "type": "date" - }, - "@timestamp": { - "type": "date" - }, - "id": { - "type": "text", - "index": false - }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword" - } - } - } - } + "type": "object" }, "config": { - "dynamic": "true", + "dynamic": "false", "properties": { - "accessibility:disableAnimations": { - "type": "boolean" - }, "buildNum": { "type": "keyword" - }, - "dateFormat:tz": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "telemetry:optIn": { - "type": "boolean" } } }, + "core-usage-stats": { + "dynamic": "false", + "type": "object" + }, + "coreMigrationVersion": { + "type": "keyword" + }, "dashboard": { "properties": { "description": { "type": "text" }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "optionsJSON": { + "index": false, "type": "text" }, "panelsJSON": { + "index": false, "type": "text" }, "refreshInterval": { "properties": { "display": { + "doc_values": false, + "index": false, "type": "keyword" }, "pause": { + "doc_values": false, + "index": false, "type": "boolean" }, "section": { + "doc_values": false, + "index": false, "type": "integer" }, "value": { + "doc_values": false, + "index": false, "type": "integer" } } }, "timeFrom": { + "doc_values": false, + "index": false, "type": "keyword" }, "timeRestore": { + "doc_values": false, + "index": false, "type": "boolean" }, "timeTo": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, - "uiStateJSON": { - "type": "text" - }, "version": { "type": "integer" } } }, - "map": { + "graph-workspace": { + "dynamic": "false", + "type": "object" + }, + "index-pattern": { + "dynamic": "false", "properties": { - "bounds": { - "dynamic": false, - "properties": {} - }, - "description": { - "type": "text" - }, - "layerListJSON": { + "title": { "type": "text" }, - "mapStateJSON": { - "type": "text" + "type": { + "type": "keyword" + } + } + }, + "kql-telemetry": { + "properties": { + "optInCount": { + "type": "long" }, - "title": { - "type": "text" + "optOutCount": { + "type": "long" + } + } + }, + "legacy-url-alias": { + "dynamic": "false", + "properties": { + "disabled": { + "type": "boolean" }, - "uiStateJSON": { - "type": "text" + "sourceId": { + "type": "keyword" }, - "version": { - "type": "integer" + "targetType": { + "type": "keyword" } } }, - "graph-workspace": { + "map": { + "dynamic": "false", + "type": "object" + }, + "migrationVersion": { + "dynamic": "true", + "type": "object" + }, + "namespace": { + "type": "keyword" + }, + "namespaces": { + "type": "keyword" + }, + "originId": { + "type": "keyword" + }, + "query": { "properties": { "description": { "type": "text" }, - "kibanaSavedObjectMeta": { + "filters": { + "enabled": false, + "type": "object" + }, + "query": { "properties": { - "searchSourceJSON": { - "type": "text" + "language": { + "type": "keyword" + }, + "query": { + "index": false, + "type": "keyword" } } }, - "numLinks": { - "type": "integer" - }, - "numVertices": { - "type": "integer" + "timefilter": { + "enabled": false, + "type": "object" }, "title": { "type": "text" - }, - "version": { - "type": "integer" - }, - "wsState": { - "type": "text" } } }, - "index-pattern": { + "references": { "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { + "id": { "type": "keyword" }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { + "name": { "type": "keyword" }, - "title": { - "type": "text" - }, "type": { "type": "keyword" - }, - "typeMeta": { - "type": "keyword" } - } + }, + "type": "nested" }, - "kql-telemetry": { + "sample-data-telemetry": { "properties": { - "optInCount": { + "installCount": { "type": "long" }, - "optOutCount": { + "unInstallCount": { "type": "long" } } }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "index-pattern": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "space": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - } - } - }, - "namespace": { - "type": "keyword" - }, "search": { "properties": { "columns": { + "doc_values": false, + "index": false, "type": "keyword" }, "description": { "type": "text" }, + "grid": { + "enabled": false, + "type": "object" + }, + "hideChart": { + "doc_values": false, + "index": false, + "type": "boolean" + }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "sort": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { @@ -336,50 +307,68 @@ } } }, + "search-telemetry": { + "dynamic": "false", + "type": "object" + }, "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } + "dynamic": "false", + "type": "object" }, "space": { + "dynamic": "false", + "type": "object" + }, + "spaceId": { + "type": "keyword" + }, + "telemetry": { "properties": { - "_reserved": { + "allowChangingOptInStatus": { + "type": "boolean" + }, + "enabled": { "type": "boolean" }, - "color": { + "lastReported": { + "type": "date" + }, + "lastVersionChecked": { "type": "keyword" }, - "description": { - "type": "text" + "reportFailureCount": { + "type": "integer" }, - "disabledFeatures": { + "reportFailureVersion": { "type": "keyword" }, - "initials": { + "sendUsageFrom": { "type": "keyword" }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } + "userHasSeenNotice": { + "type": "boolean" } } }, - "spaceId": { - "type": "keyword" + "test-export-add": { + "dynamic": "false", + "type": "object" }, - "telemetry": { - "properties": { - "enabled": { - "type": "boolean" - } - } + "test-export-add-dep": { + "dynamic": "false", + "type": "object" + }, + "test-export-invalid-transform": { + "dynamic": "false", + "type": "object" + }, + "test-export-transform": { + "dynamic": "false", + "type": "object" + }, + "test-export-transform-error": { + "dynamic": "false", + "type": "object" }, "timelion-sheet": { "properties": { @@ -425,6 +414,20 @@ "type": { "type": "keyword" }, + "ui-counter": { + "properties": { + "count": { + "type": "integer" + } + } + }, + "ui-metric": { + "properties": { + "count": { + "type": "integer" + } + } + }, "updated_at": { "type": "date" }, @@ -440,13 +443,21 @@ "type": "date" }, "url": { - "type": "text", "fields": { "keyword": { - "type": "keyword", - "ignore_above": 2048 + "ignore_above": 2048, + "type": "keyword" } - } + }, + "type": "text" + } + } + }, + "usage-counters": { + "dynamic": "false", + "properties": { + "domainId": { + "type": "keyword" } } }, @@ -458,42 +469,43 @@ "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, - "savedSearchId": { + "savedSearchRefName": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, "uiStateJSON": { + "index": false, "type": "text" }, "version": { "type": "integer" }, "visState": { + "index": false, "type": "text" } } - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" } } + }, + "settings": { + "index": { + "auto_expand_replicas": "0-1", + "number_of_replicas": "0", + "number_of_shards": "1", + "priority": "10", + "refresh_interval": "1s", + "routing_partition_size": "1" + } } } -} +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects/data.json b/test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects/data.json index 6a272dc16e462..4996c050adbf0 100644 --- a/test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects/data.json +++ b/test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects/data.json @@ -1,29 +1,37 @@ { "type": "doc", "value": { - "index": ".kibana", "id": "test-hidden-importable-exportable:ff3733a0-9fty-11e7-ahb3-3dcb94193fab", + "index": ".kibana", "source": { - "type": "test-hidden-importable-exportable", - "updated_at": "2021-02-11T18:51:23.794Z", + "coreMigrationVersion": "7.14.0", + "references": [ + ], "test-hidden-importable-exportable": { "title": "Hidden Saved object type that is importable/exportable." - } - } + }, + "type": "test-hidden-importable-exportable", + "updated_at": "2021-02-11T18:51:23.794Z" + }, + "type": "_doc" } } { "type": "doc", "value": { - "index": ".kibana", "id": "test-hidden-non-importable-exportable:op3767a1-9rcg-53u7-jkb3-3dnb74193awc", + "index": ".kibana", "source": { - "type": "test-hidden-non-importable-exportable", - "updated_at": "2021-02-11T18:51:23.794Z", + "coreMigrationVersion": "7.14.0", + "references": [ + ], "test-hidden-non-importable-exportable": { "title": "Hidden Saved object type that is not importable/exportable." - } - } + }, + "type": "test-hidden-non-importable-exportable", + "updated_at": "2021-02-11T18:51:23.794Z" + }, + "type": "_doc" } -} +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects/mappings.json index 1de768d290d35..d59f3b00d4818 100644 --- a/test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects/mappings.json +++ b/test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects/mappings.json @@ -1,331 +1,302 @@ { "type": "index", "value": { - "index": ".kibana", - "settings": { - "index": { - "number_of_shards": "1", - "auto_expand_replicas": "0-1", - "number_of_replicas": "0" - } + "aliases": { + ".kibana_$KIBANA_PACKAGE_VERSION": {}, + ".kibana": {} }, + "index": ".kibana_$KIBANA_PACKAGE_VERSION_001", "mappings": { + "_meta": { + "migrationMappingPropertyHashes": { + "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", + "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", + "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", + "config": "c63748b75f39d0c54de12d12c1ccbc20", + "core-usage-stats": "3d1b76c39bfb2cc8296b024d73854724", + "coreMigrationVersion": "2f4316de49999235636386fe51dc06c1", + "dashboard": "40554caf09725935e2c02e02563a2d07", + "index-pattern": "45915a1ad866812242df474eb0479052", + "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", + "legacy-url-alias": "6155300fd11a00e23d5cbaa39f0fce0a", + "migrationVersion": "4a1746014a75ade3a714e1db5763276f", + "namespace": "2f4316de49999235636386fe51dc06c1", + "namespaces": "2f4316de49999235636386fe51dc06c1", + "originId": "2f4316de49999235636386fe51dc06c1", + "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", + "references": "7997cf5a56cc02bdc9c93361bde732b0", + "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", + "search": "db2c00e39b36f40930a3b9fc71c823e1", + "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", + "telemetry": "36a616f7026dfa617d6655df850fe16d", + "timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf", + "type": "2f4316de49999235636386fe51dc06c1", + "ui-counter": "0d409297dc5ebe1e3a1da691c6ee32e3", + "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", + "updated_at": "00da57df13e94e9d98437d13ace4bfe0", + "url": "c7f66a0df8b1b52f17c28c4adb111105", + "usage-counters": "8cc260bdceffec4ffc3ad165c97dc1b4", + "visualization": "f819cf6636b75c9e76ba733a0c6ef355" + } + }, "dynamic": "strict", "properties": { - "test-export-transform": { - "properties": { - "title": { "type": "text" }, - "enabled": { "type": "boolean" } - } - }, - "test-export-add": { - "properties": { - "title": { "type": "text" } - } - }, - "test-export-add-dep": { - "properties": { - "title": { "type": "text" } - } + "apm-telemetry": { + "dynamic": "false", + "type": "object" }, - "test-export-transform-error": { + "application_usage_daily": { + "dynamic": "false", "properties": { - "title": { "type": "text" } + "timestamp": { + "type": "date" + } } }, - "test-export-invalid-transform": { - "properties": { - "title": { "type": "text" } - } + "application_usage_totals": { + "dynamic": "false", + "type": "object" }, - "apm-telemetry": { - "properties": { - "has_any_services": { - "type": "boolean" - }, - "services_per_agent": { - "properties": { - "go": { - "type": "long", - "null_value": 0 - }, - "java": { - "type": "long", - "null_value": 0 - }, - "js-base": { - "type": "long", - "null_value": 0 - }, - "nodejs": { - "type": "long", - "null_value": 0 - }, - "python": { - "type": "long", - "null_value": 0 - }, - "ruby": { - "type": "long", - "null_value": 0 - } - } - } - } + "application_usage_transactional": { + "dynamic": "false", + "type": "object" }, "canvas-workpad": { "dynamic": "false", - "properties": { - "@created": { - "type": "date" - }, - "@timestamp": { - "type": "date" - }, - "id": { - "type": "text", - "index": false - }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword" - } - } - } - } + "type": "object" }, "config": { - "dynamic": "true", + "dynamic": "false", "properties": { - "accessibility:disableAnimations": { - "type": "boolean" - }, "buildNum": { "type": "keyword" - }, - "dateFormat:tz": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "telemetry:optIn": { - "type": "boolean" } } }, + "core-usage-stats": { + "dynamic": "false", + "type": "object" + }, + "coreMigrationVersion": { + "type": "keyword" + }, "dashboard": { "properties": { "description": { "type": "text" }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "optionsJSON": { + "index": false, "type": "text" }, "panelsJSON": { + "index": false, "type": "text" }, "refreshInterval": { "properties": { "display": { + "doc_values": false, + "index": false, "type": "keyword" }, "pause": { + "doc_values": false, + "index": false, "type": "boolean" }, "section": { + "doc_values": false, + "index": false, "type": "integer" }, "value": { + "doc_values": false, + "index": false, "type": "integer" } } }, "timeFrom": { + "doc_values": false, + "index": false, "type": "keyword" }, "timeRestore": { + "doc_values": false, + "index": false, "type": "boolean" }, "timeTo": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, - "uiStateJSON": { - "type": "text" - }, "version": { "type": "integer" } } }, - "map": { + "graph-workspace": { + "dynamic": "false", + "type": "object" + }, + "index-pattern": { + "dynamic": "false", "properties": { - "bounds": { - "dynamic": false, - "properties": {} - }, - "description": { - "type": "text" - }, - "layerListJSON": { + "title": { "type": "text" }, - "mapStateJSON": { - "type": "text" + "type": { + "type": "keyword" + } + } + }, + "kql-telemetry": { + "properties": { + "optInCount": { + "type": "long" }, - "title": { - "type": "text" + "optOutCount": { + "type": "long" + } + } + }, + "legacy-url-alias": { + "dynamic": "false", + "properties": { + "disabled": { + "type": "boolean" }, - "uiStateJSON": { - "type": "text" + "sourceId": { + "type": "keyword" }, - "version": { - "type": "integer" + "targetType": { + "type": "keyword" } } }, - "graph-workspace": { + "map": { + "dynamic": "false", + "type": "object" + }, + "migrationVersion": { + "dynamic": "true", + "type": "object" + }, + "namespace": { + "type": "keyword" + }, + "namespaces": { + "type": "keyword" + }, + "originId": { + "type": "keyword" + }, + "query": { "properties": { "description": { "type": "text" }, - "kibanaSavedObjectMeta": { + "filters": { + "enabled": false, + "type": "object" + }, + "query": { "properties": { - "searchSourceJSON": { - "type": "text" + "language": { + "type": "keyword" + }, + "query": { + "index": false, + "type": "keyword" } } }, - "numLinks": { - "type": "integer" - }, - "numVertices": { - "type": "integer" + "timefilter": { + "enabled": false, + "type": "object" }, "title": { "type": "text" - }, - "version": { - "type": "integer" - }, - "wsState": { - "type": "text" } } }, - "index-pattern": { + "references": { "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { + "id": { "type": "keyword" }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { + "name": { "type": "keyword" }, - "title": { - "type": "text" - }, "type": { "type": "keyword" - }, - "typeMeta": { - "type": "keyword" } - } + }, + "type": "nested" }, - "kql-telemetry": { + "sample-data-telemetry": { "properties": { - "optInCount": { + "installCount": { "type": "long" }, - "optOutCount": { + "unInstallCount": { "type": "long" } } }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "index-pattern": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "space": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - } - } - }, - "namespace": { - "type": "keyword" - }, "search": { "properties": { "columns": { + "doc_values": false, + "index": false, "type": "keyword" }, "description": { "type": "text" }, + "grid": { + "enabled": false, + "type": "object" + }, + "hideChart": { + "doc_values": false, + "index": false, + "type": "boolean" + }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "sort": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { @@ -336,50 +307,76 @@ } } }, + "search-telemetry": { + "dynamic": "false", + "type": "object" + }, "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } + "dynamic": "false", + "type": "object" }, "space": { + "dynamic": "false", + "type": "object" + }, + "spaceId": { + "type": "keyword" + }, + "telemetry": { "properties": { - "_reserved": { + "allowChangingOptInStatus": { "type": "boolean" }, - "color": { + "enabled": { + "type": "boolean" + }, + "lastReported": { + "type": "date" + }, + "lastVersionChecked": { "type": "keyword" }, - "description": { - "type": "text" + "reportFailureCount": { + "type": "integer" }, - "disabledFeatures": { + "reportFailureVersion": { "type": "keyword" }, - "initials": { + "sendUsageFrom": { "type": "keyword" }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } + "userHasSeenNotice": { + "type": "boolean" } } }, - "spaceId": { - "type": "keyword" + "test-export-add": { + "dynamic": "false", + "type": "object" }, - "telemetry": { - "properties": { - "enabled": { - "type": "boolean" - } - } + "test-export-add-dep": { + "dynamic": "false", + "type": "object" + }, + "test-export-invalid-transform": { + "dynamic": "false", + "type": "object" + }, + "test-export-transform": { + "dynamic": "false", + "type": "object" + }, + "test-export-transform-error": { + "dynamic": "false", + "type": "object" + }, + "test-hidden-importable-exportable": { + "dynamic": "false", + "type": "object" + }, + "test-hidden-non-importable-exportable": { + "dynamic": "false", + "type": "object" }, "timelion-sheet": { "properties": { @@ -425,6 +422,20 @@ "type": { "type": "keyword" }, + "ui-counter": { + "properties": { + "count": { + "type": "integer" + } + } + }, + "ui-metric": { + "properties": { + "count": { + "type": "integer" + } + } + }, "updated_at": { "type": "date" }, @@ -440,13 +451,21 @@ "type": "date" }, "url": { - "type": "text", "fields": { "keyword": { - "type": "keyword", - "ignore_above": 2048 + "ignore_above": 2048, + "type": "keyword" } - } + }, + "type": "text" + } + } + }, + "usage-counters": { + "dynamic": "false", + "properties": { + "domainId": { + "type": "keyword" } } }, @@ -458,56 +477,43 @@ "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, - "savedSearchId": { + "savedSearchRefName": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, "uiStateJSON": { + "index": false, "type": "text" }, "version": { "type": "integer" }, "visState": { - "type": "text" - } - } - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "test-hidden-non-importable-exportable": { - "properties": { - "title": { - "type": "text" - } - } - }, - "test-hidden-importable-exportable": { - "properties": { - "title": { + "index": false, "type": "text" } } } } + }, + "settings": { + "index": { + "auto_expand_replicas": "0-1", + "number_of_replicas": "0", + "number_of_shards": "1", + "priority": "10", + "refresh_interval": "1s", + "routing_partition_size": "1" + } } } -} +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/hidden_types/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_management/hidden_types/mappings.json index a9abae009cb59..61763f55c1b6a 100644 --- a/test/functional/fixtures/es_archiver/saved_objects_management/hidden_types/mappings.json +++ b/test/functional/fixtures/es_archiver/saved_objects_management/hidden_types/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "settings": { "index": { "number_of_shards": "1", diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/nested_export_transform/data.json b/test/functional/fixtures/es_archiver/saved_objects_management/nested_export_transform/data.json index caac89461b9ef..3c311b0465193 100644 --- a/test/functional/fixtures/es_archiver/saved_objects_management/nested_export_transform/data.json +++ b/test/functional/fixtures/es_archiver/saved_objects_management/nested_export_transform/data.json @@ -1,87 +1,91 @@ { "type": "doc", "value": { - "index": ".kibana", - "type": "doc", "id": "test-export-transform:type_1-obj_1", + "index": ".kibana", "source": { - "test-export-transform": { - "title": "test_1-obj_1", - "enabled": true - }, - "type": "test-export-transform", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z", + "coreMigrationVersion": "7.14.0", "references": [ { - "type": "test-export-transform", "id": "type_1-obj_2", - "name": "ref-1" + "name": "ref-1", + "type": "test-export-transform" }, { - "type": "test-export-add", "id": "type_2-obj_1", - "name": "ref-2" + "name": "ref-2", + "type": "test-export-add" } - ] - } + ], + "test-export-transform": { + "enabled": true, + "title": "test_1-obj_1" + }, + "type": "test-export-transform", + "updated_at": "2018-12-21T00:43:07.096Z" + }, + "type": "_doc" } } { "type": "doc", "value": { - "index": ".kibana", - "type": "doc", "id": "test-export-transform:type_1-obj_2", + "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + ], "test-export-transform": { - "title": "test_1-obj_2", - "enabled": true + "enabled": true, + "title": "test_1-obj_2" }, "type": "test-export-transform", - "migrationVersion": {}, "updated_at": "2018-12-21T00:43:07.096Z" - } + }, + "type": "_doc" } } { "type": "doc", "value": { - "index": ".kibana", - "type": "doc", "id": "test-export-add:type_2-obj_1", + "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + ], "test-export-add": { "title": "test_2-obj_1" }, "type": "test-export-add", - "migrationVersion": {}, "updated_at": "2018-12-21T00:43:07.096Z" - } + }, + "type": "_doc" } } { "type": "doc", "value": { - "index": ".kibana", - "type": "doc", "id": "test-export-add-dep:type_dep-obj_1", + "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "references": [ + { + "id": "type_2-obj_1", + "type": "test-export-add" + } + ], "test-export-add-dep": { "title": "type_dep-obj_1" }, "type": "test-export-add-dep", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z", - "references": [ - { - "type": "test-export-add", - "id": "type_2-obj_1" - } - ] - } + "updated_at": "2018-12-21T00:43:07.096Z" + }, + "type": "_doc" } -} +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/nested_export_transform/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_management/nested_export_transform/mappings.json index 43b851e817fa8..b2385a281dd23 100644 --- a/test/functional/fixtures/es_archiver/saved_objects_management/nested_export_transform/mappings.json +++ b/test/functional/fixtures/es_archiver/saved_objects_management/nested_export_transform/mappings.json @@ -1,331 +1,302 @@ { "type": "index", "value": { - "index": ".kibana", - "settings": { - "index": { - "number_of_shards": "1", - "auto_expand_replicas": "0-1", - "number_of_replicas": "0" - } + "aliases": { + ".kibana_$KIBANA_PACKAGE_VERSION": {}, + ".kibana": {} }, + "index": ".kibana_$KIBANA_PACKAGE_VERSION_001", "mappings": { + "_meta": { + "migrationMappingPropertyHashes": { + "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", + "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", + "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", + "config": "c63748b75f39d0c54de12d12c1ccbc20", + "core-usage-stats": "3d1b76c39bfb2cc8296b024d73854724", + "coreMigrationVersion": "2f4316de49999235636386fe51dc06c1", + "dashboard": "40554caf09725935e2c02e02563a2d07", + "index-pattern": "45915a1ad866812242df474eb0479052", + "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", + "legacy-url-alias": "6155300fd11a00e23d5cbaa39f0fce0a", + "migrationVersion": "4a1746014a75ade3a714e1db5763276f", + "namespace": "2f4316de49999235636386fe51dc06c1", + "namespaces": "2f4316de49999235636386fe51dc06c1", + "originId": "2f4316de49999235636386fe51dc06c1", + "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", + "references": "7997cf5a56cc02bdc9c93361bde732b0", + "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", + "search": "db2c00e39b36f40930a3b9fc71c823e1", + "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", + "telemetry": "36a616f7026dfa617d6655df850fe16d", + "timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf", + "type": "2f4316de49999235636386fe51dc06c1", + "ui-counter": "0d409297dc5ebe1e3a1da691c6ee32e3", + "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", + "updated_at": "00da57df13e94e9d98437d13ace4bfe0", + "url": "c7f66a0df8b1b52f17c28c4adb111105", + "usage-counters": "8cc260bdceffec4ffc3ad165c97dc1b4", + "visualization": "f819cf6636b75c9e76ba733a0c6ef355" + } + }, "dynamic": "strict", "properties": { - "test-export-transform": { - "properties": { - "title": { "type": "text" }, - "enabled": { "type": "boolean" } - } - }, - "test-export-add": { - "properties": { - "title": { "type": "text" } - } - }, - "test-export-add-dep": { - "properties": { - "title": { "type": "text" } - } + "apm-telemetry": { + "dynamic": "false", + "type": "object" }, - "test-export-transform-error": { + "application_usage_daily": { + "dynamic": "false", "properties": { - "title": { "type": "text" } + "timestamp": { + "type": "date" + } } }, - "test-export-invalid-transform": { - "properties": { - "title": { "type": "text" } - } + "application_usage_totals": { + "dynamic": "false", + "type": "object" }, - "apm-telemetry": { - "properties": { - "has_any_services": { - "type": "boolean" - }, - "services_per_agent": { - "properties": { - "go": { - "type": "long", - "null_value": 0 - }, - "java": { - "type": "long", - "null_value": 0 - }, - "js-base": { - "type": "long", - "null_value": 0 - }, - "nodejs": { - "type": "long", - "null_value": 0 - }, - "python": { - "type": "long", - "null_value": 0 - }, - "ruby": { - "type": "long", - "null_value": 0 - } - } - } - } + "application_usage_transactional": { + "dynamic": "false", + "type": "object" }, "canvas-workpad": { "dynamic": "false", - "properties": { - "@created": { - "type": "date" - }, - "@timestamp": { - "type": "date" - }, - "id": { - "type": "text", - "index": false - }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword" - } - } - } - } + "type": "object" }, "config": { - "dynamic": "true", + "dynamic": "false", "properties": { - "accessibility:disableAnimations": { - "type": "boolean" - }, "buildNum": { "type": "keyword" - }, - "dateFormat:tz": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "telemetry:optIn": { - "type": "boolean" } } }, + "core-usage-stats": { + "dynamic": "false", + "type": "object" + }, + "coreMigrationVersion": { + "type": "keyword" + }, "dashboard": { "properties": { "description": { "type": "text" }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "optionsJSON": { + "index": false, "type": "text" }, "panelsJSON": { + "index": false, "type": "text" }, "refreshInterval": { "properties": { "display": { + "doc_values": false, + "index": false, "type": "keyword" }, "pause": { + "doc_values": false, + "index": false, "type": "boolean" }, "section": { + "doc_values": false, + "index": false, "type": "integer" }, "value": { + "doc_values": false, + "index": false, "type": "integer" } } }, "timeFrom": { + "doc_values": false, + "index": false, "type": "keyword" }, "timeRestore": { + "doc_values": false, + "index": false, "type": "boolean" }, "timeTo": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, - "uiStateJSON": { - "type": "text" - }, "version": { "type": "integer" } } }, - "map": { + "graph-workspace": { + "dynamic": "false", + "type": "object" + }, + "index-pattern": { + "dynamic": "false", "properties": { - "bounds": { - "dynamic": false, - "properties": {} - }, - "description": { - "type": "text" - }, - "layerListJSON": { + "title": { "type": "text" }, - "mapStateJSON": { - "type": "text" + "type": { + "type": "keyword" + } + } + }, + "kql-telemetry": { + "properties": { + "optInCount": { + "type": "long" }, - "title": { - "type": "text" + "optOutCount": { + "type": "long" + } + } + }, + "legacy-url-alias": { + "dynamic": "false", + "properties": { + "disabled": { + "type": "boolean" }, - "uiStateJSON": { - "type": "text" + "sourceId": { + "type": "keyword" }, - "version": { - "type": "integer" + "targetType": { + "type": "keyword" } } }, - "graph-workspace": { + "map": { + "dynamic": "false", + "type": "object" + }, + "migrationVersion": { + "dynamic": "true", + "type": "object" + }, + "namespace": { + "type": "keyword" + }, + "namespaces": { + "type": "keyword" + }, + "originId": { + "type": "keyword" + }, + "query": { "properties": { "description": { "type": "text" }, - "kibanaSavedObjectMeta": { + "filters": { + "enabled": false, + "type": "object" + }, + "query": { "properties": { - "searchSourceJSON": { - "type": "text" + "language": { + "type": "keyword" + }, + "query": { + "index": false, + "type": "keyword" } } }, - "numLinks": { - "type": "integer" - }, - "numVertices": { - "type": "integer" + "timefilter": { + "enabled": false, + "type": "object" }, "title": { "type": "text" - }, - "version": { - "type": "integer" - }, - "wsState": { - "type": "text" } } }, - "index-pattern": { + "references": { "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { + "id": { "type": "keyword" }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { + "name": { "type": "keyword" }, - "title": { - "type": "text" - }, "type": { "type": "keyword" - }, - "typeMeta": { - "type": "keyword" } - } + }, + "type": "nested" }, - "kql-telemetry": { + "sample-data-telemetry": { "properties": { - "optInCount": { + "installCount": { "type": "long" }, - "optOutCount": { + "unInstallCount": { "type": "long" } } }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "index-pattern": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "space": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - } - } - }, - "namespace": { - "type": "keyword" - }, "search": { "properties": { "columns": { + "doc_values": false, + "index": false, "type": "keyword" }, "description": { "type": "text" }, + "grid": { + "enabled": false, + "type": "object" + }, + "hideChart": { + "doc_values": false, + "index": false, + "type": "boolean" + }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "sort": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { @@ -336,50 +307,68 @@ } } }, + "search-telemetry": { + "dynamic": "false", + "type": "object" + }, "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } + "dynamic": "false", + "type": "object" }, "space": { + "dynamic": "false", + "type": "object" + }, + "spaceId": { + "type": "keyword" + }, + "telemetry": { "properties": { - "_reserved": { + "allowChangingOptInStatus": { + "type": "boolean" + }, + "enabled": { "type": "boolean" }, - "color": { + "lastReported": { + "type": "date" + }, + "lastVersionChecked": { "type": "keyword" }, - "description": { - "type": "text" + "reportFailureCount": { + "type": "integer" }, - "disabledFeatures": { + "reportFailureVersion": { "type": "keyword" }, - "initials": { + "sendUsageFrom": { "type": "keyword" }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } + "userHasSeenNotice": { + "type": "boolean" } } }, - "spaceId": { - "type": "keyword" + "test-export-add": { + "dynamic": "false", + "type": "object" }, - "telemetry": { - "properties": { - "enabled": { - "type": "boolean" - } - } + "test-export-add-dep": { + "dynamic": "false", + "type": "object" + }, + "test-export-invalid-transform": { + "dynamic": "false", + "type": "object" + }, + "test-export-transform": { + "dynamic": "false", + "type": "object" + }, + "test-export-transform-error": { + "dynamic": "false", + "type": "object" }, "timelion-sheet": { "properties": { @@ -425,6 +414,20 @@ "type": { "type": "keyword" }, + "ui-counter": { + "properties": { + "count": { + "type": "integer" + } + } + }, + "ui-metric": { + "properties": { + "count": { + "type": "integer" + } + } + }, "updated_at": { "type": "date" }, @@ -440,13 +443,21 @@ "type": "date" }, "url": { - "type": "text", "fields": { "keyword": { - "type": "keyword", - "ignore_above": 2048 + "ignore_above": 2048, + "type": "keyword" } - } + }, + "type": "text" + } + } + }, + "usage-counters": { + "dynamic": "false", + "properties": { + "domainId": { + "type": "keyword" } } }, @@ -458,42 +469,43 @@ "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, - "savedSearchId": { + "savedSearchRefName": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, "uiStateJSON": { + "index": false, "type": "text" }, "version": { "type": "integer" }, "visState": { + "index": false, "type": "text" } } - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" } } + }, + "settings": { + "index": { + "auto_expand_replicas": "0-1", + "number_of_replicas": "0", + "number_of_shards": "1", + "priority": "10", + "refresh_interval": "1s", + "routing_partition_size": "1" + } } } -} +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/show_relationships/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_management/show_relationships/mappings.json index a5478a5805d50..aba581867bb8a 100644 --- a/test/functional/fixtures/es_archiver/saved_objects_management/show_relationships/mappings.json +++ b/test/functional/fixtures/es_archiver/saved_objects_management/show_relationships/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "settings": { "index": { "number_of_shards": "1", diff --git a/test/functional/fixtures/es_archiver/timelion/mappings.json b/test/functional/fixtures/es_archiver/timelion/mappings.json index a89fe1dfacfc8..45b2508d38033 100644 --- a/test/functional/fixtures/es_archiver/timelion/mappings.json +++ b/test/functional/fixtures/es_archiver/timelion/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "mappings": { "properties": { "config": { diff --git a/test/functional/fixtures/es_archiver/visualize/data.json b/test/functional/fixtures/es_archiver/visualize/data.json index f337bffe80f2c..d48aa3e98d18a 100644 --- a/test/functional/fixtures/es_archiver/visualize/data.json +++ b/test/functional/fixtures/es_archiver/visualize/data.json @@ -4,15 +4,22 @@ "id": "index-pattern:logstash-*", "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", "index-pattern": { + "fieldAttrs": "{\"utc_time\":{\"customLabel\":\"UTC time\"}}", "fieldFormatMap": "{\"bytes\":{\"id\":\"bytes\"}}", "fields": "[{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false}]", "timeFieldName": "@timestamp", - "title": "logstash-*", - "fieldAttrs": "{\"utc_time\":{\"customLabel\":\"UTC time\"}}" + "title": "logstash-*" }, + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [ + ], "type": "index-pattern" - } + }, + "type": "_doc" } } @@ -22,13 +29,20 @@ "id": "index-pattern:logstash*", "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", "index-pattern": { "fieldFormatMap": "{\"bytes\":{\"id\":\"bytes\"}}", "fields": "[{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false}]", "title": "logstash*" }, + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [ + ], "type": "index-pattern" - } + }, + "type": "_doc" } } @@ -38,14 +52,21 @@ "id": "index-pattern:long-window-logstash-*", "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", "index-pattern": { "fieldFormatMap": "{\"bytes\":{\"id\":\"bytes\"}}", "fields": "[{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false}]", "timeFieldName": "@timestamp", "title": "long-window-logstash-*" }, + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [ + ], "type": "index-pattern" - } + }, + "type": "_doc" } } @@ -55,18 +76,30 @@ "id": "visualization:Shared-Item-Visualization-AreaChart", "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], "type": "visualization", "visualization": { "description": "AreaChart", "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}" + "searchSourceJSON": "{\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" }, "title": "Shared-Item Visualization AreaChart", "uiStateJSON": "{}", "version": 1, - "visState": "{\"title\":\"New Visualization\",\"type\":\"area\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"smoothLines\":false,\"scale\":\"linear\",\"interpolate\":\"linear\",\"mode\":\"stacked\",\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}}],\"listeners\":{}}" + "visState": "{\"title\":\"New Visualization\",\"type\":\"area\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"smoothLines\":false,\"scale\":\"linear\",\"interpolate\":\"linear\",\"mode\":\"stacked\",\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1,\"extended_bounds\":{}}}],\"listeners\":{}}" } - } + }, + "type": "_doc" } } @@ -76,18 +109,30 @@ "id": "visualization:Visualization-AreaChart", "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], "type": "visualization", "visualization": { "description": "AreaChart", "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}" + "searchSourceJSON": "{\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" }, "title": "Visualization AreaChart", "uiStateJSON": "{}", "version": 1, - "visState": "{\"title\":\"Visualization AreaChart\",\"type\":\"area\",\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"},\"labels\":{}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-15m\",\"to\":\"now\"},\"useNormalizedEsInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}}}]}" + "visState": "{\"title\":\"Visualization AreaChart\",\"type\":\"area\",\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"},\"labels\":{},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-15m\",\"to\":\"now\"},\"useNormalizedEsInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}}}]}" } - } + }, + "type": "_doc" } } @@ -97,34 +142,36 @@ "id": "visualization:68305470-87bc-11e9-a991-3b492a7c3e09", "index": ".kibana", "source": { - "visualization" : { - "title" : "chained input control", - "visState" : "{\"title\":\"chained input control\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1559757816862\",\"fieldName\":\"geo.src\",\"parent\":\"\",\"label\":\"\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"dynamicOptions\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"},{\"id\":\"1559757836347\",\"fieldName\":\"clientip\",\"parent\":\"1559757816862\",\"label\":\"\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"dynamicOptions\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_1_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}", - "uiStateJSON" : "{}", - "description" : "", - "version" : 1, - "kibanaSavedObjectMeta" : { - "searchSourceJSON" : "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" - } + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" }, - "type" : "visualization", - "references" : [ + "references": [ { - "name" : "control_0_index_pattern", - "type" : "index-pattern", - "id" : "logstash-*" + "id": "logstash-*", + "name": "control_0_index_pattern", + "type": "index-pattern" }, { - "name" : "control_1_index_pattern", - "type" : "index-pattern", - "id" : "logstash-*" + "id": "logstash-*", + "name": "control_1_index_pattern", + "type": "index-pattern" } ], - "migrationVersion" : { - "visualization" : "7.3.0" - }, - "updated_at" : "2019-06-05T18:04:48.310Z" - } + "type": "visualization", + "updated_at": "2019-06-05T18:04:48.310Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" + }, + "title": "chained input control", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"chained input control\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1559757816862\",\"fieldName\":\"geo.src\",\"parent\":\"\",\"label\":\"\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"dynamicOptions\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"},{\"id\":\"1559757836347\",\"fieldName\":\"clientip\",\"parent\":\"1559757816862\",\"label\":\"\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"dynamicOptions\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_1_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}" + } + }, + "type": "_doc" } } @@ -134,29 +181,31 @@ "id": "visualization:64983230-87bf-11e9-a991-3b492a7c3e09", "index": ".kibana", "source": { - "visualization" : { - "title" : "dynamic options input control", - "visState" : "{\"title\":\"dynamic options input control\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1559759127876\",\"fieldName\":\"geo.src\",\"parent\":\"\",\"label\":\"\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"dynamicOptions\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}", - "uiStateJSON" : "{}", - "description" : "", - "version" : 1, - "kibanaSavedObjectMeta" : { - "searchSourceJSON" : "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" - } + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" }, - "type" : "visualization", - "references" : [ + "references": [ { - "name" : "control_0_index_pattern", - "type" : "index-pattern", - "id" : "logstash-*" + "id": "logstash-*", + "name": "control_0_index_pattern", + "type": "index-pattern" } ], - "migrationVersion" : { - "visualization" : "7.3.0" - }, - "updated_at" : "2019-06-05T18:26:10.771Z" - } + "type": "visualization", + "updated_at": "2019-06-05T18:26:10.771Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" + }, + "title": "dynamic options input control", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"dynamic options input control\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1559759127876\",\"fieldName\":\"geo.src\",\"parent\":\"\",\"label\":\"\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"dynamicOptions\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}" + } + }, + "type": "_doc" } } @@ -166,34 +215,36 @@ "id": "visualization:5d2de430-87c0-11e9-a991-3b492a7c3e09", "index": ".kibana", "source": { - "visualization" : { - "title" : "chained input control with dynamic options", - "visState" : "{\"title\":\"chained input control with dynamic options\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1559759550755\",\"fieldName\":\"machine.os.raw\",\"parent\":\"\",\"label\":\"\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"dynamicOptions\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"},{\"id\":\"1559759557302\",\"fieldName\":\"geo.src\",\"parent\":\"1559759550755\",\"label\":\"\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"dynamicOptions\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_1_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}", - "uiStateJSON" : "{}", - "description" : "", - "version" : 1, - "kibanaSavedObjectMeta" : { - "searchSourceJSON" : "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" - } + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" }, - "type" : "visualization", - "references" : [ + "references": [ { - "name" : "control_0_index_pattern", - "type" : "index-pattern", - "id" : "logstash-*" + "id": "logstash-*", + "name": "control_0_index_pattern", + "type": "index-pattern" }, { - "name" : "control_1_index_pattern", - "type" : "index-pattern", - "id" : "logstash-*" + "id": "logstash-*", + "name": "control_1_index_pattern", + "type": "index-pattern" } ], - "migrationVersion" : { - "visualization" : "7.3.0" - }, - "updated_at" : "2019-06-05T18:33:07.827Z" - } + "type": "visualization", + "updated_at": "2019-06-05T18:33:07.827Z", + "visualization": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" + }, + "title": "chained input control with dynamic options", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"chained input control with dynamic options\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1559759550755\",\"fieldName\":\"machine.os.raw\",\"parent\":\"\",\"label\":\"\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"dynamicOptions\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"},{\"id\":\"1559759557302\",\"fieldName\":\"geo.src\",\"parent\":\"1559759550755\",\"label\":\"\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"dynamicOptions\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_1_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}" + } + }, + "type": "_doc" } } @@ -203,12 +254,19 @@ "id": "index-pattern:test_index*", "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", "index-pattern": { "fields": "[{\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"esTypes\":[\"_type\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"message.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"message\"}}},{\"name\":\"user\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"user.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"user\"}}}]", "title": "test_index*" }, + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [ + ], "type": "index-pattern" - } + }, + "type": "_doc" } } @@ -218,18 +276,30 @@ "id": "visualization:AreaChart-no-date-field", "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "test_index*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], "type": "visualization", "visualization": { "description": "AreaChart", "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"index\":\"test_index*\",\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" }, "title": "AreaChart [no date field]", "uiStateJSON": "{}", "version": 1, - "visState": "{\"title\":\"AreaChart [no date field]\",\"type\":\"area\",\"params\":{\"type\":\"area\",\"addTooltip\":true,\"addLegend\":true,\"times\":[],\"addTimeMarker\":false},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" - } - } + "visState": "{\"title\":\"AreaChart [no date field]\",\"type\":\"area\",\"params\":{\"type\":\"area\",\"addTooltip\":true,\"addLegend\":true,\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" + } + }, + "type": "_doc" } } @@ -239,13 +309,20 @@ "id": "index-pattern:log*", "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", "index-pattern": { "fieldFormatMap": "{\"bytes\":{\"id\":\"bytes\"}}", "fields": "[{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false}]", "title": "log*" }, + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [ + ], "type": "index-pattern" - } + }, + "type": "_doc" } } @@ -255,18 +332,30 @@ "id": "visualization:AreaChart-no-time-filter", "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + { + "id": "log*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], "type": "visualization", "visualization": { "description": "AreaChart", "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"index\":\"log*\",\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" }, "title": "AreaChart [no time filter]", "uiStateJSON": "{}", "version": 1, - "visState": "{\"title\":\"AreaChart [no time filter]\",\"type\":\"area\",\"params\":{\"type\":\"area\",\"addTooltip\":true,\"addLegend\":true,\"times\":[],\"addTimeMarker\":false},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" - } - } + "visState": "{\"title\":\"AreaChart [no time filter]\",\"type\":\"area\",\"params\":{\"type\":\"area\",\"addTooltip\":true,\"addLegend\":true,\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" + } + }, + "type": "_doc" } } @@ -276,6 +365,12 @@ "id": "visualization:VegaMap", "index": ".kibana", "source": { + "coreMigrationVersion": "7.14.0", + "migrationVersion": { + "visualization": "7.14.0" + }, + "references": [ + ], "type": "visualization", "visualization": { "description": "VegaMap", @@ -287,6 +382,7 @@ "version": 1, "visState": "{\"aggs\":[],\"params\":{\"spec\":\"{\\n $schema: https://vega.github.io/schema/vega/v5.json\\n config: {\\n kibana: {type: \\\"map\\\", latitude: 25, longitude: -70, zoom: 3}\\n }\\n data: [\\n {\\n name: table\\n url: {\\n index: kibana_sample_data_flights\\n %context%: true\\n // Uncomment to enable time filtering\\n // %timefield%: timestamp\\n body: {\\n size: 0\\n aggs: {\\n origins: {\\n terms: {field: \\\"OriginAirportID\\\", size: 10000}\\n aggs: {\\n originLocation: {\\n top_hits: {\\n size: 1\\n _source: {\\n includes: [\\\"OriginLocation\\\", \\\"Origin\\\"]\\n }\\n }\\n }\\n distinations: {\\n terms: {field: \\\"DestAirportID\\\", size: 10000}\\n aggs: {\\n destLocation: {\\n top_hits: {\\n size: 1\\n _source: {\\n includes: [\\\"DestLocation\\\"]\\n }\\n }\\n }\\n }\\n }\\n }\\n }\\n }\\n }\\n }\\n format: {property: \\\"aggregations.origins.buckets\\\"}\\n transform: [\\n {\\n type: geopoint\\n projection: projection\\n fields: [\\n originLocation.hits.hits[0]._source.OriginLocation.lon\\n originLocation.hits.hits[0]._source.OriginLocation.lat\\n ]\\n }\\n ]\\n }\\n {\\n name: selectedDatum\\n on: [\\n {trigger: \\\"!selected\\\", remove: true}\\n {trigger: \\\"selected\\\", insert: \\\"selected\\\"}\\n ]\\n }\\n ]\\n signals: [\\n {\\n name: selected\\n value: null\\n on: [\\n {events: \\\"@airport:mouseover\\\", update: \\\"datum\\\"}\\n {events: \\\"@airport:mouseout\\\", update: \\\"null\\\"}\\n ]\\n }\\n ]\\n scales: [\\n {\\n name: airportSize\\n type: linear\\n domain: {data: \\\"table\\\", field: \\\"doc_count\\\"}\\n range: [\\n {signal: \\\"zoom*zoom*0.2+1\\\"}\\n {signal: \\\"zoom*zoom*10+1\\\"}\\n ]\\n }\\n ]\\n marks: [\\n {\\n type: group\\n from: {\\n facet: {\\n name: facetedDatum\\n data: selectedDatum\\n field: distinations.buckets\\n }\\n }\\n data: [\\n {\\n name: facetDatumElems\\n source: facetedDatum\\n transform: [\\n {\\n type: geopoint\\n projection: projection\\n fields: [\\n destLocation.hits.hits[0]._source.DestLocation.lon\\n destLocation.hits.hits[0]._source.DestLocation.lat\\n ]\\n }\\n {type: \\\"formula\\\", expr: \\\"{x:parent.x, y:parent.y}\\\", as: \\\"source\\\"}\\n {type: \\\"formula\\\", expr: \\\"{x:datum.x, y:datum.y}\\\", as: \\\"target\\\"}\\n {type: \\\"linkpath\\\", shape: \\\"diagonal\\\"}\\n ]\\n }\\n ]\\n scales: [\\n {\\n name: lineThickness\\n type: log\\n clamp: true\\n range: [1, 8]\\n }\\n {\\n name: lineOpacity\\n type: log\\n clamp: true\\n range: [0.2, 0.8]\\n }\\n ]\\n marks: [\\n {\\n from: {data: \\\"facetDatumElems\\\"}\\n type: path\\n interactive: false\\n encode: {\\n update: {\\n path: {field: \\\"path\\\"}\\n stroke: {value: \\\"black\\\"}\\n strokeWidth: {scale: \\\"lineThickness\\\", field: \\\"doc_count\\\"}\\n strokeOpacity: {scale: \\\"lineOpacity\\\", field: \\\"doc_count\\\"}\\n }\\n }\\n }\\n ]\\n }\\n {\\n name: airport\\n type: symbol\\n from: {data: \\\"table\\\"}\\n encode: {\\n update: {\\n size: {scale: \\\"airportSize\\\", field: \\\"doc_count\\\"}\\n xc: {signal: \\\"datum.x\\\"}\\n yc: {signal: \\\"datum.y\\\"}\\n tooltip: {\\n signal: \\\"{title: datum.originLocation.hits.hits[0]._source.Origin + ' (' + datum.key + ')', connnections: length(datum.distinations.buckets), flights: datum.doc_count}\\\"\\n }\\n }\\n }\\n }\\n ]\\n}\"},\"title\":\"[Flights] Airport Connections (Hover Over Airport)\",\"type\":\"vega\"}" } - } + }, + "type": "_doc" } -} +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/visualize/mappings.json b/test/functional/fixtures/es_archiver/visualize/mappings.json index 464f6751eac5c..d032352d9a688 100644 --- a/test/functional/fixtures/es_archiver/visualize/mappings.json +++ b/test/functional/fixtures/es_archiver/visualize/mappings.json @@ -1,124 +1,305 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana_$KIBANA_PACKAGE_VERSION": {}, + ".kibana": {} + }, + "index": ".kibana_$KIBANA_PACKAGE_VERSION_001", "mappings": { + "_meta": { + "migrationMappingPropertyHashes": { + "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", + "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", + "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", + "config": "c63748b75f39d0c54de12d12c1ccbc20", + "core-usage-stats": "3d1b76c39bfb2cc8296b024d73854724", + "coreMigrationVersion": "2f4316de49999235636386fe51dc06c1", + "dashboard": "40554caf09725935e2c02e02563a2d07", + "index-pattern": "45915a1ad866812242df474eb0479052", + "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", + "legacy-url-alias": "6155300fd11a00e23d5cbaa39f0fce0a", + "migrationVersion": "4a1746014a75ade3a714e1db5763276f", + "namespace": "2f4316de49999235636386fe51dc06c1", + "namespaces": "2f4316de49999235636386fe51dc06c1", + "originId": "2f4316de49999235636386fe51dc06c1", + "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", + "references": "7997cf5a56cc02bdc9c93361bde732b0", + "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", + "search": "db2c00e39b36f40930a3b9fc71c823e1", + "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", + "telemetry": "36a616f7026dfa617d6655df850fe16d", + "timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf", + "type": "2f4316de49999235636386fe51dc06c1", + "ui-counter": "0d409297dc5ebe1e3a1da691c6ee32e3", + "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", + "updated_at": "00da57df13e94e9d98437d13ace4bfe0", + "url": "c7f66a0df8b1b52f17c28c4adb111105", + "usage-counters": "8cc260bdceffec4ffc3ad165c97dc1b4", + "visualization": "f819cf6636b75c9e76ba733a0c6ef355" + } + }, + "dynamic": "strict", "properties": { + "application_usage_daily": { + "dynamic": "false", + "properties": { + "timestamp": { + "type": "date" + } + } + }, + "application_usage_totals": { + "dynamic": "false", + "type": "object" + }, + "application_usage_transactional": { + "dynamic": "false", + "type": "object" + }, "config": { - "dynamic": "true", + "dynamic": "false", "properties": { "buildNum": { "type": "keyword" } } }, + "core-usage-stats": { + "dynamic": "false", + "type": "object" + }, + "coreMigrationVersion": { + "type": "keyword" + }, "dashboard": { - "dynamic": "strict", "properties": { "description": { "type": "text" }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "optionsJSON": { + "index": false, "type": "text" }, "panelsJSON": { + "index": false, "type": "text" }, "refreshInterval": { "properties": { "display": { + "doc_values": false, + "index": false, "type": "keyword" }, "pause": { + "doc_values": false, + "index": false, "type": "boolean" }, "section": { + "doc_values": false, + "index": false, "type": "integer" }, "value": { + "doc_values": false, + "index": false, "type": "integer" } } }, "timeFrom": { + "doc_values": false, + "index": false, "type": "keyword" }, "timeRestore": { + "doc_values": false, + "index": false, "type": "boolean" }, "timeTo": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, - "uiStateJSON": { - "type": "text" - }, "version": { "type": "integer" } } }, "index-pattern": { - "dynamic": "strict", + "dynamic": "false", "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { + "title": { "type": "text" }, - "intervalName": { + "type": { "type": "keyword" + } + } + }, + "kql-telemetry": { + "properties": { + "optInCount": { + "type": "long" }, - "notExpandable": { + "optOutCount": { + "type": "long" + } + } + }, + "legacy-url-alias": { + "dynamic": "false", + "properties": { + "disabled": { "type": "boolean" }, - "sourceFilters": { - "type": "text" + "sourceId": { + "type": "keyword" }, - "timeFieldName": { + "targetType": { "type": "keyword" + } + } + }, + "migrationVersion": { + "dynamic": "true", + "properties": { + "index-pattern": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" }, - "title": { + "visualization": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "namespace": { + "type": "keyword" + }, + "namespaces": { + "type": "keyword" + }, + "originId": { + "type": "keyword" + }, + "query": { + "properties": { + "description": { "type": "text" }, - "fieldAttrs": { + "filters": { + "enabled": false, + "type": "object" + }, + "query": { + "properties": { + "language": { + "type": "keyword" + }, + "query": { + "index": false, + "type": "keyword" + } + } + }, + "timefilter": { + "enabled": false, + "type": "object" + }, + "title": { "type": "text" } } }, + "references": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + }, + "type": "nested" + }, + "sample-data-telemetry": { + "properties": { + "installCount": { + "type": "long" + }, + "unInstallCount": { + "type": "long" + } + } + }, "search": { - "dynamic": "strict", "properties": { "columns": { + "doc_values": false, + "index": false, "type": "keyword" }, "description": { "type": "text" }, + "grid": { + "enabled": false, + "type": "object" + }, + "hideChart": { + "doc_values": false, + "index": false, + "type": "boolean" + }, "hits": { + "doc_values": false, + "index": false, "type": "integer" }, "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, "sort": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { @@ -129,16 +310,43 @@ } } }, + "search-telemetry": { + "dynamic": "false", + "type": "object" + }, "server": { - "dynamic": "strict", + "dynamic": "false", + "type": "object" + }, + "telemetry": { "properties": { - "uuid": { + "allowChangingOptInStatus": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + }, + "lastReported": { + "type": "date" + }, + "lastVersionChecked": { "type": "keyword" + }, + "reportFailureCount": { + "type": "integer" + }, + "reportFailureVersion": { + "type": "keyword" + }, + "sendUsageFrom": { + "type": "keyword" + }, + "userHasSeenNotice": { + "type": "boolean" } } }, "timelion-sheet": { - "dynamic": "strict", "properties": { "description": { "type": "text" @@ -182,8 +390,24 @@ "type": { "type": "keyword" }, + "ui-counter": { + "properties": { + "count": { + "type": "integer" + } + } + }, + "ui-metric": { + "properties": { + "count": { + "type": "integer" + } + } + }, + "updated_at": { + "type": "date" + }, "url": { - "dynamic": "strict", "properties": { "accessCount": { "type": "long" @@ -205,8 +429,15 @@ } } }, + "usage-counters": { + "dynamic": "false", + "properties": { + "domainId": { + "type": "keyword" + } + } + }, "visualization": { - "dynamic": "strict", "properties": { "description": { "type": "text" @@ -214,23 +445,28 @@ "kibanaSavedObjectMeta": { "properties": { "searchSourceJSON": { + "index": false, "type": "text" } } }, - "savedSearchId": { + "savedSearchRefName": { + "doc_values": false, + "index": false, "type": "keyword" }, "title": { "type": "text" }, "uiStateJSON": { + "index": false, "type": "text" }, "version": { "type": "integer" }, "visState": { + "index": false, "type": "text" } } @@ -239,37 +475,13 @@ }, "settings": { "index": { - "number_of_replicas": "1", - "number_of_shards": "1" - } - }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "index-pattern": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "references": { - "type": "nested", - "properties": { - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "id": { - "type": "keyword" - } + "auto_expand_replicas": "0-1", + "number_of_replicas": "0", + "number_of_shards": "1", + "priority": "10", + "refresh_interval": "1s", + "routing_partition_size": "1" } } } -} +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/visualize_embedding/mappings.json b/test/functional/fixtures/es_archiver/visualize_embedding/mappings.json index a89fe1dfacfc8..45b2508d38033 100644 --- a/test/functional/fixtures/es_archiver/visualize_embedding/mappings.json +++ b/test/functional/fixtures/es_archiver/visualize_embedding/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "mappings": { "properties": { "config": { diff --git a/test/functional/fixtures/es_archiver/visualize_source-filters/mappings.json b/test/functional/fixtures/es_archiver/visualize_source-filters/mappings.json index a89fe1dfacfc8..45b2508d38033 100644 --- a/test/functional/fixtures/es_archiver/visualize_source-filters/mappings.json +++ b/test/functional/fixtures/es_archiver/visualize_source-filters/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "mappings": { "properties": { "config": { diff --git a/test/functional/fixtures/es_archiver/visualize_source_filters/mappings.json b/test/functional/fixtures/es_archiver/visualize_source_filters/mappings.json index 0f17621dbf529..5ac113e7e4b74 100644 --- a/test/functional/fixtures/es_archiver/visualize_source_filters/mappings.json +++ b/test/functional/fixtures/es_archiver/visualize_source_filters/mappings.json @@ -1,7 +1,10 @@ { "type": "index", "value": { - "index": ".kibana", + "aliases": { + ".kibana": {} + }, + "index": ".kibana_1", "mappings": { "properties": { "config": { diff --git a/test/functional/page_objects/dashboard_page.ts b/test/functional/page_objects/dashboard_page.ts index 37dd4520a48f4..ecba9549cea02 100644 --- a/test/functional/page_objects/dashboard_page.ts +++ b/test/functional/page_objects/dashboard_page.ts @@ -41,7 +41,10 @@ export class DashboardPageObject extends FtrService { private readonly visualize = this.ctx.getPageObject('visualize'); private readonly discover = this.ctx.getPageObject('discover'); - async initTests({ kibanaIndex = 'dashboard/legacy', defaultIndex = 'logstash-*' } = {}) { + async initTests({ + kibanaIndex = 'test/functional/fixtures/es_archiver/dashboard/legacy', + defaultIndex = 'logstash-*', + } = {}) { this.log.debug('load kibana index with visualizations and log data'); await this.esArchiver.load(kibanaIndex); await this.kibanaServer.uiSettings.replace({ defaultIndex }); diff --git a/test/functional/page_objects/settings_page.ts b/test/functional/page_objects/settings_page.ts index 7d7da79b4a397..88951bb04c956 100644 --- a/test/functional/page_objects/settings_page.ts +++ b/test/functional/page_objects/settings_page.ts @@ -563,11 +563,8 @@ export class SettingsPageObject extends FtrService { async setFieldScript(script: string) { this.log.debug('set script = ' + script); - const formatRow = await this.testSubjects.find('valueRow'); - const formatRowToggle = (await formatRow.findAllByCssSelector('[data-test-subj="toggle"]'))[0]; - - await formatRowToggle.click(); - const getMonacoTextArea = async () => (await formatRow.findAllByCssSelector('textarea'))[0]; + const valueRow = await this.toggleRow('valueRow'); + const getMonacoTextArea = async () => (await valueRow.findAllByCssSelector('textarea'))[0]; this.retry.waitFor('monaco editor is ready', async () => !!(await getMonacoTextArea())); const monacoTextArea = await getMonacoTextArea(); await monacoTextArea.focus(); @@ -576,8 +573,8 @@ export class SettingsPageObject extends FtrService { async changeFieldScript(script: string) { this.log.debug('set script = ' + script); - const formatRow = await this.testSubjects.find('valueRow'); - const getMonacoTextArea = async () => (await formatRow.findAllByCssSelector('textarea'))[0]; + const valueRow = await this.testSubjects.find('valueRow'); + const getMonacoTextArea = async () => (await valueRow.findAllByCssSelector('textarea'))[0]; this.retry.waitFor('monaco editor is ready', async () => !!(await getMonacoTextArea())); const monacoTextArea = await getMonacoTextArea(); await monacoTextArea.focus(); @@ -622,6 +619,24 @@ export class SettingsPageObject extends FtrService { ); } + async toggleRow(rowTestSubj: string) { + this.log.debug('toggling tow = ' + rowTestSubj); + const row = await this.testSubjects.find(rowTestSubj); + const rowToggle = (await row.findAllByCssSelector('[data-test-subj="toggle"]'))[0]; + await rowToggle.click(); + return row; + } + + async setCustomLabel(label: string) { + this.log.debug('set custom label = ' + label); + await ( + await this.testSubjects.findDescendant( + 'input', + await this.testSubjects.find('customLabelRow') + ) + ).type(label); + } + async setScriptedFieldUrlType(type: string) { this.log.debug('set scripted field Url type = ' + type); await this.find.clickByCssSelector( diff --git a/test/functional/page_objects/timelion_page.ts b/test/functional/page_objects/timelion_page.ts index 57913f8e2413d..65584d98022be 100644 --- a/test/functional/page_objects/timelion_page.ts +++ b/test/functional/page_objects/timelion_page.ts @@ -21,7 +21,7 @@ export class TimelionPageObject extends FtrService { }); this.log.debug('load kibana index'); - await this.esArchiver.load('timelion'); + await this.esArchiver.load('test/functional/fixtures/es_archiver/timelion'); await this.common.navigateToApp('timelion'); } diff --git a/test/functional/page_objects/visualize_page.ts b/test/functional/page_objects/visualize_page.ts index f77db553e015f..a11a254509e7a 100644 --- a/test/functional/page_objects/visualize_page.ts +++ b/test/functional/page_objects/visualize_page.ts @@ -49,7 +49,9 @@ export class VisualizePageObject extends FtrService { public async initTests(isNewLibrary = false) { await this.kibanaServer.savedObjects.clean({ types: ['visualization'] }); - await this.kibanaServer.importExport.load('visualize'); + await this.kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/visualize.json' + ); await this.kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*', diff --git a/test/functional/services/lib/web_element_wrapper/web_element_wrapper.ts b/test/functional/services/lib/web_element_wrapper/web_element_wrapper.ts index b1561b29342da..148c21ffac191 100644 --- a/test/functional/services/lib/web_element_wrapper/web_element_wrapper.ts +++ b/test/functional/services/lib/web_element_wrapper/web_element_wrapper.ts @@ -9,7 +9,6 @@ import { delay } from 'bluebird'; import { WebElement, WebDriver, By, Key } from 'selenium-webdriver'; import { PNG } from 'pngjs'; -// @ts-ignore not supported yet import cheerio from 'cheerio'; import testSubjSelector from '@kbn/test-subj-selector'; import { ToolingLog } from '@kbn/dev-utils'; diff --git a/test/functional/services/management/management_menu.ts b/test/functional/services/management/management_menu.ts index 738a8d55439ec..2b93fce4daa51 100644 --- a/test/functional/services/management/management_menu.ts +++ b/test/functional/services/management/management_menu.ts @@ -13,7 +13,7 @@ export class ManagementMenuService extends FtrService { public async getSections() { const sectionsElements = await this.find.allByCssSelector( - '.mgtSideBarNav > .euiSideNav__content > .euiSideNavItem' + '.kbnPageTemplateSolutionNav .euiSideNavItem--root' ); const sections = []; diff --git a/test/interpreter_functional/config.ts b/test/interpreter_functional/config.ts index adcac520125ad..c0ec982fb98b6 100644 --- a/test/interpreter_functional/config.ts +++ b/test/interpreter_functional/config.ts @@ -26,9 +26,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { servers: functionalConfig.get('servers'), esTestCluster: functionalConfig.get('esTestCluster'), apps: functionalConfig.get('apps'), - esArchiver: { - directory: path.resolve(__dirname, '../es_archives'), - }, snapshots: { directory: path.resolve(__dirname, 'snapshots'), }, diff --git a/test/interpreter_functional/test_suites/run_pipeline/index.ts b/test/interpreter_functional/test_suites/run_pipeline/index.ts index 18d20c97be81e..9cf7e0deba2fa 100644 --- a/test/interpreter_functional/test_suites/run_pipeline/index.ts +++ b/test/interpreter_functional/test_suites/run_pipeline/index.ts @@ -20,8 +20,8 @@ export default function ({ getService, getPageObjects, loadTestFile }: FtrProvid this.tags(['skipFirefox']); before(async () => { - await esArchiver.loadIfNeeded('../functional/fixtures/es_archiver/logstash_functional'); - await esArchiver.load('../functional/fixtures/es_archiver/visualize_embedding'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.load('test/functional/fixtures/es_archiver/visualize_embedding'); await kibanaServer.uiSettings.replace({ 'dateFormat:tz': 'Australia/North', defaultIndex: 'logstash-*', diff --git a/test/new_visualize_flow/dashboard_embedding.ts b/test/new_visualize_flow/dashboard_embedding.ts index 04b91542223ba..3470973f9c96c 100644 --- a/test/new_visualize_flow/dashboard_embedding.ts +++ b/test/new_visualize_flow/dashboard_embedding.ts @@ -34,7 +34,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('Dashboard Embedding', function describeIndexTests() { before(async () => { - await esArchiver.load('kibana'); + await esArchiver.load('test/new_visualize_flow/fixtures/es_archiver/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/new_visualize_flow/index.ts b/test/new_visualize_flow/index.ts index d17501305d0bd..02245002e8336 100644 --- a/test/new_visualize_flow/index.ts +++ b/test/new_visualize_flow/index.ts @@ -14,7 +14,9 @@ export default function ({ loadTestFile, getService }: FtrProviderContext) { this.tags('ciGroup2'); const esArchiver = getService('esArchiver'); before(async () => { - await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.loadIfNeeded( + 'test/new_visualize_flow/fixtures/es_archiver/logstash_functional' + ); }); loadTestFile(require.resolve('./dashboard_embedding')); diff --git a/test/plugin_functional/config.ts b/test/plugin_functional/config.ts index 631cbc8146d65..3791e663fb68c 100644 --- a/test/plugin_functional/config.ts +++ b/test/plugin_functional/config.ts @@ -44,9 +44,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { serverArgs: ['xpack.security.enabled=false'], }, apps: functionalConfig.get('apps'), - esArchiver: { - directory: path.resolve(__dirname, '../es_archives'), - }, screenshots: functionalConfig.get('screenshots'), junit: { reportName: 'Plugin Functional Tests', diff --git a/test/plugin_functional/plugins/core_plugin_deep_links/kibana.json b/test/plugin_functional/plugins/core_plugin_deep_links/kibana.json new file mode 100644 index 0000000000000..539550974c563 --- /dev/null +++ b/test/plugin_functional/plugins/core_plugin_deep_links/kibana.json @@ -0,0 +1,7 @@ +{ + "id": "corePluginDeepLinks", + "version": "0.0.1", + "kibanaVersion": "kibana", + "configPath": ["core_plugin_deep_links"], + "ui": true +} diff --git a/test/plugin_functional/plugins/core_plugin_deep_links/package.json b/test/plugin_functional/plugins/core_plugin_deep_links/package.json new file mode 100644 index 0000000000000..3fe16ddee5321 --- /dev/null +++ b/test/plugin_functional/plugins/core_plugin_deep_links/package.json @@ -0,0 +1,14 @@ +{ + "name": "core_plugin_deep_links", + "version": "1.0.0", + "main": "target/test/plugin_functional/plugins/core_plugin_deep_links", + "kibana": { + "version": "kibana", + "templateVersion": "1.0.0" + }, + "license": "SSPL-1.0 OR Elastic License 2.0", + "scripts": { + "kbn": "node ../../../../scripts/kbn.js", + "build": "rm -rf './target' && ../../../../node_modules/.bin/tsc" + } +} \ No newline at end of file diff --git a/test/plugin_functional/plugins/core_plugin_deep_links/public/application.tsx b/test/plugin_functional/plugins/core_plugin_deep_links/public/application.tsx new file mode 100644 index 0000000000000..90814bd552d37 --- /dev/null +++ b/test/plugin_functional/plugins/core_plugin_deep_links/public/application.tsx @@ -0,0 +1,158 @@ +/* + * Copyright 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 { History } from 'history'; +import React from 'react'; +import ReactDOM from 'react-dom'; +import { Router, Route, withRouter, RouteComponentProps, Redirect } from 'react-router-dom'; + +import { + EuiPage, + EuiPageBody, + EuiPageContent, + EuiPageContentBody, + EuiPageContentHeader, + EuiPageContentHeaderSection, + EuiPageHeader, + EuiPageHeaderSection, + EuiPageSideBar, + EuiTitle, + EuiSideNav, +} from '@elastic/eui'; + +import { CoreStart, AppMountParameters } from 'kibana/public'; + +const Home = () => ( + + + + +

Welcome to DL!

+
+
+
+ + + + +

DL home page section title

+
+
+
+ Wow this is the content! +
+
+); + +const PageA = () => ( + + + + +

DL Page A

+
+
+
+ + + + +

DL Page A section title

+
+
+
+ DL Page A's content goes here +
+
+); + +const PageB = () => ( + + + + +

DL Page B

+
+
+
+ + + + +

DL Page B section title

+
+
+
+ DL Page B's content goes here +
+
+); + +type NavProps = RouteComponentProps & { + navigateToApp: CoreStart['application']['navigateToApp']; +}; +const Nav = withRouter(({ history, navigateToApp }: NavProps) => ( + history.push('/home'), + 'data-test-subj': 'dlNavHome', + }, + { + id: 'page-a', + name: 'DL page A', + onClick: () => history.push('/page-a'), + 'data-test-subj': 'dlNavPageA', + }, + { + id: 'navigateDeepByPath', + name: 'DL section 1 page B', + onClick: () => { + navigateToApp('deeplinks', { path: '/page-b' }); + }, + 'data-test-subj': 'dlNavDeepPageB', + }, + { + id: 'navigateDeepById', + name: 'DL page A deep link', + onClick: () => { + navigateToApp('deeplinks', { deepLinkId: 'pageA' }); + }, + 'data-test-subj': 'dlNavDeepPageAById', + }, + ], + }, + ]} + /> +)); + +const DlApp = ({ history, coreStart }: { history: History; coreStart: CoreStart }) => ( + + + +

New to Kibana?