diff --git a/.eslintrc.js b/.eslintrc.js index a4ce657d523d95..22d0270a5b066b 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 0cf5fc4e0dfd0f..a017c79309a56c 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/.gitignore b/.gitignore index f9855520cb1103..d5a51049540787 100644 --- a/.gitignore +++ b/.gitignore @@ -63,7 +63,7 @@ npm-debug.log* .vagrant ## @cypress/snapshot from apm plugin -snapshots.js +/snapshots.js # release notes script output report.csv diff --git a/api_docs/actions.json b/api_docs/actions.json index 8bd644be376d76..d7c5e63434c078 100644 --- a/api_docs/actions.json +++ b/api_docs/actions.json @@ -1054,7 +1054,7 @@ ], "source": { "path": "x-pack/plugins/actions/server/builtin_action_types/pagerduty.ts", - "lineNumber": 121 + "lineNumber": 129 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/apm.json b/api_docs/apm.json index 7eee0349fa349e..84f5a87f404ae9 100644 --- a/api_docs/apm.json +++ b/api_docs/apm.json @@ -78,7 +78,7 @@ ], "source": { "path": "x-pack/plugins/apm/public/plugin.ts", - "lineNumber": 45 + "lineNumber": 47 }, "deprecated": false, "lifecycle": "setup", @@ -96,7 +96,7 @@ ], "source": { "path": "x-pack/plugins/apm/public/plugin.ts", - "lineNumber": 47 + "lineNumber": 49 }, "deprecated": false, "lifecycle": "start", @@ -144,7 +144,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 55 + "lineNumber": 54 }, "deprecated": false, "children": [ @@ -160,7 +160,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 65 + "lineNumber": 64 }, "deprecated": false, "children": [ @@ -183,7 +183,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 65 + "lineNumber": 64 }, "deprecated": false, "isRequired": true @@ -237,7 +237,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 69 + "lineNumber": 68 }, "deprecated": false, "children": [ @@ -262,7 +262,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 70 + "lineNumber": 69 }, "deprecated": false, "isRequired": true @@ -281,7 +281,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 71 + "lineNumber": 70 }, "deprecated": false, "isRequired": true @@ -309,7 +309,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 269 + "lineNumber": 260 }, "deprecated": false, "children": [ @@ -331,7 +331,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 269 + "lineNumber": 260 }, "deprecated": false, "isRequired": true @@ -351,7 +351,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 288 + "lineNumber": 279 }, "deprecated": false, "children": [], diff --git a/api_docs/apm_oss.json b/api_docs/apm_oss.json index 75cb60610335b5..c09f772ea0a553 100644 --- a/api_docs/apm_oss.json +++ b/api_docs/apm_oss.json @@ -5,606 +5,15 @@ "functions": [], "interfaces": [], "enums": [], - "misc": [ - { - "parentPluginId": "apmOss", - "id": "def-public.APM_STATIC_INDEX_PATTERN_ID", - "type": "string", - "tags": [], - "label": "APM_STATIC_INDEX_PATTERN_ID", - "description": [], - "signature": [ - "\"apm_static_index_pattern_id\"" - ], - "source": { - "path": "src/plugins/apm_oss/common/index_pattern_constants.ts", - "lineNumber": 9 - }, - "deprecated": false, - "initialIsOpen": false - } - ], - "objects": [], - "setup": { - "parentPluginId": "apmOss", - "id": "def-public.ApmOssPluginSetup", - "type": "Interface", - "tags": [], - "label": "ApmOssPluginSetup", - "description": [], - "source": { - "path": "src/plugins/apm_oss/public/types.ts", - "lineNumber": 10 - }, - "deprecated": false, - "children": [], - "lifecycle": "setup", - "initialIsOpen": true - }, - "start": { - "parentPluginId": "apmOss", - "id": "def-public.ApmOssPluginStart", - "type": "Interface", - "tags": [], - "label": "ApmOssPluginStart", - "description": [], - "source": { - "path": "src/plugins/apm_oss/public/types.ts", - "lineNumber": 13 - }, - "deprecated": false, - "children": [], - "lifecycle": "start", - "initialIsOpen": true - } + "misc": [], + "objects": [] }, "server": { "classes": [], - "functions": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createDjangoAgentInstructions", - "type": "Function", - "tags": [], - "label": "createDjangoAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands: string[]; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 88 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createDjangoAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 88 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createDjangoAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 88 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createDotNetAgentInstructions", - "type": "Function", - "tags": [], - "label": "createDotNetAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands?: undefined; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; } | { title: string; commands: string[]; textPost: string; textPre?: undefined; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 631 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createDotNetAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 631 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createDotNetAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 631 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createFlaskAgentInstructions", - "type": "Function", - "tags": [], - "label": "createFlaskAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands: string[]; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 173 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createFlaskAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 173 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createFlaskAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 173 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createGoAgentInstructions", - "type": "Function", - "tags": [], - "label": "createGoAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands: string[]; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 492 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createGoAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 492 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createGoAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 492 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createJavaAgentInstructions", - "type": "Function", - "tags": [], - "label": "createJavaAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands?: undefined; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 585 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createJavaAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 585 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createJavaAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 585 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createJsAgentInstructions", - "type": "Function", - "tags": [], - "label": "createJsAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string) => ({ title: string; textPre: string; commands?: undefined; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; } | { title: string; textPre: string; commands: string[]; textPost?: undefined; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 393 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createJsAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 393 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createNodeAgentInstructions", - "type": "Function", - "tags": [], - "label": "createNodeAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands: string[]; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 11 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createNodeAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 11 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createNodeAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 11 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createPhpAgentInstructions", - "type": "Function", - "tags": [], - "label": "createPhpAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands?: undefined; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 705 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createPhpAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 705 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createPhpAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 705 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createRackAgentInstructions", - "type": "Function", - "tags": [], - "label": "createRackAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands: string[]; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 298 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createRackAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 298 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createRackAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 298 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createRailsAgentInstructions", - "type": "Function", - "tags": [], - "label": "createRailsAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands: string[]; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 255 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createRailsAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 255 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createRailsAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 255 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - } - ], + "functions": [], "interfaces": [], "enums": [], "misc": [ - { - "parentPluginId": "apmOss", - "id": "def-server.APM_STATIC_INDEX_PATTERN_ID", - "type": "string", - "tags": [], - "label": "APM_STATIC_INDEX_PATTERN_ID", - "description": [], - "signature": [ - "\"apm_static_index_pattern_id\"" - ], - "source": { - "path": "src/plugins/apm_oss/common/index_pattern_constants.ts", - "lineNumber": 9 - }, - "deprecated": false, - "initialIsOpen": false - }, { "parentPluginId": "apmOss", "id": "def-server.APMOSSConfig", @@ -617,7 +26,7 @@ ], "source": { "path": "src/plugins/apm_oss/server/index.ts", - "lineNumber": 32 + "lineNumber": 31 }, "deprecated": false, "initialIsOpen": false @@ -633,7 +42,7 @@ "description": [], "source": { "path": "src/plugins/apm_oss/server/plugin.ts", - "lineNumber": 47 + "lineNumber": 27 }, "deprecated": false, "children": [ @@ -649,7 +58,7 @@ ], "source": { "path": "src/plugins/apm_oss/server/plugin.ts", - "lineNumber": 48 + "lineNumber": 28 }, "deprecated": false }, @@ -666,34 +75,9 @@ ], "source": { "path": "src/plugins/apm_oss/server/plugin.ts", - "lineNumber": 49 + "lineNumber": 29 }, "deprecated": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.APMOSSPluginSetup.getRegisteredTutorialProvider", - "type": "Function", - "tags": [], - "label": "getRegisteredTutorialProvider", - "description": [], - "signature": [ - "() => ", - { - "pluginId": "home", - "scope": "server", - "docId": "kibHomePluginApi", - "section": "def-server.TutorialProvider", - "text": "TutorialProvider" - } - ], - "source": { - "path": "src/plugins/apm_oss/server/plugin.ts", - "lineNumber": 50 - }, - "deprecated": false, - "children": [], - "returnComment": [] } ], "lifecycle": "setup", diff --git a/api_docs/apm_oss.mdx b/api_docs/apm_oss.mdx index c4facc4e390b65..73707040013788 100644 --- a/api_docs/apm_oss.mdx +++ b/api_docs/apm_oss.mdx @@ -11,25 +11,11 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import apmOssObj from './apm_oss.json'; -## Client - -### Setup - - -### Start - - -### Consts, variables and types - - ## Server ### Setup -### Functions - - ### Consts, variables and types diff --git a/api_docs/bfetch.json b/api_docs/bfetch.json index 76b2118282b2e5..ce294077f9499c 100644 --- a/api_docs/bfetch.json +++ b/api_docs/bfetch.json @@ -78,7 +78,7 @@ "description": [], "source": { "path": "src/plugins/bfetch/public/plugin.ts", - "lineNumber": 24 + "lineNumber": 23 }, "deprecated": false, "children": [ @@ -98,7 +98,7 @@ ], "source": { "path": "src/plugins/bfetch/public/plugin.ts", - "lineNumber": 25 + "lineNumber": 24 }, "deprecated": false, "returnComment": [], @@ -115,7 +115,7 @@ ], "source": { "path": "src/plugins/bfetch/public/plugin.ts", - "lineNumber": 25 + "lineNumber": 24 }, "deprecated": false } @@ -143,7 +143,7 @@ ], "source": { "path": "src/plugins/bfetch/public/plugin.ts", - "lineNumber": 26 + "lineNumber": 25 }, "deprecated": false, "returnComment": [], @@ -161,7 +161,7 @@ ], "source": { "path": "src/plugins/bfetch/public/plugin.ts", - "lineNumber": 27 + "lineNumber": 26 }, "deprecated": false } @@ -195,7 +195,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 39 + "lineNumber": 41 }, "deprecated": false, "children": [ @@ -211,7 +211,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 40 + "lineNumber": 42 }, "deprecated": false, "returnComment": [], @@ -228,7 +228,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 40 + "lineNumber": 42 }, "deprecated": false } @@ -290,7 +290,7 @@ "description": [], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 44 + "lineNumber": 46 }, "deprecated": false, "children": [ @@ -322,7 +322,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 45 + "lineNumber": 47 }, "deprecated": false, "returnComment": [], @@ -336,7 +336,7 @@ "description": [], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 46 + "lineNumber": 48 }, "deprecated": false }, @@ -368,7 +368,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 47 + "lineNumber": 49 }, "deprecated": false } @@ -402,7 +402,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 49 + "lineNumber": 51 }, "deprecated": false, "returnComment": [], @@ -416,7 +416,7 @@ "description": [], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 50 + "lineNumber": 52 }, "deprecated": false }, @@ -448,7 +448,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 51 + "lineNumber": 53 }, "deprecated": false } @@ -682,7 +682,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 81 + "lineNumber": 83 }, "deprecated": false, "returnComment": [], @@ -719,7 +719,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 89 + "lineNumber": 91 }, "deprecated": false } @@ -738,7 +738,7 @@ "description": [], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 94 + "lineNumber": 96 }, "deprecated": false, "children": [], @@ -1343,6 +1343,48 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "bfetch", + "id": "def-common.BatchItemWrapper", + "type": "Interface", + "tags": [], + "label": "BatchItemWrapper", + "description": [], + "source": { + "path": "src/plugins/bfetch/common/batch.ts", + "lineNumber": 23 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "bfetch", + "id": "def-common.BatchItemWrapper.compressed", + "type": "boolean", + "tags": [], + "label": "compressed", + "description": [], + "source": { + "path": "src/plugins/bfetch/common/batch.ts", + "lineNumber": 24 + }, + "deprecated": false + }, + { + "parentPluginId": "bfetch", + "id": "def-common.BatchItemWrapper.payload", + "type": "string", + "tags": [], + "label": "payload", + "description": [], + "source": { + "path": "src/plugins/bfetch/common/batch.ts", + "lineNumber": 25 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "bfetch", "id": "def-common.BatchRequestData", @@ -1684,7 +1726,25 @@ } ], "enums": [], - "misc": [], + "misc": [ + { + "parentPluginId": "bfetch", + "id": "def-common.DISABLE_BFETCH_COMPRESSION", + "type": "string", + "tags": [], + "label": "DISABLE_BFETCH_COMPRESSION", + "description": [], + "signature": [ + "\"bfetch:disableCompression\"" + ], + "source": { + "path": "src/plugins/bfetch/common/constants.ts", + "lineNumber": 9 + }, + "deprecated": false, + "initialIsOpen": false + } + ], "objects": [] } } \ No newline at end of file diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index 0e9a9e79dbea60..faf3d7eefc7f9f 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -47,3 +47,6 @@ import bfetchObj from './bfetch.json'; ### Interfaces +### Consts, variables and types + + diff --git a/api_docs/cases.json b/api_docs/cases.json index 3d77ada0c336b4..bc92995dff6e91 100644 --- a/api_docs/cases.json +++ b/api_docs/cases.json @@ -294,6 +294,38 @@ ], "functions": [], "interfaces": [ + { + "parentPluginId": "cases", + "id": "def-public.Owner", + "type": "Interface", + "tags": [], + "label": "Owner", + "description": [], + "source": { + "path": "x-pack/plugins/cases/public/types.ts", + "lineNumber": 42 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "cases", + "id": "def-public.Owner.owner", + "type": "Array", + "tags": [], + "label": "owner", + "description": [], + "signature": [ + "string[]" + ], + "source": { + "path": "x-pack/plugins/cases/public/types.ts", + "lineNumber": 43 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "cases", "id": "def-public.SetupPlugins", @@ -315,17 +347,13 @@ "label": "security", "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; }; }" + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.SecurityPluginSetup", + "text": "SecurityPluginSetup" + } ], "source": { "path": "x-pack/plugins/cases/public/types.ts", @@ -424,17 +452,15 @@ "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; }; }; }" + " & { security: ", + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.SecurityPluginSetup", + "text": "SecurityPluginSetup" + }, + "; }" ], "source": { "path": "x-pack/plugins/cases/public/types.ts", @@ -454,7 +480,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 42 + "lineNumber": 46 }, "deprecated": false, "children": [ @@ -474,7 +500,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 43 + "lineNumber": 47 }, "deprecated": false, "returnComment": [], @@ -491,7 +517,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 43 + "lineNumber": 47 }, "deprecated": false } @@ -513,7 +539,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 44 + "lineNumber": 48 }, "deprecated": false, "returnComment": [], @@ -530,7 +556,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 45 + "lineNumber": 49 }, "deprecated": false } @@ -552,7 +578,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 47 + "lineNumber": 51 }, "deprecated": false, "returnComment": [], @@ -569,7 +595,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 47 + "lineNumber": 51 }, "deprecated": false } @@ -591,7 +617,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 48 + "lineNumber": 52 }, "deprecated": false, "returnComment": [], @@ -608,7 +634,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 48 + "lineNumber": 52 }, "deprecated": false } @@ -630,7 +656,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 49 + "lineNumber": 53 }, "deprecated": false, "returnComment": [], @@ -647,7 +673,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 49 + "lineNumber": 53 }, "deprecated": false } @@ -669,7 +695,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 50 + "lineNumber": 54 }, "deprecated": false, "returnComment": [], @@ -686,7 +712,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 50 + "lineNumber": 54 }, "deprecated": false } @@ -698,7 +724,170 @@ } }, "server": { - "classes": [], + "classes": [ + { + "parentPluginId": "cases", + "id": "def-server.CasesClient", + "type": "Class", + "tags": [], + "label": "CasesClient", + "description": [ + "\nClient wrapper that contains accessor methods for individual entities within the cases system." + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 21 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 30 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "args", + "description": [], + "signature": [ + "CasesClientArgs" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 30 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nRetrieves an interface for interacting with cases entities." + ], + "signature": [ + "CasesSubClient" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 43 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.attachments", + "type": "Object", + "tags": [], + "label": "attachments", + "description": [ + "\nRetrieves an interface for interacting with attachments (comments) entities." + ], + "signature": [ + "AttachmentsSubClient" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 50 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.userActions", + "type": "Object", + "tags": [], + "label": "userActions", + "description": [ + "\nRetrieves an interface for interacting with the user actions associated with the plugin entities." + ], + "signature": [ + "UserActionsSubClient" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 57 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.subCases", + "type": "Object", + "tags": [], + "label": "subCases", + "description": [ + "\nRetrieves an interface for interacting with the case as a connector entities.\n\nCurrently this functionality is disabled and will throw an error if this function is called." + ], + "signature": [ + "SubCasesClient" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 66 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.configure", + "type": "Object", + "tags": [], + "label": "configure", + "description": [ + "\nRetrieves an interface for interacting with the configuration of external connectors for the plugin entities." + ], + "signature": [ + "ConfigureSubClient" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 76 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.stats", + "type": "Object", + "tags": [], + "label": "stats", + "description": [ + "\nRetrieves an interface for retrieving statistics related to the cases entities." + ], + "signature": [ + "StatsSubClient" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 83 + }, + "deprecated": false + } + ], + "initialIsOpen": false + } + ], "functions": [], "interfaces": [ { @@ -710,7 +899,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/server/types.ts", - "lineNumber": 12 + "lineNumber": 18 }, "deprecated": false, "children": [ @@ -722,18 +911,19 @@ "label": "getCasesClient", "description": [], "signature": [ - "() => ", + "() => Promise<", { "pluginId": "cases", "scope": "server", "docId": "kibCasesPluginApi", "section": "def-server.CasesClient", "text": "CasesClient" - } + }, + ">" ], "source": { "path": "x-pack/plugins/cases/server/types.ts", - "lineNumber": 13 + "lineNumber": 19 }, "deprecated": false, "returnComment": [], @@ -744,1448 +934,62 @@ }, { "parentPluginId": "cases", - "id": "def-server.CasesClient", + "id": "def-server.PluginStartContract", "type": "Interface", "tags": [], - "label": "CasesClient", + "label": "PluginStartContract", "description": [ - "\nThis represents the interface that other plugins can access." + "\nCases server exposed contract for interacting with cases entities." ], "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 102 + "path": "x-pack/plugins/cases/server/plugin.ts", + "lineNumber": 55 }, "deprecated": false, "children": [ { "parentPluginId": "cases", - "id": "def-server.CasesClient.addComment", + "id": "def-server.PluginStartContract.getCasesClientWithRequest", "type": "Function", "tags": [], - "label": "addComment", - "description": [], + "label": "getCasesClientWithRequest", + "description": [ + "\nReturns a client which can be used to interact with the cases backend entities.\n" + ], "signature": [ - "(args: ", - "CasesClientAddComment", - ") => Promise<{ description: string; status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; tags: string[]; title: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - "; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", + "(request: ", { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + ") => Promise<", { "pluginId": "cases", - "scope": "common", + "scope": "server", "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ 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; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ 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; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 103 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.addComment.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientAddComment" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 103 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.create", - "type": "Function", - "tags": [], - "label": "create", - "description": [], - "signature": [ - "(theCase: { type?: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - " | undefined; } & { description: string; tags: string[]; title: string; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; }) => Promise<{ description: string; status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; tags: string[]; title: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - "; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ 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; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ 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; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 104 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.create.$1", - "type": "CompoundType", - "tags": [], - "label": "theCase", - "description": [], - "signature": [ - "{ type?: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - " | undefined; } & { description: string; tags: string[]; title: string; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; }" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 104 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.get", - "type": "Function", - "tags": [], - "label": "get", - "description": [], - "signature": [ - "(args: ", - "CasesClientGet", - ") => Promise<{ description: string; status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; tags: string[]; title: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - "; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ 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; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ 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; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 105 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.get.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientGet" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 105 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getAlerts", - "type": "Function", - "tags": [], - "label": "getAlerts", - "description": [], - "signature": [ - "(args: ", - "CasesClientGetAlerts", - ") => Promise<", - "CasesClientGetAlertsResponse", - ">" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 106 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getAlerts.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientGetAlerts" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 106 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getFields", - "type": "Function", - "tags": [], - "label": "getFields", - "description": [], - "signature": [ - "(args: ", - "ConfigureFields", - ") => Promise<{ defaultMappings: { action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]; fields: { id: string; name: string; required: boolean; type: \"text\" | \"textarea\"; }[]; }>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 107 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getFields.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "ConfigureFields" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 107 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getMappings", - "type": "Function", - "tags": [], - "label": "getMappings", - "description": [], - "signature": [ - "(args: ", - "MappingsClient", - ") => Promise<{ action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 108 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getMappings.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "MappingsClient" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 108 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getUserActions", - "type": "Function", - "tags": [], - "label": "getUserActions", - "description": [], - "signature": [ - "(args: ", - "CasesClientGetUserActions", - ") => Promise<({ action_field: (\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; } & { action_id: string; case_id: string; comment_id: string | null; } & { sub_case_id?: string | undefined; })[]>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 109 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getUserActions.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientGetUserActions" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 109 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.push", - "type": "Function", - "tags": [], - "label": "push", - "description": [], - "signature": [ - "(args: ", - "CasesClientPush", - ") => Promise<{ description: string; status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; tags: string[]; title: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - "; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ 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; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ 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; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 110 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.push.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientPush" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 110 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.update", - "type": "Function", - "tags": [], - "label": "update", - "description": [], - "signature": [ - "(args: { cases: ({ description?: string | undefined; status?: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - " | undefined; tags?: string[] | undefined; title?: string | undefined; type?: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - " | undefined; connector?: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; } & { id: string; version: string; })[]; }) => Promise<({ description: string; status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; tags: string[]; title: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - "; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ 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; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ 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; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 111 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.update.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "{ cases: ({ description?: string | undefined; status?: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - " | undefined; tags?: string[] | undefined; title?: string | undefined; type?: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - " | undefined; connector?: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; } & { id: string; version: string; })[]; }" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 111 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.updateAlertsStatus", - "type": "Function", - "tags": [], - "label": "updateAlertsStatus", - "description": [], - "signature": [ - "(args: ", - "CasesClientUpdateAlertsStatus", - ") => Promise" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 112 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.updateAlertsStatus.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientUpdateAlertsStatus" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 112 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getCaseIdsByAlertId", - "type": "Function", - "tags": [], - "label": "getCaseIdsByAlertId", - "description": [], - "signature": [ - "(args: ", - "CasesClientGetCasesByAlert", - ") => Promise" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 113 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getCaseIdsByAlertId.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientGetCasesByAlert" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 113 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "cases", - "id": "def-server.PluginStartContract", - "type": "Interface", - "tags": [], - "label": "PluginStartContract", - "description": [], - "source": { - "path": "x-pack/plugins/cases/server/index.ts", - "lineNumber": 29 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.PluginStartContract.getCasesClientWithRequestAndContext", - "type": "Function", - "tags": [], - "label": "getCasesClientWithRequestAndContext", - "description": [], - "signature": [ - "(context: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.RequestHandlerContext", - "text": "RequestHandlerContext" - }, - ", request: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - ") => ", - { - "pluginId": "cases", - "scope": "server", - "docId": "kibCasesPluginApi", - "section": "def-server.CasesClient", - "text": "CasesClient" - } - ], - "source": { - "path": "x-pack/plugins/cases/server/index.ts", - "lineNumber": 30 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.PluginStartContract.getCasesClientWithRequestAndContext.$1", - "type": "Object", - "tags": [], - "label": "context", - "description": [], - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.RequestHandlerContext", - "text": "RequestHandlerContext" - } - ], - "source": { - "path": "x-pack/plugins/cases/server/index.ts", - "lineNumber": 31 - }, - "deprecated": false, - "isRequired": true + "section": "def-server.CasesClient", + "text": "CasesClient" }, + ">" + ], + "source": { + "path": "x-pack/plugins/cases/server/plugin.ts", + "lineNumber": 62 + }, + "deprecated": false, + "children": [ { "parentPluginId": "cases", - "id": "def-server.PluginStartContract.getCasesClientWithRequestAndContext.$2", + "id": "def-server.PluginStartContract.getCasesClientWithRequest.$1", "type": "Object", "tags": [], "label": "request", - "description": [], + "description": [ + "a KibanaRequest" + ], "signature": [ { "pluginId": "core", @@ -2197,14 +1001,16 @@ "" ], "source": { - "path": "x-pack/plugins/cases/server/index.ts", - "lineNumber": 32 + "path": "x-pack/plugins/cases/server/plugin.ts", + "lineNumber": 62 }, "deprecated": false, "isRequired": true } ], - "returnComment": [] + "returnComment": [ + "a {@link CasesClient}" + ] } ], "initialIsOpen": false @@ -2339,7 +1145,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 71 + "lineNumber": 72 }, "deprecated": false, "isRequired": true @@ -2402,7 +1208,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 36 + "lineNumber": 37 }, "deprecated": false, "children": [ @@ -2418,7 +1224,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 36 + "lineNumber": 37 }, "deprecated": false, "isRequired": true @@ -2435,7 +1241,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 36 + "lineNumber": 37 }, "deprecated": false, "isRequired": true @@ -2456,7 +1262,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 32 + "lineNumber": 33 }, "deprecated": false, "children": [ @@ -2472,7 +1278,44 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 32 + "lineNumber": 33 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.getCaseConfigurationDetailsUrl", + "type": "Function", + "tags": [], + "label": "getCaseConfigurationDetailsUrl", + "description": [], + "signature": [ + "(configureID: string) => string" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/helpers.ts", + "lineNumber": 53 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "cases", + "id": "def-common.getCaseConfigurationDetailsUrl.$1", + "type": "string", + "tags": [], + "label": "configureID", + "description": [], + "signature": [ + "string" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/helpers.ts", + "lineNumber": 53 }, "deprecated": false, "isRequired": true @@ -2493,7 +1336,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 20 + "lineNumber": 21 }, "deprecated": false, "children": [ @@ -2509,7 +1352,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 20 + "lineNumber": 21 }, "deprecated": false, "isRequired": true @@ -2530,7 +1373,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 48 + "lineNumber": 49 }, "deprecated": false, "children": [ @@ -2546,7 +1389,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 48 + "lineNumber": 49 }, "deprecated": false, "isRequired": true @@ -2563,7 +1406,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 48 + "lineNumber": 49 }, "deprecated": false, "isRequired": true @@ -2584,7 +1427,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 52 + "lineNumber": 57 }, "deprecated": false, "children": [ @@ -2600,7 +1443,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 52 + "lineNumber": 57 }, "deprecated": false, "isRequired": true @@ -2621,7 +1464,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 40 + "lineNumber": 41 }, "deprecated": false, "children": [ @@ -2637,7 +1480,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 40 + "lineNumber": 41 }, "deprecated": false, "isRequired": true @@ -2658,7 +1501,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 28 + "lineNumber": 29 }, "deprecated": false, "children": [ @@ -2674,7 +1517,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 28 + "lineNumber": 29 }, "deprecated": false, "isRequired": true @@ -2691,7 +1534,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 28 + "lineNumber": 29 }, "deprecated": false, "isRequired": true @@ -2712,7 +1555,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 24 + "lineNumber": 25 }, "deprecated": false, "children": [ @@ -2728,7 +1571,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 24 + "lineNumber": 25 }, "deprecated": false, "isRequired": true @@ -2749,7 +1592,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 44 + "lineNumber": 45 }, "deprecated": false, "children": [ @@ -2765,7 +1608,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 44 + "lineNumber": 45 }, "deprecated": false, "isRequired": true @@ -2782,7 +1625,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 44 + "lineNumber": 45 }, "deprecated": false, "isRequired": true @@ -2841,7 +1684,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 144 + "lineNumber": 145 }, "deprecated": false, "children": [ @@ -2854,7 +1697,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 145 + "lineNumber": 146 }, "deprecated": false }, @@ -2867,7 +1710,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 146 + "lineNumber": 147 }, "deprecated": false }, @@ -2880,7 +1723,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 147 + "lineNumber": 148 }, "deprecated": false }, @@ -2893,7 +1736,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 148 + "lineNumber": 149 }, "deprecated": false }, @@ -2906,7 +1749,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 149 + "lineNumber": 150 }, "deprecated": false } @@ -2939,7 +1782,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 112 + "lineNumber": 113 }, "deprecated": false, "children": [ @@ -2962,7 +1805,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 113 + "lineNumber": 114 }, "deprecated": false }, @@ -2975,7 +1818,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 114 + "lineNumber": 115 }, "deprecated": false }, @@ -2988,7 +1831,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 115 + "lineNumber": 116 }, "deprecated": false }, @@ -3001,7 +1844,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 116 + "lineNumber": 117 }, "deprecated": false } @@ -3017,7 +1860,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 135 + "lineNumber": 136 }, "deprecated": false, "children": [ @@ -3033,7 +1876,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 136 + "lineNumber": 137 }, "deprecated": false } @@ -3049,7 +1892,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 139 + "lineNumber": 140 }, "deprecated": false, "children": [ @@ -3062,7 +1905,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 140 + "lineNumber": 141 }, "deprecated": false }, @@ -3075,7 +1918,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 141 + "lineNumber": 142 }, "deprecated": false }, @@ -3088,7 +1931,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 142 + "lineNumber": 143 }, "deprecated": false } @@ -3114,7 +1957,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 80 + "lineNumber": 81 }, "deprecated": false, "children": [ @@ -3170,7 +2013,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 81 + "lineNumber": 82 }, "deprecated": false }, @@ -3183,7 +2026,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 82 + "lineNumber": 83 }, "deprecated": false }, @@ -3206,7 +2049,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 83 + "lineNumber": 84 }, "deprecated": false }, @@ -3229,7 +2072,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 84 + "lineNumber": 85 }, "deprecated": false }, @@ -3245,7 +2088,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 85 + "lineNumber": 86 }, "deprecated": false }, @@ -3261,7 +2104,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 86 + "lineNumber": 87 }, "deprecated": false }, @@ -3277,7 +2120,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 87 + "lineNumber": 88 }, "deprecated": false }, @@ -3299,7 +2142,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 88 + "lineNumber": 89 }, "deprecated": false } @@ -3431,7 +2274,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 106 + "lineNumber": 107 }, "deprecated": false, "children": [ @@ -3447,7 +2290,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 107 + "lineNumber": 108 }, "deprecated": false }, @@ -3463,7 +2306,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 108 + "lineNumber": 109 }, "deprecated": false }, @@ -3479,7 +2322,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 109 + "lineNumber": 110 }, "deprecated": false } @@ -3520,7 +2363,7 @@ "label": "actionField", "description": [], "signature": [ - "(\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"connector\" | \"pushed\" | \"sub_case\")[]" + "(\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]" ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", @@ -3652,7 +2495,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 152 + "lineNumber": 153 }, "deprecated": false, "children": [ @@ -3665,7 +2508,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 153 + "lineNumber": 154 }, "deprecated": false }, @@ -3688,7 +2531,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 154 + "lineNumber": 155 }, "deprecated": false }, @@ -3704,7 +2547,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 155 + "lineNumber": 156 }, "deprecated": false } @@ -3720,7 +2563,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 225 + "lineNumber": 226 }, "deprecated": false, "children": [ @@ -3733,7 +2576,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 226 + "lineNumber": 227 }, "deprecated": false }, @@ -3749,7 +2592,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 227 + "lineNumber": 228 }, "deprecated": false }, @@ -3772,7 +2615,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 228 + "lineNumber": 229 }, "deprecated": false } @@ -3788,7 +2631,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 124 + "lineNumber": 125 }, "deprecated": false, "children": [ @@ -3804,7 +2647,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 125 + "lineNumber": 126 }, "deprecated": false }, @@ -3820,7 +2663,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 126 + "lineNumber": 127 }, "deprecated": false }, @@ -3836,7 +2679,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 127 + "lineNumber": 128 }, "deprecated": false } @@ -3956,7 +2799,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 130 + "lineNumber": 131 }, "deprecated": false, "children": [ @@ -3979,18 +2822,19 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 131 + "lineNumber": 132 }, "deprecated": false }, { "parentPluginId": "cases", "id": "def-common.FetchCasesProps.filterOptions", - "type": "Object", + "type": "CompoundType", "tags": [], "label": "filterOptions", "description": [], "signature": [ + "(", { "pluginId": "cases", "scope": "common", @@ -3998,11 +2842,11 @@ "section": "def-common.FilterOptions", "text": "FilterOptions" }, - " | undefined" + " & { owner: string[]; }) | undefined" ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 132 + "lineNumber": 133 }, "deprecated": false } @@ -4018,7 +2862,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 158 + "lineNumber": 159 }, "deprecated": false, "children": [ @@ -4031,7 +2875,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 159 + "lineNumber": 160 }, "deprecated": false }, @@ -4047,7 +2891,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 160 + "lineNumber": 161 }, "deprecated": false } @@ -4063,7 +2907,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 98 + "lineNumber": 99 }, "deprecated": false, "children": [ @@ -4076,7 +2920,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 99 + "lineNumber": 100 }, "deprecated": false }, @@ -4099,7 +2943,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 100 + "lineNumber": 101 }, "deprecated": false }, @@ -4115,7 +2959,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 101 + "lineNumber": 102 }, "deprecated": false }, @@ -4131,7 +2975,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 102 + "lineNumber": 103 }, "deprecated": false }, @@ -4147,7 +2991,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 103 + "lineNumber": 104 }, "deprecated": false } @@ -4163,7 +3007,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 91 + "lineNumber": 92 }, "deprecated": false, "children": [ @@ -4176,7 +3020,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 92 + "lineNumber": 93 }, "deprecated": false }, @@ -4189,7 +3033,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 93 + "lineNumber": 94 }, "deprecated": false }, @@ -4211,7 +3055,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 94 + "lineNumber": 95 }, "deprecated": false }, @@ -4227,7 +3071,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 95 + "lineNumber": 96 }, "deprecated": false } @@ -4243,7 +3087,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 178 + "lineNumber": 179 }, "deprecated": false, "children": [ @@ -4259,7 +3103,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 179 + "lineNumber": 180 }, "deprecated": false }, @@ -4275,7 +3119,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 180 + "lineNumber": 181 }, "deprecated": false }, @@ -4291,7 +3135,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 181 + "lineNumber": 182 }, "deprecated": false }, @@ -4307,7 +3151,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 182 + "lineNumber": 183 }, "deprecated": false }, @@ -4323,7 +3167,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 183 + "lineNumber": 184 }, "deprecated": false }, @@ -4339,7 +3183,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 184 + "lineNumber": 185 }, "deprecated": false }, @@ -4355,7 +3199,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 185 + "lineNumber": 186 }, "deprecated": false }, @@ -4371,7 +3215,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 186 + "lineNumber": 187 }, "deprecated": false }, @@ -4387,7 +3231,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 187 + "lineNumber": 188 }, "deprecated": false }, @@ -4403,7 +3247,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 188 + "lineNumber": 189 }, "deprecated": false }, @@ -4419,7 +3263,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 189 + "lineNumber": 190 }, "deprecated": false }, @@ -4435,7 +3279,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 190 + "lineNumber": 191 }, "deprecated": false }, @@ -4451,7 +3295,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 191 + "lineNumber": 192 }, "deprecated": false }, @@ -4467,7 +3311,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 192 + "lineNumber": 193 }, "deprecated": false }, @@ -4483,7 +3327,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 193 + "lineNumber": 194 }, "deprecated": false }, @@ -4499,7 +3343,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 194 + "lineNumber": 195 }, "deprecated": false }, @@ -4515,7 +3359,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 195 + "lineNumber": 196 }, "deprecated": false }, @@ -4531,7 +3375,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 196 + "lineNumber": 197 }, "deprecated": false }, @@ -4547,7 +3391,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 197 + "lineNumber": 198 }, "deprecated": false }, @@ -4563,7 +3407,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 198 + "lineNumber": 199 }, "deprecated": false }, @@ -4579,7 +3423,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 199 + "lineNumber": 200 }, "deprecated": false }, @@ -4595,7 +3439,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 200 + "lineNumber": 201 }, "deprecated": false }, @@ -4611,7 +3455,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 201 + "lineNumber": 202 }, "deprecated": false }, @@ -4627,7 +3471,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 202 + "lineNumber": 203 }, "deprecated": false }, @@ -4643,7 +3487,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 203 + "lineNumber": 204 }, "deprecated": false }, @@ -4659,7 +3503,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 204 + "lineNumber": 205 }, "deprecated": false }, @@ -4675,7 +3519,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 205 + "lineNumber": 206 }, "deprecated": false }, @@ -4691,7 +3535,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 206 + "lineNumber": 207 }, "deprecated": false }, @@ -4707,7 +3551,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 207 + "lineNumber": 208 }, "deprecated": false }, @@ -4723,7 +3567,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 208 + "lineNumber": 209 }, "deprecated": false }, @@ -4739,7 +3583,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 209 + "lineNumber": 210 }, "deprecated": false }, @@ -4755,7 +3599,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 210 + "lineNumber": 211 }, "deprecated": false }, @@ -4771,7 +3615,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 211 + "lineNumber": 212 }, "deprecated": false }, @@ -4787,7 +3631,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 212 + "lineNumber": 213 }, "deprecated": false } @@ -4803,7 +3647,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 215 + "lineNumber": 216 }, "deprecated": false, "children": [ @@ -4826,7 +3670,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 216 + "lineNumber": 217 }, "deprecated": false }, @@ -4842,7 +3686,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 217 + "lineNumber": 218 }, "deprecated": false }, @@ -4858,7 +3702,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 218 + "lineNumber": 219 }, "deprecated": false }, @@ -4874,7 +3718,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 219 + "lineNumber": 220 }, "deprecated": false }, @@ -4890,7 +3734,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 222 + "lineNumber": 223 }, "deprecated": false } @@ -4916,7 +3760,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 75 + "lineNumber": 76 }, "deprecated": false, "children": [ @@ -4938,7 +3782,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 76 + "lineNumber": 77 }, "deprecated": false }, @@ -4951,7 +3795,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 77 + "lineNumber": 78 }, "deprecated": false } @@ -4967,7 +3811,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 168 + "lineNumber": 169 }, "deprecated": false, "children": [ @@ -4983,7 +3827,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 169 + "lineNumber": 170 }, "deprecated": false }, @@ -5039,7 +3883,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 170 + "lineNumber": 171 }, "deprecated": false }, @@ -5055,7 +3899,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 171 + "lineNumber": 172 }, "deprecated": false }, @@ -5079,7 +3923,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 172 + "lineNumber": 173 }, "deprecated": false }, @@ -5101,7 +3945,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 173 + "lineNumber": 174 }, "deprecated": false }, @@ -5117,7 +3961,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 174 + "lineNumber": 175 }, "deprecated": false }, @@ -5133,7 +3977,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 175 + "lineNumber": 176 }, "deprecated": false } @@ -5153,7 +3997,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 33 + "lineNumber": 34 }, "deprecated": false, "initialIsOpen": false @@ -5195,7 +4039,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 51 + "lineNumber": 53 }, "deprecated": false, "initialIsOpen": false @@ -5223,7 +4067,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 119 + "lineNumber": 120 }, "deprecated": false, "initialIsOpen": false @@ -5242,7 +4086,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 41 + "lineNumber": 60 }, "deprecated": false, "initialIsOpen": false @@ -5261,7 +4105,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 40 + "lineNumber": 59 }, "deprecated": false, "initialIsOpen": false @@ -5345,7 +4189,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -5353,7 +4197,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -5369,7 +4213,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -5377,11 +4221,45 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[]" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[]" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 135 + "lineNumber": 149 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.AllReportersFindRequest", + "type": "Type", + "tags": [], + "label": "AllReportersFindRequest", + "description": [], + "signature": [ + "{ owner?: string | string[] | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 313 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.AllTagsFindRequest", + "type": "Type", + "tags": [], + "label": "AllTagsFindRequest", + "description": [], + "signature": [ + "{ owner?: string | string[] | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 312 }, "deprecated": false, "initialIsOpen": false @@ -5427,7 +4305,40 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.AssociationType", + "text": "AssociationType" + }, + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; 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/comment.ts", + "lineNumber": 143 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.AttributesTypeUser", + "type": "Type", + "tags": [], + "label": "AttributesTypeUser", + "description": [], + "signature": [ + "{ comment: string; type: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CommentType", + "text": "CommentType" + }, + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -5435,39 +4346,56 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; 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/comment.ts", - "lineNumber": 130 + "lineNumber": 144 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CASE_ALERTS_URL", + "type": "string", + "tags": [], + "label": "CASE_ALERTS_URL", + "description": [], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 53 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.CASE_ALERTS_URL", + "id": "def-common.CASE_COMMENT_DETAILS_URL", "type": "string", "tags": [], - "label": "CASE_ALERTS_URL", + "label": "CASE_COMMENT_DETAILS_URL", "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 34 + "lineNumber": 46 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.CASE_COMMENT_DETAILS_URL", + "id": "def-common.CASE_COMMENT_SAVED_OBJECT", "type": "string", "tags": [], - "label": "CASE_COMMENT_DETAILS_URL", + "label": "CASE_COMMENT_SAVED_OBJECT", "description": [], + "signature": [ + "\"cases-comments\"" + ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 27 + "lineNumber": 16 }, "deprecated": false, "initialIsOpen": false @@ -5481,7 +4409,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 26 + "lineNumber": 45 }, "deprecated": false, "initialIsOpen": false @@ -5495,7 +4423,38 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 19 + "lineNumber": 38 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CASE_CONFIGURE_DETAILS_URL", + "type": "string", + "tags": [], + "label": "CASE_CONFIGURE_DETAILS_URL", + "description": [], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 37 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CASE_CONFIGURE_SAVED_OBJECT", + "type": "string", + "tags": [], + "label": "CASE_CONFIGURE_SAVED_OBJECT", + "description": [], + "signature": [ + "\"cases-configure\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 17 }, "deprecated": false, "initialIsOpen": false @@ -5509,7 +4468,24 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 18 + "lineNumber": 36 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CASE_CONNECTOR_MAPPINGS_SAVED_OBJECT", + "type": "string", + "tags": [], + "label": "CASE_CONNECTOR_MAPPINGS_SAVED_OBJECT", + "description": [], + "signature": [ + "\"cases-connector-mappings\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 13 }, "deprecated": false, "initialIsOpen": false @@ -5523,7 +4499,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 17 + "lineNumber": 35 }, "deprecated": false, "initialIsOpen": false @@ -5537,7 +4513,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 28 + "lineNumber": 47 }, "deprecated": false, "initialIsOpen": false @@ -5551,7 +4527,24 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 29 + "lineNumber": 48 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CASE_SAVED_OBJECT", + "type": "string", + "tags": [], + "label": "CASE_SAVED_OBJECT", + "description": [], + "signature": [ + "\"cases\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 12 }, "deprecated": false, "initialIsOpen": false @@ -5565,7 +4558,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 30 + "lineNumber": 49 }, "deprecated": false, "initialIsOpen": false @@ -5579,7 +4572,24 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 31 + "lineNumber": 50 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CASE_USER_ACTION_SAVED_OBJECT", + "type": "string", + "tags": [], + "label": "CASE_USER_ACTION_SAVED_OBJECT", + "description": [], + "signature": [ + "\"cases-user-actions\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 15 }, "deprecated": false, "initialIsOpen": false @@ -5593,7 +4603,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 32 + "lineNumber": 51 }, "deprecated": false, "initialIsOpen": false @@ -5662,11 +4672,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }" + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; 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/case.ts", - "lineNumber": 175 + "lineNumber": 288 }, "deprecated": false, "initialIsOpen": false @@ -5757,7 +4767,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 189 + "lineNumber": 303 }, "deprecated": false, "initialIsOpen": false @@ -5826,11 +4836,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; } & { id: string; version: string; }" + ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; owner?: string | undefined; } & { id: string; version: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 187 + "lineNumber": 301 }, "deprecated": false, "initialIsOpen": false @@ -5891,11 +4901,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; }" + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 182 + "lineNumber": 295 }, "deprecated": false, "initialIsOpen": false @@ -5964,7 +4974,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", { "pluginId": "cases", "scope": "common", @@ -5972,7 +4982,7 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -5980,7 +4990,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -5988,7 +4998,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -6004,7 +5014,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6012,7 +5022,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -6020,7 +5030,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6028,7 +5038,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -6044,7 +5054,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6052,11 +5062,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 183 + "lineNumber": 296 }, "deprecated": false, "initialIsOpen": false @@ -6075,7 +5085,24 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 16 + "lineNumber": 34 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesByAlertIDRequest", + "type": "Type", + "tags": [], + "label": "CasesByAlertIDRequest", + "description": [], + "signature": [ + "{ owner?: string | string[] | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 299 }, "deprecated": false, "initialIsOpen": false @@ -6138,11 +5165,68 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; }" + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 181 + "lineNumber": 294 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesConfigurationsResponse", + "type": "Type", + "tags": [], + "label": "CasesConfigurationsResponse", + "description": [], + "signature": [ + "({ connector: ({ id: string; name: string; } & { type: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" + }, + ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" + }, + ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" + }, + ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" + }, + ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "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; })[]" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/configure.ts", + "lineNumber": 84 }, "deprecated": false, "initialIsOpen": false @@ -6195,11 +5279,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; }" + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 47 + "lineNumber": 79 }, "deprecated": false, "initialIsOpen": false @@ -6252,11 +5336,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { 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", - "lineNumber": 50 + "lineNumber": 82 }, "deprecated": false, "initialIsOpen": false @@ -6313,7 +5397,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 49 + "lineNumber": 81 }, "deprecated": false, "initialIsOpen": false @@ -6366,11 +5450,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; }" + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 48 + "lineNumber": 80 }, "deprecated": false, "initialIsOpen": false @@ -6423,11 +5507,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { 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; }[]; } & { version: string; error: string | 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; } & { 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", - "lineNumber": 51 + "lineNumber": 83 }, "deprecated": false, "initialIsOpen": false @@ -6444,7 +5528,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 190 + "lineNumber": 304 }, "deprecated": false, "initialIsOpen": false @@ -6473,11 +5557,11 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - " | undefined; reporters?: string | string[] | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; fields?: string[] | undefined; page?: number | undefined; perPage?: number | undefined; search?: string | undefined; searchFields?: string[] | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; }" + " | undefined; reporters?: string | string[] | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; fields?: string[] | undefined; page?: number | undefined; perPage?: number | undefined; search?: string | undefined; searchFields?: string | string[] | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; owner?: string | string[] | undefined; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 185 + "lineNumber": 298 }, "deprecated": false, "initialIsOpen": false @@ -6546,7 +5630,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", { "pluginId": "cases", "scope": "common", @@ -6554,7 +5638,7 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -6562,7 +5646,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6570,7 +5654,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -6586,7 +5670,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6594,7 +5678,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -6602,7 +5686,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6610,7 +5694,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -6626,7 +5710,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6634,11 +5718,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]; page: number; per_page: number; total: number; } & { count_open_cases: number; count_in_progress_cases: number; count_closed_cases: number; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]; page: number; per_page: number; total: number; } & { count_open_cases: number; count_in_progress_cases: number; count_closed_cases: number; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 186 + "lineNumber": 300 }, "deprecated": false, "initialIsOpen": false @@ -6707,11 +5791,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; } & { id: string; version: string; })[]; }" + ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; owner?: string | undefined; } & { id: string; version: string; })[]; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 188 + "lineNumber": 302 }, "deprecated": false, "initialIsOpen": false @@ -6780,7 +5864,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", { "pluginId": "cases", "scope": "common", @@ -6788,7 +5872,7 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -6796,7 +5880,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6804,7 +5888,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -6820,7 +5904,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6828,7 +5912,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -6836,7 +5920,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6844,7 +5928,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -6860,7 +5944,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6868,11 +5952,28 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 184 + "lineNumber": 297 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesStatusRequest", + "type": "Type", + "tags": [], + "label": "CasesStatusRequest", + "description": [], + "signature": [ + "{ owner?: string | string[] | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/status.ts", + "lineNumber": 39 }, "deprecated": false, "initialIsOpen": false @@ -6889,7 +5990,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/status.ts", - "lineNumber": 30 + "lineNumber": 38 }, "deprecated": false, "initialIsOpen": false @@ -6969,11 +6070,28 @@ "label": "CaseUserActionAttributes", "description": [], "signature": [ - "{ action_field: (\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; }" + "{ action_field: (\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 59 + "lineNumber": 62 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CaseUserActionResponse", + "type": "Type", + "tags": [], + "label": "CaseUserActionResponse", + "description": [], + "signature": [ + "{ action_field: (\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; owner: string; } & { action_id: string; case_id: string; comment_id: string | null; } & { sub_case_id?: string | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", + "lineNumber": 64 }, "deprecated": false, "initialIsOpen": false @@ -6986,11 +6104,11 @@ "label": "CaseUserActionsResponse", "description": [], "signature": [ - "({ action_field: (\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; } & { action_id: string; case_id: string; comment_id: string | null; } & { sub_case_id?: string | undefined; })[]" + "({ action_field: (\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; owner: string; } & { action_id: string; case_id: string; comment_id: string | null; } & { sub_case_id?: string | undefined; })[]" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 60 + "lineNumber": 63 }, "deprecated": false, "initialIsOpen": false @@ -7007,7 +6125,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 46 + "lineNumber": 78 }, "deprecated": false, "initialIsOpen": false @@ -7028,7 +6146,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7068,7 +6186,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7117,7 +6235,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7125,7 +6243,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -7141,7 +6259,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7149,11 +6267,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; })" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; 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/comment.ts", - "lineNumber": 131 + "lineNumber": 145 }, "deprecated": false, "initialIsOpen": false @@ -7174,7 +6292,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - " | undefined; created_at?: string | undefined; created_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | undefined; pushed_at?: string | null | undefined; pushed_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; updated_at?: string | null | undefined; updated_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; } | ({ type?: ", + " | undefined; created_at?: string | undefined; created_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | undefined; owner?: string | undefined; pushed_at?: string | null | undefined; pushed_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; updated_at?: string | null | undefined; updated_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; } | ({ type?: ", { "pluginId": "cases", "scope": "common", @@ -7190,7 +6308,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert | undefined; alertId?: string | string[] | undefined; index?: string | string[] | undefined; rule?: { id: string | null; name: string | null; } | undefined; } & { associationType?: ", + ".generatedAlert | undefined; alertId?: string | string[] | undefined; index?: string | string[] | undefined; rule?: { id: string | null; name: string | null; } | undefined; owner?: string | undefined; } & { associationType?: ", { "pluginId": "cases", "scope": "common", @@ -7198,11 +6316,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - " | undefined; created_at?: string | undefined; created_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | undefined; pushed_at?: string | null | undefined; pushed_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; updated_at?: string | null | undefined; updated_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; })" + " | undefined; created_at?: string | undefined; created_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | undefined; owner?: string | undefined; pushed_at?: string | null | undefined; pushed_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; updated_at?: string | null | undefined; updated_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; })" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 138 + "lineNumber": 152 }, "deprecated": false, "initialIsOpen": false @@ -7223,7 +6341,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { id: string; version: string; }) | ({ type: ", + ".user; owner: string; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -7239,11 +6357,11 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { id: string; version: string; })" + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { id: string; version: string; })" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 137 + "lineNumber": 151 }, "deprecated": false, "initialIsOpen": false @@ -7264,7 +6382,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } | { type: ", + ".user; owner: string; } | { type: ", { "pluginId": "cases", "scope": "common", @@ -7280,11 +6398,11 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; }" + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 132 + "lineNumber": 146 }, "deprecated": false, "initialIsOpen": false @@ -7313,11 +6431,11 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; }" + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 140 + "lineNumber": 154 }, "deprecated": false, "initialIsOpen": false @@ -7338,11 +6456,11 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; }" + ".user; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 139 + "lineNumber": 153 }, "deprecated": false, "initialIsOpen": false @@ -7363,7 +6481,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7371,7 +6489,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -7387,7 +6505,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7395,11 +6513,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; })" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; })" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 133 + "lineNumber": 147 }, "deprecated": false, "initialIsOpen": false @@ -7428,7 +6546,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7436,11 +6554,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 134 + "lineNumber": 148 }, "deprecated": false, "initialIsOpen": false @@ -7461,7 +6579,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7469,7 +6587,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -7485,7 +6603,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7493,11 +6611,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[]; page: number; per_page: number; total: number; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[]; page: number; per_page: number; total: number; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 136 + "lineNumber": 150 }, "deprecated": false, "initialIsOpen": false @@ -7514,7 +6632,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/connectors/mappings.ts", - "lineNumber": 48 + "lineNumber": 49 }, "deprecated": false, "initialIsOpen": false @@ -7569,11 +6687,11 @@ "label": "ConnectorMappings", "description": [], "signature": [ - "{ mappings: { action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]; }" + "{ mappings: { action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/connectors/mappings.ts", - "lineNumber": 37 + "lineNumber": 38 }, "deprecated": false, "initialIsOpen": false @@ -7590,7 +6708,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/connectors/mappings.ts", - "lineNumber": 36 + "lineNumber": 37 }, "deprecated": false, "initialIsOpen": false @@ -7775,7 +6893,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 63 + "lineNumber": 90 }, "deprecated": false, "initialIsOpen": false @@ -7844,7 +6962,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }, \"type\" | \"status\" | \"description\" | \"title\" | \"updated_at\" | \"tags\" | \"settings\" | \"created_at\" | \"created_by\" | \"updated_by\" | \"closed_at\" | \"closed_by\" | \"external_service\"> & { connector: ", + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }, \"type\" | \"status\" | \"description\" | \"title\" | \"updated_at\" | \"tags\" | \"settings\" | \"owner\" | \"created_at\" | \"created_by\" | \"updated_by\" | \"closed_at\" | \"closed_by\" | \"external_service\"> & { connector: ", { "pluginId": "cases", "scope": "common", @@ -7856,7 +6974,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 193 + "lineNumber": 307 }, "deprecated": false, "initialIsOpen": false @@ -7948,7 +7066,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; } & { id: string; version: string; }, \"type\" | \"status\" | \"description\" | \"title\" | \"id\" | \"version\" | \"tags\" | \"settings\"> & { connector?: ", + ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; owner?: string | undefined; } & { id: string; version: string; }, \"type\" | \"status\" | \"description\" | \"title\" | \"id\" | \"version\" | \"tags\" | \"settings\" | \"owner\"> & { connector?: ", { "pluginId": "cases", "scope": "common", @@ -7960,7 +7078,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 194 + "lineNumber": 308 }, "deprecated": false, "initialIsOpen": false @@ -8013,7 +7131,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { 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\" | \"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", @@ -8024,59 +7142,93 @@ "; }" ], "source": { - "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 53 + "path": "x-pack/plugins/cases/common/api/cases/configure.ts", + "lineNumber": 86 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.ESConnectorFields", + "type": "Type", + "tags": [], + "label": "ESConnectorFields", + "description": [], + "signature": [ + "{ key: string; value: unknown; }[]" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/connectors/index.ts", + "lineNumber": 94 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.ExternalServiceResponse", + "type": "Type", + "tags": [], + "label": "ExternalServiceResponse", + "description": [], + "signature": [ + "{ title: string; id: string; pushedDate: string; url: string; } & { comments?: ({ commentId: string; pushedDate: string; } & { externalCommentId?: string | undefined; })[] | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 305 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.ESConnectorFields", + "id": "def-common.FindQueryParams", "type": "Type", "tags": [], - "label": "ESConnectorFields", + "label": "FindQueryParams", "description": [], "signature": [ - "{ key: string; value: unknown; }[]" + "{ subCaseId?: string | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; hasReferenceOperator?: \"AND\" | \"OR\" | undefined; hasReference?: { id: string; type: string; } | { id: string; type: string; }[] | undefined; fields?: string[] | undefined; filter?: string | undefined; page?: number | undefined; perPage?: number | undefined; search?: string | undefined; searchFields?: string[] | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; }" ], "source": { - "path": "x-pack/plugins/cases/common/api/connectors/index.ts", - "lineNumber": 94 + "path": "x-pack/plugins/cases/common/api/cases/comment.ts", + "lineNumber": 142 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.ExternalServiceResponse", + "id": "def-common.GetCaseIdsByAlertIdAggs", "type": "Type", "tags": [], - "label": "ExternalServiceResponse", + "label": "GetCaseIdsByAlertIdAggs", "description": [], "signature": [ - "{ title: string; id: string; pushedDate: string; url: string; } & { comments?: ({ commentId: string; pushedDate: string; } & { externalCommentId?: string | undefined; })[] | undefined; }" + "{ references: { doc_count: number; caseIds: { buckets: { key: string; }[]; }; }; }" ], "source": { - "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 191 + "path": "x-pack/plugins/cases/common/api/cases/comment.ts", + "lineNumber": 155 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.GetCaseIdsByAlertIdAggs", + "id": "def-common.GetConfigureFindRequest", "type": "Type", "tags": [], - "label": "GetCaseIdsByAlertIdAggs", + "label": "GetConfigureFindRequest", "description": [], "signature": [ - "{ references: { doc_count: number; caseIds: { buckets: { key: string; }[]; }; }; }" + "{ owner?: string | string[] | undefined; }" ], "source": { - "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 141 + "path": "x-pack/plugins/cases/common/api/cases/configure.ts", + "lineNumber": 90 }, "deprecated": false, "initialIsOpen": false @@ -8093,7 +7245,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/connectors/mappings.ts", - "lineNumber": 55 + "lineNumber": 56 }, "deprecated": false, "initialIsOpen": false @@ -8110,7 +7262,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 44 + "lineNumber": 63 }, "deprecated": false, "initialIsOpen": false @@ -8146,7 +7298,41 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 57 + "lineNumber": 76 + }, + "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 @@ -8163,7 +7349,26 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 58 + "lineNumber": 77 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.OWNER_FIELD", + "type": "string", + "tags": [], + "label": "OWNER_FIELD", + "description": [ + "\nThis field is used for authorization of the entities within the cases plugin. Each entity within Cases will have the owner field\nset to a string that represents the plugin that \"owns\" (i.e. the plugin that originally issued the POST request to\ncreate the entity) the entity.\n\nThe Authorization class constructs a string composed of the operation being performed (createCase, getComment, etc),\nand the owner of the entity being acted upon or created. This string is then given to the Security plugin which\nchecks to see if the user making the request has that particular string stored within it's privileges. If it does,\nthen the operation succeeds, otherwise the operation fails.\n\nAPIs that create/update an entity require that the owner field be passed in the body of the request.\nAPIs that search for entities typically require that the owner be passed as a query parameter.\nAPIs that specify an ID of an entity directly generally don't need to specify the owner field.\n\nFor APIs that create/update an entity, the RBAC implementation checks to see if the user making the request has the\ncorrect privileges for performing that action (a create/update) for the specified owner.\nThis check is done through the Security plugin's API.\n\nFor APIs that search for entities, the RBAC implementation creates a filter for the saved objects query that limits\nthe search to only owners that the user has access to. We also check that the objects returned by the saved objects\nAPI have the limited owner scope. If we find one that the user does not have permissions for, we throw a 403 error.\nThe owner field that is passed in as a query parameter can be used to further limit the results. If a user attempts\nto pass an owner that they do not have access to, the owner is ignored.\n\nFor APIs that retrieve/delete entities directly using their ID, the RBAC implementation requests the object first,\nand then checks to see if the user making the request has access to that operation and owner. If the user does, the\noperation continues, otherwise we throw a 403." + ], + "signature": [ + "\"owner\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/constants.ts", + "lineNumber": 36 }, "deprecated": false, "initialIsOpen": false @@ -8180,7 +7385,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 45 + "lineNumber": 64 }, "deprecated": false, "initialIsOpen": false @@ -8202,6 +7407,25 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "cases", + "id": "def-common.SAVED_OBJECT_TYPES", + "type": "Array", + "tags": [], + "label": "SAVED_OBJECT_TYPES", + "description": [ + "\nIf more values are added here please also add them here: x-pack/test/case_api_integration/common/fixtures/plugins" + ], + "signature": [ + "string[]" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 22 + }, + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "cases", "id": "def-common.SavedObjectFindOptions", @@ -8214,7 +7438,26 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/saved_object.ts", - "lineNumber": 39 + "lineNumber": 72 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.SECURITY_SOLUTION_OWNER", + "type": "string", + "tags": [], + "label": "SECURITY_SOLUTION_OWNER", + "description": [ + "\nThis must be the same value that the security solution plugin uses to define the case kind when it registers the\nfeature for the 7.13 migration only.\n\nThis variable is being also used by test files and mocks." + ], + "signature": [ + "\"securitySolution\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 85 }, "deprecated": false, "initialIsOpen": false @@ -8231,7 +7474,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 42 + "lineNumber": 61 }, "deprecated": false, "initialIsOpen": false @@ -8248,7 +7491,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 43 + "lineNumber": 62 }, "deprecated": false, "initialIsOpen": false @@ -8330,7 +7573,24 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 23 + "lineNumber": 42 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.SUB_CASE_SAVED_OBJECT", + "type": "string", + "tags": [], + "label": "SUB_CASE_SAVED_OBJECT", + "description": [], + "signature": [ + "\"cases-sub-case\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 14 }, "deprecated": false, "initialIsOpen": false @@ -8344,7 +7604,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 24 + "lineNumber": 43 }, "deprecated": false, "initialIsOpen": false @@ -8358,7 +7618,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 21 + "lineNumber": 40 }, "deprecated": false, "initialIsOpen": false @@ -8372,7 +7632,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 22 + "lineNumber": 41 }, "deprecated": false, "initialIsOpen": false @@ -8393,11 +7653,11 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }" + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 75 + "lineNumber": 107 }, "deprecated": false, "initialIsOpen": false @@ -8422,7 +7682,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 79 + "lineNumber": 111 }, "deprecated": false, "initialIsOpen": false @@ -8443,7 +7703,7 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -8451,7 +7711,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -8459,7 +7719,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -8475,7 +7735,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -8483,11 +7743,36 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 76 + "lineNumber": 108 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.SubCasesFindRequest", + "type": "Type", + "tags": [], + "label": "SubCasesFindRequest", + "description": [], + "signature": [ + "{ status?: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CaseStatuses", + "text": "CaseStatuses" + }, + " | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; fields?: string[] | undefined; page?: number | undefined; perPage?: number | undefined; search?: string | undefined; searchFields?: string[] | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; owner?: string | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", + "lineNumber": 113 }, "deprecated": false, "initialIsOpen": false @@ -8508,7 +7793,7 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -8516,7 +7801,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -8524,7 +7809,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -8540,7 +7825,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -8548,11 +7833,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]; page: number; per_page: number; total: number; } & { count_open_cases: number; count_in_progress_cases: number; count_closed_cases: number; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]; page: number; per_page: number; total: number; } & { count_open_cases: number; count_in_progress_cases: number; count_closed_cases: number; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 78 + "lineNumber": 110 }, "deprecated": false, "initialIsOpen": false @@ -8577,7 +7862,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 80 + "lineNumber": 112 }, "deprecated": false, "initialIsOpen": false @@ -8598,7 +7883,7 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -8606,7 +7891,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -8614,7 +7899,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -8630,7 +7915,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -8638,11 +7923,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 77 + "lineNumber": 109 }, "deprecated": false, "initialIsOpen": false @@ -8659,7 +7944,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 47 + "lineNumber": 66 }, "deprecated": false, "initialIsOpen": false @@ -8693,7 +7978,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 163 + "lineNumber": 164 }, "deprecated": false, "initialIsOpen": false @@ -8727,7 +8012,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 62 + "lineNumber": 66 }, "deprecated": false, "initialIsOpen": false @@ -8740,11 +8025,11 @@ "label": "UserActionField", "description": [], "signature": [ - "(\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"connector\" | \"pushed\" | \"sub_case\")[]" + "(\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 63 + "lineNumber": 67 }, "deprecated": false, "initialIsOpen": false @@ -8757,11 +8042,11 @@ "label": "UserActionFieldType", "description": [], "signature": [ - "\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"connector\" | \"pushed\" | \"sub_case\"" + "\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\"" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 64 + "lineNumber": 68 }, "deprecated": false, "initialIsOpen": false @@ -8822,30 +8107,388 @@ "<{ id: ", "UnionC", "<[", - "StringC", + "StringC", + ", ", + "NullC", + "]>; name: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>; owner: ", + "StringC", + "; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/comment.ts", + "lineNumber": 70 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.AllCommentsResponseRt", + "type": "Object", + "tags": [], + "label": "AllCommentsResponseRt", + "description": [], + "signature": [ + "ArrayC", + "<", + "IntersectionC", + "<[", + "UnionC", + "<[", + "IntersectionC", + "<[", + "TypeC", + "<{ comment: ", + "StringC", + "; type: ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CommentType", + "text": "CommentType" + }, + ".user>; owner: ", + "StringC", + "; }>, ", + "TypeC", + "<{ associationType: ", + "UnionC", + "<[", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.AssociationType", + "text": "AssociationType" + }, + ".case>, ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.AssociationType", + "text": "AssociationType" + }, + ".subCase>]>; created_at: ", + "StringC", + "; created_by: ", + "TypeC", + "<{ email: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; full_name: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; username: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; pushed_by: ", + "UnionC", + "<[", + "TypeC", + "<{ email: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; full_name: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; username: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; }>, ", + "NullC", + "]>; updated_at: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; updated_by: ", + "UnionC", + "<[", + "TypeC", + "<{ email: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; full_name: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; username: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; }>, ", + "NullC", + "]>; }>]>, ", + "IntersectionC", + "<[", + "TypeC", + "<{ type: ", + "UnionC", + "<[", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CommentType", + "text": "CommentType" + }, + ".generatedAlert>, ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CommentType", + "text": "CommentType" + }, + ".alert>]>; alertId: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; index: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; rule: ", + "TypeC", + "<{ id: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; name: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>; owner: ", + "StringC", + "; }>, ", + "TypeC", + "<{ associationType: ", + "UnionC", + "<[", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.AssociationType", + "text": "AssociationType" + }, + ".case>, ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.AssociationType", + "text": "AssociationType" + }, + ".subCase>]>; created_at: ", + "StringC", + "; created_by: ", + "TypeC", + "<{ email: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; full_name: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; username: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; pushed_by: ", + "UnionC", + "<[", + "TypeC", + "<{ email: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; full_name: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; username: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; }>, ", + "NullC", + "]>; updated_at: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; updated_by: ", + "UnionC", + "<[", + "TypeC", + "<{ email: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; full_name: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; username: ", + "UnionC", + "<[", + "UndefinedC", ", ", "NullC", - "]>; name: ", - "UnionC", - "<[", - "StringC", ", ", + "StringC", + "]>; }>, ", "NullC", - "]>; }>; }>" + "]>; }>]>]>, ", + "TypeC", + "<{ id: ", + "StringC", + "; version: ", + "StringC", + "; }>]>>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 67 + "lineNumber": 132 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.AllCommentsResponseRt", + "id": "def-common.AllCommentsResponseRT", "type": "Object", "tags": [], - "label": "AllCommentsResponseRt", + "label": "AllCommentsResponseRT", "description": [], "signature": [ "ArrayC", @@ -8869,7 +8512,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -8921,7 +8566,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -9049,7 +8696,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -9101,7 +8750,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -9183,135 +8834,351 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 128 + "lineNumber": 103 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.AllCommentsResponseRT", + "id": "def-common.AllReportersFindRequestRt", "type": "Object", "tags": [], - "label": "AllCommentsResponseRT", + "label": "AllReportersFindRequestRt", + "description": [], + "signature": [ + "PartialC", + "<{ owner: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 286 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.AllTagsFindRequestRt", + "type": "Object", + "tags": [], + "label": "AllTagsFindRequestRt", "description": [], "signature": [ + "PartialC", + "<{ owner: ", + "UnionC", + "<[", "ArrayC", "<", + "StringC", + ">, ", + "StringC", + "]>; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 278 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CaseAttributesRt", + "type": "Object", + "tags": [], + "label": "CaseAttributesRt", + "description": [], + "signature": [ "IntersectionC", "<[", + "TypeC", + "<{ description: ", + "StringC", + "; status: ", + "UnionC", + "<[", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CaseStatuses", + "text": "CaseStatuses" + }, + ".open>, ", + "LiteralC", + ", ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CaseStatuses", + "text": "CaseStatuses" + }, + ".closed>]>; tags: ", + "ArrayC", + "<", + "StringC", + ">; title: ", + "StringC", + "; type: ", "UnionC", "<[", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CaseType", + "text": "CaseType" + }, + ".collection>, ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CaseType", + "text": "CaseType" + }, + ".individual>]>; connector: ", "IntersectionC", "<[", "TypeC", - "<{ comment: ", + "<{ id: ", "StringC", - "; type: ", + "; name: ", + "StringC", + "; }>, ", + "UnionC", + "<[", + "TypeC", + "<{ type: ", "LiteralC", "<", { "pluginId": "cases", "scope": "common", "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" }, - ".user>; }>, ", + ".jira>; fields: ", + "UnionC", + "<[", "TypeC", - "<{ associationType: ", + "<{ issueType: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; priority: ", "UnionC", "<[", + "StringC", + ", ", + "NullC", + "]>; parent: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>, ", + "NullC", + "]>; }>, ", + "TypeC", + "<{ type: ", "LiteralC", "<", { "pluginId": "cases", "scope": "common", "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" }, - ".case>, ", + ".resilient>; fields: ", + "UnionC", + "<[", + "TypeC", + "<{ incidentTypes: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "NullC", + "]>; severityCode: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>, ", + "NullC", + "]>; }>, ", + "TypeC", + "<{ type: ", "LiteralC", "<", { "pluginId": "cases", "scope": "common", "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" }, - ".subCase>]>; created_at: ", + ".serviceNowITSM>; fields: ", + "UnionC", + "<[", + "TypeC", + "<{ impact: ", + "UnionC", + "<[", "StringC", - "; created_by: ", + ", ", + "NullC", + "]>; severity: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; urgency: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; category: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; subcategory: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>, ", + "NullC", + "]>; }>, ", + "TypeC", + "<{ type: ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" + }, + ".serviceNowSIR>; fields: ", + "UnionC", + "<[", "TypeC", - "<{ email: ", + "<{ category: ", "UnionC", "<[", - "UndefinedC", + "StringC", ", ", "NullC", - ", ", - "StringC", - "]>; full_name: ", + "]>; destIp: ", "UnionC", "<[", - "UndefinedC", + "BooleanC", ", ", "NullC", - ", ", - "StringC", - "]>; username: ", + "]>; malwareHash: ", "UnionC", "<[", - "UndefinedC", + "BooleanC", ", ", "NullC", - ", ", - "StringC", - "]>; }>; pushed_at: ", + "]>; malwareUrl: ", "UnionC", "<[", - "StringC", + "BooleanC", ", ", "NullC", - "]>; pushed_by: ", - "UnionC", - "<[", - "TypeC", - "<{ email: ", + "]>; priority: ", "UnionC", "<[", - "UndefinedC", + "StringC", ", ", "NullC", - ", ", - "StringC", - "]>; full_name: ", + "]>; sourceIp: ", "UnionC", "<[", - "UndefinedC", + "BooleanC", ", ", "NullC", - ", ", - "StringC", - "]>; username: ", + "]>; subcategory: ", "UnionC", "<[", - "UndefinedC", + "StringC", ", ", "NullC", - ", ", - "StringC", "]>; }>, ", "NullC", - "]>; updated_at: ", + "]>; }>, ", + "TypeC", + "<{ type: ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" + }, + ".none>; fields: ", + "NullC", + "; }>]>]>; settings: ", + "TypeC", + "<{ syncAlerts: ", + "BooleanC", + "; }>; owner: ", + "StringC", + "; }>, ", + "TypeC", + "<{ closed_at: ", "UnionC", "<[", "StringC", ", ", "NullC", - "]>; updated_by: ", + "]>; closed_by: ", "UnionC", "<[", "TypeC", @@ -9341,87 +9208,7 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", - "IntersectionC", - "<[", - "TypeC", - "<{ type: ", - "UnionC", - "<[", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".generatedAlert>, ", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".alert>]>; alertId: ", - "UnionC", - "<[", - "ArrayC", - "<", - "StringC", - ">, ", - "StringC", - "]>; index: ", - "UnionC", - "<[", - "ArrayC", - "<", - "StringC", - ">, ", - "StringC", - "]>; rule: ", - "TypeC", - "<{ id: ", - "UnionC", - "<[", - "StringC", - ", ", - "NullC", - "]>; name: ", - "UnionC", - "<[", - "StringC", - ", ", - "NullC", - "]>; }>; }>, ", - "TypeC", - "<{ associationType: ", - "UnionC", - "<[", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - ".case>, ", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - ".subCase>]>; created_at: ", + "]>; created_at: ", "StringC", "; created_by: ", "TypeC", @@ -9449,16 +9236,28 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; external_service: ", "UnionC", "<[", - "StringC", - ", ", - "NullC", - "]>; pushed_by: ", - "UnionC", + "IntersectionC", "<[", "TypeC", + "<{ connector_id: ", + "StringC", + "; connector_name: ", + "StringC", + "; external_id: ", + "StringC", + "; external_title: ", + "StringC", + "; external_url: ", + "StringC", + "; }>, ", + "TypeC", + "<{ pushed_at: ", + "StringC", + "; pushed_by: ", + "TypeC", "<{ email: ", "UnionC", "<[", @@ -9483,7 +9282,7 @@ "NullC", ", ", "StringC", - "]>; }>, ", + "]>; }>; }>]>, ", "NullC", "]>; updated_at: ", "UnionC", @@ -9521,95 +9320,33 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>]>, ", - "TypeC", - "<{ id: ", - "StringC", - "; version: ", - "StringC", - "; }>]>>" + "]>; }>]>" ], - "source": { - "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 99 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "cases", - "id": "def-common.CaseAttributesRt", - "type": "Object", - "tags": [], - "label": "CaseAttributesRt", - "description": [], - "signature": [ - "IntersectionC", - "<[", - "TypeC", - "<{ description: ", - "StringC", - "; status: ", - "UnionC", - "<[", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - ".open>, ", - "LiteralC", - ", ", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - ".closed>]>; tags: ", - "ArrayC", - "<", - "StringC", - ">; title: ", - "StringC", - "; type: ", - "UnionC", - "<[", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - ".collection>, ", - "LiteralC", + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 87 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CaseConfigurationsResponseRt", + "type": "Object", + "tags": [], + "label": "CaseConfigurationsResponseRt", + "description": [], + "signature": [ + "ArrayC", "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - ".individual>]>; connector: ", + "IntersectionC", + "<[", + "IntersectionC", + "<[", + "IntersectionC", + "<[", + "TypeC", + "<{ connector: ", "IntersectionC", "<[", "TypeC", @@ -9809,21 +9546,21 @@ }, ".none>; fields: ", "NullC", - "; }>]>]>; settings: ", - "TypeC", - "<{ syncAlerts: ", - "BooleanC", - "; }>; }>, ", - "TypeC", - "<{ closed_at: ", + "; }>]>]>; closure_type: ", "UnionC", "<[", + "LiteralC", + "<\"close-by-user\">, ", + "LiteralC", + "<\"close-by-pushing\">]>; }>, ", + "TypeC", + "<{ owner: ", "StringC", - ", ", - "NullC", - "]>; closed_by: ", - "UnionC", - "<[", + "; }>]>, ", + "TypeC", + "<{ created_at: ", + "StringC", + "; created_by: ", "TypeC", "<{ email: ", "UnionC", @@ -9849,57 +9586,15 @@ "NullC", ", ", "StringC", - "]>; }>, ", - "NullC", - "]>; created_at: ", - "StringC", - "; created_by: ", - "TypeC", - "<{ email: ", - "UnionC", - "<[", - "UndefinedC", - ", ", - "NullC", - ", ", - "StringC", - "]>; full_name: ", + "]>; }>; updated_at: ", "UnionC", "<[", - "UndefinedC", - ", ", - "NullC", - ", ", "StringC", - "]>; username: ", - "UnionC", - "<[", - "UndefinedC", ", ", "NullC", - ", ", - "StringC", - "]>; }>; external_service: ", + "]>; updated_by: ", "UnionC", "<[", - "IntersectionC", - "<[", - "TypeC", - "<{ connector_id: ", - "StringC", - "; connector_name: ", - "StringC", - "; external_id: ", - "StringC", - "; external_title: ", - "StringC", - "; external_url: ", - "StringC", - "; }>, ", - "TypeC", - "<{ pushed_at: ", - "StringC", - "; pushed_by: ", "TypeC", "<{ email: ", "UnionC", @@ -9925,49 +9620,57 @@ "NullC", ", ", "StringC", - "]>; }>; }>]>, ", + "]>; }>, ", "NullC", - "]>; updated_at: ", + "]>; }>]>, ", + "TypeC", + "<{ mappings: ", + "ArrayC", + "<", + "TypeC", + "<{ action_type: ", "UnionC", "<[", - "StringC", - ", ", - "NullC", - "]>; updated_by: ", + "LiteralC", + "<\"append\">, ", + "LiteralC", + "<\"nothing\">, ", + "LiteralC", + "<\"overwrite\">]>; source: ", "UnionC", "<[", - "TypeC", - "<{ email: ", + "LiteralC", + "<\"title\">, ", + "LiteralC", + "<\"description\">, ", + "LiteralC", + "<\"comments\">]>; target: ", "UnionC", "<[", - "UndefinedC", - ", ", - "NullC", - ", ", "StringC", - "]>; full_name: ", - "UnionC", - "<[", - "UndefinedC", - ", ", - "NullC", ", ", + "LiteralC", + "<\"not_mapped\">]>; }>>; owner: ", "StringC", - "]>; username: ", + "; }>, ", + "TypeC", + "<{ id: ", + "StringC", + "; version: ", + "StringC", + "; error: ", "UnionC", "<[", - "UndefinedC", + "StringC", ", ", "NullC", - ", ", + "]>; owner: ", "StringC", - "]>; }>, ", - "NullC", - "]>; }>]>" + "; }>]>>" ], "source": { - "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 62 + "path": "x-pack/plugins/cases/common/api/cases/configure.ts", + "lineNumber": 76 }, "deprecated": false, "initialIsOpen": false @@ -9980,6 +9683,8 @@ "label": "CaseConfigureAttributesRt", "description": [], "signature": [ + "IntersectionC", + "<[", "IntersectionC", "<[", "TypeC", @@ -10191,6 +9896,10 @@ "LiteralC", "<\"close-by-pushing\">]>; }>, ", "TypeC", + "<{ owner: ", + "StringC", + "; }>]>, ", + "TypeC", "<{ created_at: ", "StringC", "; created_by: ", @@ -10259,7 +9968,27 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 27 + "lineNumber": 43 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CaseConfigureRequestParamsRt", + "type": "Object", + "tags": [], + "label": "CaseConfigureRequestParamsRt", + "description": [], + "signature": [ + "TypeC", + "<{ configuration_id: ", + "StringC", + "; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/configure.ts", + "lineNumber": 72 }, "deprecated": false, "initialIsOpen": false @@ -10276,6 +10005,8 @@ "<[", "IntersectionC", "<[", + "IntersectionC", + "<[", "TypeC", "<{ connector: ", "IntersectionC", @@ -10485,6 +10216,10 @@ "LiteralC", "<\"close-by-pushing\">]>; }>, ", "TypeC", + "<{ owner: ", + "StringC", + "; }>]>, ", + "TypeC", "<{ created_at: ", "StringC", "; created_by: ", @@ -10577,9 +10312,13 @@ "StringC", ", ", "LiteralC", - "<\"not_mapped\">]>; }>>; }>, ", + "<\"not_mapped\">]>; }>>; owner: ", + "StringC", + "; }>, ", "TypeC", - "<{ version: ", + "<{ id: ", + "StringC", + "; version: ", "StringC", "; error: ", "UnionC", @@ -10587,11 +10326,13 @@ "StringC", ", ", "NullC", - "]>; }>]>" + "]>; owner: ", + "StringC", + "; }>]>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 37 + "lineNumber": 53 }, "deprecated": false, "initialIsOpen": false @@ -11089,7 +10830,9 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>, ", + "; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ id: ", "StringC", @@ -11099,7 +10842,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 142 + "lineNumber": 242 }, "deprecated": false, "initialIsOpen": false @@ -11353,11 +11096,13 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>]>" + "; }>; owner: ", + "StringC", + "; }>]>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 97 + "lineNumber": 142 }, "deprecated": false, "initialIsOpen": false @@ -11379,7 +11124,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 150 + "lineNumber": 253 }, "deprecated": false, "initialIsOpen": false @@ -11663,7 +11408,9 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>, ", + "; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ closed_at: ", "UnionC", @@ -11975,7 +11722,9 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", + "]>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -12009,7 +11758,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -12061,7 +11812,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -12189,7 +11942,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -12241,7 +11996,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -12341,7 +12098,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -12393,7 +12152,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -12521,7 +12282,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -12573,7 +12336,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -12655,7 +12420,33 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 117 + "lineNumber": 217 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesByAlertIDRequestRt", + "type": "Object", + "tags": [], + "label": "CasesByAlertIDRequestRt", + "description": [], + "signature": [ + "PartialC", + "<{ owner: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 209 }, "deprecated": false, "initialIsOpen": false @@ -12905,11 +12696,13 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>" + "; }>; owner: ", + "StringC", + "; }>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 86 + "lineNumber": 131 }, "deprecated": false, "initialIsOpen": false @@ -13139,7 +12932,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 22 + "lineNumber": 38 }, "deprecated": false, "initialIsOpen": false @@ -13152,6 +12945,8 @@ "label": "CasesConfigureRequestRt", "description": [], "signature": [ + "IntersectionC", + "<[", "TypeC", "<{ connector: ", "IntersectionC", @@ -13359,11 +13154,15 @@ "LiteralC", "<\"close-by-user\">, ", "LiteralC", - "<\"close-by-pushing\">]>; }>" + "<\"close-by-pushing\">]>; }>, ", + "TypeC", + "<{ owner: ", + "StringC", + "; }>]>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 21 + "lineNumber": 37 }, "deprecated": false, "initialIsOpen": false @@ -13464,10 +13263,14 @@ "; search: ", "StringC", "; searchFields: ", + "UnionC", + "<[", "ArrayC", "<", "StringC", - ">; sortField: ", + ">, ", + "StringC", + "]>; sortField: ", "StringC", "; sortOrder: ", "UnionC", @@ -13475,11 +13278,19 @@ "LiteralC", "<\"desc\">, ", "LiteralC", - "<\"asc\">]>; }>" + "<\"asc\">]>; owner: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; }>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 102 + "lineNumber": 150 }, "deprecated": false, "initialIsOpen": false @@ -13769,7 +13580,9 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>, ", + "; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ closed_at: ", "UnionC", @@ -14081,7 +13894,9 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", + "]>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -14115,7 +13930,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -14167,7 +13984,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -14295,7 +14114,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -14347,7 +14168,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -14447,7 +14270,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -14499,7 +14324,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -14627,7 +14454,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -14679,7 +14508,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -14775,7 +14606,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 132 + "lineNumber": 232 }, "deprecated": false, "initialIsOpen": false @@ -15061,7 +14892,9 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>, ", + "; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ id: ", "StringC", @@ -15071,7 +14904,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 147 + "lineNumber": 250 }, "deprecated": false, "initialIsOpen": false @@ -15357,7 +15190,9 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>, ", + "; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ closed_at: ", "UnionC", @@ -15669,7 +15504,9 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", + "]>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -15703,7 +15540,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -15755,7 +15594,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -15883,7 +15724,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -15935,7 +15778,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -16035,7 +15880,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -16087,7 +15934,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -16215,7 +16064,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -16267,7 +16118,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -16349,7 +16202,33 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 148 + "lineNumber": 251 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesStatusRequestRt", + "type": "Object", + "tags": [], + "label": "CasesStatusRequestRt", + "description": [], + "signature": [ + "PartialC", + "<{ owner: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/status.ts", + "lineNumber": 30 }, "deprecated": false, "initialIsOpen": false @@ -16457,7 +16336,9 @@ "LiteralC", "<\"settings\">, ", "LiteralC", - "<\"sub_case\">]>>; action: ", + "<\"sub_case\">, ", + "LiteralC", + "<\"owner\">]>>; action: ", "UnionC", "<[", "LiteralC", @@ -16509,11 +16390,13 @@ "StringC", ", ", "NullC", - "]>; }>" + "]>; owner: ", + "StringC", + "; }>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 55 + "lineNumber": 58 }, "deprecated": false, "initialIsOpen": false @@ -16553,7 +16436,9 @@ "LiteralC", "<\"settings\">, ", "LiteralC", - "<\"sub_case\">]>>; action: ", + "<\"sub_case\">, ", + "LiteralC", + "<\"owner\">]>>; action: ", "UnionC", "<[", "LiteralC", @@ -16605,7 +16490,9 @@ "StringC", ", ", "NullC", - "]>; }>, ", + "]>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ action_id: ", "StringC", @@ -16625,7 +16512,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 57 + "lineNumber": 60 }, "deprecated": false, "initialIsOpen": false @@ -16689,7 +16576,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -16765,7 +16654,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 38 + "lineNumber": 39 }, "deprecated": false, "initialIsOpen": false @@ -16835,7 +16724,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -16961,7 +16852,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>]>, ", + "]>; }>; owner: ", + "StringC", + "; }>]>, ", "PartialC", "<{ associationType: ", "UnionC", @@ -17013,7 +16906,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -17089,7 +16984,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 116 + "lineNumber": 120 }, "deprecated": false, "initialIsOpen": false @@ -17119,7 +17014,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ type: ", "UnionC", @@ -17173,7 +17070,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>]>, ", + "]>; }>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -17183,7 +17082,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 101 + "lineNumber": 105 }, "deprecated": false, "initialIsOpen": false @@ -17211,7 +17110,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ type: ", "UnionC", @@ -17265,11 +17166,13 @@ "StringC", ", ", "NullC", - "]>; }>; }>]>" + "]>; }>; owner: ", + "StringC", + "; }>]>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 81 + "lineNumber": 85 }, "deprecated": false, "initialIsOpen": false @@ -17301,7 +17204,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -17353,7 +17258,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -17481,7 +17388,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -17533,7 +17442,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -17615,7 +17526,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 83 + "lineNumber": 87 }, "deprecated": false, "initialIsOpen": false @@ -17685,7 +17596,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -17737,7 +17650,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -17819,7 +17734,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 91 + "lineNumber": 95 }, "deprecated": false, "initialIsOpen": false @@ -17855,7 +17770,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -17907,7 +17824,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -18035,7 +17954,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -18087,7 +18008,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -18175,7 +18098,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 121 + "lineNumber": 125 }, "deprecated": false, "initialIsOpen": false @@ -18387,7 +18310,9 @@ "StringC", ", ", "LiteralC", - "<\"not_mapped\">]>; }>>; }>" + "<\"not_mapped\">]>; }>>; owner: ", + "StringC", + "; }>" ], "source": { "path": "x-pack/plugins/cases/common/api/connectors/mappings.ts", @@ -18625,11 +18550,13 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>" + ".user>; owner: ", + "StringC", + "; }>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 57 + "lineNumber": 59 }, "deprecated": false, "initialIsOpen": false @@ -18673,7 +18600,79 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 155 + "lineNumber": 258 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.FindQueryParamsRt", + "type": "Object", + "tags": [], + "label": "FindQueryParamsRt", + "description": [], + "signature": [ + "PartialC", + "<{ subCaseId: ", + "StringC", + "; defaultSearchOperator: ", + "UnionC", + "<[", + "LiteralC", + "<\"AND\">, ", + "LiteralC", + "<\"OR\">]>; hasReferenceOperator: ", + "UnionC", + "<[", + "LiteralC", + "<\"AND\">, ", + "LiteralC", + "<\"OR\">]>; hasReference: ", + "UnionC", + "<[", + "ArrayC", + "<", + "TypeC", + "<{ id: ", + "StringC", + "; type: ", + "StringC", + "; }>>, ", + "TypeC", + "<{ id: ", + "StringC", + "; type: ", + "StringC", + "; }>]>; fields: ", + "ArrayC", + "<", + "StringC", + ">; filter: ", + "StringC", + "; page: ", + "Type", + "; perPage: ", + "Type", + "; search: ", + "StringC", + "; searchFields: ", + "ArrayC", + "<", + "StringC", + ">; sortField: ", + "StringC", + "; sortOrder: ", + "UnionC", + "<[", + "LiteralC", + "<\"desc\">, ", + "LiteralC", + "<\"asc\">]>; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/comment.ts", + "lineNumber": 134 }, "deprecated": false, "initialIsOpen": false @@ -18703,7 +18702,33 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 18 + "lineNumber": 19 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.GetConfigureFindRequestRt", + "type": "Object", + "tags": [], + "label": "GetConfigureFindRequestRt", + "description": [], + "signature": [ + "PartialC", + "<{ owner: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/configure.ts", + "lineNumber": 64 }, "deprecated": false, "initialIsOpen": false @@ -19121,11 +19146,13 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>" + "]>; owner: ", + "StringC", + "; }>]>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 20 + "lineNumber": 23 }, "deprecated": false, "initialIsOpen": false @@ -19183,7 +19210,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 67 + "lineNumber": 99 }, "deprecated": false, "initialIsOpen": false @@ -19339,7 +19366,9 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", + "]>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -19373,7 +19402,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -19425,7 +19456,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -19553,7 +19586,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -19605,7 +19640,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -19687,7 +19724,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 44 + "lineNumber": 76 }, "deprecated": false, "initialIsOpen": false @@ -19761,11 +19798,13 @@ "LiteralC", "<\"desc\">, ", "LiteralC", - "<\"asc\">]>; }>" + "<\"asc\">]>; owner: ", + "StringC", + "; }>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 32 + "lineNumber": 36 }, "deprecated": false, "initialIsOpen": false @@ -19927,7 +19966,9 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", + "]>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -19961,7 +20002,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -20013,7 +20056,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -20141,7 +20186,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -20193,7 +20240,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -20289,7 +20338,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 57 + "lineNumber": 89 }, "deprecated": false, "initialIsOpen": false @@ -20351,7 +20400,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 72 + "lineNumber": 104 }, "deprecated": false, "initialIsOpen": false @@ -20509,7 +20558,9 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", + "]>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -20543,7 +20594,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -20595,7 +20648,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -20723,7 +20778,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -20775,7 +20832,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -20857,7 +20916,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 73 + "lineNumber": 105 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 892e3e02e75222..20d371cbcdc6e0 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -27,6 +27,9 @@ import casesObj from './cases.json'; ## Server +### Classes + + ### Interfaces diff --git a/api_docs/charts.json b/api_docs/charts.json index 29c1c163d19a03..f42832e5d1e95f 100644 --- a/api_docs/charts.json +++ b/api_docs/charts.json @@ -11,11 +11,11 @@ "label": "ColorPicker", "description": [], "signature": [ - "({ onChange, color: selectedColor, label, useLegacyColors, colorIsOverwritten, onKeyDown, }: ColorPickerProps) => JSX.Element" + "({ onChange, color: selectedColor, label, useLegacyColors, colorIsOverwritten, onKeyDown, maxDepth, layerIndex, }: ColorPickerProps) => JSX.Element" ], "source": { "path": "src/plugins/charts/public/static/components/color_picker.tsx", - "lineNumber": 111 + "lineNumber": 119 }, "deprecated": false, "children": [ @@ -24,14 +24,14 @@ "id": "def-public.ColorPicker.$1", "type": "Object", "tags": [], - "label": "{\n onChange,\n color: selectedColor,\n label,\n useLegacyColors = true,\n colorIsOverwritten = true,\n onKeyDown,\n}", + "label": "{\n onChange,\n color: selectedColor,\n label,\n useLegacyColors = true,\n colorIsOverwritten = true,\n onKeyDown,\n maxDepth,\n layerIndex,\n}", "description": [], "signature": [ "ColorPickerProps" ], "source": { "path": "src/plugins/charts/public/static/components/color_picker.tsx", - "lineNumber": 111 + "lineNumber": 119 }, "deprecated": false, "isRequired": true @@ -630,6 +630,77 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "charts", + "id": "def-public.lightenColor", + "type": "Function", + "tags": [], + "label": "lightenColor", + "description": [], + "signature": [ + "(baseColor: string, step: number, totalSteps: number) => string" + ], + "source": { + "path": "src/plugins/charts/public/services/palettes/lighten_color.ts", + "lineNumber": 14 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "charts", + "id": "def-public.lightenColor.$1", + "type": "string", + "tags": [], + "label": "baseColor", + "description": [], + "signature": [ + "string" + ], + "source": { + "path": "src/plugins/charts/public/services/palettes/lighten_color.ts", + "lineNumber": 14 + }, + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "charts", + "id": "def-public.lightenColor.$2", + "type": "number", + "tags": [], + "label": "step", + "description": [], + "signature": [ + "number" + ], + "source": { + "path": "src/plugins/charts/public/services/palettes/lighten_color.ts", + "lineNumber": 14 + }, + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "charts", + "id": "def-public.lightenColor.$3", + "type": "number", + "tags": [], + "label": "totalSteps", + "description": [], + "signature": [ + "number" + ], + "source": { + "path": "src/plugins/charts/public/services/palettes/lighten_color.ts", + "lineNumber": 14 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "charts", "id": "def-public.renderEndzoneTooltip", @@ -1132,6 +1203,86 @@ "lineNumber": 16 }, "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteArguments.stop", + "type": "Array", + "tags": [], + "label": "stop", + "description": [], + "signature": [ + "number[] | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 17 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteArguments.range", + "type": "CompoundType", + "tags": [], + "label": "range", + "description": [], + "signature": [ + "\"number\" | \"percent\" | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 18 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteArguments.rangeMin", + "type": "number", + "tags": [], + "label": "rangeMin", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 19 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteArguments.rangeMax", + "type": "number", + "tags": [], + "label": "rangeMax", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 20 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteArguments.continuity", + "type": "CompoundType", + "tags": [], + "label": "continuity", + "description": [], + "signature": [ + "\"above\" | \"below\" | \"all\" | \"none\" | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 21 + }, + "deprecated": false } ], "initialIsOpen": false @@ -1145,7 +1296,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 19 + "lineNumber": 24 }, "deprecated": false, "children": [ @@ -1161,7 +1312,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 20 + "lineNumber": 25 }, "deprecated": false }, @@ -1174,7 +1325,81 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 21 + "lineNumber": 26 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteState.stops", + "type": "Array", + "tags": [], + "label": "stops", + "description": [], + "signature": [ + "number[]" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 27 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteState.range", + "type": "CompoundType", + "tags": [], + "label": "range", + "description": [], + "signature": [ + "\"number\" | \"percent\"" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 28 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteState.rangeMin", + "type": "number", + "tags": [], + "label": "rangeMin", + "description": [], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 29 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteState.rangeMax", + "type": "number", + "tags": [], + "label": "rangeMax", + "description": [], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 30 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteState.continuity", + "type": "CompoundType", + "tags": [], + "label": "continuity", + "description": [], + "signature": [ + "\"above\" | \"below\" | \"all\" | \"none\" | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 31 }, "deprecated": false } @@ -1408,28 +1633,10 @@ }, { "parentPluginId": "charts", - "id": "def-public.PaletteDefinition.renderEditor", + "id": "def-public.PaletteDefinition.getCategoricalColor", "type": "Function", "tags": [], - "label": "renderEditor", - "description": [ - "\nRenders the UI for editing the internal state of the palette.\nNot each palette has to feature an internal state, so this is an optional property." - ], - "signature": [ - "((domElement: Element, props: { state?: T | undefined; setState: (updater: (oldState: T) => T) => void; }) => void) | undefined" - ], - "source": { - "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 88 - }, - "deprecated": false - }, - { - "parentPluginId": "charts", - "id": "def-public.PaletteDefinition.getColor", - "type": "Function", - "tags": [], - "label": "getColor", + "label": "getCategoricalColor", "description": [ "\nColor a series according to the internal rules of the palette." ], @@ -1454,7 +1661,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 97 + "lineNumber": 87 }, "deprecated": false, "returnComment": [], @@ -1480,7 +1687,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 98 + "lineNumber": 88 }, "deprecated": false }, @@ -1503,7 +1710,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 99 + "lineNumber": 89 }, "deprecated": false }, @@ -1521,7 +1728,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 100 + "lineNumber": 90 }, "deprecated": false } @@ -1529,10 +1736,10 @@ }, { "parentPluginId": "charts", - "id": "def-public.PaletteDefinition.getColors", + "id": "def-public.PaletteDefinition.getCategoricalColors", "type": "Function", "tags": [], - "label": "getColors", + "label": "getCategoricalColors", "description": [ "\nGet a spectrum of colors of the current palette.\nThis can be used if the chart wants to control color assignment locally." ], @@ -1541,7 +1748,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 106 + "lineNumber": 96 }, "deprecated": false, "returnComment": [], @@ -1555,7 +1762,7 @@ "description": [], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 106 + "lineNumber": 96 }, "deprecated": false }, @@ -1571,11 +1778,47 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 106 + "lineNumber": 96 }, "deprecated": false } ] + }, + { + "parentPluginId": "charts", + "id": "def-public.PaletteDefinition.canDynamicColoring", + "type": "CompoundType", + "tags": [], + "label": "canDynamicColoring", + "description": [ + "\nDefine whether a palette supports dynamic coloring (i.e. gradient colors mapped to number values)" + ], + "signature": [ + "boolean | undefined" + ], + "source": { + "path": "src/plugins/charts/public/services/palettes/types.ts", + "lineNumber": 100 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.PaletteDefinition.getColorForValue", + "type": "Function", + "tags": [], + "label": "getColorForValue", + "description": [ + "\nGet the assigned color for the given value based on its data domain and state settings.\nThis can be used for dynamic coloring based on uniform color distribution or custom stops." + ], + "signature": [ + "((value: number | undefined, state: T, { min, max }: { min: number; max: number; }) => string | undefined) | undefined" + ], + "source": { + "path": "src/plugins/charts/public/services/palettes/types.ts", + "lineNumber": 105 + }, + "deprecated": false } ], "initialIsOpen": false @@ -1599,7 +1842,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 28 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -1615,7 +1858,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 29 + "lineNumber": 39 }, "deprecated": false }, @@ -1628,7 +1871,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 30 + "lineNumber": 40 }, "deprecated": false }, @@ -1644,7 +1887,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 31 + "lineNumber": 41 }, "deprecated": false } @@ -1660,7 +1903,7 @@ "description": [], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 109 + "lineNumber": 112 }, "deprecated": false, "children": [ @@ -1684,7 +1927,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 110 + "lineNumber": 113 }, "deprecated": false, "returnComment": [], @@ -1698,7 +1941,7 @@ "description": [], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 110 + "lineNumber": 113 }, "deprecated": false } @@ -1724,7 +1967,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 111 + "lineNumber": 114 }, "deprecated": false, "returnComment": [], @@ -1953,7 +2196,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 24 + "lineNumber": 34 }, "deprecated": false, "children": [ @@ -1966,7 +2209,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 25 + "lineNumber": 35 }, "deprecated": false } @@ -2693,7 +2936,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 53 + "lineNumber": 63 }, "deprecated": false, "children": [], @@ -2754,7 +2997,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 119 + "lineNumber": 175 }, "deprecated": false, "children": [], @@ -2820,6 +3063,86 @@ "lineNumber": 16 }, "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteArguments.stop", + "type": "Array", + "tags": [], + "label": "stop", + "description": [], + "signature": [ + "number[] | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 17 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteArguments.range", + "type": "CompoundType", + "tags": [], + "label": "range", + "description": [], + "signature": [ + "\"number\" | \"percent\" | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 18 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteArguments.rangeMin", + "type": "number", + "tags": [], + "label": "rangeMin", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 19 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteArguments.rangeMax", + "type": "number", + "tags": [], + "label": "rangeMax", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 20 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteArguments.continuity", + "type": "CompoundType", + "tags": [], + "label": "continuity", + "description": [], + "signature": [ + "\"above\" | \"below\" | \"all\" | \"none\" | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 21 + }, + "deprecated": false } ], "initialIsOpen": false @@ -2833,7 +3156,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 19 + "lineNumber": 24 }, "deprecated": false, "children": [ @@ -2849,7 +3172,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 20 + "lineNumber": 25 }, "deprecated": false }, @@ -2862,7 +3185,81 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 21 + "lineNumber": 26 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteState.stops", + "type": "Array", + "tags": [], + "label": "stops", + "description": [], + "signature": [ + "number[]" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 27 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteState.range", + "type": "CompoundType", + "tags": [], + "label": "range", + "description": [], + "signature": [ + "\"number\" | \"percent\"" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 28 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteState.rangeMin", + "type": "number", + "tags": [], + "label": "rangeMin", + "description": [], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 29 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteState.rangeMax", + "type": "number", + "tags": [], + "label": "rangeMax", + "description": [], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 30 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteState.continuity", + "type": "CompoundType", + "tags": [], + "label": "continuity", + "description": [], + "signature": [ + "\"above\" | \"below\" | \"all\" | \"none\" | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 31 }, "deprecated": false } @@ -2888,7 +3285,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 28 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -2904,7 +3301,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 29 + "lineNumber": 39 }, "deprecated": false }, @@ -2917,7 +3314,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 30 + "lineNumber": 40 }, "deprecated": false }, @@ -2933,7 +3330,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 31 + "lineNumber": 41 }, "deprecated": false } @@ -2949,7 +3346,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 24 + "lineNumber": 34 }, "deprecated": false, "children": [ @@ -2962,7 +3359,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 25 + "lineNumber": 35 }, "deprecated": false } @@ -3001,7 +3398,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 33 + "lineNumber": 43 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/core.json b/api_docs/core.json index 4fedef842a1c4c..a5466960dbd36f 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 @@ -8058,7 +8058,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 188 + "lineNumber": 210 }, "deprecated": false, "children": [ @@ -8076,7 +8076,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 192 + "lineNumber": 214 }, "deprecated": false }, @@ -8091,7 +8091,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 197 + "lineNumber": 219 }, "deprecated": false }, @@ -8106,7 +8106,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 202 + "lineNumber": 224 }, "deprecated": false }, @@ -8124,7 +8124,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 208 + "lineNumber": 230 }, "deprecated": false }, @@ -8142,7 +8142,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 215 + "lineNumber": 237 }, "deprecated": false }, @@ -8160,7 +8160,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 220 + "lineNumber": 242 }, "deprecated": false }, @@ -8178,7 +8178,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 225 + "lineNumber": 247 }, "deprecated": false }, @@ -8196,7 +8196,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 230 + "lineNumber": 252 }, "deprecated": false }, @@ -8211,7 +8211,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 236 + "lineNumber": 258 }, "deprecated": false }, @@ -8229,7 +8229,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 242 + "lineNumber": 264 }, "deprecated": false }, @@ -8244,7 +8244,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 248 + "lineNumber": 270 }, "deprecated": false }, @@ -8262,7 +8262,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 254 + "lineNumber": 276 }, "deprecated": false }, @@ -8280,7 +8280,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 260 + "lineNumber": 282 }, "deprecated": false }, @@ -8298,7 +8298,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 267 + "lineNumber": 289 }, "deprecated": false }, @@ -8316,7 +8316,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 277 + "lineNumber": 299 }, "deprecated": false }, @@ -8332,7 +8332,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 279 + "lineNumber": 301 }, "deprecated": false, "children": [ @@ -8348,7 +8348,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 279 + "lineNumber": 301 }, "deprecated": false, "isRequired": true @@ -9095,7 +9095,7 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/types.ts", - "lineNumber": 40 + "lineNumber": 39 } }, { @@ -9109,7 +9109,7 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/target/types/server/types.d.ts", - "lineNumber": 25 + "lineNumber": 24 } } ], @@ -9383,7 +9383,7 @@ "plugin": "data", "link": { "path": "src/plugins/data/server/autocomplete/value_suggestions_route.ts", - "lineNumber": 67 + "lineNumber": 65 } }, { @@ -9439,7 +9439,7 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/routes/api/indices/register_list_route.ts", - "lineNumber": 18 + "lineNumber": 16 } }, { @@ -9460,7 +9460,7 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/routes/api/indices/register_reload_route.ts", - "lineNumber": 33 + "lineNumber": 28 } }, { @@ -9488,14 +9488,14 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/routes/api/templates/register_get_routes.ts", - "lineNumber": 24 + "lineNumber": 22 } }, { "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/routes/api/templates/register_get_routes.ts", - "lineNumber": 65 + "lineNumber": 62 } }, { @@ -9572,14 +9572,14 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/routes/api/component_templates/create.ts", - "lineNumber": 28 + "lineNumber": 24 } }, { "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/routes/api/component_templates/update.ts", - "lineNumber": 32 + "lineNumber": 28 } }, { @@ -9596,181 +9596,6 @@ "lineNumber": 48 } }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_create_route.ts", - "lineNumber": 45 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_create_route.ts", - "lineNumber": 64 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_delete_route.ts", - "lineNumber": 50 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_fetch_route.ts", - "lineNumber": 27 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_get_route.ts", - "lineNumber": 37 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_pause_route.ts", - "lineNumber": 49 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_resume_route.ts", - "lineNumber": 49 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_update_route.ts", - "lineNumber": 47 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_create_route.ts", - "lineNumber": 52 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_fetch_route.ts", - "lineNumber": 29 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_fetch_route.ts", - "lineNumber": 35 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_get_route.ts", - "lineNumber": 38 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_get_route.ts", - "lineNumber": 58 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_pause_route.ts", - "lineNumber": 47 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_resume_route.ts", - "lineNumber": 47 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_unfollow_route.ts", - "lineNumber": 50 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_unfollow_route.ts", - "lineNumber": 59 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_unfollow_route.ts", - "lineNumber": 64 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_unfollow_route.ts", - "lineNumber": 72 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_update_route.ts", - "lineNumber": 53 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_update_route.ts", - "lineNumber": 66 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_update_route.ts", - "lineNumber": 80 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/cross_cluster_replication/register_permissions_route.ts", - "lineNumber": 40 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/cross_cluster_replication/register_stats_route.ts", - "lineNumber": 29 - } - }, - { - "plugin": "infra", - "link": { - "path": "x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts", - "lineNumber": 420 - } - }, { "plugin": "lists", "link": { @@ -9803,7 +9628,7 @@ "plugin": "monitoring", "link": { "path": "x-pack/plugins/monitoring/server/plugin.ts", - "lineNumber": 356 + "lineNumber": 361 } }, { @@ -9817,7 +9642,7 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts", - "lineNumber": 52 + "lineNumber": 60 } }, { @@ -10303,7 +10128,7 @@ "plugin": "fleet", "link": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 189 + "lineNumber": 190 } }, { @@ -11156,7 +10981,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 472 + "lineNumber": 470 }, "deprecated": false, "children": [ @@ -11180,7 +11005,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 474 + "lineNumber": 472 }, "deprecated": false }, @@ -11204,7 +11029,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 476 + "lineNumber": 474 }, "deprecated": false }, @@ -11228,7 +11053,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 478 + "lineNumber": 476 }, "deprecated": false }, @@ -11261,7 +11086,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 480 + "lineNumber": 478 }, "deprecated": false }, @@ -11285,7 +11110,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 485 + "lineNumber": 483 }, "deprecated": false }, @@ -11309,7 +11134,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 487 + "lineNumber": 485 }, "deprecated": false }, @@ -11333,7 +11158,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 489 + "lineNumber": 487 }, "deprecated": false }, @@ -11357,7 +11182,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 491 + "lineNumber": 489 }, "deprecated": false }, @@ -11381,7 +11206,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 493 + "lineNumber": 491 }, "deprecated": false }, @@ -11405,7 +11230,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 495 + "lineNumber": 493 }, "deprecated": false }, @@ -11429,7 +11254,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 497 + "lineNumber": 495 }, "deprecated": false }, @@ -11455,7 +11280,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 499 + "lineNumber": 497 }, "deprecated": false, "returnComment": [], @@ -11475,7 +11300,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 520 + "lineNumber": 518 }, "deprecated": false, "children": [ @@ -11499,7 +11324,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 522 + "lineNumber": 520 }, "deprecated": false }, @@ -11523,7 +11348,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 524 + "lineNumber": 522 }, "deprecated": false }, @@ -11547,7 +11372,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 526 + "lineNumber": 524 }, "deprecated": false }, @@ -11571,7 +11396,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 528 + "lineNumber": 526 }, "deprecated": false }, @@ -11595,7 +11420,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 530 + "lineNumber": 528 }, "deprecated": false }, @@ -11619,7 +11444,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 532 + "lineNumber": 530 }, "deprecated": false } @@ -12169,6 +11994,24 @@ }, "deprecated": false }, + { + "parentPluginId": "core", + "id": "def-server.DeprecationsDetails.deprecationType", + "type": "CompoundType", + "tags": [], + "label": "deprecationType", + "description": [ + "\n(optional) Used to identify between different deprecation types.\nExample use case: in Upgrade Assistant, we may want to allow the user to sort by\ndeprecation type or show each type in a separate tab.\n\nFeel free to add new types if necessary.\nPredefined types are necessary to reduce having similar definitions with different keywords\nacross kibana deprecations." + ], + "signature": [ + "\"config\" | \"feature\" | undefined" + ], + "source": { + "path": "src/core/server/deprecations/types.ts", + "lineNumber": 37 + }, + "deprecated": false + }, { "parentPluginId": "core", "id": "def-server.DeprecationsDetails.documentationUrl", @@ -12181,7 +12024,7 @@ ], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 29 + "lineNumber": 39 }, "deprecated": false }, @@ -12193,11 +12036,11 @@ "label": "correctiveActions", "description": [], "signature": [ - "{ api?: { path: string; method: \"PUT\" | \"POST\"; body?: { [key: string]: any; } | undefined; } | undefined; manualSteps?: string[] | undefined; }" + "{ api?: { path: string; method: \"PUT\" | \"POST\"; body?: { [key: string]: any; } | undefined; } | undefined; manualSteps: string[]; }" ], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 31 + "lineNumber": 41 }, "deprecated": false } @@ -12265,7 +12108,7 @@ ], "source": { "path": "src/core/server/deprecations/deprecations_service.ts", - "lineNumber": 103 + "lineNumber": 101 }, "deprecated": false, "children": [ @@ -12289,7 +12132,7 @@ ], "source": { "path": "src/core/server/deprecations/deprecations_service.ts", - "lineNumber": 104 + "lineNumber": 102 }, "deprecated": false, "returnComment": [], @@ -12312,7 +12155,7 @@ ], "source": { "path": "src/core/server/deprecations/deprecations_service.ts", - "lineNumber": 104 + "lineNumber": 102 }, "deprecated": false } @@ -12708,14 +12551,7 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/plugin.ts", - "lineNumber": 34 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/plugin.ts", - "lineNumber": 33 + "lineNumber": 32 } }, { @@ -12949,7 +12785,7 @@ "description": [], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 60 + "lineNumber": 70 }, "deprecated": false, "children": [ @@ -12971,7 +12807,7 @@ ], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 61 + "lineNumber": 71 }, "deprecated": false }, @@ -13287,7 +13123,7 @@ ], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 62 + "lineNumber": 72 }, "deprecated": false } @@ -14316,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", @@ -15520,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", @@ -15548,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", @@ -15957,14 +15793,14 @@ "plugin": "crossClusterReplication", "link": { "path": "x-pack/plugins/cross_cluster_replication/server/plugin.ts", - "lineNumber": 17 + "lineNumber": 16 } }, { "plugin": "crossClusterReplication", "link": { "path": "x-pack/plugins/cross_cluster_replication/server/plugin.ts", - "lineNumber": 36 + "lineNumber": 27 } }, { @@ -16223,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 } }, { @@ -20314,13 +20150,13 @@ "signature": [ "{ legacy: { globalConfig$: ", "Observable", - " moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + "; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", "ByteSizeValue", ") => boolean; isLessThan: (other: ", "ByteSizeValue", ") => boolean; isEqualTo: (other: ", "ByteSizeValue", - ") => boolean; getValueInBytes: () => number; toString: (returnUnit?: \"b\" | \"kb\" | \"mb\" | \"gb\" | undefined) => string; }>; }>; }>>; get: () => Readonly<{ kibana: Readonly<{ readonly index: string; readonly autocompleteTerminateAfter: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + ") => boolean; getValueInBytes: () => number; toString: (returnUnit?: \"b\" | \"kb\" | \"mb\" | \"gb\" | undefined) => string; }>; }>; }>>; get: () => Readonly<{ kibana: Readonly<{ readonly index: string; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", "ByteSizeValue", ") => boolean; isLessThan: (other: ", "ByteSizeValue", @@ -20552,7 +20388,7 @@ "description": [], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 56 + "lineNumber": 66 }, "deprecated": false, "children": [ @@ -20584,7 +20420,7 @@ ], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 57 + "lineNumber": 67 }, "deprecated": false, "returnComment": [], @@ -20607,7 +20443,7 @@ ], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 57 + "lineNumber": 67 }, "deprecated": false } @@ -20627,7 +20463,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 439 + "lineNumber": 437 }, "deprecated": false, "children": [ @@ -20731,7 +20567,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 440 + "lineNumber": 438 }, "deprecated": false } @@ -22507,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", @@ -23394,28 +23230,14 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/plugin.ts", - "lineNumber": 14 + "lineNumber": 12 } }, { "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/plugin.ts", - "lineNumber": 42 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/plugin.ts", - "lineNumber": 13 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/plugin.ts", - "lineNumber": 69 + "lineNumber": 38 } }, { @@ -23499,7 +23321,7 @@ "plugin": "monitoring", "link": { "path": "x-pack/plugins/monitoring/server/plugin.ts", - "lineNumber": 279 + "lineNumber": 284 } }, { @@ -23672,28 +23494,14 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/types.ts", - "lineNumber": 43 + "lineNumber": 42 } }, { "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/types.ts", - "lineNumber": 50 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/types.ts", - "lineNumber": 8 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/types.ts", - "lineNumber": 41 + "lineNumber": 49 } }, { @@ -23710,41 +23518,6 @@ "lineNumber": 73 } }, - { - "plugin": "infra", - "link": { - "path": "x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts", - "lineNumber": 9 - } - }, - { - "plugin": "infra", - "link": { - "path": "x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts", - "lineNumber": 139 - } - }, - { - "plugin": "infra", - "link": { - "path": "x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts", - "lineNumber": 405 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/target/types/server/types.d.ts", - "lineNumber": 1 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/target/types/server/types.d.ts", - "lineNumber": 30 - } - }, { "plugin": "globalSearch", "link": { @@ -23770,28 +23543,14 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/target/types/server/types.d.ts", - "lineNumber": 27 + "lineNumber": 26 } }, { "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/target/types/server/types.d.ts", - "lineNumber": 33 - } - }, - { - "plugin": "infra", - "link": { - "path": "x-pack/plugins/infra/target/types/server/lib/log_analysis/log_entry_categories_analysis.d.ts", - "lineNumber": 1 - } - }, - { - "plugin": "infra", - "link": { - "path": "x-pack/plugins/infra/target/types/server/lib/log_analysis/log_entry_categories_analysis.d.ts", - "lineNumber": 58 + "lineNumber": 32 } } ], @@ -24260,7 +24019,7 @@ "label": "SharedGlobalConfig", "description": [], "signature": [ - "{ readonly kibana: Readonly<{ readonly index: string; readonly autocompleteTerminateAfter: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; readonly elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; readonly path: Readonly<{ readonly data: string; }>; readonly savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + "{ readonly kibana: Readonly<{ readonly index: string; }>; readonly elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; readonly path: Readonly<{ readonly data: string; }>; readonly savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", "ByteSizeValue", ") => boolean; isLessThan: (other: ", "ByteSizeValue", @@ -24297,7 +24056,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 510 + "lineNumber": 508 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/core_application.json b/api_docs/core_application.json index e890b6f92a2ad6..ab5fbe560172be 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": [ @@ -1606,6 +1559,13 @@ "lineNumber": 16 } }, + { + "plugin": "fleet", + "link": { + "path": "x-pack/plugins/fleet/public/applications/integrations/index.tsx", + "lineNumber": 67 + } + }, { "plugin": "fleet", "link": { @@ -1661,6 +1621,13 @@ "path": "x-pack/plugins/fleet/target/types/public/applications/fleet/index.d.ts", "lineNumber": 11 } + }, + { + "plugin": "fleet", + "link": { + "path": "x-pack/plugins/fleet/target/types/public/applications/integrations/index.d.ts", + "lineNumber": 11 + } } ] }, @@ -1688,29 +1655,29 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 471 + "lineNumber": 491 }, "deprecated": true, "references": [ { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/types.ts", - "lineNumber": 82 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 194 } }, { "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/application/dashboard_router.tsx", - "lineNumber": 56 + "lineNumber": 57 } }, { "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 298 + "lineNumber": 299 } }, { @@ -1724,7 +1691,7 @@ "plugin": "maps", "link": { "path": "x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx", - "lineNumber": 59 + "lineNumber": 67 } }, { @@ -1738,14 +1705,21 @@ "plugin": "lens", "link": { "path": "x-pack/plugins/lens/public/app_plugin/types.ts", - "lineNumber": 71 + "lineNumber": 44 + } + }, + { + "plugin": "lens", + "link": { + "path": "x-pack/plugins/lens/public/app_plugin/types.ts", + "lineNumber": 72 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/public/app_plugin/mounter.tsx", - "lineNumber": 171 + "lineNumber": 219 } }, { @@ -1822,7 +1796,7 @@ "plugin": "maps", "link": { "path": "x-pack/plugins/maps/target/types/public/routes/map_page/map_app/map_app.d.ts", - "lineNumber": 13 + "lineNumber": 17 } } ], @@ -1849,7 +1823,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 471 + "lineNumber": 491 }, "deprecated": false } @@ -1877,7 +1851,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 502 + "lineNumber": 522 }, "deprecated": false, "returnComment": [], @@ -1901,7 +1875,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 502 + "lineNumber": 522 }, "deprecated": false } @@ -1910,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", @@ -1921,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", @@ -1932,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 }, @@ -1957,7 +2039,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 670 + "lineNumber": 697 }, "deprecated": false }, @@ -1975,7 +2057,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 674 + "lineNumber": 701 }, "deprecated": false }, @@ -1993,7 +2075,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 679 + "lineNumber": 706 }, "deprecated": false } @@ -2013,7 +2095,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 527 + "lineNumber": 547 }, "deprecated": false, "initialIsOpen": false @@ -2070,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", @@ -2086,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", @@ -2098,7 +2196,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 279 + "lineNumber": 292 }, "deprecated": false, "initialIsOpen": false @@ -2131,7 +2229,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 566 + "lineNumber": 586 }, "deprecated": false, "initialIsOpen": false @@ -2161,7 +2259,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 517 + "lineNumber": 537 }, "deprecated": true, "references": [ @@ -2269,7 +2367,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 325 + "lineNumber": 345 }, "deprecated": false, "initialIsOpen": false @@ -2288,7 +2386,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 333 + "lineNumber": 353 }, "deprecated": false, "initialIsOpen": false @@ -2319,7 +2417,7 @@ "section": "def-public.AppDeepLink", "text": "AppDeepLink" }, - "[] | undefined; navLinkStatus?: ", + "[] | undefined; searchable?: boolean | undefined; navLinkStatus?: ", { "pluginId": "core", "scope": "public", @@ -2362,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 @@ -2389,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", @@ -2405,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 @@ -2432,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", @@ -2456,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_chrome.json b/api_docs/core_chrome.json index fae65ff62c9714..c84b06c235b489 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_saved_objects.json b/api_docs/core_saved_objects.json index adf0612a28faf8..bd7a9cb1ccb08b 100644 --- a/api_docs/core_saved_objects.json +++ b/api_docs/core_saved_objects.json @@ -4759,7 +4759,7 @@ "description": [], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 36 + "lineNumber": 35 }, "deprecated": false, "children": [ @@ -5075,7 +5075,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 37 + "lineNumber": 36 }, "deprecated": false }, @@ -5099,7 +5099,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 38 + "lineNumber": 37 }, "deprecated": false }, @@ -5112,7 +5112,7 @@ "description": [], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 39 + "lineNumber": 38 }, "deprecated": false }, @@ -5128,7 +5128,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 40 + "lineNumber": 39 }, "deprecated": false }, @@ -5144,7 +5144,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 42 + "lineNumber": 41 }, "deprecated": false, "children": [ @@ -5157,7 +5157,7 @@ "description": [], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 47 + "lineNumber": 46 }, "deprecated": false, "children": [ @@ -5473,7 +5473,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 48 + "lineNumber": 47 }, "deprecated": false }, @@ -5521,7 +5521,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 49 + "lineNumber": 48 }, "deprecated": false }, @@ -5534,7 +5534,7 @@ "description": [], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 50 + "lineNumber": 49 }, "deprecated": false }, @@ -5550,7 +5550,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 51 + "lineNumber": 50 }, "deprecated": false } @@ -5585,7 +5585,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 74 + "lineNumber": 73 }, "deprecated": false, "children": [ @@ -5607,7 +5607,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 74 + "lineNumber": 73 }, "deprecated": false, "isRequired": true @@ -5641,7 +5641,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 93 + "lineNumber": 92 }, "deprecated": false, "children": [ @@ -5663,7 +5663,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 93 + "lineNumber": 92 }, "deprecated": false, "isRequired": true @@ -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 } @@ -14507,15 +14306,15 @@ { "plugin": "lens", "link": { - "path": "x-pack/plugins/lens/server/migrations.ts", - "lineNumber": 245 + "path": "x-pack/plugins/lens/server/migrations/saved_object_migrations.ts", + "lineNumber": 167 } }, { "plugin": "lens", "link": { - "path": "x-pack/plugins/lens/server/migrations.ts", - "lineNumber": 312 + "path": "x-pack/plugins/lens/server/migrations/saved_object_migrations.ts", + "lineNumber": 234 } } ], @@ -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 } @@ -17426,7 +17225,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 31 + "lineNumber": 30 }, "deprecated": false, "initialIsOpen": 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/dashboard.json b/api_docs/dashboard.json index 9c3dccb95bc07c..821d298ea1309e 100644 --- a/api_docs/dashboard.json +++ b/api_docs/dashboard.json @@ -47,7 +47,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 105 + "lineNumber": 87 }, "deprecated": false, "children": [ @@ -63,31 +63,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 106 - }, - "deprecated": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainer.switchViewMode", - "type": "Function", - "tags": [], - "label": "switchViewMode", - "description": [], - "signature": [ - "((newViewMode: ", - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.ViewMode", - "text": "ViewMode" - }, - ") => void) | undefined" - ], - "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 107 + "lineNumber": 88 }, "deprecated": false }, @@ -103,7 +79,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 109 + "lineNumber": 90 }, "deprecated": false, "children": [], @@ -121,7 +97,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 113 + "lineNumber": 94 }, "deprecated": false, "children": [ @@ -143,7 +119,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 114 + "lineNumber": 95 }, "deprecated": false, "isRequired": true @@ -160,7 +136,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 115 + "lineNumber": 96 }, "deprecated": false, "isRequired": true @@ -200,7 +176,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 116 + "lineNumber": 97 }, "deprecated": false, "isRequired": false @@ -248,7 +224,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 129 + "lineNumber": 110 }, "deprecated": false, "children": [ @@ -273,7 +249,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 133 + "lineNumber": 114 }, "deprecated": false, "isRequired": true @@ -290,7 +266,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 134 + "lineNumber": 115 }, "deprecated": false, "isRequired": true @@ -322,7 +298,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 140 + "lineNumber": 122 }, "deprecated": false, "children": [ @@ -346,7 +322,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 141 + "lineNumber": 123 }, "deprecated": false, "isRequired": true @@ -364,7 +340,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 142 + "lineNumber": 124 }, "deprecated": false, "isRequired": false @@ -381,7 +357,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 143 + "lineNumber": 125 }, "deprecated": false, "isRequired": false @@ -419,7 +395,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 181 + "lineNumber": 164 }, "deprecated": false, "children": [ @@ -444,7 +420,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 182 + "lineNumber": 165 }, "deprecated": false, "isRequired": true @@ -469,7 +445,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 183 + "lineNumber": 166 }, "deprecated": false, "isRequired": true @@ -486,7 +462,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 184 + "lineNumber": 167 }, "deprecated": false, "isRequired": false @@ -562,7 +538,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 228 + "lineNumber": 211 }, "deprecated": false, "children": [ @@ -578,7 +554,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 232 + "lineNumber": 215 }, "deprecated": false, "isRequired": true @@ -595,7 +571,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 232 + "lineNumber": 215 }, "deprecated": false, "isRequired": true @@ -612,7 +588,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 232 + "lineNumber": 215 }, "deprecated": false, "isRequired": false @@ -632,7 +608,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 246 + "lineNumber": 229 }, "deprecated": false, "children": [ @@ -648,7 +624,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 246 + "lineNumber": 229 }, "deprecated": false, "isRequired": true @@ -669,7 +645,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 259 + "lineNumber": 242 }, "deprecated": false, "children": [ @@ -685,7 +661,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 259 + "lineNumber": 242 }, "deprecated": false, "isRequired": true @@ -749,7 +725,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 34 + "lineNumber": 32 }, "deprecated": false, "children": [ @@ -765,7 +741,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 37 + "lineNumber": 35 }, "deprecated": false }, @@ -781,7 +757,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 38 + "lineNumber": 36 }, "deprecated": false }, @@ -797,7 +773,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 40 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -815,7 +791,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 41 + "lineNumber": 39 }, "deprecated": false, "isRequired": true @@ -838,7 +814,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 42 + "lineNumber": 40 }, "deprecated": false, "isRequired": true @@ -858,7 +834,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 45 + "lineNumber": 43 }, "deprecated": false, "children": [], @@ -876,7 +852,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 50 + "lineNumber": 48 }, "deprecated": false, "children": [], @@ -902,7 +878,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 56 + "lineNumber": 54 }, "deprecated": false, "children": [], @@ -968,7 +944,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 66 + "lineNumber": 64 }, "deprecated": false, "children": [ @@ -990,7 +966,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 67 + "lineNumber": 65 }, "deprecated": false, "isRequired": true @@ -1030,7 +1006,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 68 + "lineNumber": 66 }, "deprecated": false, "isRequired": false @@ -1067,7 +1043,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 74 + "lineNumber": 72 }, "deprecated": false, "returnComment": [], @@ -1137,7 +1113,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 76 + "lineNumber": 74 }, "deprecated": false, "returnComment": [], @@ -1177,7 +1153,7 @@ ], "source": { "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "lineNumber": 22 + "lineNumber": 24 }, "deprecated": false, "children": [ @@ -1193,7 +1169,7 @@ ], "source": { "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "lineNumber": 22 + "lineNumber": 24 }, "deprecated": false, "isRequired": false @@ -1210,7 +1186,7 @@ ], "source": { "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "lineNumber": 22 + "lineNumber": 24 }, "deprecated": false, "isRequired": false @@ -1308,8 +1284,8 @@ "<{}>" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 43 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 72 }, "deprecated": false, "children": [ @@ -1321,12 +1297,12 @@ "label": "dashboardCapabilities", "description": [], "signature": [ - "DashboardCapabilities", + "DashboardAppCapabilities", " | undefined" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 44 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 73 }, "deprecated": false }, @@ -1348,8 +1324,8 @@ " | undefined" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 45 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 74 }, "deprecated": false }, @@ -1364,8 +1340,8 @@ "boolean | undefined" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 46 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 75 }, "deprecated": false }, @@ -1377,8 +1353,8 @@ "label": "isFullScreenMode", "description": [], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 47 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 76 }, "deprecated": false }, @@ -1393,8 +1369,8 @@ "string | undefined" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 48 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 77 }, "deprecated": false }, @@ -1409,8 +1385,8 @@ "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 49 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 78 }, "deprecated": false }, @@ -1425,8 +1401,8 @@ "string | undefined" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 50 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 79 }, "deprecated": false }, @@ -1438,8 +1414,8 @@ "label": "useMargins", "description": [], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 51 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 80 }, "deprecated": false }, @@ -1454,8 +1430,8 @@ "boolean | undefined" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 52 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 81 }, "deprecated": false }, @@ -1476,8 +1452,8 @@ } ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 53 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 82 }, "deprecated": false }, @@ -1499,8 +1475,8 @@ "[]" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 54 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 83 }, "deprecated": false }, @@ -1512,8 +1488,8 @@ "label": "title", "description": [], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 55 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 84 }, "deprecated": false }, @@ -1528,8 +1504,8 @@ "{ query: string | { [key: string]: any; }; language: string; }" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 56 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 85 }, "deprecated": false }, @@ -1554,8 +1530,8 @@ " & { [k: string]: unknown; }>; }" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 57 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 86 }, "deprecated": false } @@ -1571,7 +1547,7 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 91 + "lineNumber": 92 }, "deprecated": false, "children": [ @@ -1584,7 +1560,7 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 92 + "lineNumber": 93 }, "deprecated": false } @@ -1617,7 +1593,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 18 + "lineNumber": 19 }, "deprecated": false, "children": [ @@ -1633,7 +1609,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 19 + "lineNumber": 20 }, "deprecated": false }, @@ -1646,7 +1622,7 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 20 + "lineNumber": 21 }, "deprecated": false }, @@ -1662,7 +1638,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 21 + "lineNumber": 22 }, "deprecated": false }, @@ -1678,7 +1654,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 22 + "lineNumber": 23 }, "deprecated": false }, @@ -1694,7 +1670,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 23 + "lineNumber": 24 }, "deprecated": false }, @@ -1707,7 +1683,7 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 24 + "lineNumber": 25 }, "deprecated": false }, @@ -1723,7 +1699,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 25 + "lineNumber": 26 }, "deprecated": false }, @@ -1739,7 +1715,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 27 + "lineNumber": 28 }, "deprecated": false }, @@ -1752,7 +1728,7 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 28 + "lineNumber": 29 }, "deprecated": false }, @@ -1775,7 +1751,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 29 + "lineNumber": 30 }, "deprecated": false }, @@ -1967,7 +1943,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 30 + "lineNumber": 31 }, "deprecated": false }, @@ -1990,7 +1966,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 31 + "lineNumber": 32 }, "deprecated": false, "children": [], @@ -2016,7 +1992,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 32 + "lineNumber": 33 }, "deprecated": false, "children": [], @@ -2034,7 +2010,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 33 + "lineNumber": 34 }, "deprecated": false, "returnComment": [], @@ -2051,7 +2027,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 33 + "lineNumber": 34 }, "deprecated": false } @@ -2372,7 +2348,7 @@ ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 89 + "lineNumber": 90 }, "deprecated": false, "initialIsOpen": false @@ -2399,7 +2375,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 38 + "lineNumber": 46 }, "deprecated": false, "initialIsOpen": false @@ -2522,6 +2498,32 @@ "lineNumber": 19 }, "deprecated": false + }, + { + "parentPluginId": "dashboard", + "id": "def-public.DashboardConstants.CHANGE_CHECK_DEBOUNCE", + "type": "number", + "tags": [], + "label": "CHANGE_CHECK_DEBOUNCE", + "description": [], + "source": { + "path": "src/plugins/dashboard/public/dashboard_constants.ts", + "lineNumber": 20 + }, + "deprecated": false + }, + { + "parentPluginId": "dashboard", + "id": "def-public.DashboardConstants.CHANGE_APPLY_DEBOUNCE", + "type": "number", + "tags": [], + "label": "CHANGE_APPLY_DEBOUNCE", + "description": [], + "source": { + "path": "src/plugins/dashboard/public/dashboard_constants.ts", + "lineNumber": 21 + }, + "deprecated": false } ], "initialIsOpen": false @@ -2539,7 +2541,7 @@ ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 123 + "lineNumber": 124 }, "deprecated": false, "lifecycle": "setup", @@ -2554,7 +2556,7 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 125 + "lineNumber": 126 }, "deprecated": false, "children": [ @@ -2577,7 +2579,7 @@ ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 126 + "lineNumber": 127 }, "deprecated": false, "returnComment": [], @@ -2595,7 +2597,7 @@ ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 127 + "lineNumber": 128 }, "deprecated": false, "returnComment": [], @@ -2620,7 +2622,7 @@ ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 130 + "lineNumber": 131 }, "deprecated": false }, @@ -2642,7 +2644,7 @@ ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 131 + "lineNumber": 132 }, "deprecated": false } @@ -2983,7 +2985,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 91 + "lineNumber": 99 }, "deprecated": false, "children": [ @@ -3009,7 +3011,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 92 + "lineNumber": 100 }, "deprecated": false } @@ -3184,7 +3186,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 64 + "lineNumber": 72 }, "deprecated": false, "initialIsOpen": false @@ -3203,7 +3205,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 56 + "lineNumber": 64 }, "deprecated": false, "initialIsOpen": false @@ -3222,7 +3224,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 48 + "lineNumber": 56 }, "deprecated": false, "initialIsOpen": false @@ -3241,7 +3243,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 40 + "lineNumber": 48 }, "deprecated": false, "initialIsOpen": false @@ -3266,7 +3268,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 81 + "lineNumber": 89 }, "deprecated": false, "initialIsOpen": false @@ -3285,7 +3287,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 72 + "lineNumber": 80 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/dashboard_enhanced.json b/api_docs/dashboard_enhanced.json index 30daac1b263957..b1ce19250a597d 100644 --- a/api_docs/dashboard_enhanced.json +++ b/api_docs/dashboard_enhanced.json @@ -684,6 +684,8 @@ }, ") => void; } & { urlGenerators: ", "UrlGeneratorsSetup", + "; url: ", + "UrlService", "; }" ], "source": { @@ -792,6 +794,8 @@ }, ") => void; } & { urlGenerators: ", "UrlGeneratorsStart", + "; url: ", + "UrlService", "; }" ], "source": { diff --git a/api_docs/data.json b/api_docs/data.json index 1ba62ea9946549..2f9e74584603fc 100644 --- a/api_docs/data.json +++ b/api_docs/data.json @@ -11,7 +11,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 55 + "lineNumber": 57 }, "deprecated": false, "children": [ @@ -31,7 +31,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 63 + "lineNumber": 65 }, "deprecated": false, "children": [ @@ -49,7 +49,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 63 + "lineNumber": 65 }, "deprecated": false, "isRequired": true @@ -83,7 +83,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 83 + "lineNumber": 85 }, "deprecated": false, "children": [ @@ -106,7 +106,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 83 + "lineNumber": 85 }, "deprecated": false, "isRequired": true @@ -134,7 +134,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 92 + "lineNumber": 94 }, "deprecated": false }, @@ -147,7 +147,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 93 + "lineNumber": 95 }, "deprecated": false }, @@ -160,7 +160,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 94 + "lineNumber": 96 }, "deprecated": false }, @@ -176,7 +176,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 95 + "lineNumber": 97 }, "deprecated": false }, @@ -199,7 +199,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 96 + "lineNumber": 98 }, "deprecated": false }, @@ -215,7 +215,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 97 + "lineNumber": 99 }, "deprecated": false }, @@ -231,7 +231,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 98 + "lineNumber": 100 }, "deprecated": false }, @@ -247,7 +247,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 104 + "lineNumber": 106 }, "deprecated": false, "children": [ @@ -269,7 +269,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 104 + "lineNumber": 106 }, "deprecated": false, "isRequired": true @@ -304,7 +304,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 104 + "lineNumber": 106 }, "deprecated": false, "isRequired": true @@ -328,7 +328,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 134 + "lineNumber": 136 }, "deprecated": false, "children": [ @@ -346,7 +346,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 134 + "lineNumber": 136 }, "deprecated": false, "isRequired": true @@ -366,7 +366,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 171 + "lineNumber": 173 }, "deprecated": false, "children": [ @@ -382,7 +382,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 171 + "lineNumber": 173 }, "deprecated": false, "isRequired": true @@ -390,6 +390,42 @@ ], "returnComment": [] }, + { + "parentPluginId": "data", + "id": "def-public.AggConfig.hasTimeShift", + "type": "Function", + "tags": [], + "label": "hasTimeShift", + "description": [], + "signature": [ + "() => boolean" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_config.ts", + "lineNumber": 177 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfig.getTimeShift", + "type": "Function", + "tags": [], + "label": "getTimeShift", + "description": [], + "signature": [ + "() => moment.Duration | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_config.ts", + "lineNumber": 181 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "data", "id": "def-public.AggConfig.write", @@ -410,7 +446,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 175 + "lineNumber": 202 }, "deprecated": false, "children": [ @@ -433,7 +469,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 175 + "lineNumber": 202 }, "deprecated": false, "isRequired": false @@ -453,7 +489,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 179 + "lineNumber": 206 }, "deprecated": false, "children": [], @@ -471,7 +507,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 183 + "lineNumber": 210 }, "deprecated": false, "children": [ @@ -487,7 +523,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 183 + "lineNumber": 210 }, "deprecated": false, "isRequired": true @@ -504,7 +540,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 183 + "lineNumber": 210 }, "deprecated": false, "isRequired": true @@ -544,7 +580,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 209 + "lineNumber": 236 }, "deprecated": false, "children": [ @@ -568,7 +604,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 209 + "lineNumber": 236 }, "deprecated": false, "isRequired": true @@ -592,7 +628,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 209 + "lineNumber": 236 }, "deprecated": false, "isRequired": false @@ -624,7 +660,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 230 + "lineNumber": 257 }, "deprecated": false, "children": [ @@ -649,7 +685,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 230 + "lineNumber": 257 }, "deprecated": false, "isRequired": false @@ -673,7 +709,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 265 + "lineNumber": 292 }, "deprecated": false, "children": [], @@ -697,7 +733,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 296 + "lineNumber": 323 }, "deprecated": true, "references": [ @@ -726,7 +762,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 307 + "lineNumber": 334 }, "deprecated": false, "children": [], @@ -752,7 +788,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 316 + "lineNumber": 343 }, "deprecated": false, "children": [], @@ -788,7 +824,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 371 + "lineNumber": 398 }, "deprecated": false, "children": [], @@ -814,7 +850,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 375 + "lineNumber": 402 }, "deprecated": false, "children": [], @@ -840,7 +876,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 379 + "lineNumber": 406 }, "deprecated": false, "children": [], @@ -858,7 +894,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 383 + "lineNumber": 410 }, "deprecated": false, "children": [ @@ -874,7 +910,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 383 + "lineNumber": 410 }, "deprecated": false, "isRequired": true @@ -894,7 +930,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 387 + "lineNumber": 414 }, "deprecated": false, "children": [ @@ -910,7 +946,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 387 + "lineNumber": 414 }, "deprecated": false, "isRequired": true @@ -927,7 +963,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 387 + "lineNumber": 414 }, "deprecated": false, "isRequired": false @@ -947,7 +983,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 395 + "lineNumber": 422 }, "deprecated": false, "children": [], @@ -965,7 +1001,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 401 + "lineNumber": 428 }, "deprecated": false, "children": [], @@ -985,7 +1021,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 410 + "lineNumber": 437 }, "deprecated": false, "children": [], @@ -1003,7 +1039,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 414 + "lineNumber": 441 }, "deprecated": false, "children": [ @@ -1019,7 +1055,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 414 + "lineNumber": 441 }, "deprecated": false, "isRequired": true @@ -1046,7 +1082,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 428 + "lineNumber": 455 }, "deprecated": false, "children": [], @@ -1072,7 +1108,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 432 + "lineNumber": 459 }, "deprecated": false, "children": [], @@ -1090,7 +1126,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 436 + "lineNumber": 463 }, "deprecated": false, "children": [], @@ -1108,7 +1144,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 441 + "lineNumber": 468 }, "deprecated": false, "children": [], @@ -1157,7 +1193,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 452 + "lineNumber": 479 }, "deprecated": false }, @@ -1204,7 +1240,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 456 + "lineNumber": 483 }, "deprecated": false }, @@ -1228,7 +1264,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 486 + "lineNumber": 513 }, "deprecated": false, "children": [ @@ -1250,7 +1286,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 486 + "lineNumber": 513 }, "deprecated": false, "isRequired": true @@ -1270,7 +1306,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 65 + "lineNumber": 78 }, "deprecated": false, "children": [ @@ -1292,7 +1328,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 66 + "lineNumber": 79 }, "deprecated": false }, @@ -1315,7 +1351,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 67 + "lineNumber": 80 }, "deprecated": false }, @@ -1331,7 +1367,23 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 68 + "lineNumber": 81 + }, + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.forceNow", + "type": "Object", + "tags": [], + "label": "forceNow", + "description": [], + "signature": [ + "Date | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 82 }, "deprecated": false }, @@ -1347,7 +1399,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 69 + "lineNumber": 83 }, "deprecated": false }, @@ -1370,7 +1422,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 73 + "lineNumber": 87 }, "deprecated": false }, @@ -1386,7 +1438,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 75 + "lineNumber": 89 }, "deprecated": false, "children": [ @@ -1408,7 +1460,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 76 + "lineNumber": 90 }, "deprecated": false, "isRequired": true @@ -1443,7 +1495,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 77 + "lineNumber": 91 }, "deprecated": false, "isRequired": true @@ -1466,7 +1518,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 78 + "lineNumber": 92 }, "deprecated": false, "isRequired": true @@ -1486,7 +1538,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 91 + "lineNumber": 105 }, "deprecated": false, "children": [ @@ -1502,7 +1554,43 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 91 + "lineNumber": 105 + }, + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.setForceNow", + "type": "Function", + "tags": [], + "label": "setForceNow", + "description": [], + "signature": [ + "(now: Date | undefined) => void" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 109 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.setForceNow.$1", + "type": "Object", + "tags": [], + "label": "now", + "description": [], + "signature": [ + "Date | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 109 }, "deprecated": false, "isRequired": false @@ -1530,7 +1618,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 95 + "lineNumber": 113 }, "deprecated": false, "children": [ @@ -1552,7 +1640,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 95 + "lineNumber": 113 }, "deprecated": false, "isRequired": true @@ -1579,7 +1667,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 113 + "lineNumber": 131 }, "deprecated": false, "children": [ @@ -1595,7 +1683,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 113 + "lineNumber": 131 }, "deprecated": false, "isRequired": true @@ -1649,7 +1737,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 126 + "lineNumber": 144 }, "deprecated": false, "children": [ @@ -1683,7 +1771,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 127 + "lineNumber": 145 }, "deprecated": false, "isRequired": true @@ -1700,7 +1788,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 128 + "lineNumber": 146 }, "deprecated": false, "isRequired": true @@ -1730,7 +1818,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 169 + "lineNumber": 187 }, "deprecated": false, "children": [ @@ -1755,7 +1843,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 169 + "lineNumber": 187 }, "deprecated": false, "isRequired": true @@ -1775,7 +1863,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 181 + "lineNumber": 199 }, "deprecated": false, "children": [], @@ -1801,7 +1889,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 250 + "lineNumber": 289 }, "deprecated": false, "children": [], @@ -1826,7 +1914,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 254 + "lineNumber": 293 }, "deprecated": false, "children": [ @@ -1842,7 +1930,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 254 + "lineNumber": 293 }, "deprecated": false, "isRequired": true @@ -1870,7 +1958,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 258 + "lineNumber": 297 }, "deprecated": false, "children": [ @@ -1886,7 +1974,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 258 + "lineNumber": 297 }, "deprecated": false, "isRequired": true @@ -1914,7 +2002,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 262 + "lineNumber": 301 }, "deprecated": false, "children": [ @@ -1930,7 +2018,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 262 + "lineNumber": 301 }, "deprecated": false, "isRequired": true @@ -1958,7 +2046,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 266 + "lineNumber": 305 }, "deprecated": false, "children": [ @@ -1974,7 +2062,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 266 + "lineNumber": 305 }, "deprecated": false, "isRequired": true @@ -2002,7 +2090,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 270 + "lineNumber": 309 }, "deprecated": false, "children": [ @@ -2018,7 +2106,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 270 + "lineNumber": 309 }, "deprecated": false, "isRequired": true @@ -2046,7 +2134,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 274 + "lineNumber": 313 }, "deprecated": false, "children": [ @@ -2062,7 +2150,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 274 + "lineNumber": 313 }, "deprecated": false, "isRequired": true @@ -2090,12 +2178,169 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 278 + "lineNumber": 317 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.getTimeShifts", + "type": "Function", + "tags": [], + "label": "getTimeShifts", + "description": [], + "signature": [ + "() => Record" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 331 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.getTimeShiftInterval", + "type": "Function", + "tags": [], + "label": "getTimeShiftInterval", + "description": [], + "signature": [ + "() => moment.Duration | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 346 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.hasTimeShifts", + "type": "Function", + "tags": [], + "label": "hasTimeShifts", + "description": [], + "signature": [ + "() => boolean" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 353 }, "deprecated": false, "children": [], "returnComment": [] }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.getSearchSourceTimeFilter", + "type": "Function", + "tags": [], + "label": "getSearchSourceTimeFilter", + "description": [], + "signature": [ + "(forceNow?: Date | undefined) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataPluginApi", + "section": "def-common.RangeFilter", + "text": "RangeFilter" + }, + "[] | { meta: { index: string | undefined; params: {}; alias: string; disabled: boolean; negate: boolean; }; query: { bool: { should: { bool: { filter: { range: { [x: string]: { gte: string; lte: string; }; }; }[]; }; }[]; minimum_should_match: number; }; }; }[]" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 357 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.getSearchSourceTimeFilter.$1", + "type": "Object", + "tags": [], + "label": "forceNow", + "description": [], + "signature": [ + "Date | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 357 + }, + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.postFlightTransform", + "type": "Function", + "tags": [], + "label": "postFlightTransform", + "description": [], + "signature": [ + "(response: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" + }, + ") => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" + }, + "" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 410 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.postFlightTransform.$1", + "type": "Object", + "tags": [], + "label": "response", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" + }, + "" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 410 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "data", "id": "def-public.AggConfigs.getRequestAggById", @@ -2116,7 +2361,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 292 + "lineNumber": 429 }, "deprecated": false, "children": [ @@ -2132,7 +2377,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 292 + "lineNumber": 429 }, "deprecated": false, "isRequired": true @@ -2164,7 +2409,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 307 + "lineNumber": 444 }, "deprecated": false, "children": [], @@ -2194,7 +2439,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 321 + "lineNumber": 458 }, "deprecated": false, "children": [ @@ -2212,7 +2457,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 321 + "lineNumber": 458 }, "deprecated": false, "isRequired": true @@ -2248,7 +2493,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 330 + "lineNumber": 467 }, "deprecated": false, "children": [ @@ -2272,7 +2517,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 330 + "lineNumber": 467 }, "deprecated": false, "isRequired": true @@ -2296,7 +2541,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 330 + "lineNumber": 467 }, "deprecated": false, "isRequired": false @@ -2530,7 +2775,7 @@ "section": "def-public.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; }>; }>; autocomplete: Readonly<{} & { querySuggestions: Readonly<{} & { enabled: boolean; }>; valueSuggestions: Readonly<{} & { enabled: boolean; }>; }>; }>>" + "; }>; }>; autocomplete: Readonly<{} & { querySuggestions: Readonly<{} & { enabled: boolean; }>; valueSuggestions: Readonly<{} & { enabled: boolean; timeout: moment.Duration; terminateAfter: moment.Duration; }>; }>; }>>" ], "source": { "path": "src/plugins/data/public/plugin.ts", @@ -4008,7 +4253,9 @@ "parentPluginId": "data", "id": "def-public.IndexPattern.addScriptedField", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "addScriptedField", "description": [ "\nAdd scripted field to field list\n" @@ -4018,9 +4265,10 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, - "deprecated": false, + "deprecated": true, + "references": [], "children": [ { "parentPluginId": "data", @@ -4036,7 +4284,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -4055,7 +4303,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -4072,7 +4320,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -4084,7 +4332,9 @@ "parentPluginId": "data", "id": "def-public.IndexPattern.removeScriptedField", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "removeScriptedField", "description": [ "\nRemove scripted field from field list" @@ -4094,9 +4344,25 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 270 + "lineNumber": 272 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx", + "lineNumber": 117 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx", + "lineNumber": 778 + } + } + ], "children": [ { "parentPluginId": "data", @@ -4110,7 +4376,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 270 + "lineNumber": 272 }, "deprecated": false, "isRequired": true @@ -4122,9 +4388,13 @@ "parentPluginId": "data", "id": "def-public.IndexPattern.getNonScriptedFields", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "getNonScriptedFields", - "description": [], + "description": [ + "\n" + ], "signature": [ "() => ", { @@ -4138,9 +4408,74 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 277 + "lineNumber": 283 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx", + "lineNumber": 152 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 66 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 74 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 204 + } + }, + { + "plugin": "visTypeTimeseries", + "link": { + "path": "src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts", + "lineNumber": 65 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts", + "lineNumber": 106 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts", + "lineNumber": 29 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts", + "lineNumber": 122 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts", + "lineNumber": 244 + } + } + ], "children": [], "returnComment": [] }, @@ -4148,9 +4483,13 @@ "parentPluginId": "data", "id": "def-public.IndexPattern.getScriptedFields", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "getScriptedFields", - "description": [], + "description": [ + "\n" + ], "signature": [ "() => ", { @@ -4164,9 +4503,18 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 281 + "lineNumber": 291 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx", + "lineNumber": 61 + } + } + ], "children": [], "returnComment": [] }, @@ -4182,7 +4530,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 285 + "lineNumber": 295 }, "deprecated": false, "children": [], @@ -4200,7 +4548,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 289 + "lineNumber": 299 }, "deprecated": false, "children": [], @@ -4226,7 +4574,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 294 + "lineNumber": 304 }, "deprecated": false, "children": [], @@ -4252,7 +4600,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 299 + "lineNumber": 309 }, "deprecated": false, "children": [ @@ -4268,7 +4616,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 299 + "lineNumber": 309 }, "deprecated": false, "isRequired": true @@ -4288,7 +4636,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 304 + "lineNumber": 314 }, "deprecated": false, "children": [], @@ -4304,11 +4652,18 @@ "\nReturns index pattern as saved object body for saving" ], "signature": [ - "() => { fieldAttrs: string | undefined; title: string; timeFieldName: string | undefined; intervalName: string | undefined; sourceFilters: string | undefined; fields: string | undefined; fieldFormatMap: string | undefined; type: string | undefined; typeMeta: string | undefined; allowNoIndex: true | undefined; runtimeFieldMap: string | undefined; }" + "() => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataIndexPatternsPluginApi", + "section": "def-common.IndexPatternAttributes", + "text": "IndexPatternAttributes" + } ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 311 + "lineNumber": 321 }, "deprecated": false, "children": [], @@ -4359,7 +4714,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 339 + "lineNumber": 347 }, "deprecated": false, "children": [ @@ -4397,7 +4752,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 340 + "lineNumber": 348 }, "deprecated": false, "isRequired": true @@ -4427,7 +4782,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "children": [ @@ -4445,7 +4800,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "isRequired": true @@ -4470,7 +4825,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "isRequired": true @@ -4492,7 +4847,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 384 + "lineNumber": 392 }, "deprecated": false, "children": [ @@ -4510,7 +4865,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 384 + "lineNumber": 392 }, "deprecated": false, "isRequired": true @@ -4540,7 +4895,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 404 + "lineNumber": 412 }, "deprecated": false, "children": [ @@ -4556,7 +4911,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 404 + "lineNumber": 412 }, "deprecated": false, "isRequired": true @@ -4584,7 +4939,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 411 + "lineNumber": 419 }, "deprecated": false, "children": [ @@ -4600,7 +4955,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 412 + "lineNumber": 420 }, "deprecated": false, "isRequired": true @@ -4617,7 +4972,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 413 + "lineNumber": 421 }, "deprecated": false, "isRequired": true @@ -4641,7 +4996,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 414 + "lineNumber": 422 }, "deprecated": false, "isRequired": true @@ -4661,7 +5016,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "children": [ @@ -4677,7 +5032,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "isRequired": true @@ -4694,7 +5049,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "isRequired": false @@ -4714,7 +5069,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "children": [ @@ -4730,7 +5085,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "isRequired": true @@ -4747,7 +5102,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "isRequired": false @@ -4775,7 +5130,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "children": [ @@ -4791,7 +5146,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "isRequired": true @@ -4815,7 +5170,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "isRequired": true @@ -4835,7 +5190,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 450 + "lineNumber": 458 }, "deprecated": false, "children": [ @@ -4851,7 +5206,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 450 + "lineNumber": 458 }, "deprecated": false, "isRequired": true @@ -5067,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", @@ -5085,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", @@ -5377,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", @@ -6331,7 +6686,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "children": [ @@ -6347,7 +6702,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "isRequired": true @@ -6385,7 +6740,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "children": [ @@ -6407,7 +6762,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -6424,7 +6779,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -6464,7 +6819,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "children": [ @@ -6486,7 +6841,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -6505,7 +6860,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -6524,7 +6879,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -6562,7 +6917,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "children": [ @@ -6584,7 +6939,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -6603,7 +6958,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -6633,7 +6988,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 558 + "lineNumber": 570 }, "deprecated": false, "children": [ @@ -6655,7 +7010,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 559 + "lineNumber": 571 }, "deprecated": false, "isRequired": true @@ -6672,7 +7027,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 560 + "lineNumber": 572 }, "deprecated": false, "isRequired": true @@ -6689,7 +7044,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 561 + "lineNumber": 573 }, "deprecated": false, "isRequired": true @@ -6711,7 +7066,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "children": [ @@ -6729,7 +7084,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "isRequired": true @@ -6850,7 +7205,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 121 + "lineNumber": 127 }, "deprecated": false, "children": [ @@ -6866,7 +7221,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 129 + "lineNumber": 135 }, "deprecated": false }, @@ -6882,7 +7237,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 133 + "lineNumber": 139 }, "deprecated": false, "children": [ @@ -6904,7 +7259,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 133 + "lineNumber": 139 }, "deprecated": false, "isRequired": true @@ -6927,7 +7282,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 133 + "lineNumber": 139 }, "deprecated": false, "isRequired": true @@ -6949,7 +7304,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 151 + "lineNumber": 157 }, "deprecated": false, "children": [ @@ -6965,7 +7320,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 151 + "lineNumber": 157 }, "deprecated": false, "isRequired": true @@ -6995,7 +7350,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 160 + "lineNumber": 166 }, "deprecated": false, "children": [ @@ -7013,7 +7368,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 160 + "lineNumber": 166 }, "deprecated": false, "isRequired": true @@ -7039,7 +7394,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 160 + "lineNumber": 166 }, "deprecated": false, "isRequired": true @@ -7061,7 +7416,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 172 + "lineNumber": 178 }, "deprecated": false, "children": [ @@ -7079,7 +7434,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 172 + "lineNumber": 178 }, "deprecated": false, "isRequired": true @@ -7111,7 +7466,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 183 + "lineNumber": 189 }, "deprecated": false, "children": [ @@ -7135,7 +7490,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 183 + "lineNumber": 189 }, "deprecated": false, "isRequired": true @@ -7157,7 +7512,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 191 + "lineNumber": 197 }, "deprecated": false, "children": [], @@ -7184,7 +7539,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 198 + "lineNumber": 204 }, "deprecated": false, "children": [], @@ -7212,7 +7567,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 205 + "lineNumber": 211 }, "deprecated": false, "children": [ @@ -7228,7 +7583,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 205 + "lineNumber": 211 }, "deprecated": false, "isRequired": true @@ -7245,7 +7600,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 205 + "lineNumber": 211 }, "deprecated": false, "isRequired": true @@ -7275,7 +7630,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 216 + "lineNumber": 222 }, "deprecated": false, "children": [ @@ -7291,7 +7646,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 216 + "lineNumber": 222 }, "deprecated": false, "isRequired": true @@ -7320,7 +7675,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 223 + "lineNumber": 229 }, "deprecated": true, "references": [ @@ -7328,14 +7683,14 @@ "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 206 + "lineNumber": 207 } }, { "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 212 + "lineNumber": 213 } } ], @@ -7363,7 +7718,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 230 + "lineNumber": 236 }, "deprecated": false, "children": [], @@ -7390,7 +7745,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 244 + "lineNumber": 250 }, "deprecated": false, "children": [ @@ -7406,7 +7761,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 244 + "lineNumber": 250 }, "deprecated": false, "isRequired": true @@ -7446,7 +7801,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 256 + "lineNumber": 262 }, "deprecated": false, "children": [ @@ -7472,7 +7827,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 256 + "lineNumber": 262 }, "deprecated": false, "isRequired": false @@ -7497,7 +7852,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 256 + "lineNumber": 262 }, "deprecated": false, "isRequired": true @@ -7531,7 +7886,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 266 + "lineNumber": 272 }, "deprecated": false, "children": [], @@ -7571,7 +7926,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 274 + "lineNumber": 280 }, "deprecated": false, "children": [ @@ -7593,7 +7948,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 275 + "lineNumber": 281 }, "deprecated": false, "isRequired": true @@ -7627,7 +7982,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 312 + "lineNumber": 318 }, "deprecated": true, "references": [ @@ -7638,13 +7993,6 @@ "lineNumber": 77 } }, - { - "plugin": "discover", - "link": { - "path": "src/plugins/discover/public/application/angular/context/api/anchor.ts", - "lineNumber": 57 - } - }, { "plugin": "maps", "link": { @@ -7686,7 +8034,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 312 + "lineNumber": 318 }, "deprecated": false, "isRequired": true @@ -7726,7 +8074,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 325 + "lineNumber": 331 }, "deprecated": false, "children": [ @@ -7758,7 +8106,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 326 + "lineNumber": 332 }, "deprecated": false, "isRequired": true @@ -7780,7 +8128,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 334 + "lineNumber": 340 }, "deprecated": false, "children": [], @@ -7802,7 +8150,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 342 + "lineNumber": 348 }, "deprecated": false, "children": [], @@ -7829,7 +8177,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 831 + "lineNumber": 848 }, "deprecated": false, "children": [ @@ -7845,7 +8193,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 831 + "lineNumber": 848 }, "deprecated": false, "isRequired": true @@ -7869,7 +8217,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 860 + "lineNumber": 877 }, "deprecated": false, "children": [], @@ -8816,7 +9164,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 195 + "lineNumber": 196 }, "deprecated": false, "children": [ @@ -8845,7 +9193,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTER>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"geo_bounding_box\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"filter\">, \"enabled\" | \"id\" | \"filter\" | \"customLabel\" | \"schema\" | \"geo_bounding_box\" | \"json\">, ", + ".FILTER>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"geo_bounding_box\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"filter\">, \"enabled\" | \"id\" | \"filter\" | \"customLabel\" | \"schema\" | \"geo_bounding_box\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -8869,7 +9217,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 196 + "lineNumber": 197 }, "deprecated": false }, @@ -8898,7 +9246,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\"> & Pick<{ filters?: string | undefined; }, \"filters\"> & Pick<{ filters?: string | undefined; }, never>, \"enabled\" | \"filters\" | \"id\" | \"schema\" | \"json\">, ", + ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ filters?: string | undefined; }, \"filters\"> & Pick<{ filters?: string | undefined; }, never>, \"enabled\" | \"filters\" | \"id\" | \"schema\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -8922,7 +9270,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 197 + "lineNumber": 198 }, "deprecated": false }, @@ -8975,7 +9323,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 198 + "lineNumber": 199 }, "deprecated": false }, @@ -9004,7 +9352,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".IP_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, \"ipRangeType\" | \"ranges\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", + ".IP_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, \"ipRangeType\" | \"ranges\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -9028,7 +9376,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 199 + "lineNumber": 200 }, "deprecated": false }, @@ -9057,7 +9405,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ranges\" | \"time_zone\">, ", + ".DATE_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ranges\" | \"time_zone\">, ", "AggExpressionType", ", ", { @@ -9081,7 +9429,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 200 + "lineNumber": 201 }, "deprecated": false }, @@ -9110,7 +9458,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ranges\">, ", + ".RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -9134,7 +9482,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 201 + "lineNumber": 202 }, "deprecated": false }, @@ -9187,7 +9535,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 202 + "lineNumber": 203 }, "deprecated": false }, @@ -9216,7 +9564,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: string | undefined; }, \"boundingBox\"> & Pick<{ boundingBox?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", + ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: string | undefined; }, \"boundingBox\"> & Pick<{ boundingBox?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", "AggExpressionType", ", ", { @@ -9240,7 +9588,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 203 + "lineNumber": 204 }, "deprecated": false }, @@ -9269,7 +9617,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, \"extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", + ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, \"extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", "AggExpressionType", ", ", { @@ -9293,7 +9641,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 204 + "lineNumber": 205 }, "deprecated": false }, @@ -9322,7 +9670,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, \"timeRange\" | \"extended_bounds\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"timeRange\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", + ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, \"timeRange\" | \"extended_bounds\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"timeRange\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", "AggExpressionType", ", ", { @@ -9346,7 +9694,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 205 + "lineNumber": 206 }, "deprecated": false }, @@ -9375,11 +9723,11 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", + ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", "AggExpressionType", " | undefined; }, \"orderAgg\"> & Pick<{ orderAgg?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", "AggExpressionType", ", ", { @@ -9403,7 +9751,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 206 + "lineNumber": 207 }, "deprecated": false }, @@ -9456,7 +9804,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 207 + "lineNumber": 208 }, "deprecated": false }, @@ -9485,7 +9833,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".AVG_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".AVG_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -9493,7 +9841,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -9517,7 +9865,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 208 + "lineNumber": 209 }, "deprecated": false }, @@ -9546,7 +9894,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MAX_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".MAX_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -9554,7 +9902,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -9578,7 +9926,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 209 + "lineNumber": 210 }, "deprecated": false }, @@ -9607,7 +9955,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MIN_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".MIN_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -9615,7 +9963,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -9639,7 +9987,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 210 + "lineNumber": 211 }, "deprecated": false }, @@ -9668,7 +10016,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SUM_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".SUM_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -9676,7 +10024,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -9700,7 +10048,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 211 + "lineNumber": 212 }, "deprecated": false }, @@ -9729,7 +10077,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -9737,7 +10085,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -9761,7 +10109,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 212 + "lineNumber": 213 }, "deprecated": false }, @@ -9814,7 +10162,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 213 + "lineNumber": 214 }, "deprecated": false }, @@ -9867,7 +10215,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 214 + "lineNumber": 215 }, "deprecated": false }, @@ -9896,11 +10244,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -9924,7 +10272,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 215 + "lineNumber": 216 }, "deprecated": false }, @@ -9953,11 +10301,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".DERIVATIVE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".DERIVATIVE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -9981,7 +10329,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 216 + "lineNumber": 217 }, "deprecated": false }, @@ -10034,7 +10382,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 217 + "lineNumber": 218 }, "deprecated": false }, @@ -10087,7 +10435,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 218 + "lineNumber": 219 }, "deprecated": false }, @@ -10140,7 +10488,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 219 + "lineNumber": 220 }, "deprecated": false }, @@ -10193,7 +10541,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 220 + "lineNumber": 221 }, "deprecated": false }, @@ -10246,7 +10594,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 221 + "lineNumber": 222 }, "deprecated": false }, @@ -10299,7 +10647,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 222 + "lineNumber": 223 }, "deprecated": false }, @@ -10328,11 +10676,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MOVING_FN>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", + ".MOVING_FN>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", "AggExpressionType", ", ", { @@ -10356,7 +10704,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 223 + "lineNumber": 224 }, "deprecated": false }, @@ -10409,7 +10757,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 224 + "lineNumber": 225 }, "deprecated": false }, @@ -10462,7 +10810,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 225 + "lineNumber": 226 }, "deprecated": false }, @@ -10491,11 +10839,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -10519,7 +10867,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 226 + "lineNumber": 227 }, "deprecated": false }, @@ -10572,7 +10920,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 227 + "lineNumber": 228 }, "deprecated": false }, @@ -10625,7 +10973,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 228 + "lineNumber": 229 }, "deprecated": false }, @@ -10678,7 +11026,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 229 + "lineNumber": 230 }, "deprecated": false } @@ -11531,7 +11879,7 @@ "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 58 + "lineNumber": 59 } }, { @@ -12882,28 +13230,28 @@ "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 139 + "lineNumber": 141 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 248 + "lineNumber": 250 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 287 + "lineNumber": 290 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 329 + "lineNumber": 332 } }, { @@ -13807,12 +14155,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", @@ -14340,6 +14688,20 @@ "lineNumber": 85 } }, + { + "plugin": "lens", + "link": { + "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", + "lineNumber": 25 + } + }, + { + "plugin": "lens", + "link": { + "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", + "lineNumber": 102 + } + }, { "plugin": "lens", "link": { @@ -14445,20 +14807,6 @@ "lineNumber": 30 } }, - { - "plugin": "apm", - "link": { - "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", - "lineNumber": 14 - } - }, - { - "plugin": "apm", - "link": { - "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", - "lineNumber": 31 - } - }, { "plugin": "infra", "link": { @@ -14627,6 +14975,20 @@ "lineNumber": 23 } }, + { + "plugin": "apm", + "link": { + "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", + "lineNumber": 14 + } + }, + { + "plugin": "apm", + "link": { + "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", + "lineNumber": 31 + } + }, { "plugin": "lists", "link": { @@ -14659,21 +15021,21 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts", - "lineNumber": 21 + "lineNumber": 22 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts", - "lineNumber": 66 + "lineNumber": 72 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts", - "lineNumber": 19 + "lineNumber": 20 } }, { @@ -14932,21 +15294,21 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts", - "lineNumber": 44 + "lineNumber": 48 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts", - "lineNumber": 60 + "lineNumber": 64 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts", - "lineNumber": 65 + "lineNumber": 69 } }, { @@ -15733,6 +16095,20 @@ "lineNumber": 30 } }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts", + "lineNumber": 13 + } + }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts", + "lineNumber": 52 + } + }, { "plugin": "stackAlerts", "link": { @@ -15936,20 +16312,6 @@ "lineNumber": 1352 } }, - { - "plugin": "discover", - "link": { - "path": "src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx", - "lineNumber": 17 - } - }, - { - "plugin": "discover", - "link": { - "path": "src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx", - "lineNumber": 26 - } - }, { "plugin": "maps", "link": { @@ -15961,7 +16323,7 @@ "plugin": "maps", "link": { "path": "x-pack/plugins/maps/public/embeddable/types.ts", - "lineNumber": 45 + "lineNumber": 44 } }, { @@ -16066,14 +16428,14 @@ "plugin": "observability", "link": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 18 + "lineNumber": 19 } }, { "plugin": "observability", "link": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 95 + "lineNumber": 104 } }, { @@ -16115,7 +16477,7 @@ "plugin": "observability", "link": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts", - "lineNumber": 24 + "lineNumber": 25 } }, { @@ -16283,14 +16645,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 } }, { @@ -19028,7 +19390,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 43 + "lineNumber": 45 }, "deprecated": false, "initialIsOpen": false @@ -19041,7 +19403,7 @@ "label": "AggGroupName", "description": [], "signature": [ - "\"buckets\" | \"metrics\" | \"none\"" + "\"none\" | \"buckets\" | \"metrics\"" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_groups.ts", @@ -19773,7 +20135,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 53 + "lineNumber": 55 }, "deprecated": false, "initialIsOpen": false @@ -20132,7 +20494,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 35 + "lineNumber": 36 }, "deprecated": false, "initialIsOpen": false @@ -20359,7 +20721,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 650 + "lineNumber": 662 }, "deprecated": false, "initialIsOpen": false @@ -20716,7 +21078,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", @@ -20805,7 +21167,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", @@ -22149,7 +22513,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", @@ -22207,7 +22571,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", @@ -22887,7 +23251,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", @@ -22960,7 +23326,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", @@ -23530,7 +23898,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 33 + "lineNumber": 39 }, "deprecated": false }, @@ -23561,7 +23929,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 34 + "lineNumber": 40 }, "deprecated": false }, @@ -23592,7 +23960,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 35 + "lineNumber": 41 }, "deprecated": false }, @@ -23614,7 +23982,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 36 + "lineNumber": 42 }, "deprecated": false } @@ -25922,7 +26290,7 @@ "section": "def-public.QuerySuggestionGetFn", "text": "QuerySuggestionGetFn" }, - "; }" + "; getAutocompleteSettings: () => { terminateAfter: number; timeout: number; }; }" ], "source": { "path": "src/plugins/data/public/types.ts", @@ -26699,7 +27067,7 @@ "section": "def-server.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; }>; }>; autocomplete: Readonly<{} & { querySuggestions: Readonly<{} & { enabled: boolean; }>; valueSuggestions: Readonly<{} & { enabled: boolean; }>; }>; }>>" + "; }>; }>; autocomplete: Readonly<{} & { querySuggestions: Readonly<{} & { enabled: boolean; }>; valueSuggestions: Readonly<{} & { enabled: boolean; timeout: moment.Duration; terminateAfter: moment.Duration; }>; }>; }>>" ], "source": { "path": "src/plugins/data/server/plugin.ts", @@ -27533,7 +27901,9 @@ "parentPluginId": "data", "id": "def-server.IndexPattern.addScriptedField", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "addScriptedField", "description": [ "\nAdd scripted field to field list\n" @@ -27543,9 +27913,10 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, - "deprecated": false, + "deprecated": true, + "references": [], "children": [ { "parentPluginId": "data", @@ -27561,7 +27932,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -27580,7 +27951,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -27597,7 +27968,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -27609,7 +27980,9 @@ "parentPluginId": "data", "id": "def-server.IndexPattern.removeScriptedField", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "removeScriptedField", "description": [ "\nRemove scripted field from field list" @@ -27619,9 +27992,25 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 270 + "lineNumber": 272 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx", + "lineNumber": 117 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx", + "lineNumber": 778 + } + } + ], "children": [ { "parentPluginId": "data", @@ -27635,7 +28024,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 270 + "lineNumber": 272 }, "deprecated": false, "isRequired": true @@ -27647,9 +28036,13 @@ "parentPluginId": "data", "id": "def-server.IndexPattern.getNonScriptedFields", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "getNonScriptedFields", - "description": [], + "description": [ + "\n" + ], "signature": [ "() => ", { @@ -27663,9 +28056,74 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 277 + "lineNumber": 283 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx", + "lineNumber": 152 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 66 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 74 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 204 + } + }, + { + "plugin": "visTypeTimeseries", + "link": { + "path": "src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts", + "lineNumber": 65 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts", + "lineNumber": 106 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts", + "lineNumber": 29 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts", + "lineNumber": 122 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts", + "lineNumber": 244 + } + } + ], "children": [], "returnComment": [] }, @@ -27673,9 +28131,13 @@ "parentPluginId": "data", "id": "def-server.IndexPattern.getScriptedFields", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "getScriptedFields", - "description": [], + "description": [ + "\n" + ], "signature": [ "() => ", { @@ -27689,9 +28151,18 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 281 + "lineNumber": 291 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx", + "lineNumber": 61 + } + } + ], "children": [], "returnComment": [] }, @@ -27707,7 +28178,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 285 + "lineNumber": 295 }, "deprecated": false, "children": [], @@ -27725,7 +28196,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 289 + "lineNumber": 299 }, "deprecated": false, "children": [], @@ -27751,7 +28222,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 294 + "lineNumber": 304 }, "deprecated": false, "children": [], @@ -27777,7 +28248,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 299 + "lineNumber": 309 }, "deprecated": false, "children": [ @@ -27793,7 +28264,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 299 + "lineNumber": 309 }, "deprecated": false, "isRequired": true @@ -27813,7 +28284,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 304 + "lineNumber": 314 }, "deprecated": false, "children": [], @@ -27829,11 +28300,18 @@ "\nReturns index pattern as saved object body for saving" ], "signature": [ - "() => { fieldAttrs: string | undefined; title: string; timeFieldName: string | undefined; intervalName: string | undefined; sourceFilters: string | undefined; fields: string | undefined; fieldFormatMap: string | undefined; type: string | undefined; typeMeta: string | undefined; allowNoIndex: true | undefined; runtimeFieldMap: string | undefined; }" + "() => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataIndexPatternsPluginApi", + "section": "def-common.IndexPatternAttributes", + "text": "IndexPatternAttributes" + } ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 311 + "lineNumber": 321 }, "deprecated": false, "children": [], @@ -27884,7 +28362,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 339 + "lineNumber": 347 }, "deprecated": false, "children": [ @@ -27922,7 +28400,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 340 + "lineNumber": 348 }, "deprecated": false, "isRequired": true @@ -27952,7 +28430,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "children": [ @@ -27970,7 +28448,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "isRequired": true @@ -27995,7 +28473,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "isRequired": true @@ -28017,7 +28495,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 384 + "lineNumber": 392 }, "deprecated": false, "children": [ @@ -28035,7 +28513,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 384 + "lineNumber": 392 }, "deprecated": false, "isRequired": true @@ -28065,7 +28543,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 404 + "lineNumber": 412 }, "deprecated": false, "children": [ @@ -28081,7 +28559,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 404 + "lineNumber": 412 }, "deprecated": false, "isRequired": true @@ -28109,7 +28587,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 411 + "lineNumber": 419 }, "deprecated": false, "children": [ @@ -28125,7 +28603,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 412 + "lineNumber": 420 }, "deprecated": false, "isRequired": true @@ -28142,7 +28620,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 413 + "lineNumber": 421 }, "deprecated": false, "isRequired": true @@ -28166,7 +28644,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 414 + "lineNumber": 422 }, "deprecated": false, "isRequired": true @@ -28186,7 +28664,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "children": [ @@ -28202,7 +28680,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "isRequired": true @@ -28219,7 +28697,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "isRequired": false @@ -28239,7 +28717,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "children": [ @@ -28255,7 +28733,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "isRequired": true @@ -28272,7 +28750,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "isRequired": false @@ -28300,7 +28778,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "children": [ @@ -28316,7 +28794,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "isRequired": true @@ -28340,7 +28818,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "isRequired": true @@ -28360,7 +28838,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 450 + "lineNumber": 458 }, "deprecated": false, "children": [ @@ -28376,7 +28854,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 450 + "lineNumber": 458 }, "deprecated": false, "isRequired": true @@ -29199,7 +29677,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "children": [ @@ -29215,7 +29693,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "isRequired": true @@ -29253,7 +29731,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "children": [ @@ -29275,7 +29753,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -29292,7 +29770,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -29332,7 +29810,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "children": [ @@ -29354,7 +29832,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -29373,7 +29851,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -29392,7 +29870,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -29430,7 +29908,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "children": [ @@ -29452,7 +29930,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -29471,7 +29949,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -29501,7 +29979,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 558 + "lineNumber": 570 }, "deprecated": false, "children": [ @@ -29523,7 +30001,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 559 + "lineNumber": 571 }, "deprecated": false, "isRequired": true @@ -29540,7 +30018,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 560 + "lineNumber": 572 }, "deprecated": false, "isRequired": true @@ -29557,7 +30035,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 561 + "lineNumber": 573 }, "deprecated": false, "isRequired": true @@ -29579,7 +30057,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "children": [ @@ -29597,7 +30075,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "isRequired": true @@ -30420,7 +30898,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "children": [ @@ -30436,7 +30914,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "isRequired": true @@ -30474,7 +30952,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "children": [ @@ -30496,7 +30974,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -30513,7 +30991,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -30553,7 +31031,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "children": [ @@ -30575,7 +31053,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -30594,7 +31072,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -30613,7 +31091,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -30651,7 +31129,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "children": [ @@ -30673,7 +31151,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -30692,7 +31170,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -30722,7 +31200,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 558 + "lineNumber": 570 }, "deprecated": false, "children": [ @@ -30744,7 +31222,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 559 + "lineNumber": 571 }, "deprecated": false, "isRequired": true @@ -30761,7 +31239,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 560 + "lineNumber": 572 }, "deprecated": false, "isRequired": true @@ -30778,7 +31256,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 561 + "lineNumber": 573 }, "deprecated": false, "isRequired": true @@ -30800,7 +31278,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "children": [ @@ -30818,7 +31296,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "isRequired": true @@ -31168,7 +31646,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 195 + "lineNumber": 196 }, "deprecated": false, "children": [ @@ -31197,7 +31675,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTER>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"geo_bounding_box\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"filter\">, \"enabled\" | \"id\" | \"filter\" | \"customLabel\" | \"schema\" | \"geo_bounding_box\" | \"json\">, ", + ".FILTER>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"geo_bounding_box\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"filter\">, \"enabled\" | \"id\" | \"filter\" | \"customLabel\" | \"schema\" | \"geo_bounding_box\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -31221,7 +31699,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 196 + "lineNumber": 197 }, "deprecated": false }, @@ -31250,7 +31728,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\"> & Pick<{ filters?: string | undefined; }, \"filters\"> & Pick<{ filters?: string | undefined; }, never>, \"enabled\" | \"filters\" | \"id\" | \"schema\" | \"json\">, ", + ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ filters?: string | undefined; }, \"filters\"> & Pick<{ filters?: string | undefined; }, never>, \"enabled\" | \"filters\" | \"id\" | \"schema\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -31274,7 +31752,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 197 + "lineNumber": 198 }, "deprecated": false }, @@ -31327,7 +31805,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 198 + "lineNumber": 199 }, "deprecated": false }, @@ -31356,7 +31834,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".IP_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, \"ipRangeType\" | \"ranges\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", + ".IP_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, \"ipRangeType\" | \"ranges\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -31380,7 +31858,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 199 + "lineNumber": 200 }, "deprecated": false }, @@ -31409,7 +31887,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ranges\" | \"time_zone\">, ", + ".DATE_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ranges\" | \"time_zone\">, ", "AggExpressionType", ", ", { @@ -31433,7 +31911,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 200 + "lineNumber": 201 }, "deprecated": false }, @@ -31462,7 +31940,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ranges\">, ", + ".RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -31486,7 +31964,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 201 + "lineNumber": 202 }, "deprecated": false }, @@ -31539,7 +32017,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 202 + "lineNumber": 203 }, "deprecated": false }, @@ -31568,7 +32046,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: string | undefined; }, \"boundingBox\"> & Pick<{ boundingBox?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", + ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: string | undefined; }, \"boundingBox\"> & Pick<{ boundingBox?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", "AggExpressionType", ", ", { @@ -31592,7 +32070,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 203 + "lineNumber": 204 }, "deprecated": false }, @@ -31621,7 +32099,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, \"extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", + ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, \"extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", "AggExpressionType", ", ", { @@ -31645,7 +32123,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 204 + "lineNumber": 205 }, "deprecated": false }, @@ -31674,7 +32152,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, \"timeRange\" | \"extended_bounds\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"timeRange\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", + ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, \"timeRange\" | \"extended_bounds\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"timeRange\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", "AggExpressionType", ", ", { @@ -31698,7 +32176,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 205 + "lineNumber": 206 }, "deprecated": false }, @@ -31727,11 +32205,11 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", + ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", "AggExpressionType", " | undefined; }, \"orderAgg\"> & Pick<{ orderAgg?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", "AggExpressionType", ", ", { @@ -31755,7 +32233,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 206 + "lineNumber": 207 }, "deprecated": false }, @@ -31808,7 +32286,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 207 + "lineNumber": 208 }, "deprecated": false }, @@ -31837,7 +32315,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".AVG_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".AVG_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -31845,7 +32323,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -31869,7 +32347,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 208 + "lineNumber": 209 }, "deprecated": false }, @@ -31898,7 +32376,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MAX_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".MAX_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -31906,7 +32384,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -31930,7 +32408,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 209 + "lineNumber": 210 }, "deprecated": false }, @@ -31959,7 +32437,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MIN_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".MIN_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -31967,7 +32445,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -31991,7 +32469,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 210 + "lineNumber": 211 }, "deprecated": false }, @@ -32020,7 +32498,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SUM_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".SUM_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -32028,7 +32506,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -32052,7 +32530,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 211 + "lineNumber": 212 }, "deprecated": false }, @@ -32081,7 +32559,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -32089,7 +32567,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -32113,7 +32591,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 212 + "lineNumber": 213 }, "deprecated": false }, @@ -32166,7 +32644,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 213 + "lineNumber": 214 }, "deprecated": false }, @@ -32219,7 +32697,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 214 + "lineNumber": 215 }, "deprecated": false }, @@ -32248,11 +32726,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -32276,7 +32754,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 215 + "lineNumber": 216 }, "deprecated": false }, @@ -32305,11 +32783,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".DERIVATIVE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".DERIVATIVE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -32333,7 +32811,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 216 + "lineNumber": 217 }, "deprecated": false }, @@ -32386,7 +32864,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 217 + "lineNumber": 218 }, "deprecated": false }, @@ -32439,7 +32917,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 218 + "lineNumber": 219 }, "deprecated": false }, @@ -32492,7 +32970,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 219 + "lineNumber": 220 }, "deprecated": false }, @@ -32545,7 +33023,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 220 + "lineNumber": 221 }, "deprecated": false }, @@ -32598,7 +33076,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 221 + "lineNumber": 222 }, "deprecated": false }, @@ -32651,7 +33129,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 222 + "lineNumber": 223 }, "deprecated": false }, @@ -32680,11 +33158,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MOVING_FN>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", + ".MOVING_FN>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", "AggExpressionType", ", ", { @@ -32708,7 +33186,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 223 + "lineNumber": 224 }, "deprecated": false }, @@ -32761,7 +33239,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 224 + "lineNumber": 225 }, "deprecated": false }, @@ -32814,7 +33292,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 225 + "lineNumber": 226 }, "deprecated": false }, @@ -32843,11 +33321,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -32871,7 +33349,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 226 + "lineNumber": 227 }, "deprecated": false }, @@ -32924,7 +33402,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 227 + "lineNumber": 228 }, "deprecated": false }, @@ -32977,7 +33455,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 228 + "lineNumber": 229 }, "deprecated": false }, @@ -33030,7 +33508,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 229 + "lineNumber": 230 }, "deprecated": false } @@ -33403,7 +33881,7 @@ "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 58 + "lineNumber": 59 } }, { @@ -34754,28 +35232,28 @@ "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 139 + "lineNumber": 141 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 248 + "lineNumber": 250 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 287 + "lineNumber": 290 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 329 + "lineNumber": 332 } }, { @@ -35679,12 +36157,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", @@ -36603,7 +37081,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 43 + "lineNumber": 45 }, "deprecated": false, "initialIsOpen": false @@ -36616,7 +37094,7 @@ "label": "AggGroupName", "description": [], "signature": [ - "\"buckets\" | \"metrics\" | \"none\"" + "\"none\" | \"buckets\" | \"metrics\"" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_groups.ts", @@ -36988,7 +37466,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 53 + "lineNumber": 55 }, "deprecated": false, "initialIsOpen": false @@ -37324,7 +37802,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 35 + "lineNumber": 36 }, "deprecated": false, "initialIsOpen": false @@ -38964,7 +39442,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 33 + "lineNumber": 39 }, "deprecated": false }, @@ -38995,7 +39473,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 34 + "lineNumber": 40 }, "deprecated": false }, @@ -39026,7 +39504,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 35 + "lineNumber": 41 }, "deprecated": false }, @@ -39048,7 +39526,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 36 + "lineNumber": 42 }, "deprecated": false } @@ -39658,7 +40136,7 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 243 + "lineNumber": 244 }, "deprecated": false, "children": [ @@ -39671,7 +40149,7 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "children": [ @@ -39694,7 +40172,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 245 + "lineNumber": 246 }, "deprecated": false }, @@ -39710,7 +40188,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 246 + "lineNumber": 247 }, "deprecated": false, "returnComment": [], @@ -39750,7 +40228,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 247 + "lineNumber": 248 }, "deprecated": false }, @@ -39773,7 +40251,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 248 + "lineNumber": 249 }, "deprecated": false }, @@ -39796,7 +40274,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 249 + "lineNumber": 250 }, "deprecated": false }, @@ -39819,7 +40297,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 250 + "lineNumber": 251 }, "deprecated": false }, @@ -39843,7 +40321,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 251 + "lineNumber": 252 }, "deprecated": false, "returnComment": [], @@ -39892,7 +40370,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 252 + "lineNumber": 253 }, "deprecated": false, "returnComment": [], @@ -39941,7 +40419,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 253 + "lineNumber": 254 }, "deprecated": false, "returnComment": [], @@ -39976,7 +40454,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 254 + "lineNumber": 255 }, "deprecated": false, "returnComment": [], @@ -40008,7 +40486,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 255 + "lineNumber": 256 }, "deprecated": false, "returnComment": [], @@ -40053,7 +40531,7 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 256 + "lineNumber": 257 }, "deprecated": false }, @@ -40071,7 +40549,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 257 + "lineNumber": 258 }, "deprecated": false, "returnComment": [], @@ -40103,7 +40581,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 258 + "lineNumber": 259 }, "deprecated": false, "returnComment": [], @@ -40135,7 +40613,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 259 + "lineNumber": 260 }, "deprecated": false, "returnComment": [], @@ -40167,7 +40645,7 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 260 + "lineNumber": 261 }, "deprecated": false }, @@ -40183,7 +40661,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 261 + "lineNumber": 262 }, "deprecated": false }, @@ -40207,7 +40685,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 262 + "lineNumber": 263 }, "deprecated": false, "returnComment": [], @@ -40242,7 +40720,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 263 + "lineNumber": 264 }, "deprecated": false, "returnComment": [], @@ -40306,7 +40784,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 265 + "lineNumber": 266 }, "deprecated": false, "returnComment": [], @@ -40391,7 +40869,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 266 + "lineNumber": 267 }, "deprecated": false, "returnComment": [], @@ -41124,7 +41602,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 32 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -41147,7 +41625,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 33 + "lineNumber": 39 }, "deprecated": false, "isRequired": false @@ -41181,7 +41659,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 34 + "lineNumber": 40 }, "deprecated": false, "isRequired": true @@ -41215,7 +41693,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 35 + "lineNumber": 41 }, "deprecated": false, "isRequired": true @@ -41240,7 +41718,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 36 + "lineNumber": 42 }, "deprecated": false, "isRequired": true @@ -43386,7 +43864,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", @@ -43564,7 +44042,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", @@ -46324,7 +46802,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", @@ -46493,7 +46971,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_autocomplete.json b/api_docs/data_autocomplete.json index 38e27d4df6e2d8..25bda08157358d 100644 --- a/api_docs/data_autocomplete.json +++ b/api_docs/data_autocomplete.json @@ -370,7 +370,7 @@ ], "source": { "path": "src/plugins/data/public/autocomplete/autocomplete_service.ts", - "lineNumber": 96 + "lineNumber": 103 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/data_field_formats.json b/api_docs/data_field_formats.json index 1807c32a18389d..a5fba87c20169b 100644 --- a/api_docs/data_field_formats.json +++ b/api_docs/data_field_formats.json @@ -513,7 +513,7 @@ ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 157 + "lineNumber": 211 }, "deprecated": false, "children": [ @@ -535,7 +535,7 @@ ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 158 + "lineNumber": 212 }, "deprecated": false }, @@ -548,7 +548,7 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 159 + "lineNumber": 213 }, "deprecated": false }, @@ -570,7 +570,7 @@ ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 162 + "lineNumber": 216 }, "deprecated": false }, @@ -586,7 +586,7 @@ ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 163 + "lineNumber": 217 }, "deprecated": false }, @@ -598,11 +598,11 @@ "label": "outputFormats", "description": [], "signature": [ - "{ text: string; method: string; }[]" + "({ text: string; method: string; shortText?: undefined; } | { text: string; shortText: string; method: string; })[]" ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 164 + "lineNumber": 218 }, "deprecated": false }, @@ -615,7 +615,7 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 165 + "lineNumber": 219 }, "deprecated": false }, @@ -631,7 +631,25 @@ ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 167 + "lineNumber": 221 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.DurationFormat.isHumanPrecise", + "type": "Function", + "tags": [], + "label": "isHumanPrecise", + "description": [], + "signature": [ + "() => boolean" + ], + "source": { + "path": "src/plugins/data/common/field_formats/converters/duration.ts", + "lineNumber": 225 }, "deprecated": false, "children": [], @@ -645,11 +663,11 @@ "label": "getParamDefaults", "description": [], "signature": [ - "() => { inputFormat: string; outputFormat: string; outputPrecision: number; }" + "() => { inputFormat: string; outputFormat: string; outputPrecision: number; includeSpaceWithSuffix: boolean; }" ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 170 + "lineNumber": 229 }, "deprecated": false, "children": [], @@ -663,11 +681,11 @@ "label": "textConvert", "description": [], "signature": [ - "(val: any) => string" + "(val: any) => any" ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 178 + "lineNumber": 238 }, "deprecated": false, "children": [ @@ -683,7 +701,7 @@ ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 178 + "lineNumber": 238 }, "deprecated": false, "isRequired": true diff --git a/api_docs/data_index_patterns.json b/api_docs/data_index_patterns.json index 676ded76cb331b..af5ddec4809768 100644 --- a/api_docs/data_index_patterns.json +++ b/api_docs/data_index_patterns.json @@ -1689,7 +1689,9 @@ "parentPluginId": "data", "id": "def-common.IndexPattern.addScriptedField", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "addScriptedField", "description": [ "\nAdd scripted field to field list\n" @@ -1699,9 +1701,10 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, - "deprecated": false, + "deprecated": true, + "references": [], "children": [ { "parentPluginId": "data", @@ -1717,7 +1720,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -1736,7 +1739,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -1753,7 +1756,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -1765,7 +1768,9 @@ "parentPluginId": "data", "id": "def-common.IndexPattern.removeScriptedField", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "removeScriptedField", "description": [ "\nRemove scripted field from field list" @@ -1775,9 +1780,25 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 270 + "lineNumber": 272 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx", + "lineNumber": 117 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx", + "lineNumber": 778 + } + } + ], "children": [ { "parentPluginId": "data", @@ -1791,7 +1812,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 270 + "lineNumber": 272 }, "deprecated": false, "isRequired": true @@ -1803,9 +1824,13 @@ "parentPluginId": "data", "id": "def-common.IndexPattern.getNonScriptedFields", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "getNonScriptedFields", - "description": [], + "description": [ + "\n" + ], "signature": [ "() => ", { @@ -1819,9 +1844,74 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 277 + "lineNumber": 283 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx", + "lineNumber": 152 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 66 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 74 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 204 + } + }, + { + "plugin": "visTypeTimeseries", + "link": { + "path": "src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts", + "lineNumber": 65 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts", + "lineNumber": 106 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts", + "lineNumber": 29 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts", + "lineNumber": 122 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts", + "lineNumber": 244 + } + } + ], "children": [], "returnComment": [] }, @@ -1829,9 +1919,13 @@ "parentPluginId": "data", "id": "def-common.IndexPattern.getScriptedFields", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "getScriptedFields", - "description": [], + "description": [ + "\n" + ], "signature": [ "() => ", { @@ -1845,9 +1939,18 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 281 + "lineNumber": 291 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx", + "lineNumber": 61 + } + } + ], "children": [], "returnComment": [] }, @@ -1863,7 +1966,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 285 + "lineNumber": 295 }, "deprecated": false, "children": [], @@ -1881,7 +1984,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 289 + "lineNumber": 299 }, "deprecated": false, "children": [], @@ -1907,7 +2010,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 294 + "lineNumber": 304 }, "deprecated": false, "children": [], @@ -1933,7 +2036,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 299 + "lineNumber": 309 }, "deprecated": false, "children": [ @@ -1949,7 +2052,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 299 + "lineNumber": 309 }, "deprecated": false, "isRequired": true @@ -1969,7 +2072,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 304 + "lineNumber": 314 }, "deprecated": false, "children": [], @@ -1985,11 +2088,18 @@ "\nReturns index pattern as saved object body for saving" ], "signature": [ - "() => { fieldAttrs: string | undefined; title: string; timeFieldName: string | undefined; intervalName: string | undefined; sourceFilters: string | undefined; fields: string | undefined; fieldFormatMap: string | undefined; type: string | undefined; typeMeta: string | undefined; allowNoIndex: true | undefined; runtimeFieldMap: string | undefined; }" + "() => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataIndexPatternsPluginApi", + "section": "def-common.IndexPatternAttributes", + "text": "IndexPatternAttributes" + } ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 311 + "lineNumber": 321 }, "deprecated": false, "children": [], @@ -2040,7 +2150,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 339 + "lineNumber": 347 }, "deprecated": false, "children": [ @@ -2078,7 +2188,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 340 + "lineNumber": 348 }, "deprecated": false, "isRequired": true @@ -2108,7 +2218,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "children": [ @@ -2126,7 +2236,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "isRequired": true @@ -2151,7 +2261,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "isRequired": true @@ -2173,7 +2283,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 384 + "lineNumber": 392 }, "deprecated": false, "children": [ @@ -2191,7 +2301,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 384 + "lineNumber": 392 }, "deprecated": false, "isRequired": true @@ -2221,7 +2331,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 404 + "lineNumber": 412 }, "deprecated": false, "children": [ @@ -2237,7 +2347,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 404 + "lineNumber": 412 }, "deprecated": false, "isRequired": true @@ -2265,7 +2375,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 411 + "lineNumber": 419 }, "deprecated": false, "children": [ @@ -2281,7 +2391,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 412 + "lineNumber": 420 }, "deprecated": false, "isRequired": true @@ -2298,7 +2408,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 413 + "lineNumber": 421 }, "deprecated": false, "isRequired": true @@ -2322,7 +2432,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 414 + "lineNumber": 422 }, "deprecated": false, "isRequired": true @@ -2342,7 +2452,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "children": [ @@ -2358,7 +2468,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "isRequired": true @@ -2375,7 +2485,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "isRequired": false @@ -2395,7 +2505,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "children": [ @@ -2411,7 +2521,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "isRequired": true @@ -2428,7 +2538,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "isRequired": false @@ -2456,7 +2566,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "children": [ @@ -2472,7 +2582,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "isRequired": true @@ -2496,7 +2606,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "isRequired": true @@ -2516,7 +2626,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 450 + "lineNumber": 458 }, "deprecated": false, "children": [ @@ -2532,7 +2642,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 450 + "lineNumber": 458 }, "deprecated": false, "isRequired": true @@ -2748,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", @@ -2766,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", @@ -3058,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", @@ -4012,7 +4122,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "children": [ @@ -4028,7 +4138,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "isRequired": true @@ -4066,7 +4176,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "children": [ @@ -4088,7 +4198,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -4105,7 +4215,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -4145,7 +4255,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "children": [ @@ -4167,7 +4277,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -4186,7 +4296,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -4205,7 +4315,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -4243,7 +4353,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "children": [ @@ -4265,7 +4375,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -4284,7 +4394,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -4314,7 +4424,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 558 + "lineNumber": 570 }, "deprecated": false, "children": [ @@ -4336,7 +4446,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 559 + "lineNumber": 571 }, "deprecated": false, "isRequired": true @@ -4353,7 +4463,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 560 + "lineNumber": 572 }, "deprecated": false, "isRequired": true @@ -4370,7 +4480,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 561 + "lineNumber": 573 }, "deprecated": false, "isRequired": true @@ -4392,7 +4502,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "children": [ @@ -4410,7 +4520,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "isRequired": true @@ -4766,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", @@ -5081,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", @@ -5542,7 +5652,7 @@ "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 58 + "lineNumber": 59 } }, { @@ -6893,28 +7003,28 @@ "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 139 + "lineNumber": 141 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 248 + "lineNumber": 250 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 287 + "lineNumber": 290 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 329 + "lineNumber": 332 } }, { @@ -7818,12 +7928,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", @@ -8351,6 +8461,20 @@ "lineNumber": 85 } }, + { + "plugin": "lens", + "link": { + "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", + "lineNumber": 25 + } + }, + { + "plugin": "lens", + "link": { + "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", + "lineNumber": 102 + } + }, { "plugin": "lens", "link": { @@ -8456,20 +8580,6 @@ "lineNumber": 30 } }, - { - "plugin": "apm", - "link": { - "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", - "lineNumber": 14 - } - }, - { - "plugin": "apm", - "link": { - "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", - "lineNumber": 31 - } - }, { "plugin": "infra", "link": { @@ -8638,6 +8748,20 @@ "lineNumber": 23 } }, + { + "plugin": "apm", + "link": { + "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", + "lineNumber": 14 + } + }, + { + "plugin": "apm", + "link": { + "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", + "lineNumber": 31 + } + }, { "plugin": "lists", "link": { @@ -8670,21 +8794,21 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts", - "lineNumber": 21 + "lineNumber": 22 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts", - "lineNumber": 66 + "lineNumber": 72 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts", - "lineNumber": 19 + "lineNumber": 20 } }, { @@ -8943,21 +9067,21 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts", - "lineNumber": 44 + "lineNumber": 48 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts", - "lineNumber": 60 + "lineNumber": 64 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts", - "lineNumber": 65 + "lineNumber": 69 } }, { @@ -9744,6 +9868,20 @@ "lineNumber": 30 } }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts", + "lineNumber": 13 + } + }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts", + "lineNumber": 52 + } + }, { "plugin": "stackAlerts", "link": { @@ -9947,20 +10085,6 @@ "lineNumber": 1352 } }, - { - "plugin": "discover", - "link": { - "path": "src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx", - "lineNumber": 17 - } - }, - { - "plugin": "discover", - "link": { - "path": "src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx", - "lineNumber": 26 - } - }, { "plugin": "maps", "link": { @@ -9972,7 +10096,7 @@ "plugin": "maps", "link": { "path": "x-pack/plugins/maps/public/embeddable/types.ts", - "lineNumber": 45 + "lineNumber": 44 } }, { @@ -10077,14 +10201,14 @@ "plugin": "observability", "link": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 18 + "lineNumber": 19 } }, { "plugin": "observability", "link": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 95 + "lineNumber": 104 } }, { @@ -10126,7 +10250,7 @@ "plugin": "observability", "link": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts", - "lineNumber": 24 + "lineNumber": 25 } }, { @@ -10294,14 +10418,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 } }, { @@ -12657,7 +12781,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 650 + "lineNumber": 662 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/data_search.json b/api_docs/data_search.json index d72ae79e79bd87..99c04298c27cbd 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", @@ -2272,7 +2272,7 @@ "label": "getShardTimeout", "description": [], "signature": [ - "(config: Readonly<{ kibana: Readonly<{ readonly index: string; readonly autocompleteTerminateAfter: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + "(config: Readonly<{ kibana: Readonly<{ readonly index: string; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", "ByteSizeValue", ") => boolean; isLessThan: (other: ", "ByteSizeValue", @@ -2298,7 +2298,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{ kibana: Readonly<{ readonly index: string; readonly autocompleteTerminateAfter: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + "Readonly<{ kibana: Readonly<{ readonly index: string; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", "ByteSizeValue", ") => boolean; isLessThan: (other: ", "ByteSizeValue", @@ -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", @@ -4164,7 +4164,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 55 + "lineNumber": 57 }, "deprecated": false, "children": [ @@ -4184,7 +4184,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 63 + "lineNumber": 65 }, "deprecated": false, "children": [ @@ -4202,7 +4202,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 63 + "lineNumber": 65 }, "deprecated": false, "isRequired": true @@ -4236,7 +4236,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 83 + "lineNumber": 85 }, "deprecated": false, "children": [ @@ -4259,7 +4259,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 83 + "lineNumber": 85 }, "deprecated": false, "isRequired": true @@ -4287,7 +4287,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 92 + "lineNumber": 94 }, "deprecated": false }, @@ -4300,7 +4300,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 93 + "lineNumber": 95 }, "deprecated": false }, @@ -4313,7 +4313,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 94 + "lineNumber": 96 }, "deprecated": false }, @@ -4329,7 +4329,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 95 + "lineNumber": 97 }, "deprecated": false }, @@ -4352,7 +4352,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 96 + "lineNumber": 98 }, "deprecated": false }, @@ -4368,7 +4368,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 97 + "lineNumber": 99 }, "deprecated": false }, @@ -4384,7 +4384,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 98 + "lineNumber": 100 }, "deprecated": false }, @@ -4400,7 +4400,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 104 + "lineNumber": 106 }, "deprecated": false, "children": [ @@ -4422,7 +4422,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 104 + "lineNumber": 106 }, "deprecated": false, "isRequired": true @@ -4457,7 +4457,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 104 + "lineNumber": 106 }, "deprecated": false, "isRequired": true @@ -4481,7 +4481,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 134 + "lineNumber": 136 }, "deprecated": false, "children": [ @@ -4499,7 +4499,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 134 + "lineNumber": 136 }, "deprecated": false, "isRequired": true @@ -4519,7 +4519,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 171 + "lineNumber": 173 }, "deprecated": false, "children": [ @@ -4535,7 +4535,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 171 + "lineNumber": 173 }, "deprecated": false, "isRequired": true @@ -4543,6 +4543,42 @@ ], "returnComment": [] }, + { + "parentPluginId": "data", + "id": "def-common.AggConfig.hasTimeShift", + "type": "Function", + "tags": [], + "label": "hasTimeShift", + "description": [], + "signature": [ + "() => boolean" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_config.ts", + "lineNumber": 177 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfig.getTimeShift", + "type": "Function", + "tags": [], + "label": "getTimeShift", + "description": [], + "signature": [ + "() => moment.Duration | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_config.ts", + "lineNumber": 181 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "data", "id": "def-common.AggConfig.write", @@ -4563,7 +4599,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 175 + "lineNumber": 202 }, "deprecated": false, "children": [ @@ -4586,7 +4622,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 175 + "lineNumber": 202 }, "deprecated": false, "isRequired": false @@ -4606,7 +4642,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 179 + "lineNumber": 206 }, "deprecated": false, "children": [], @@ -4624,7 +4660,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 183 + "lineNumber": 210 }, "deprecated": false, "children": [ @@ -4640,7 +4676,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 183 + "lineNumber": 210 }, "deprecated": false, "isRequired": true @@ -4657,7 +4693,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 183 + "lineNumber": 210 }, "deprecated": false, "isRequired": true @@ -4697,7 +4733,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 209 + "lineNumber": 236 }, "deprecated": false, "children": [ @@ -4721,7 +4757,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 209 + "lineNumber": 236 }, "deprecated": false, "isRequired": true @@ -4745,7 +4781,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 209 + "lineNumber": 236 }, "deprecated": false, "isRequired": false @@ -4777,7 +4813,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 230 + "lineNumber": 257 }, "deprecated": false, "children": [ @@ -4802,7 +4838,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 230 + "lineNumber": 257 }, "deprecated": false, "isRequired": false @@ -4826,7 +4862,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 265 + "lineNumber": 292 }, "deprecated": false, "children": [], @@ -4850,7 +4886,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 296 + "lineNumber": 323 }, "deprecated": true, "references": [ @@ -4879,7 +4915,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 307 + "lineNumber": 334 }, "deprecated": false, "children": [], @@ -4905,7 +4941,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 316 + "lineNumber": 343 }, "deprecated": false, "children": [], @@ -4941,7 +4977,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 371 + "lineNumber": 398 }, "deprecated": false, "children": [], @@ -4967,7 +5003,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 375 + "lineNumber": 402 }, "deprecated": false, "children": [], @@ -4993,7 +5029,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 379 + "lineNumber": 406 }, "deprecated": false, "children": [], @@ -5011,7 +5047,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 383 + "lineNumber": 410 }, "deprecated": false, "children": [ @@ -5027,7 +5063,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 383 + "lineNumber": 410 }, "deprecated": false, "isRequired": true @@ -5047,7 +5083,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 387 + "lineNumber": 414 }, "deprecated": false, "children": [ @@ -5063,7 +5099,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 387 + "lineNumber": 414 }, "deprecated": false, "isRequired": true @@ -5080,7 +5116,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 387 + "lineNumber": 414 }, "deprecated": false, "isRequired": false @@ -5100,7 +5136,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 395 + "lineNumber": 422 }, "deprecated": false, "children": [], @@ -5118,7 +5154,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 401 + "lineNumber": 428 }, "deprecated": false, "children": [], @@ -5138,7 +5174,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 410 + "lineNumber": 437 }, "deprecated": false, "children": [], @@ -5156,7 +5192,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 414 + "lineNumber": 441 }, "deprecated": false, "children": [ @@ -5172,7 +5208,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 414 + "lineNumber": 441 }, "deprecated": false, "isRequired": true @@ -5199,7 +5235,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 428 + "lineNumber": 455 }, "deprecated": false, "children": [], @@ -5225,7 +5261,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 432 + "lineNumber": 459 }, "deprecated": false, "children": [], @@ -5243,7 +5279,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 436 + "lineNumber": 463 }, "deprecated": false, "children": [], @@ -5261,7 +5297,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 441 + "lineNumber": 468 }, "deprecated": false, "children": [], @@ -5310,7 +5346,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 452 + "lineNumber": 479 }, "deprecated": false }, @@ -5357,7 +5393,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 456 + "lineNumber": 483 }, "deprecated": false }, @@ -5381,7 +5417,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 486 + "lineNumber": 513 }, "deprecated": false, "children": [ @@ -5403,7 +5439,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 486 + "lineNumber": 513 }, "deprecated": false, "isRequired": true @@ -5423,7 +5459,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 65 + "lineNumber": 78 }, "deprecated": false, "children": [ @@ -5445,7 +5481,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 66 + "lineNumber": 79 }, "deprecated": false }, @@ -5468,7 +5504,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 67 + "lineNumber": 80 }, "deprecated": false }, @@ -5484,7 +5520,23 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 68 + "lineNumber": 81 + }, + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.forceNow", + "type": "Object", + "tags": [], + "label": "forceNow", + "description": [], + "signature": [ + "Date | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 82 }, "deprecated": false }, @@ -5500,7 +5552,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 69 + "lineNumber": 83 }, "deprecated": false }, @@ -5523,7 +5575,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 73 + "lineNumber": 87 }, "deprecated": false }, @@ -5539,7 +5591,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 75 + "lineNumber": 89 }, "deprecated": false, "children": [ @@ -5561,7 +5613,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 76 + "lineNumber": 90 }, "deprecated": false, "isRequired": true @@ -5596,7 +5648,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 77 + "lineNumber": 91 }, "deprecated": false, "isRequired": true @@ -5619,7 +5671,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 78 + "lineNumber": 92 }, "deprecated": false, "isRequired": true @@ -5639,7 +5691,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 91 + "lineNumber": 105 }, "deprecated": false, "children": [ @@ -5655,7 +5707,43 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 91 + "lineNumber": 105 + }, + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.setForceNow", + "type": "Function", + "tags": [], + "label": "setForceNow", + "description": [], + "signature": [ + "(now: Date | undefined) => void" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 109 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.setForceNow.$1", + "type": "Object", + "tags": [], + "label": "now", + "description": [], + "signature": [ + "Date | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 109 }, "deprecated": false, "isRequired": false @@ -5683,7 +5771,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 95 + "lineNumber": 113 }, "deprecated": false, "children": [ @@ -5705,7 +5793,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 95 + "lineNumber": 113 }, "deprecated": false, "isRequired": true @@ -5732,7 +5820,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 113 + "lineNumber": 131 }, "deprecated": false, "children": [ @@ -5748,7 +5836,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 113 + "lineNumber": 131 }, "deprecated": false, "isRequired": true @@ -5802,7 +5890,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 126 + "lineNumber": 144 }, "deprecated": false, "children": [ @@ -5836,7 +5924,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 127 + "lineNumber": 145 }, "deprecated": false, "isRequired": true @@ -5853,7 +5941,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 128 + "lineNumber": 146 }, "deprecated": false, "isRequired": true @@ -5883,7 +5971,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 169 + "lineNumber": 187 }, "deprecated": false, "children": [ @@ -5908,7 +5996,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 169 + "lineNumber": 187 }, "deprecated": false, "isRequired": true @@ -5928,7 +6016,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 181 + "lineNumber": 199 }, "deprecated": false, "children": [], @@ -5954,7 +6042,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 250 + "lineNumber": 289 }, "deprecated": false, "children": [], @@ -5979,7 +6067,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 254 + "lineNumber": 293 }, "deprecated": false, "children": [ @@ -5995,7 +6083,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 254 + "lineNumber": 293 }, "deprecated": false, "isRequired": true @@ -6023,7 +6111,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 258 + "lineNumber": 297 }, "deprecated": false, "children": [ @@ -6039,7 +6127,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 258 + "lineNumber": 297 }, "deprecated": false, "isRequired": true @@ -6067,7 +6155,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 262 + "lineNumber": 301 }, "deprecated": false, "children": [ @@ -6083,7 +6171,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 262 + "lineNumber": 301 }, "deprecated": false, "isRequired": true @@ -6111,7 +6199,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 266 + "lineNumber": 305 }, "deprecated": false, "children": [ @@ -6127,7 +6215,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 266 + "lineNumber": 305 }, "deprecated": false, "isRequired": true @@ -6155,7 +6243,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 270 + "lineNumber": 309 }, "deprecated": false, "children": [ @@ -6171,7 +6259,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 270 + "lineNumber": 309 }, "deprecated": false, "isRequired": true @@ -6199,7 +6287,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 274 + "lineNumber": 313 }, "deprecated": false, "children": [ @@ -6215,7 +6303,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 274 + "lineNumber": 313 }, "deprecated": false, "isRequired": true @@ -6243,7 +6331,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 278 + "lineNumber": 317 }, "deprecated": false, "children": [], @@ -6251,73 +6339,35 @@ }, { "parentPluginId": "data", - "id": "def-common.AggConfigs.getRequestAggById", + "id": "def-common.AggConfigs.getTimeShifts", "type": "Function", "tags": [], - "label": "getRequestAggById", + "label": "getTimeShifts", "description": [], "signature": [ - "(id: string) => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.AggConfig", - "text": "AggConfig" - }, - " | undefined" + "() => Record" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 292 + "lineNumber": 331 }, "deprecated": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-common.AggConfigs.getRequestAggById.$1", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 292 - }, - "deprecated": false, - "isRequired": true - } - ], + "children": [], "returnComment": [] }, { "parentPluginId": "data", - "id": "def-common.AggConfigs.getResponseAggs", + "id": "def-common.AggConfigs.getTimeShiftInterval", "type": "Function", - "tags": [ - "return" - ], - "label": "getResponseAggs", - "description": [ - "\nGets the AggConfigs (and possibly ResponseAggConfigs) that\nrepresent the values that will be produced when all aggs\nare run.\n\nWith multi-value metric aggs it is possible for a single agg\nrequest to result in multiple agg values, which is why the length\nof a vis' responseValuesAggs may be different than the vis' aggs\n" - ], + "tags": [], + "label": "getTimeShiftInterval", + "description": [], "signature": [ - "() => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.AggConfig", - "text": "AggConfig" - }, - "[]" + "() => moment.Duration | undefined" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 307 + "lineNumber": 346 }, "deprecated": false, "children": [], @@ -6325,83 +6375,278 @@ }, { "parentPluginId": "data", - "id": "def-common.AggConfigs.getResponseAggById", + "id": "def-common.AggConfigs.hasTimeShifts", "type": "Function", - "tags": [ - "return" - ], - "label": "getResponseAggById", - "description": [ - "\nFind a response agg by it's id. This may be an agg in the aggConfigs, or one\ncreated specifically for a response value\n" + "tags": [], + "label": "hasTimeShifts", + "description": [], + "signature": [ + "() => boolean" ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 353 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.getSearchSourceTimeFilter", + "type": "Function", + "tags": [], + "label": "getSearchSourceTimeFilter", + "description": [], "signature": [ - "(id: string) => ", + "(forceNow?: Date | undefined) => ", { "pluginId": "data", "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.AggConfig", - "text": "AggConfig" + "docId": "kibDataPluginApi", + "section": "def-common.RangeFilter", + "text": "RangeFilter" }, - " | undefined" + "[] | { meta: { index: string | undefined; params: {}; alias: string; disabled: boolean; negate: boolean; }; query: { bool: { should: { bool: { filter: { range: { [x: string]: { gte: string; lte: string; }; }; }[]; }; }[]; minimum_should_match: number; }; }; }[]" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 321 + "lineNumber": 357 }, "deprecated": false, "children": [ { "parentPluginId": "data", - "id": "def-common.AggConfigs.getResponseAggById.$1", - "type": "string", + "id": "def-common.AggConfigs.getSearchSourceTimeFilter.$1", + "type": "Object", "tags": [], - "label": "id", - "description": [ - "- the id of the agg to find" - ], + "label": "forceNow", + "description": [], "signature": [ - "string" + "Date | undefined" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 321 + "lineNumber": 357 }, "deprecated": false, - "isRequired": true + "isRequired": false } ], "returnComment": [] }, { "parentPluginId": "data", - "id": "def-common.AggConfigs.onSearchRequestStart", + "id": "def-common.AggConfigs.postFlightTransform", "type": "Function", "tags": [], - "label": "onSearchRequestStart", + "label": "postFlightTransform", "description": [], "signature": [ - "(searchSource: Pick<", + "(response: ", { "pluginId": "data", "scope": "common", "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSource", - "text": "SearchSource" + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" }, - ", \"create\" | \"history\" | \"setPreferredSearchStrategyId\" | \"setField\" | \"removeField\" | \"setFields\" | \"getId\" | \"getFields\" | \"getField\" | \"getOwnField\" | \"createCopy\" | \"createChild\" | \"setParent\" | \"getParent\" | \"fetch$\" | \"fetch\" | \"onRequestStart\" | \"getSearchRequestBody\" | \"destroy\" | \"getSerializedFields\" | \"serialize\">, options?: ", + ") => ", { "pluginId": "data", "scope": "common", "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" }, - " | undefined) => Promise<[unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]>" + "" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 410 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.postFlightTransform.$1", + "type": "Object", + "tags": [], + "label": "response", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" + }, + "" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 410 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.getRequestAggById", + "type": "Function", + "tags": [], + "label": "getRequestAggById", + "description": [], + "signature": [ + "(id: string) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggConfig", + "text": "AggConfig" + }, + " | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 429 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.getRequestAggById.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 429 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.getResponseAggs", + "type": "Function", + "tags": [ + "return" + ], + "label": "getResponseAggs", + "description": [ + "\nGets the AggConfigs (and possibly ResponseAggConfigs) that\nrepresent the values that will be produced when all aggs\nare run.\n\nWith multi-value metric aggs it is possible for a single agg\nrequest to result in multiple agg values, which is why the length\nof a vis' responseValuesAggs may be different than the vis' aggs\n" + ], + "signature": [ + "() => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggConfig", + "text": "AggConfig" + }, + "[]" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 444 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.getResponseAggById", + "type": "Function", + "tags": [ + "return" + ], + "label": "getResponseAggById", + "description": [ + "\nFind a response agg by it's id. This may be an agg in the aggConfigs, or one\ncreated specifically for a response value\n" + ], + "signature": [ + "(id: string) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggConfig", + "text": "AggConfig" + }, + " | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 458 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.getResponseAggById.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [ + "- the id of the agg to find" + ], + "signature": [ + "string" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 458 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.onSearchRequestStart", + "type": "Function", + "tags": [], + "label": "onSearchRequestStart", + "description": [], + "signature": [ + "(searchSource: Pick<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + ", \"create\" | \"history\" | \"setPreferredSearchStrategyId\" | \"setField\" | \"removeField\" | \"setFields\" | \"getId\" | \"getFields\" | \"getField\" | \"getOwnField\" | \"createCopy\" | \"createChild\" | \"setParent\" | \"getParent\" | \"fetch$\" | \"fetch\" | \"onRequestStart\" | \"getSearchRequestBody\" | \"destroy\" | \"getSerializedFields\" | \"serialize\">, options?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined) => Promise<[unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]>" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 330 + "lineNumber": 467 }, "deprecated": false, "children": [ @@ -6425,7 +6670,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 330 + "lineNumber": 467 }, "deprecated": false, "isRequired": true @@ -6449,7 +6694,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 330 + "lineNumber": 467 }, "deprecated": false, "isRequired": false @@ -7629,6 +7874,73 @@ ], "returnComment": [] }, + { + "parentPluginId": "data", + "id": "def-common.AggType.splitForTimeShift", + "type": "Function", + "tags": [], + "label": "splitForTimeShift", + "description": [], + "signature": [ + "(agg: TAggConfig, aggs: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggConfigs", + "text": "AggConfigs" + }, + ") => boolean" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_type.ts", + "lineNumber": 218 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.AggType.splitForTimeShift.$1", + "type": "Uncategorized", + "tags": [], + "label": "agg", + "description": [], + "signature": [ + "TAggConfig" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_type.ts", + "lineNumber": 218 + }, + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-common.AggType.splitForTimeShift.$2", + "type": "Object", + "tags": [], + "label": "aggs", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggConfigs", + "text": "AggConfigs" + } + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_type.ts", + "lineNumber": 218 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "data", "id": "def-common.AggType.Unnamed", @@ -7646,7 +7958,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_type.ts", - "lineNumber": 227 + "lineNumber": 231 }, "deprecated": false, "children": [ @@ -7679,7 +7991,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_type.ts", - "lineNumber": 227 + "lineNumber": 231 }, "deprecated": false, "isRequired": true @@ -8296,7 +8608,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 31 + "lineNumber": 40 }, "deprecated": false, "children": [ @@ -8312,7 +8624,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 35 + "lineNumber": 44 }, "deprecated": false, "returnComment": [], @@ -8329,7 +8641,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 35 + "lineNumber": 44 }, "deprecated": false }, @@ -8345,40 +8657,244 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 35 + "lineNumber": 44 + }, + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.agg", + "type": "Uncategorized", + "tags": [], + "label": "agg", + "description": [], + "signature": [ + "TBucketAggConfig" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 44 }, "deprecated": false + } + ] + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 45 + }, + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.getShiftedKey", + "type": "Function", + "tags": [], + "label": "getShiftedKey", + "description": [], + "signature": [ + "(agg: TBucketAggConfig, key: React.ReactText, timeShift: moment.Duration) => React.ReactText" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 47 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.getShiftedKey.$1", + "type": "Uncategorized", + "tags": [], + "label": "agg", + "description": [], + "signature": [ + "TBucketAggConfig" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 48 + }, + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.getShiftedKey.$2", + "type": "CompoundType", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "React.ReactText" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 49 + }, + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.getShiftedKey.$3", + "type": "Object", + "tags": [], + "label": "timeShift", + "description": [], + "signature": [ + "moment.Duration" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 50 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.getTimeShiftInterval", + "type": "Function", + "tags": [], + "label": "getTimeShiftInterval", + "description": [], + "signature": [ + "(agg: TBucketAggConfig) => moment.Duration | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 55 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.getTimeShiftInterval.$1", + "type": "Uncategorized", + "tags": [], + "label": "agg", + "description": [], + "signature": [ + "TBucketAggConfig" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 55 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.orderBuckets", + "type": "Function", + "tags": [], + "label": "orderBuckets", + "description": [], + "signature": [ + "(agg: TBucketAggConfig, a: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.GenericBucket", + "text": "GenericBucket" + }, + ", b: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.GenericBucket", + "text": "GenericBucket" + }, + ") => number" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 59 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.orderBuckets.$1", + "type": "Uncategorized", + "tags": [], + "label": "agg", + "description": [], + "signature": [ + "TBucketAggConfig" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 59 + }, + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.orderBuckets.$2", + "type": "CompoundType", + "tags": [], + "label": "a", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.GenericBucket", + "text": "GenericBucket" + } + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 59 + }, + "deprecated": false, + "isRequired": true }, { "parentPluginId": "data", - "id": "def-common.agg", - "type": "Uncategorized", + "id": "def-common.BucketAggType.orderBuckets.$3", + "type": "CompoundType", "tags": [], - "label": "agg", + "label": "b", "description": [], "signature": [ - "TBucketAggConfig" + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.GenericBucket", + "text": "GenericBucket" + } ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 35 + "lineNumber": 59 }, - "deprecated": false + "deprecated": false, + "isRequired": true } - ] - }, - { - "parentPluginId": "data", - "id": "def-common.BucketAggType.type", - "type": "string", - "tags": [], - "label": "type", - "description": [], - "source": { - "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 36 - }, - "deprecated": false + ], + "returnComment": [] }, { "parentPluginId": "data", @@ -8392,7 +8908,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 38 + "lineNumber": 63 }, "deprecated": false, "children": [ @@ -8408,7 +8924,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 38 + "lineNumber": 63 }, "deprecated": false, "isRequired": true @@ -9091,7 +9607,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 37 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -9104,7 +9620,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 41 + "lineNumber": 42 }, "deprecated": false }, @@ -9120,7 +9636,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 42 + "lineNumber": 43 }, "deprecated": false, "returnComment": [], @@ -9135,7 +9651,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 43 + "lineNumber": 44 }, "deprecated": false }, @@ -9151,7 +9667,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 45 + "lineNumber": 46 }, "deprecated": false, "children": [], @@ -9169,7 +9685,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 47 + "lineNumber": 48 }, "deprecated": false, "children": [ @@ -9185,7 +9701,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 47 + "lineNumber": 48 }, "deprecated": false, "isRequired": true @@ -9431,7 +9947,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 121 + "lineNumber": 127 }, "deprecated": false, "children": [ @@ -9447,7 +9963,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 129 + "lineNumber": 135 }, "deprecated": false }, @@ -9463,7 +9979,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 133 + "lineNumber": 139 }, "deprecated": false, "children": [ @@ -9485,7 +10001,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 133 + "lineNumber": 139 }, "deprecated": false, "isRequired": true @@ -9508,7 +10024,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 133 + "lineNumber": 139 }, "deprecated": false, "isRequired": true @@ -9530,7 +10046,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 151 + "lineNumber": 157 }, "deprecated": false, "children": [ @@ -9546,7 +10062,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 151 + "lineNumber": 157 }, "deprecated": false, "isRequired": true @@ -9576,7 +10092,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 160 + "lineNumber": 166 }, "deprecated": false, "children": [ @@ -9594,7 +10110,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 160 + "lineNumber": 166 }, "deprecated": false, "isRequired": true @@ -9620,7 +10136,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 160 + "lineNumber": 166 }, "deprecated": false, "isRequired": true @@ -9642,7 +10158,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 172 + "lineNumber": 178 }, "deprecated": false, "children": [ @@ -9660,7 +10176,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 172 + "lineNumber": 178 }, "deprecated": false, "isRequired": true @@ -9692,7 +10208,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 183 + "lineNumber": 189 }, "deprecated": false, "children": [ @@ -9716,7 +10232,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 183 + "lineNumber": 189 }, "deprecated": false, "isRequired": true @@ -9738,7 +10254,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 191 + "lineNumber": 197 }, "deprecated": false, "children": [], @@ -9765,7 +10281,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 198 + "lineNumber": 204 }, "deprecated": false, "children": [], @@ -9793,7 +10309,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 205 + "lineNumber": 211 }, "deprecated": false, "children": [ @@ -9809,7 +10325,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 205 + "lineNumber": 211 }, "deprecated": false, "isRequired": true @@ -9826,7 +10342,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 205 + "lineNumber": 211 }, "deprecated": false, "isRequired": true @@ -9856,7 +10372,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 216 + "lineNumber": 222 }, "deprecated": false, "children": [ @@ -9872,7 +10388,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 216 + "lineNumber": 222 }, "deprecated": false, "isRequired": true @@ -9901,7 +10417,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 223 + "lineNumber": 229 }, "deprecated": true, "references": [ @@ -9909,14 +10425,14 @@ "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 206 + "lineNumber": 207 } }, { "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 212 + "lineNumber": 213 } } ], @@ -9944,7 +10460,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 230 + "lineNumber": 236 }, "deprecated": false, "children": [], @@ -9971,7 +10487,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 244 + "lineNumber": 250 }, "deprecated": false, "children": [ @@ -9987,7 +10503,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 244 + "lineNumber": 250 }, "deprecated": false, "isRequired": true @@ -10027,7 +10543,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 256 + "lineNumber": 262 }, "deprecated": false, "children": [ @@ -10053,7 +10569,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 256 + "lineNumber": 262 }, "deprecated": false, "isRequired": false @@ -10078,7 +10594,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 256 + "lineNumber": 262 }, "deprecated": false, "isRequired": true @@ -10112,7 +10628,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 266 + "lineNumber": 272 }, "deprecated": false, "children": [], @@ -10152,7 +10668,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 274 + "lineNumber": 280 }, "deprecated": false, "children": [ @@ -10174,7 +10690,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 275 + "lineNumber": 281 }, "deprecated": false, "isRequired": true @@ -10208,7 +10724,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 312 + "lineNumber": 318 }, "deprecated": true, "references": [ @@ -10219,13 +10735,6 @@ "lineNumber": 77 } }, - { - "plugin": "discover", - "link": { - "path": "src/plugins/discover/public/application/angular/context/api/anchor.ts", - "lineNumber": 57 - } - }, { "plugin": "maps", "link": { @@ -10267,7 +10776,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 312 + "lineNumber": 318 }, "deprecated": false, "isRequired": true @@ -10307,7 +10816,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 325 + "lineNumber": 331 }, "deprecated": false, "children": [ @@ -10339,7 +10848,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 326 + "lineNumber": 332 }, "deprecated": false, "isRequired": true @@ -10361,7 +10870,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 334 + "lineNumber": 340 }, "deprecated": false, "children": [], @@ -10383,7 +10892,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 342 + "lineNumber": 348 }, "deprecated": false, "children": [], @@ -10410,7 +10919,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 831 + "lineNumber": 848 }, "deprecated": false, "children": [ @@ -10426,7 +10935,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 831 + "lineNumber": 848 }, "deprecated": false, "isRequired": true @@ -10450,7 +10959,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 860 + "lineNumber": 877 }, "deprecated": false, "children": [], @@ -13926,7 +14435,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 63 + "lineNumber": 64 }, "deprecated": false, "children": [], @@ -13982,7 +14491,7 @@ ], "source": { "path": "src/plugins/data/common/search/expressions/esaggs/request_handler.ts", - "lineNumber": 43 + "lineNumber": 35 }, "deprecated": false, "children": [ @@ -13998,7 +14507,7 @@ ], "source": { "path": "src/plugins/data/common/search/expressions/esaggs/request_handler.ts", - "lineNumber": 43 + "lineNumber": 35 }, "deprecated": false, "isRequired": true @@ -14251,7 +14760,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 49 + "lineNumber": 90 }, "deprecated": false, "children": [ @@ -14267,7 +14776,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 49 + "lineNumber": 90 }, "deprecated": false, "isRequired": true @@ -14433,7 +14942,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 75 + "lineNumber": 92 }, "deprecated": false, "children": [ @@ -14449,7 +14958,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 75 + "lineNumber": 92 }, "deprecated": false, "isRequired": true @@ -14926,6 +15435,45 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.parseTimeShift", + "type": "Function", + "tags": [], + "label": "parseTimeShift", + "description": [ + "\nThis method parses a string into a time shift duration.\nIf parsing fails, 'invalid' is returned.\nAllowed values are the string 'previous' and an integer followed by the units s,m,h,d,w,M,y" + ], + "signature": [ + "(val: string) => moment.Duration | \"previous\" | \"invalid\"" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/utils/parse_time_shift.ts", + "lineNumber": 18 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.parseTimeShift.$1", + "type": "string", + "tags": [], + "label": "val", + "description": [], + "signature": [ + "string" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/utils/parse_time_shift.ts", + "lineNumber": 18 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.pollSearch", @@ -15561,7 +16109,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 44 + "lineNumber": 53 }, "deprecated": false, "children": [ @@ -15577,7 +16125,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 45 + "lineNumber": 54 }, "deprecated": false }, @@ -15593,7 +16141,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 46 + "lineNumber": 55 }, "deprecated": false } @@ -15611,7 +16159,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 195 + "lineNumber": 196 }, "deprecated": false, "children": [ @@ -15640,7 +16188,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTER>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"geo_bounding_box\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"filter\">, \"enabled\" | \"id\" | \"filter\" | \"customLabel\" | \"schema\" | \"geo_bounding_box\" | \"json\">, ", + ".FILTER>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"geo_bounding_box\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"filter\">, \"enabled\" | \"id\" | \"filter\" | \"customLabel\" | \"schema\" | \"geo_bounding_box\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -15664,7 +16212,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 196 + "lineNumber": 197 }, "deprecated": false }, @@ -15693,7 +16241,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\"> & Pick<{ filters?: string | undefined; }, \"filters\"> & Pick<{ filters?: string | undefined; }, never>, \"enabled\" | \"filters\" | \"id\" | \"schema\" | \"json\">, ", + ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ filters?: string | undefined; }, \"filters\"> & Pick<{ filters?: string | undefined; }, never>, \"enabled\" | \"filters\" | \"id\" | \"schema\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -15717,7 +16265,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 197 + "lineNumber": 198 }, "deprecated": false }, @@ -15770,7 +16318,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 198 + "lineNumber": 199 }, "deprecated": false }, @@ -15799,7 +16347,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".IP_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, \"ipRangeType\" | \"ranges\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", + ".IP_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, \"ipRangeType\" | \"ranges\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -15823,7 +16371,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 199 + "lineNumber": 200 }, "deprecated": false }, @@ -15852,7 +16400,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ranges\" | \"time_zone\">, ", + ".DATE_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ranges\" | \"time_zone\">, ", "AggExpressionType", ", ", { @@ -15876,7 +16424,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 200 + "lineNumber": 201 }, "deprecated": false }, @@ -15905,7 +16453,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ranges\">, ", + ".RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -15929,7 +16477,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 201 + "lineNumber": 202 }, "deprecated": false }, @@ -15982,7 +16530,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 202 + "lineNumber": 203 }, "deprecated": false }, @@ -16011,7 +16559,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: string | undefined; }, \"boundingBox\"> & Pick<{ boundingBox?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", + ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: string | undefined; }, \"boundingBox\"> & Pick<{ boundingBox?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", "AggExpressionType", ", ", { @@ -16035,7 +16583,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 203 + "lineNumber": 204 }, "deprecated": false }, @@ -16064,7 +16612,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, \"extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", + ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, \"extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", "AggExpressionType", ", ", { @@ -16088,7 +16636,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 204 + "lineNumber": 205 }, "deprecated": false }, @@ -16117,7 +16665,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, \"timeRange\" | \"extended_bounds\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"timeRange\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", + ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, \"timeRange\" | \"extended_bounds\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"timeRange\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", "AggExpressionType", ", ", { @@ -16141,7 +16689,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 205 + "lineNumber": 206 }, "deprecated": false }, @@ -16170,11 +16718,11 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", + ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", "AggExpressionType", " | undefined; }, \"orderAgg\"> & Pick<{ orderAgg?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", "AggExpressionType", ", ", { @@ -16198,7 +16746,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 206 + "lineNumber": 207 }, "deprecated": false }, @@ -16251,7 +16799,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 207 + "lineNumber": 208 }, "deprecated": false }, @@ -16280,7 +16828,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".AVG_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".AVG_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -16288,7 +16836,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -16312,7 +16860,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 208 + "lineNumber": 209 }, "deprecated": false }, @@ -16341,7 +16889,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MAX_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".MAX_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -16349,7 +16897,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -16373,7 +16921,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 209 + "lineNumber": 210 }, "deprecated": false }, @@ -16402,7 +16950,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MIN_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".MIN_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -16410,7 +16958,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -16434,7 +16982,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 210 + "lineNumber": 211 }, "deprecated": false }, @@ -16463,7 +17011,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SUM_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".SUM_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -16471,7 +17019,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -16495,7 +17043,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 211 + "lineNumber": 212 }, "deprecated": false }, @@ -16524,7 +17072,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -16532,7 +17080,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -16556,7 +17104,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 212 + "lineNumber": 213 }, "deprecated": false }, @@ -16609,7 +17157,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 213 + "lineNumber": 214 }, "deprecated": false }, @@ -16662,7 +17210,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 214 + "lineNumber": 215 }, "deprecated": false }, @@ -16691,11 +17239,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -16719,7 +17267,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 215 + "lineNumber": 216 }, "deprecated": false }, @@ -16748,11 +17296,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".DERIVATIVE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".DERIVATIVE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -16776,7 +17324,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 216 + "lineNumber": 217 }, "deprecated": false }, @@ -16829,7 +17377,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 217 + "lineNumber": 218 }, "deprecated": false }, @@ -16882,7 +17430,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 218 + "lineNumber": 219 }, "deprecated": false }, @@ -16935,7 +17483,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 219 + "lineNumber": 220 }, "deprecated": false }, @@ -16988,7 +17536,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 220 + "lineNumber": 221 }, "deprecated": false }, @@ -17041,7 +17589,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 221 + "lineNumber": 222 }, "deprecated": false }, @@ -17094,7 +17642,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 222 + "lineNumber": 223 }, "deprecated": false }, @@ -17123,11 +17671,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MOVING_FN>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", + ".MOVING_FN>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", "AggExpressionType", ", ", { @@ -17151,7 +17699,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 223 + "lineNumber": 224 }, "deprecated": false }, @@ -17204,7 +17752,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 224 + "lineNumber": 225 }, "deprecated": false }, @@ -17257,7 +17805,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 225 + "lineNumber": 226 }, "deprecated": false }, @@ -17286,11 +17834,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -17314,7 +17862,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 226 + "lineNumber": 227 }, "deprecated": false }, @@ -17367,7 +17915,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 227 + "lineNumber": 228 }, "deprecated": false }, @@ -17420,7 +17968,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 228 + "lineNumber": 229 }, "deprecated": false }, @@ -17473,7 +18021,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 229 + "lineNumber": 230 }, "deprecated": false } @@ -18498,7 +19046,7 @@ }, " extends Pick<", "BaseAggParams", - ", \"json\">" + ", \"json\" | \"timeShift\">" ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/filters.ts", @@ -19768,7 +20316,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 48 + "lineNumber": 49 }, "deprecated": false, "children": [ @@ -19781,7 +20329,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 49 + "lineNumber": 50 }, "deprecated": false }, @@ -19794,7 +20342,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 50 + "lineNumber": 51 }, "deprecated": false }, @@ -19812,7 +20360,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 51 + "lineNumber": 52 }, "deprecated": false }, @@ -19828,7 +20376,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 52 + "lineNumber": 53 }, "deprecated": false }, @@ -19844,7 +20392,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 53 + "lineNumber": 54 }, "deprecated": false }, @@ -19860,7 +20408,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 54 + "lineNumber": 55 }, "deprecated": false }, @@ -19876,7 +20424,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 55 + "lineNumber": 56 }, "deprecated": false }, @@ -19892,7 +20440,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 56 + "lineNumber": 57 }, "deprecated": false }, @@ -19908,7 +20456,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 57 + "lineNumber": 58 }, "deprecated": false }, @@ -19924,7 +20472,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 59 + "lineNumber": 60 }, "deprecated": false }, @@ -19940,7 +20488,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 60 + "lineNumber": 61 }, "deprecated": false } @@ -20497,7 +21045,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 18 + "lineNumber": 19 }, "deprecated": false, "children": [ @@ -20513,7 +21061,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 20 + "lineNumber": 21 }, "deprecated": false }, @@ -20544,7 +21092,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 21 + "lineNumber": 22 }, "deprecated": false } @@ -21283,7 +21831,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 14 + "lineNumber": 15 }, "deprecated": false, "children": [ @@ -21314,7 +21862,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 15 + "lineNumber": 16 }, "deprecated": false } @@ -21839,7 +22387,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 16 + "lineNumber": 17 }, "deprecated": false, "children": [ @@ -21870,7 +22418,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 17 + "lineNumber": 18 }, "deprecated": false } @@ -22536,7 +23084,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 20 + "lineNumber": 21 }, "deprecated": false, "children": [ @@ -22567,7 +23115,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 22 + "lineNumber": 23 }, "deprecated": false }, @@ -22583,7 +23131,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 23 + "lineNumber": 24 }, "deprecated": false } @@ -23650,7 +24198,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 116 + "lineNumber": 122 }, "deprecated": false, "children": [ @@ -23708,7 +24256,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 117 + "lineNumber": 123 }, "deprecated": false, "returnComment": [], @@ -24312,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", @@ -24786,7 +25334,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 43 + "lineNumber": 45 }, "deprecated": false, "initialIsOpen": false @@ -25003,7 +25551,7 @@ "label": "AggGroupName", "description": [], "signature": [ - "\"buckets\" | \"metrics\" | \"none\"" + "\"none\" | \"buckets\" | \"metrics\"" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_groups.ts", @@ -25512,7 +26060,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 49 + "lineNumber": 58 }, "deprecated": false, "initialIsOpen": false @@ -26549,6 +27097,87 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.GenericBucket", + "type": "Type", + "tags": [], + "label": "GenericBucket", + "description": [], + "signature": [ + "(", + "AggregationsCompositeBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsDateHistogramBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsFiltersBucketItemKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsIpRangeBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsRangeBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsRareTermsBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsSignificantTermsBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsKeyedBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; })" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 60 + }, + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.IAggConfig", @@ -26570,7 +27199,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 53 + "lineNumber": 55 }, "deprecated": false, "initialIsOpen": false @@ -26699,7 +27328,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 35 + "lineNumber": 36 }, "deprecated": false, "initialIsOpen": false @@ -27399,7 +28028,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 30 + "lineNumber": 31 }, "deprecated": false, "initialIsOpen": false @@ -30613,7 +31242,7 @@ "label": "types", "description": [], "signature": [ - "(\"string\" | \"number\")[]" + "(\"number\" | \"string\")[]" ], "source": { "path": "src/plugins/data/common/search/expressions/range.ts", @@ -30657,7 +31286,7 @@ "label": "types", "description": [], "signature": [ - "(\"string\" | \"number\")[]" + "(\"number\" | \"string\")[]" ], "source": { "path": "src/plugins/data/common/search/expressions/range.ts", @@ -30701,7 +31330,7 @@ "label": "types", "description": [], "signature": [ - "(\"string\" | \"number\")[]" + "(\"number\" | \"string\")[]" ], "source": { "path": "src/plugins/data/common/search/expressions/range.ts", @@ -30745,7 +31374,7 @@ "label": "types", "description": [], "signature": [ - "(\"string\" | \"number\")[]" + "(\"number\" | \"string\")[]" ], "source": { "path": "src/plugins/data/common/search/expressions/range.ts", diff --git a/api_docs/data_ui.json b/api_docs/data_ui.json index 5b4f11ee0cd9fa..4a532af99a115f 100644 --- a/api_docs/data_ui.json +++ b/api_docs/data_ui.json @@ -510,9 +510,9 @@ "signature": [ "Pick, \"children\" | \"onClick\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"isClearable\" | \"async\" | \"compressed\" | \"fullWidth\" | \"singleSelection\" | \"prepend\" | \"append\" | \"sortMatchesBy\" | \"customOptionText\" | \"onCreateOption\" | \"renderOption\" | \"inputRef\" | \"isDisabled\" | \"isInvalid\" | \"noSuggestions\" | \"rowHeight\" | \"delimiter\">, \"children\" | \"onClick\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"isClearable\" | \"async\" | \"compressed\" | \"fullWidth\" | \"singleSelection\" | \"prepend\" | \"append\" | \"sortMatchesBy\" | \"customOptionText\" | \"onCreateOption\" | \"renderOption\" | \"inputRef\" | \"isDisabled\" | \"isInvalid\" | \"noSuggestions\" | \"rowHeight\" | \"delimiter\"> & Required, \"children\" | \"onClick\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"isClearable\" | \"async\" | \"compressed\" | \"fullWidth\" | \"singleSelection\" | \"prepend\" | \"append\" | \"sortMatchesBy\" | \"autoFocus\" | \"customOptionText\" | \"onCreateOption\" | \"renderOption\" | \"inputRef\" | \"isDisabled\" | \"isInvalid\" | \"noSuggestions\" | \"rowHeight\" | \"delimiter\">, \"children\" | \"onClick\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"isClearable\" | \"async\" | \"compressed\" | \"fullWidth\" | \"singleSelection\" | \"prepend\" | \"append\" | \"sortMatchesBy\" | \"autoFocus\" | \"customOptionText\" | \"onCreateOption\" | \"renderOption\" | \"inputRef\" | \"isDisabled\" | \"isInvalid\" | \"noSuggestions\" | \"rowHeight\" | \"delimiter\"> & Required, \"children\" | \"onClick\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"isClearable\" | \"async\" | \"compressed\" | \"fullWidth\" | \"singleSelection\" | \"prepend\" | \"append\" | \"sortMatchesBy\" | \"customOptionText\" | \"onCreateOption\" | \"renderOption\" | \"inputRef\" | \"isDisabled\" | \"isInvalid\" | \"noSuggestions\" | \"rowHeight\" | \"delimiter\">, \"placeholder\">> & { onChange: (indexPatternId?: string | undefined) => void; indexPatternId: string; onNoIndexPatterns?: (() => void) | undefined; }" + ", \"children\" | \"onClick\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"isClearable\" | \"async\" | \"compressed\" | \"fullWidth\" | \"singleSelection\" | \"prepend\" | \"append\" | \"sortMatchesBy\" | \"autoFocus\" | \"customOptionText\" | \"onCreateOption\" | \"renderOption\" | \"inputRef\" | \"isDisabled\" | \"isInvalid\" | \"noSuggestions\" | \"rowHeight\" | \"delimiter\">, \"placeholder\">> & { onChange: (indexPatternId?: string | undefined) => void; indexPatternId: string; onNoIndexPatterns?: (() => void) | undefined; }" ], "source": { "path": "src/plugins/data/public/ui/index_pattern_select/index_pattern_select.tsx", diff --git a/api_docs/data_visualizer.json b/api_docs/data_visualizer.json new file mode 100644 index 00000000000000..b4544a03817909 --- /dev/null +++ b/api_docs/data_visualizer.json @@ -0,0 +1,328 @@ +{ + "id": "dataVisualizer", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [], + "start": { + "parentPluginId": "dataVisualizer", + "id": "def-public.DataVisualizerPluginStart", + "type": "Type", + "tags": [], + "label": "DataVisualizerPluginStart", + "description": [], + "signature": [ + "{ getFileDataVisualizerComponent: () => Promise>; getMaxBytesFormatted: () => string; }" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/public/plugin.ts", + "lineNumber": 33 + }, + "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.ts", + "lineNumber": 14 + }, + "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.ts", + "lineNumber": 15 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.pageIndex", + "type": "number", + "tags": [], + "label": "pageIndex", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 16 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.sortField", + "type": "string", + "tags": [], + "label": "sortField", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 17 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.sortDirection", + "type": "string", + "tags": [], + "label": "sortDirection", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 18 + }, + "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.ts", + "lineNumber": 19 + }, + "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.ts", + "lineNumber": 20 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.showDistributions", + "type": "boolean", + "tags": [], + "label": "showDistributions", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 21 + }, + "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.ts", + "lineNumber": 10 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.JobFieldType", + "type": "Type", + "tags": [], + "label": "JobFieldType", + "description": [], + "signature": [ + "\"number\" | \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"unknown\"" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 12 + }, + "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.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 + } + ] + } +} diff --git a/api_docs/file_data_visualizer.mdx b/api_docs/data_visualizer.mdx similarity index 100% rename from api_docs/file_data_visualizer.mdx rename to api_docs/data_visualizer.mdx diff --git a/api_docs/deprecations.mdx b/api_docs/deprecations.mdx index 99edad62075bce..b5fe8d1e31da0a 100644 --- a/api_docs/deprecations.mdx +++ b/api_docs/deprecations.mdx @@ -82,14 +82,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| -| | [plugin.ts#L13](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/plugin.ts#L13) | 7.16 | -| | [plugin.ts#L69](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/plugin.ts#L69) | 7.16 | -| | [types.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/types.ts#L8) | 7.16 | -| | [types.ts#L41](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/types.ts#L41) | 7.16 | -| | [types.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/target/types/server/types.d.ts#L1) | 7.16 | -| | [types.d.ts#L30](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/target/types/server/types.d.ts#L30) | 7.16 | -| | [plugin.ts#L17](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/plugin.ts#L17) | 7.16 | -| | [plugin.ts#L36](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/plugin.ts#L36) | 7.16 | +| | [plugin.ts#L16](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/plugin.ts#L16) | 7.16 | +| | [plugin.ts#L27](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/plugin.ts#L27) | 7.16 | @@ -103,20 +97,20 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [saved_objects.ts#L13](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_objects.ts#L13) | - | | | [saved_dashboards.ts#L12](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboards.ts#L12) | - | | | [saved_dashboards.ts#L31](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboards.ts#L31) | - | -| | [types.ts#L25](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/types.ts#L25) | - | -| | [types.ts#L74](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/types.ts#L74) | - | +| | [types.ts#L33](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#L33) | - | +| | [types.ts#L186](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#L186) | - | | | [plugin.tsx#L42](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#L42) | - | -| | [plugin.tsx#L126](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#L126) | - | +| | [plugin.tsx#L127](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#L127) | - | | | [url_generator.ts#L19](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/url_generator.ts#L19) | - | | | [url_generator.ts#L95](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/url_generator.ts#L95) | - | | | [saved_objects.ts#L11](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_objects.ts#L11) | - | | | [saved_dashboard.ts#L10](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#L10) | - | -| | [saved_dashboard.ts#L18](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#L18) | - | +| | [saved_dashboard.ts#L19](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#L19) | - | +| | [dashboard_tagging.ts#L10](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#L10) | - | +| | [dashboard_tagging.ts#L15](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#L15) | - | | | [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) | - | @@ -129,26 +123,22 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [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) | - | | | [types.ts#L16](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/types.ts#L16) | - | | | [types.ts#L30](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/types.ts#L30) | - | -| | [context_app_legacy.tsx#L17](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx#L17) | - | -| | [context_app_legacy.tsx#L26](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx#L26) | - | | | [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#L58](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L58) | - | +| | [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#L58](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L58) | - | +| | [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) | - | | | [types.ts#L16](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/types.ts#L16) | - | | | [types.ts#L30](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/types.ts#L30) | - | -| | [context_app_legacy.tsx#L17](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx#L17) | - | -| | [context_app_legacy.tsx#L26](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx#L26) | - | | | [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#L58](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L58) | - | -| | [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) | - | +| | [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/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) | - | @@ -163,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#L167](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#L167) | - | +| | [attribute_service.tsx#L165](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#L165) | - | @@ -199,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#L189](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#L189) | - | +| | [plugin.ts#L190](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#L190) | - | | | [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) | - | @@ -238,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#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 | +| | [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 | | | [types.ts#L9](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L9) | 7.16 | -| | [types.ts#L40](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L40) | 7.16 | +| | [types.ts#L39](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L39) | 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#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L25) | 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.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L10) | 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.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.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#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 | +| | [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 | @@ -588,11 +578,6 @@ 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 | @@ -602,6 +587,8 @@ 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) | - | @@ -616,10 +603,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#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) | - | +| | [field_stats.ts#L141](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L141) | - | +| | [field_stats.ts#L250](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L250) | - | +| | [field_stats.ts#L290](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L290) | - | +| | [field_stats.ts#L332](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L332) | - | | | [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) | - | @@ -631,10 +618,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#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) | - | +| | [field_stats.ts#L141](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L141) | - | +| | [field_stats.ts#L250](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L250) | - | +| | [field_stats.ts#L290](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L290) | - | +| | [field_stats.ts#L332](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L332) | - | | | [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) | - | @@ -643,6 +630,8 @@ 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) | - | @@ -657,10 +646,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#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) | - | +| | [field_stats.ts#L141](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L141) | - | +| | [field_stats.ts#L250](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L250) | - | +| | [field_stats.ts#L290](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L290) | - | +| | [field_stats.ts#L332](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L332) | - | | | [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) | - | @@ -946,7 +935,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#L45](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L45) | - | +| | [types.ts#L44](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L44) | - | | | [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) | - | @@ -1136,7 +1125,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#L45](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L45) | - | +| | [types.ts#L44](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L44) | - | | | [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) | - | @@ -1393,7 +1382,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#L279](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/plugin.ts#L279) | 7.16 | +| | [plugin.ts#L284](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/plugin.ts#L284) | 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 | @@ -1482,22 +1471,22 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| -| | [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) | - | +| | [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) | - | | | [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#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) | - | +| | [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) | - | | | [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#L24](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#L24) | - | +| | [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) | - | @@ -1573,9 +1562,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| -| | [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) | - | +| | [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) | - | | | [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) | - | @@ -1612,9 +1601,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#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) | - | +| | [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) | - | | | [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) | - | @@ -1669,6 +1658,8 @@ 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) | - | @@ -1785,9 +1776,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#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) | - | +| | [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) | - | | | [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) | - | @@ -1824,9 +1815,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#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) | - | +| | [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) | - | | | [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) | - | @@ -1881,6 +1872,8 @@ 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) | - | @@ -1955,8 +1948,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 | @@ -2076,12 +2069,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/discover.json b/api_docs/discover.json index 1824b5a3e3d5d0..48ed4d51abc67b 100644 --- a/api_docs/discover.json +++ b/api_docs/discover.json @@ -56,7 +56,7 @@ "description": [], "signature": [ "() => Promise" ], "source": { @@ -79,7 +79,7 @@ "description": [], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 22 + "lineNumber": 16 }, "deprecated": false, "children": [ @@ -97,7 +97,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 26 + "lineNumber": 20 }, "deprecated": false }, @@ -115,7 +115,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 31 + "lineNumber": 25 }, "deprecated": false }, @@ -140,7 +140,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 36 + "lineNumber": 30 }, "deprecated": false }, @@ -165,7 +165,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 41 + "lineNumber": 35 }, "deprecated": false }, @@ -190,7 +190,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 46 + "lineNumber": 40 }, "deprecated": false }, @@ -215,7 +215,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 52 + "lineNumber": 46 }, "deprecated": false }, @@ -233,7 +233,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 58 + "lineNumber": 52 }, "deprecated": false }, @@ -251,7 +251,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 63 + "lineNumber": 57 }, "deprecated": false }, @@ -269,7 +269,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 68 + "lineNumber": 62 }, "deprecated": false }, @@ -287,7 +287,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 73 + "lineNumber": 67 }, "deprecated": false }, @@ -305,7 +305,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 77 + "lineNumber": 72 }, "deprecated": false }, @@ -323,7 +323,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 81 + "lineNumber": 77 }, "deprecated": false } @@ -890,7 +890,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 20 + "lineNumber": 14 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/enterprise_search.json b/api_docs/enterprise_search.json index 6ea7bfe1c50f1f..e2b6184c9d36f9 100644 --- a/api_docs/enterprise_search.json +++ b/api_docs/enterprise_search.json @@ -22,11 +22,11 @@ "label": "ConfigType", "description": [], "signature": [ - "{ readonly host?: string | undefined; readonly enabled: boolean; readonly accessCheckTimeout: number; readonly accessCheckTimeoutWarning: number; }" + "{ readonly host?: string | undefined; readonly enabled: boolean; readonly ssl: Readonly<{ certificateAuthorities?: string | string[] | undefined; } & { verificationMode: \"none\" | \"certificate\" | \"full\"; }>; readonly accessCheckTimeout: number; readonly accessCheckTimeoutWarning: number; }" ], "source": { "path": "x-pack/plugins/enterprise_search/server/index.ts", - "lineNumber": 24 + "lineNumber": 33 }, "deprecated": false, "initialIsOpen": false @@ -50,7 +50,13 @@ "Type", "; accessCheckTimeoutWarning: ", "Type", - "; }>" + "; ssl: ", + "ObjectType", + "<{ certificateAuthorities: ", + "Type", + "; verificationMode: ", + "Type", + "<\"none\" | \"certificate\" | \"full\">; }>; }>" ], "source": { "path": "x-pack/plugins/enterprise_search/server/index.ts", diff --git a/api_docs/event_log.json b/api_docs/event_log.json index 1eb19bf6310de4..1d5605105c7c1a 100644 --- a/api_docs/event_log.json +++ b/api_docs/event_log.json @@ -687,7 +687,7 @@ "label": "logEvent", "description": [], "signature": [ - "(properties: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" + "(properties: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", @@ -703,7 +703,7 @@ "label": "properties", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", @@ -723,7 +723,7 @@ "label": "startTiming", "description": [], "signature": [ - "(event: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" + "(event: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", @@ -739,7 +739,7 @@ "label": "event", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", @@ -759,7 +759,7 @@ "label": "stopTiming", "description": [], "signature": [ - "(event: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" + "(event: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", @@ -775,7 +775,7 @@ "label": "event", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", @@ -850,7 +850,7 @@ "label": "data", "description": [], "signature": [ - "(Readonly<{ '@timestamp'?: string | undefined; kibana?: Readonly<{ saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}> | undefined)[]" + "(Readonly<{ kibana?: Readonly<{ saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}> | undefined)[]" ], "source": { "path": "x-pack/plugins/event_log/server/es/cluster_client_adapter.ts", @@ -872,7 +872,7 @@ "label": "IEvent", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "source": { "path": "x-pack/plugins/event_log/generated/schemas.ts", @@ -889,7 +889,7 @@ "label": "IValidatedEvent", "description": [], "signature": [ - "Readonly<{ '@timestamp'?: string | undefined; kibana?: Readonly<{ saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}> | undefined" + "Readonly<{ kibana?: Readonly<{ saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}> | undefined" ], "source": { "path": "x-pack/plugins/event_log/generated/schemas.ts", @@ -1171,7 +1171,7 @@ "label": "getLogger", "description": [], "signature": [ - "(properties: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => ", + "(properties: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => ", { "pluginId": "eventLog", "scope": "server", @@ -1194,7 +1194,7 @@ "label": "properties", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", diff --git a/api_docs/expressions.json b/api_docs/expressions.json index e981414fe7bda9..79a9d016df0710 100644 --- a/api_docs/expressions.json +++ b/api_docs/expressions.json @@ -39151,7 +39151,7 @@ "label": "types", "description": [], "signature": [ - "(\"boolean\" | \"string\" | \"number\" | \"null\")[]" + "(\"number\" | \"boolean\" | \"string\" | \"null\")[]" ], "source": { "path": "src/plugins/expressions/common/expression_functions/specs/map_column.ts", diff --git a/api_docs/features.json b/api_docs/features.json index 63c3ebe3a92dec..7392fcf6a17f76 100644 --- a/api_docs/features.json +++ b/api_docs/features.json @@ -11,7 +11,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 137 + "lineNumber": 142 }, "deprecated": false, "children": [ @@ -34,7 +34,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 138 + "lineNumber": 143 }, "deprecated": false }, @@ -50,7 +50,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 140 + "lineNumber": 145 }, "deprecated": false, "children": [ @@ -62,7 +62,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{ id: string; name: string; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; privilegeGroups: readonly Readonly<{ groupType: ", + "Readonly<{ id: string; name: string; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; cases?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; privilegeGroups: readonly Readonly<{ groupType: ", { "pluginId": "features", "scope": "common", @@ -70,11 +70,11 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"all\" | \"none\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 140 + "lineNumber": 145 }, "deprecated": false, "isRequired": true @@ -91,7 +91,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 146 + "lineNumber": 151 }, "deprecated": false }, @@ -104,7 +104,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 150 + "lineNumber": 155 }, "deprecated": false }, @@ -120,7 +120,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 154 + "lineNumber": 159 }, "deprecated": false }, @@ -136,7 +136,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 158 + "lineNumber": 163 }, "deprecated": false }, @@ -152,7 +152,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 162 + "lineNumber": 167 }, "deprecated": false }, @@ -168,7 +168,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 166 + "lineNumber": 171 }, "deprecated": false }, @@ -184,7 +184,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 170 + "lineNumber": 175 }, "deprecated": false }, @@ -200,7 +200,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 174 + "lineNumber": 179 }, "deprecated": false }, @@ -212,11 +212,11 @@ "label": "privileges", "description": [], "signature": [ - "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null" + "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 178 + "lineNumber": 183 }, "deprecated": false }, @@ -232,7 +232,23 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 182 + "lineNumber": 187 + }, + "deprecated": false + }, + { + "parentPluginId": "features", + "id": "def-public.KibanaFeature.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [], + "signature": [ + "readonly string[] | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/kibana_feature.ts", + "lineNumber": 191 }, "deprecated": false }, @@ -245,7 +261,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 186 + "lineNumber": 195 }, "deprecated": false }, @@ -257,11 +273,11 @@ "label": "reserved", "description": [], "signature": [ - "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined" + "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 190 + "lineNumber": 199 }, "deprecated": false }, @@ -284,7 +300,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 194 + "lineNumber": 203 }, "deprecated": false, "children": [], @@ -411,7 +427,7 @@ "\nIf your feature requires access to specific Alert Types, then specify your access needs here.\nInclude both Alert Types registered by the feature and external Alert Types such as built-in\nAlert Types and Alert Types provided by other features to which you wish to grant access." ], "signature": [ - "{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined" + "{ rule?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; alert?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; } | undefined" ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", @@ -419,6 +435,24 @@ }, "deprecated": false }, + { + "parentPluginId": "features", + "id": "def-public.FeatureKibanaPrivileges.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nIf your feature requires access to specific owners of cases (aka plugins that have created cases), then specify your access needs here. The values here should\nbe unique identifiers for the owners of cases you want access to." + ], + "signature": [ + "{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", + "lineNumber": 135 + }, + "deprecated": false + }, { "parentPluginId": "features", "id": "def-public.FeatureKibanaPrivileges.savedObject", @@ -433,7 +467,7 @@ ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", - "lineNumber": 110 + "lineNumber": 161 }, "deprecated": false }, @@ -453,7 +487,7 @@ ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", - "lineNumber": 153 + "lineNumber": 204 }, "deprecated": false } @@ -651,6 +685,24 @@ }, "deprecated": false }, + { + "parentPluginId": "features", + "id": "def-public.KibanaFeatureConfig.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nIf your feature grants access to specific case types, you can specify them here to control visibility based on the current space." + ], + "signature": [ + "readonly string[] | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/kibana_feature.ts", + "lineNumber": 104 + }, + "deprecated": false + }, { "parentPluginId": "features", "id": "def-public.KibanaFeatureConfig.privileges", @@ -683,7 +735,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 113 + "lineNumber": 118 }, "deprecated": false }, @@ -709,7 +761,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 121 + "lineNumber": 126 }, "deprecated": false }, @@ -727,7 +779,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 126 + "lineNumber": 131 }, "deprecated": false }, @@ -747,7 +799,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 131 + "lineNumber": 136 }, "deprecated": false } @@ -838,7 +890,7 @@ "section": "def-common.FeatureKibanaPrivileges", "text": "FeatureKibanaPrivileges" }, - ", \"management\" | \"catalogue\" | \"alerting\" | \"ui\" | \"app\" | \"api\" | \"savedObject\">" + ", \"management\" | \"catalogue\" | \"alerting\" | \"ui\" | \"cases\" | \"app\" | \"api\" | \"savedObject\">" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", @@ -886,7 +938,7 @@ "\nDenotes which Primary Feature Privilege this sub-feature privilege should be included in.\n`read` is also included in `all` automatically." ], "signature": [ - "\"none\" | \"all\" | \"read\"" + "\"all\" | \"none\" | \"read\"" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", @@ -1139,7 +1191,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 137 + "lineNumber": 142 }, "deprecated": false, "children": [ @@ -1162,7 +1214,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 138 + "lineNumber": 143 }, "deprecated": false }, @@ -1178,7 +1230,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 140 + "lineNumber": 145 }, "deprecated": false, "children": [ @@ -1190,7 +1242,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{ id: string; name: string; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; privilegeGroups: readonly Readonly<{ groupType: ", + "Readonly<{ id: string; name: string; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; cases?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; privilegeGroups: readonly Readonly<{ groupType: ", { "pluginId": "features", "scope": "common", @@ -1198,11 +1250,11 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"all\" | \"none\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 140 + "lineNumber": 145 }, "deprecated": false, "isRequired": true @@ -1219,7 +1271,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 146 + "lineNumber": 151 }, "deprecated": false }, @@ -1232,7 +1284,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 150 + "lineNumber": 155 }, "deprecated": false }, @@ -1248,7 +1300,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 154 + "lineNumber": 159 }, "deprecated": false }, @@ -1264,7 +1316,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 158 + "lineNumber": 163 }, "deprecated": false }, @@ -1280,7 +1332,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 162 + "lineNumber": 167 }, "deprecated": false }, @@ -1296,7 +1348,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 166 + "lineNumber": 171 }, "deprecated": false }, @@ -1312,7 +1364,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 170 + "lineNumber": 175 }, "deprecated": false }, @@ -1328,7 +1380,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 174 + "lineNumber": 179 }, "deprecated": false }, @@ -1340,11 +1392,11 @@ "label": "privileges", "description": [], "signature": [ - "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null" + "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 178 + "lineNumber": 183 }, "deprecated": false }, @@ -1360,7 +1412,23 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 182 + "lineNumber": 187 + }, + "deprecated": false + }, + { + "parentPluginId": "features", + "id": "def-server.KibanaFeature.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [], + "signature": [ + "readonly string[] | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/kibana_feature.ts", + "lineNumber": 191 }, "deprecated": false }, @@ -1373,7 +1441,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 186 + "lineNumber": 195 }, "deprecated": false }, @@ -1385,11 +1453,11 @@ "label": "reserved", "description": [], "signature": [ - "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined" + "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 190 + "lineNumber": 199 }, "deprecated": false }, @@ -1412,7 +1480,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 194 + "lineNumber": 203 }, "deprecated": false, "children": [], @@ -1740,7 +1808,7 @@ "\nIf your feature requires access to specific Alert Types, then specify your access needs here.\nInclude both Alert Types registered by the feature and external Alert Types such as built-in\nAlert Types and Alert Types provided by other features to which you wish to grant access." ], "signature": [ - "{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined" + "{ rule?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; alert?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; } | undefined" ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", @@ -1748,6 +1816,24 @@ }, "deprecated": false }, + { + "parentPluginId": "features", + "id": "def-server.FeatureKibanaPrivileges.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nIf your feature requires access to specific owners of cases (aka plugins that have created cases), then specify your access needs here. The values here should\nbe unique identifiers for the owners of cases you want access to." + ], + "signature": [ + "{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", + "lineNumber": 135 + }, + "deprecated": false + }, { "parentPluginId": "features", "id": "def-server.FeatureKibanaPrivileges.savedObject", @@ -1762,7 +1848,7 @@ ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", - "lineNumber": 110 + "lineNumber": 161 }, "deprecated": false }, @@ -1782,7 +1868,7 @@ ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", - "lineNumber": 153 + "lineNumber": 204 }, "deprecated": false } @@ -1980,6 +2066,24 @@ }, "deprecated": false }, + { + "parentPluginId": "features", + "id": "def-server.KibanaFeatureConfig.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nIf your feature grants access to specific case types, you can specify them here to control visibility based on the current space." + ], + "signature": [ + "readonly string[] | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/kibana_feature.ts", + "lineNumber": 104 + }, + "deprecated": false + }, { "parentPluginId": "features", "id": "def-server.KibanaFeatureConfig.privileges", @@ -2012,7 +2116,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 113 + "lineNumber": 118 }, "deprecated": false }, @@ -2038,7 +2142,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 121 + "lineNumber": 126 }, "deprecated": false }, @@ -2056,7 +2160,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 126 + "lineNumber": 131 }, "deprecated": false }, @@ -2076,7 +2180,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 131 + "lineNumber": 136 }, "deprecated": false } @@ -2708,7 +2812,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 137 + "lineNumber": 142 }, "deprecated": false, "children": [ @@ -2731,7 +2835,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 138 + "lineNumber": 143 }, "deprecated": false }, @@ -2747,7 +2851,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 140 + "lineNumber": 145 }, "deprecated": false, "children": [ @@ -2759,7 +2863,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{ id: string; name: string; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; privilegeGroups: readonly Readonly<{ groupType: ", + "Readonly<{ id: string; name: string; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; cases?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; privilegeGroups: readonly Readonly<{ groupType: ", { "pluginId": "features", "scope": "common", @@ -2767,11 +2871,11 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"all\" | \"none\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 140 + "lineNumber": 145 }, "deprecated": false, "isRequired": true @@ -2788,7 +2892,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 146 + "lineNumber": 151 }, "deprecated": false }, @@ -2801,7 +2905,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 150 + "lineNumber": 155 }, "deprecated": false }, @@ -2817,7 +2921,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 154 + "lineNumber": 159 }, "deprecated": false }, @@ -2833,7 +2937,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 158 + "lineNumber": 163 }, "deprecated": false }, @@ -2849,7 +2953,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 162 + "lineNumber": 167 }, "deprecated": false }, @@ -2865,7 +2969,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 166 + "lineNumber": 171 }, "deprecated": false }, @@ -2881,7 +2985,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 170 + "lineNumber": 175 }, "deprecated": false }, @@ -2897,7 +3001,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 174 + "lineNumber": 179 }, "deprecated": false }, @@ -2909,11 +3013,11 @@ "label": "privileges", "description": [], "signature": [ - "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null" + "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 178 + "lineNumber": 183 }, "deprecated": false }, @@ -2929,7 +3033,23 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 182 + "lineNumber": 187 + }, + "deprecated": false + }, + { + "parentPluginId": "features", + "id": "def-common.KibanaFeature.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [], + "signature": [ + "readonly string[] | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/kibana_feature.ts", + "lineNumber": 191 }, "deprecated": false }, @@ -2942,7 +3062,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 186 + "lineNumber": 195 }, "deprecated": false }, @@ -2954,11 +3074,11 @@ "label": "reserved", "description": [], "signature": [ - "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined" + "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 190 + "lineNumber": 199 }, "deprecated": false }, @@ -2981,7 +3101,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 194 + "lineNumber": 203 }, "deprecated": false, "children": [], @@ -3035,7 +3155,7 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"all\" | \"none\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", @@ -3076,7 +3196,7 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"all\" | \"none\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", @@ -3100,7 +3220,7 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"all\" | \"none\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", @@ -3432,7 +3552,7 @@ "\nIf your feature requires access to specific Alert Types, then specify your access needs here.\nInclude both Alert Types registered by the feature and external Alert Types such as built-in\nAlert Types and Alert Types provided by other features to which you wish to grant access." ], "signature": [ - "{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined" + "{ rule?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; alert?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; } | undefined" ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", @@ -3440,6 +3560,24 @@ }, "deprecated": false }, + { + "parentPluginId": "features", + "id": "def-common.FeatureKibanaPrivileges.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nIf your feature requires access to specific owners of cases (aka plugins that have created cases), then specify your access needs here. The values here should\nbe unique identifiers for the owners of cases you want access to." + ], + "signature": [ + "{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", + "lineNumber": 135 + }, + "deprecated": false + }, { "parentPluginId": "features", "id": "def-common.FeatureKibanaPrivileges.savedObject", @@ -3454,7 +3592,7 @@ ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", - "lineNumber": 110 + "lineNumber": 161 }, "deprecated": false }, @@ -3474,7 +3612,7 @@ ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", - "lineNumber": 153 + "lineNumber": 204 }, "deprecated": false } @@ -3672,6 +3810,24 @@ }, "deprecated": false }, + { + "parentPluginId": "features", + "id": "def-common.KibanaFeatureConfig.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nIf your feature grants access to specific case types, you can specify them here to control visibility based on the current space." + ], + "signature": [ + "readonly string[] | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/kibana_feature.ts", + "lineNumber": 104 + }, + "deprecated": false + }, { "parentPluginId": "features", "id": "def-common.KibanaFeatureConfig.privileges", @@ -3704,7 +3860,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 113 + "lineNumber": 118 }, "deprecated": false }, @@ -3730,7 +3886,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 121 + "lineNumber": 126 }, "deprecated": false }, @@ -3748,7 +3904,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 126 + "lineNumber": 131 }, "deprecated": false }, @@ -3768,7 +3924,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 131 + "lineNumber": 136 }, "deprecated": false } @@ -3859,7 +4015,7 @@ "section": "def-common.FeatureKibanaPrivileges", "text": "FeatureKibanaPrivileges" }, - ", \"management\" | \"catalogue\" | \"alerting\" | \"ui\" | \"app\" | \"api\" | \"savedObject\">" + ", \"management\" | \"catalogue\" | \"alerting\" | \"ui\" | \"cases\" | \"app\" | \"api\" | \"savedObject\">" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", @@ -3907,7 +4063,7 @@ "\nDenotes which Primary Feature Privilege this sub-feature privilege should be included in.\n`read` is also included in `all` automatically." ], "signature": [ - "\"none\" | \"all\" | \"read\"" + "\"all\" | \"none\" | \"read\"" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", diff --git a/api_docs/file_data_visualizer.json b/api_docs/file_data_visualizer.json deleted file mode 100644 index c536acd5f4997a..00000000000000 --- 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": 33 - }, - "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\" | \"text\" | \"keyword\" | \"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/fleet.json b/api_docs/fleet.json index 043dfcd16c2a79..bb7e8990626400 100644 --- a/api_docs/fleet.json +++ b/api_docs/fleet.json @@ -14,7 +14,7 @@ "(packageInfo: T) => string" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/services/pkg_key_from_package_info.ts", + "path": "x-pack/plugins/fleet/public/services/pkg_key_from_package_info.ts", "lineNumber": 8 }, "deprecated": false, @@ -30,7 +30,7 @@ "T" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/services/pkg_key_from_package_info.ts", + "path": "x-pack/plugins/fleet/public/services/pkg_key_from_package_info.ts", "lineNumber": 9 }, "deprecated": false, @@ -52,7 +52,7 @@ "\nSupported routing state for the agent policy details page routes with deploy agents action" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 37 }, "deprecated": false, @@ -78,7 +78,7 @@ " | undefined] | undefined" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 39 }, "deprecated": false @@ -96,7 +96,7 @@ "\nSupported routing state for the agent policy details page routes with deploy agents action" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 29 }, "deprecated": false, @@ -122,7 +122,7 @@ " | undefined] | undefined" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 31 }, "deprecated": false @@ -140,7 +140,7 @@ "\nSupported routing state for the create package policy page routes" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 15 }, "deprecated": false, @@ -182,7 +182,7 @@ " | undefined]) | undefined" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 17 }, "deprecated": false @@ -208,7 +208,7 @@ " | undefined] | undefined" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 21 }, "deprecated": false @@ -226,7 +226,7 @@ "string | undefined" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 23 }, "deprecated": false @@ -411,7 +411,7 @@ "Extension point registration contract for Integration details Custom view" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 94 }, "deprecated": false, @@ -424,7 +424,7 @@ "label": "package", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 95 }, "deprecated": false @@ -440,7 +440,7 @@ "\"package-detail-custom\"" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 96 }, "deprecated": false @@ -488,7 +488,7 @@ ">; }" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 97 }, "deprecated": false, @@ -523,7 +523,7 @@ "label": "PackageCustomExtensionComponentProps", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 87 }, "deprecated": false, @@ -538,7 +538,7 @@ "The package key value that should be used used for URLs" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 89 }, "deprecated": false @@ -649,7 +649,7 @@ ">>" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 90 }, "deprecated": false @@ -667,7 +667,7 @@ "Extension point registration contract for Integration Policy Create views" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 76 }, "deprecated": false, @@ -680,7 +680,7 @@ "label": "package", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 77 }, "deprecated": false @@ -696,7 +696,7 @@ "\"package-policy-create\"" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 78 }, "deprecated": false @@ -744,7 +744,7 @@ ">; }" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 79 }, "deprecated": false, @@ -779,7 +779,7 @@ "label": "PackagePolicyCreateExtensionComponentProps", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 60 }, "deprecated": false, @@ -803,7 +803,7 @@ } ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 62 }, "deprecated": false @@ -829,7 +829,7 @@ "; }) => void" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 67 }, "deprecated": false, @@ -854,7 +854,7 @@ "; }" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 67 }, "deprecated": false @@ -874,7 +874,7 @@ "Extension point registration contract for Integration Policy Edit views" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 48 }, "deprecated": false, @@ -887,7 +887,7 @@ "label": "package", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 49 }, "deprecated": false @@ -903,7 +903,7 @@ "\"package-policy-edit\"" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 50 }, "deprecated": false @@ -951,7 +951,7 @@ ">; }" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 51 }, "deprecated": false, @@ -986,7 +986,7 @@ "label": "PackagePolicyEditExtensionComponentProps", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 26 }, "deprecated": false, @@ -1010,7 +1010,7 @@ } ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 28 }, "deprecated": false @@ -1034,7 +1034,7 @@ } ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 30 }, "deprecated": false @@ -1060,7 +1060,7 @@ ">; }) => void" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 39 }, "deprecated": false, @@ -1085,7 +1085,7 @@ ">; }" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 39 }, "deprecated": false @@ -1105,7 +1105,7 @@ "Internal storage for registered UI Extension Points" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 16 }, "deprecated": false, @@ -1121,7 +1121,7 @@ "any" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 17 }, "deprecated": false @@ -1167,7 +1167,7 @@ } ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 45 }, "deprecated": false, @@ -1202,7 +1202,7 @@ ">" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 85 }, "deprecated": false, @@ -1237,7 +1237,7 @@ ">" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 58 }, "deprecated": false, @@ -1272,7 +1272,7 @@ ">" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 24 }, "deprecated": false, @@ -1313,7 +1313,7 @@ } ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 101 }, "deprecated": false, @@ -1340,7 +1340,7 @@ ") => void" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 13 }, "deprecated": false, @@ -1356,8 +1356,8 @@ "label": "pagePathGetters", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 69 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 73 }, "deprecated": false, "children": [ @@ -1369,11 +1369,11 @@ "label": "base", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 75 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 79 }, "deprecated": false, "children": [], @@ -1387,11 +1387,11 @@ "label": "overview", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 76 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 80 }, "deprecated": false, "children": [], @@ -1405,11 +1405,11 @@ "label": "integrations", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 77 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 81 }, "deprecated": false, "children": [], @@ -1423,11 +1423,11 @@ "label": "integrations_all", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 78 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 82 }, "deprecated": false, "children": [], @@ -1441,11 +1441,11 @@ "label": "integrations_installed", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 79 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 83 }, "deprecated": false, "children": [], @@ -1461,11 +1461,11 @@ "signature": [ "({ pkgkey, integration }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 80 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 84 }, "deprecated": false, "children": [ @@ -1480,8 +1480,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 80 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 84 }, "deprecated": false, "isRequired": true @@ -1499,11 +1499,11 @@ "signature": [ "({ pkgkey, integration }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 82 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 88 }, "deprecated": false, "children": [ @@ -1518,8 +1518,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 82 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 88 }, "deprecated": false, "isRequired": true @@ -1537,11 +1537,11 @@ "signature": [ "({ pkgkey, integration }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 84 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 92 }, "deprecated": false, "children": [ @@ -1556,8 +1556,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 84 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 92 }, "deprecated": false, "isRequired": true @@ -1575,11 +1575,11 @@ "signature": [ "({ pkgkey, integration }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 86 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 96 }, "deprecated": false, "children": [ @@ -1594,8 +1594,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 86 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 96 }, "deprecated": false, "isRequired": true @@ -1613,11 +1613,11 @@ "signature": [ "({ packagePolicyId }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 88 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 100 }, "deprecated": false, "children": [ @@ -1632,8 +1632,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 88 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 100 }, "deprecated": false, "isRequired": true @@ -1649,11 +1649,11 @@ "label": "policies", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 90 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 104 }, "deprecated": false, "children": [], @@ -1667,11 +1667,11 @@ "label": "policies_list", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 91 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 105 }, "deprecated": false, "children": [], @@ -1687,11 +1687,11 @@ "signature": [ "({ policyId, tabId }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 92 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 106 }, "deprecated": false, "children": [ @@ -1706,8 +1706,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 92 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 106 }, "deprecated": false, "isRequired": true @@ -1725,11 +1725,11 @@ "signature": [ "({ policyId }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 93 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 110 }, "deprecated": false, "children": [ @@ -1744,8 +1744,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 93 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 110 }, "deprecated": false, "isRequired": true @@ -1763,11 +1763,11 @@ "signature": [ "({ pkgkey, integration }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 94 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 114 }, "deprecated": false, "children": [ @@ -1782,8 +1782,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 94 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 114 }, "deprecated": false, "isRequired": true @@ -1801,11 +1801,11 @@ "signature": [ "({ policyId, packagePolicyId }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 96 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 118 }, "deprecated": false, "children": [ @@ -1820,8 +1820,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 96 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 118 }, "deprecated": false, "isRequired": true @@ -1837,11 +1837,11 @@ "label": "fleet", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 98 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 122 }, "deprecated": false, "children": [], @@ -1857,11 +1857,11 @@ "signature": [ "({ kuery }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 99 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 123 }, "deprecated": false, "children": [ @@ -1876,8 +1876,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 99 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 123 }, "deprecated": false, "isRequired": true @@ -1895,11 +1895,11 @@ "signature": [ "({ agentId, tabId, logQuery }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 100 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 127 }, "deprecated": false, "children": [ @@ -1914,8 +1914,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 100 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 127 }, "deprecated": false, "isRequired": true @@ -1931,11 +1931,11 @@ "label": "fleet_enrollment_tokens", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 102 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 131 }, "deprecated": false, "children": [], @@ -1949,11 +1949,11 @@ "label": "data_streams", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 103 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 132 }, "deprecated": false, "children": [], @@ -1972,7 +1972,7 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/public/plugin.ts", - "lineNumber": 51 + "lineNumber": 48 }, "deprecated": false, "children": [], @@ -1990,7 +1990,7 @@ ], "source": { "path": "x-pack/plugins/fleet/public/plugin.ts", - "lineNumber": 56 + "lineNumber": 53 }, "deprecated": false, "children": [ @@ -2014,7 +2014,7 @@ ], "source": { "path": "x-pack/plugins/fleet/public/plugin.ts", - "lineNumber": 57 + "lineNumber": 54 }, "deprecated": false, "returnComment": [], @@ -2052,7 +2052,7 @@ } ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 13 }, "deprecated": false @@ -2071,7 +2071,7 @@ ], "source": { "path": "x-pack/plugins/fleet/public/plugin.ts", - "lineNumber": 58 + "lineNumber": 55 }, "deprecated": false, "returnComment": [], @@ -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", @@ -4448,7 +4448,7 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 90 + "lineNumber": 91 }, "deprecated": false, "children": [ @@ -4470,7 +4470,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 91 + "lineNumber": 92 }, "deprecated": false }, @@ -4493,7 +4493,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 92 + "lineNumber": 93 }, "deprecated": false }, @@ -4516,7 +4516,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 93 + "lineNumber": 94 }, "deprecated": false }, @@ -4538,7 +4538,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 94 + "lineNumber": 95 }, "deprecated": false }, @@ -4561,7 +4561,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 95 + "lineNumber": 96 }, "deprecated": false }, @@ -4584,7 +4584,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 96 + "lineNumber": 97 }, "deprecated": false } @@ -4767,7 +4767,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 137 + "lineNumber": 138 }, "deprecated": false, "initialIsOpen": false @@ -4784,7 +4784,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/index.ts", - "lineNumber": 66 + "lineNumber": 83 }, "deprecated": false, "initialIsOpen": false @@ -4801,7 +4801,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/services/package_policy.ts", - "lineNumber": 655 + "lineNumber": 656 }, "deprecated": false, "initialIsOpen": false @@ -4838,7 +4838,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 122 + "lineNumber": 123 }, "deprecated": false, "lifecycle": "setup", @@ -4855,7 +4855,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 160 + "lineNumber": 161 }, "deprecated": false, "children": [ @@ -4873,7 +4873,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 166 + "lineNumber": 167 }, "deprecated": false, "returnComment": [], @@ -4897,7 +4897,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 167 + "lineNumber": 168 }, "deprecated": false }, @@ -4919,7 +4919,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 168 + "lineNumber": 169 }, "deprecated": false }, @@ -4941,7 +4941,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 169 + "lineNumber": 170 }, "deprecated": false }, @@ -4959,7 +4959,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 173 + "lineNumber": 174 }, "deprecated": false }, @@ -4981,7 +4981,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 174 + "lineNumber": 175 }, "deprecated": false }, @@ -5007,7 +5007,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 179 + "lineNumber": 180 }, "deprecated": false, "returnComment": [], @@ -5088,7 +5088,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 179 + "lineNumber": 180 }, "deprecated": false } @@ -5109,7 +5109,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 185 + "lineNumber": 186 }, "deprecated": false, "returnComment": [], @@ -5123,7 +5123,7 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 185 + "lineNumber": 186 }, "deprecated": false } @@ -8203,7 +8203,7 @@ "label": "agents", "description": [], "signature": [ - "{ enabled: boolean; elasticsearch: { host?: string | undefined; ca_sha256?: string | undefined; }; fleet_server?: { hosts?: string[] | undefined; } | undefined; }" + "{ enabled: boolean; elasticsearch: { hosts?: string[] | undefined; ca_sha256?: string | undefined; }; fleet_server?: { hosts?: string[] | undefined; } | undefined; }" ], "source": { "path": "x-pack/plugins/fleet/common/types/index.ts", @@ -17304,6 +17304,23 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-common.INTEGRATIONS_PLUGIN_ID", + "type": "string", + "tags": [], + "label": "INTEGRATIONS_PLUGIN_ID", + "description": [], + "signature": [ + "\"integrations\"" + ], + "source": { + "path": "x-pack/plugins/fleet/common/constants/plugin.ts", + "lineNumber": 9 + }, + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-common.KibanaAssetParts", diff --git a/api_docs/home.json b/api_docs/home.json index a1039beb8d3a24..c11d02dfed9de1 100644 --- a/api_docs/home.json +++ b/api_docs/home.json @@ -501,7 +501,7 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 161 + "lineNumber": 166 }, "deprecated": false, "initialIsOpen": false @@ -534,7 +534,7 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 158 + "lineNumber": 163 }, "deprecated": false, "initialIsOpen": false @@ -602,7 +602,7 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 164 + "lineNumber": 169 }, "deprecated": false, "initialIsOpen": false @@ -873,7 +873,7 @@ "description": [], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 167 + "lineNumber": 175 }, "deprecated": false, "children": [ @@ -889,7 +889,25 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 168 + "lineNumber": 176 + }, + "deprecated": false + }, + { + "parentPluginId": "home", + "id": "def-public.HomePublicPluginSetup.addData", + "type": "Object", + "tags": [], + "label": "addData", + "description": [], + "signature": [ + "{ registerAddDataTab: (tab: ", + "AddDataTab", + ") => void; }" + ], + "source": { + "path": "src/plugins/home/public/plugin.ts", + "lineNumber": 177 }, "deprecated": false }, @@ -921,7 +939,7 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 169 + "lineNumber": 178 }, "deprecated": false }, @@ -949,7 +967,7 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 176 + "lineNumber": 185 }, "deprecated": true, "references": [ @@ -964,7 +982,7 @@ "plugin": "apm", "link": { "path": "x-pack/plugins/apm/public/plugin.ts", - "lineNumber": 82 + "lineNumber": 85 } }, { @@ -989,7 +1007,7 @@ "description": [], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 178 + "lineNumber": 187 }, "deprecated": false, "children": [ @@ -1005,7 +1023,7 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 179 + "lineNumber": 188 }, "deprecated": false } diff --git a/api_docs/index_management.json b/api_docs/index_management.json index 9d4edf199ca274..9dc02a51148bca 100644 --- a/api_docs/index_management.json +++ b/api_docs/index_management.json @@ -722,7 +722,7 @@ "description": [], "source": { "path": "x-pack/plugins/index_management/server/plugin.ts", - "lineNumber": 25 + "lineNumber": 23 }, "deprecated": false, "children": [ @@ -740,7 +740,7 @@ ], "source": { "path": "x-pack/plugins/index_management/server/plugin.ts", - "lineNumber": 26 + "lineNumber": 24 }, "deprecated": false } diff --git a/api_docs/kibana_react.json b/api_docs/kibana_react.json index 98537d71d7b019..a477de7c6512c1 100644 --- a/api_docs/kibana_react.json +++ b/api_docs/kibana_react.json @@ -3952,11 +3952,11 @@ "CommonProps", " & React.HTMLAttributes & ", "DisambiguateSet", - "<{ position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }, { position: \"static\" | \"sticky\"; }> & { position: \"static\" | \"sticky\"; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | (", + "<{ position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }, { position: \"static\" | \"sticky\"; }> & { position: \"static\" | \"sticky\"; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | (", "CommonProps", " & React.HTMLAttributes & ", "DisambiguateSet", - "<{ position: \"static\" | \"sticky\"; }, { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }> & { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | undefined; }, { template: \"default\" | \"empty\" | \"centeredBody\" | \"centeredContent\"; }> & { template: \"default\" | \"empty\" | \"centeredBody\" | \"centeredContent\"; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; pageSideBar?: React.ReactNode; pageSideBarProps?: ", + "<{ position: \"static\" | \"sticky\"; }, { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }> & { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | undefined; }, { template: \"default\" | \"empty\" | \"centeredBody\" | \"centeredContent\"; }> & { template: \"default\" | \"empty\" | \"centeredBody\" | \"centeredContent\"; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; pageSideBar?: React.ReactNode; pageSideBarProps?: ", "EuiPageSideBarProps", " | undefined; pageHeader?: ", "EuiPageHeaderProps", @@ -3976,19 +3976,19 @@ "CommonProps", " & React.HTMLAttributes & ", "DisambiguateSet", - "<{ position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }, { position: \"static\" | \"sticky\"; }> & { position: \"static\" | \"sticky\"; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | (", + "<{ position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }, { position: \"static\" | \"sticky\"; }> & { position: \"static\" | \"sticky\"; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | (", "CommonProps", " & React.HTMLAttributes & ", "DisambiguateSet", - "<{ position: \"static\" | \"sticky\"; }, { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }> & { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | undefined; }> & { template?: \"default\" | undefined; bottomBar?: React.ReactNode; bottomBarProps?: (", + "<{ position: \"static\" | \"sticky\"; }, { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }> & { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | undefined; }> & { template?: \"default\" | undefined; bottomBar?: React.ReactNode; bottomBarProps?: (", "CommonProps", " & React.HTMLAttributes & ", "DisambiguateSet", - "<{ position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }, { position: \"static\" | \"sticky\"; }> & { position: \"static\" | \"sticky\"; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | (", + "<{ position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }, { position: \"static\" | \"sticky\"; }> & { position: \"static\" | \"sticky\"; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | (", "CommonProps", " & React.HTMLAttributes & ", "DisambiguateSet", - "<{ position: \"static\" | \"sticky\"; }, { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }> & { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | undefined; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; pageSideBar?: React.ReactNode; pageSideBarProps?: ", + "<{ position: \"static\" | \"sticky\"; }, { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }> & { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | undefined; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; pageSideBar?: React.ReactNode; pageSideBarProps?: ", "EuiPageSideBarProps", " | undefined; pageHeader?: ", "EuiPageHeaderProps", @@ -4122,7 +4122,7 @@ "label": "POSITIONS", "description": [], "signature": [ - "(\"left\" | \"right\" | \"none\" | \"center\")[]" + "(\"none\" | \"left\" | \"right\" | \"center\")[]" ], "source": { "path": "src/plugins/kibana_react/public/toolbar_button/toolbar_button.tsx", @@ -4185,7 +4185,7 @@ "EuiButtonProps", ", { buttonRef?: ((instance: HTMLButtonElement | null) => void) | React.RefObject | null | undefined; }>> & ", "EuiButtonProps", - " & { onClick?: ((event: React.MouseEvent) => void) | undefined; } & React.ButtonHTMLAttributes & { buttonRef?: ((instance: HTMLButtonElement | null) => void) | React.RefObject | null | undefined; } & { fontWeight?: \"bold\" | \"normal\" | undefined; size?: \"m\" | \"s\" | undefined; hasArrow?: boolean | undefined; groupPosition?: \"left\" | \"right\" | \"none\" | \"center\" | undefined; dataTestSubj?: string | undefined; }) | (", + " & { onClick?: ((event: React.MouseEvent) => void) | undefined; } & React.ButtonHTMLAttributes & { buttonRef?: ((instance: HTMLButtonElement | null) => void) | React.RefObject | null | undefined; } & { fontWeight?: \"bold\" | \"normal\" | undefined; size?: \"m\" | \"s\" | undefined; hasArrow?: boolean | undefined; groupPosition?: \"none\" | \"left\" | \"right\" | \"center\" | undefined; dataTestSubj?: string | undefined; }) | (", "DisambiguateSet", "<", "PropsForButton", @@ -4197,7 +4197,7 @@ "EuiButtonProps", ", { buttonRef?: ((instance: HTMLAnchorElement | null) => void) | React.RefObject | null | undefined; }>> & ", "EuiButtonProps", - " & { href?: string | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; } & React.AnchorHTMLAttributes & { buttonRef?: ((instance: HTMLAnchorElement | null) => void) | React.RefObject | null | undefined; } & { fontWeight?: \"bold\" | \"normal\" | undefined; size?: \"m\" | \"s\" | undefined; hasArrow?: boolean | undefined; groupPosition?: \"left\" | \"right\" | \"none\" | \"center\" | undefined; dataTestSubj?: string | undefined; })" + " & { href?: string | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; } & React.AnchorHTMLAttributes & { buttonRef?: ((instance: HTMLAnchorElement | null) => void) | React.RefObject | null | undefined; } & { fontWeight?: \"bold\" | \"normal\" | undefined; size?: \"m\" | \"s\" | undefined; hasArrow?: boolean | undefined; groupPosition?: \"none\" | \"left\" | \"right\" | \"center\" | undefined; dataTestSubj?: string | undefined; })" ], "source": { "path": "src/plugins/kibana_react/public/toolbar_button/toolbar_button.tsx", @@ -5003,7 +5003,7 @@ "label": "eui", "description": [], "signature": [ - "{ paddingSizes: { xs: string; s: string; m: string; l: string; xl: string; }; avatarSizing: { s: { size: string; 'font-size': string; }; m: { size: string; 'font-size': string; }; l: { size: string; 'font-size': string; }; xl: { size: string; 'font-size': string; }; }; euiBadgeGroupGutterTypes: { gutterExtraSmall: string; gutterSmall: string; }; euiBreadcrumbSpacing: string; euiBreadcrumbTruncateWidth: string; euiButtonEmptyTypes: { primary: string; danger: string; disabled: string; ghost: string; text: string; success: string; warning: string; }; euiButtonIconTypes: { accent: string; danger: string; ghost: string; primary: string; subdued: string; success: string; text: string; warning: string; }; euiCallOutTypes: { primary: string; success: string; warning: string; danger: string; }; euiCardSpacing: string; euiCardBottomNodeHeight: string; euiCardSelectButtonBorders: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardSelectButtonBackgrounds: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiCheckableCardPadding: string; euiCollapsibleNavWidth: string; euiCollapsibleNavGroupLightBackgroundColor: string; euiCollapsibleNavGroupDarkBackgroundColor: string; euiCollapsibleNavGroupDarkHighContrastColor: string; euiColorPickerValueRange0: string; euiColorPickerValueRange1: string; euiColorPickerSaturationRange0: string; euiColorPickerSaturationRange1: string; euiColorPickerIndicatorSize: string; euiColorPickerWidth: string; euiColorPaletteDisplaySizes: { sizeExtraSmall: string; sizeSmall: string; sizeMedium: string; }; euiContextMenuWidth: string; euiControlBarBackground: string; euiControlBarText: string; euiControlBarBorderColor: string; euiControlBarInitialHeight: string; euiControlBarMaxHeight: string; euiControlBarHeights: { s: string; m: string; l: string; }; euiDataGridPrefix: string; euiDataGridStyles: string; euiDataGridColumnResizerWidth: string; euiDataGridPopoverMaxHeight: string; euiDataGridCellPaddingS: string; euiDataGridCellPaddingM: string; euiDataGridCellPaddingL: string; euiDataGridVerticalBorder: string; euiDatePickerCalendarWidth: string; euiSuperDatePickerWidth: string; euiSuperDatePickerButtonWidth: string; euiDragAndDropSpacing: { s: string; m: string; l: string; }; euiExpressionColors: { subdued: string; primary: string; secondary: string; warning: string; danger: string; accent: string; }; euiFacetGutterSizes: { gutterNone: number; gutterSmall: string; gutterMedium: string; gutterLarge: string; }; gutterTypes: { gutterExtraSmall: string; gutterSmall: string; gutterMedium: string; gutterLarge: string; gutterExtraLarge: string; }; fractions: { fourths: { percentage: string; count: number; }; thirds: { percentage: string; count: number; }; halves: { percentage: string; count: number; }; single: { percentage: string; count: number; }; }; flyoutSizes: { small: { min: string; width: string; max: string; }; medium: { min: string; width: string; max: string; }; large: { min: string; width: string; max: string; }; }; euiFlyoutBorder: string; euiFlyoutPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiFilePickerTallHeight: string; euiRangeLevelColors: { primary: string; success: string; warning: string; danger: string; }; textareaResizing: { vertical: string; horizontal: string; both: string; none: string; }; euiHeaderLinksGutterSizes: { gutterXS: string; gutterS: string; gutterM: string; gutterL: string; }; ruleMargins: { marginXSmall: string; marginSmall: string; marginMedium: string; marginLarge: string; marginXLarge: string; marginXXLarge: string; }; euiIconLoadingOpacity: number; euiIconColors: { accent: string; danger: string; ghost: string; primary: string; secondary: string; success: string; subdued: string; text: string; warning: string; }; euiIconSizes: { small: string; medium: string; large: string; xLarge: string; xxLarge: string; }; euiKeyPadMenuSize: string; euiKeyPadMenuItemBetaBadgeSize: string; euiLinkColors: { subdued: string; primary: string; secondary: string; accent: string; warning: string; danger: string; text: string; ghost: string; }; euiListGroupItemHoverBackground: string; euiListGroupItemHoverBackgroundGhost: string; euiListGroupGutterTypes: { gutterSmall: string; gutterMedium: string; }; euiListGroupItemColorTypes: { primary: string; text: string; subdued: string; ghost: string; }; euiListGroupItemSizeTypes: { xSmall: string; small: string; medium: string; large: string; }; euiGradientStartStop: string; euiGradientMiddle: string; browserDefaultFontSize: string; euiMarkdownEditorMinHeight: string; euiPopoverArrowSize: string; euiPopoverTranslateDistance: string; euiProgressSizes: { xs: string; s: string; m: string; l: string; }; euiProgressColors: { primary: string; secondary: string; success: string; warning: string; danger: string; accent: string; subdued: string; vis0: string; vis1: string; vis2: string; vis3: string; vis4: string; vis5: string; vis6: string; vis7: string; vis8: string; vis9: string; customColor: string; }; euiResizableButtonTransitionSpeed: string; euiResizableButtonSize: string; euiSelectableListItemBorder: string; euiSelectableListItemPadding: string; euiSelectableTemplateSitewideTypes: { application: { color: string; 'font-weight': number; }; deployment: { color: string; 'font-weight': number; }; article: { color: string; 'font-weight': number; }; case: { color: string; 'font-weight': number; }; platform: { color: string; 'font-weight': number; }; }; euiSideNavEmphasizedBackgroundColor: string; euiSideNavRootTextcolor: string; euiSideNavBranchTextcolor: string; euiSideNavSelectedTextcolor: string; spacerSizes: { xs: string; s: string; m: string; l: string; xl: string; xxl: string; }; euiStepNumberSize: string; euiStepNumberSmallSize: string; euiStepNumberMargin: string; euiStepStatusColorsToFade: { warning: string; danger: string; disabled: string; incomplete: string; }; euiSuggestItemColors: { tint0: string; tint1: string; tint2: string; tint3: string; tint4: string; tint5: string; tint6: string; tint7: string; tint8: string; tint9: string; tint10: string; }; euiTableCellContentPadding: string; euiTableCellContentPaddingCompressed: string; euiTableCellCheckboxWidth: string; euiTableActionsAreaWidth: string; euiTableHoverColor: string; euiTableSelectedColor: string; euiTableHoverSelectedColor: string; euiTableActionsBorderColor: string; euiTableHoverClickableColor: string; euiTableFocusClickableColor: string; euiTabFontSize: string; euiTabFontSizeS: string; euiTabFontSizeL: string; euiTextColors: { default: string; subdued: string; secondary: string; accent: string; warning: string; danger: string; ghost: string; }; euiTextConstrainedMaxWidth: string; euiToastWidth: string; euiToastTypes: { primary: string; success: string; warning: string; danger: string; }; euiTokenGrayColor: string; euiTokenTypes: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; gray: { graphic: string; behindText: string; }; }; euiTokenTypeKeys: string; euiAnimSlightBounce: string; euiAnimSlightResistance: string; euiAnimSpeedExtraFast: string; euiAnimSpeedFast: string; euiAnimSpeedNormal: string; euiAnimSpeedSlow: string; euiAnimSpeedExtraSlow: string; euiBorderWidthThin: string; euiBorderWidthThick: string; euiBorderColor: string; euiBorderRadius: string; euiBorderRadiusSmall: string; euiBorderThick: string; euiBorderThin: string; euiBorderEditable: string; euiButtonHeight: string; euiButtonHeightSmall: string; euiButtonHeightXSmall: string; euiButtonColorDisabled: string; euiButtonColorDisabledText: string; euiButtonColorGhostDisabled: string; euiButtonTypes: { primary: string; secondary: string; warning: string; danger: string; ghost: string; text: string; }; euiColorGhost: string; euiColorInk: string; euiColorPrimary: string; euiColorSecondary: string; euiColorAccent: string; euiColorSuccess: string; euiColorWarning: string; euiColorDanger: string; euiColorEmptyShade: string; euiColorLightestShade: string; euiColorLightShade: string; euiColorMediumShade: string; euiColorDarkShade: string; euiColorDarkestShade: string; euiColorFullShade: string; euiPageBackgroundColor: string; euiColorHighlight: string; euiTextColor: string; euiTitleColor: string; euiTextSubduedColor: string; euiColorDisabled: string; euiColorPrimaryText: string; euiColorSecondaryText: string; euiColorAccentText: string; euiColorWarningText: string; euiColorDangerText: string; euiColorDisabledText: string; euiColorSuccessText: string; euiLinkColor: string; euiPaletteColorBlind: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; }; euiPaletteColorBlindKeys: string; euiColorVis0: string; euiColorVis1: string; euiColorVis2: string; euiColorVis3: string; euiColorVis4: string; euiColorVis5: string; euiColorVis6: string; euiColorVis7: string; euiColorVis8: string; euiColorVis9: string; euiColorVis0_behindText: string; euiColorVis1_behindText: string; euiColorVis2_behindText: string; euiColorVis3_behindText: string; euiColorVis4_behindText: string; euiColorVis5_behindText: string; euiColorVis6_behindText: string; euiColorVis7_behindText: string; euiColorVis8_behindText: string; euiColorVis9_behindText: string; euiColorChartLines: string; euiColorChartBand: string; euiCodeBlockBackgroundColor: string; euiCodeBlockColor: string; euiCodeBlockSelectedBackgroundColor: string; euiCodeBlockCommentColor: string; euiCodeBlockSelectorTagColor: string; euiCodeBlockStringColor: string; euiCodeBlockTagColor: string; euiCodeBlockNameColor: string; euiCodeBlockNumberColor: string; euiCodeBlockKeywordColor: string; euiCodeBlockFunctionTitleColor: string; euiCodeBlockTypeColor: string; euiCodeBlockAttributeColor: string; euiCodeBlockSymbolColor: string; euiCodeBlockParamsColor: string; euiCodeBlockMetaColor: string; euiCodeBlockTitleColor: string; euiCodeBlockSectionColor: string; euiCodeBlockAdditionColor: string; euiCodeBlockDeletionColor: string; euiCodeBlockSelectorClassColor: string; euiCodeBlockSelectorIdColor: string; euiFormMaxWidth: string; euiFormControlHeight: string; euiFormControlCompressedHeight: string; euiFormControlPadding: string; euiFormControlCompressedPadding: string; euiFormControlBorderRadius: number; euiFormControlCompressedBorderRadius: string; euiRadioSize: string; euiCheckBoxSize: string; euiCheckboxBorderRadius: string; euiSwitchHeight: string; euiSwitchWidth: string; euiSwitchThumbSize: string; euiSwitchIconHeight: string; euiSwitchHeightCompressed: string; euiSwitchWidthCompressed: string; euiSwitchThumbSizeCompressed: string; euiSwitchHeightMini: string; euiSwitchWidthMini: string; euiSwitchThumbSizeMini: string; euiFormBackgroundColor: string; euiFormBackgroundDisabledColor: string; euiFormBackgroundReadOnlyColor: string; euiFormBorderOpaqueColor: string; euiFormBorderColor: string; euiFormBorderDisabledColor: string; euiFormCustomControlDisabledIconColor: string; euiFormCustomControlBorderColor: string; euiFormControlDisabledColor: string; euiFormControlBoxShadow: string; euiFormInputGroupLabelBackground: string; euiFormInputGroupBorder: string; euiSwitchOffColor: string; euiFormControlLayoutGroupInputHeight: string; euiFormControlLayoutGroupInputCompressedHeight: string; euiFormControlLayoutGroupInputCompressedBorderRadius: string; euiRangeTrackColor: string; euiRangeThumbRadius: string; euiRangeThumbHeight: string; euiRangeThumbWidth: string; euiRangeThumbBorderColor: string; euiRangeTrackWidth: string; euiRangeTrackHeight: string; euiRangeTrackBorderWidth: number; euiRangeTrackBorderColor: string; euiRangeTrackRadius: string; euiRangeDisabledOpacity: number; euiRangeHighlightHeight: string; euiHeaderBackgroundColor: string; euiHeaderDarkBackgroundColor: string; euiHeaderBorderColor: string; euiHeaderBreadcrumbColor: string; euiHeaderHeight: string; euiHeaderChildSize: string; euiHeaderHeightCompensation: string; euiPageDefaultMaxWidth: string; euiPageSidebarMinWidth: string; euiPanelPaddingModifiers: { paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiPanelBorderRadiusModifiers: { borderRadiusNone: number; borderRadiusMedium: string; }; euiPanelBackgroundColorModifiers: { transparent: string; plain: string; subdued: string; accent: string; primary: string; success: string; warning: string; danger: string; }; euiBreakpoints: { xs: number; s: string; m: string; l: string; xl: string; }; euiBreakpointKeys: string; euiShadowColor: string; euiShadowColorLarge: string; euiSize: string; euiSizeXS: string; euiSizeS: string; euiSizeM: string; euiSizeL: string; euiSizeXL: string; euiSizeXXL: string; euiButtonMinWidth: string; euiScrollBar: string; euiScrollBarCorner: string; euiFocusRingColor: string; euiFocusRingAnimStartColor: string; euiFocusRingAnimStartSize: string; euiFocusRingAnimStartSizeLarge: string; euiFocusRingSizeLarge: string; euiFocusRingSize: string; euiFocusTransparency: number; euiFocusBackgroundColor: string; euiTooltipBackgroundColor: string; euiTooltipAnimations: { top: string; left: string; bottom: string; right: string; }; euiFontFamily: string; euiCodeFontFamily: string; euiFontFeatureSettings: string; euiTextScale: string; euiFontSize: string; euiFontSizeXS: string; euiFontSizeS: string; euiFontSizeM: string; euiFontSizeL: string; euiFontSizeXL: string; euiFontSizeXXL: string; euiLineHeight: number; euiBodyLineHeight: number; euiFontWeightLight: number; euiFontWeightRegular: number; euiFontWeightMedium: number; euiFontWeightSemiBold: number; euiFontWeightBold: number; euiCodeFontWeightRegular: number; euiCodeFontWeightBold: number; euiTitles: { xxxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xs: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; s: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; m: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; l: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; }; euiZLevel0: number; euiZLevel1: number; euiZLevel2: number; euiZLevel3: number; euiZLevel4: number; euiZLevel5: number; euiZLevel6: number; euiZLevel7: number; euiZLevel8: number; euiZLevel9: number; euiZContent: number; euiZHeader: number; euiZContentMenu: number; euiZFlyout: number; euiZNavigation: number; euiZMask: number; euiZModal: number; euiZToastList: number; } | { paddingSizes: { xs: string; s: string; m: string; l: string; xl: string; }; avatarSizing: { s: { size: string; 'font-size': string; }; m: { size: string; 'font-size': string; }; l: { size: string; 'font-size': string; }; xl: { size: string; 'font-size': string; }; }; euiBadgeGroupGutterTypes: { gutterExtraSmall: string; gutterSmall: string; }; euiBreadcrumbSpacing: string; euiBreadcrumbTruncateWidth: string; euiButtonEmptyTypes: { primary: string; danger: string; disabled: string; ghost: string; text: string; success: string; warning: string; }; euiButtonIconTypes: { accent: string; danger: string; ghost: string; primary: string; subdued: string; success: string; text: string; warning: string; }; euiCallOutTypes: { primary: string; success: string; warning: string; danger: string; }; euiCardSpacing: string; euiCardBottomNodeHeight: string; euiCardSelectButtonBorders: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardSelectButtonBackgrounds: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiCheckableCardPadding: string; euiCollapsibleNavWidth: string; euiCollapsibleNavGroupLightBackgroundColor: string; euiCollapsibleNavGroupDarkBackgroundColor: string; euiCollapsibleNavGroupDarkHighContrastColor: string; euiColorPickerValueRange0: string; euiColorPickerValueRange1: string; euiColorPickerSaturationRange0: string; euiColorPickerSaturationRange1: string; euiColorPickerIndicatorSize: string; euiColorPickerWidth: string; euiColorPaletteDisplaySizes: { sizeExtraSmall: string; sizeSmall: string; sizeMedium: string; }; euiContextMenuWidth: string; euiControlBarBackground: string; euiControlBarText: string; euiControlBarBorderColor: string; euiControlBarInitialHeight: string; euiControlBarMaxHeight: string; euiControlBarHeights: { s: string; m: string; l: string; }; euiDataGridPrefix: string; euiDataGridStyles: string; euiDataGridColumnResizerWidth: string; euiDataGridPopoverMaxHeight: string; euiDataGridCellPaddingS: string; euiDataGridCellPaddingM: string; euiDataGridCellPaddingL: string; euiDataGridVerticalBorder: string; euiDatePickerCalendarWidth: string; euiSuperDatePickerWidth: string; euiSuperDatePickerButtonWidth: string; euiDragAndDropSpacing: { s: string; m: string; l: string; }; euiExpressionColors: { subdued: string; primary: string; secondary: string; warning: string; danger: string; accent: string; }; euiFacetGutterSizes: { gutterNone: number; gutterSmall: string; gutterMedium: string; gutterLarge: string; }; gutterTypes: { gutterExtraSmall: string; gutterSmall: string; gutterMedium: string; gutterLarge: string; gutterExtraLarge: string; }; fractions: { fourths: { percentage: string; count: number; }; thirds: { percentage: string; count: number; }; halves: { percentage: string; count: number; }; single: { percentage: string; count: number; }; }; flyoutSizes: { small: { min: string; width: string; max: string; }; medium: { min: string; width: string; max: string; }; large: { min: string; width: string; max: string; }; }; euiFlyoutBorder: string; euiFlyoutPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiFilePickerTallHeight: string; euiRangeLevelColors: { primary: string; success: string; warning: string; danger: string; }; textareaResizing: { vertical: string; horizontal: string; both: string; none: string; }; euiHeaderLinksGutterSizes: { gutterXS: string; gutterS: string; gutterM: string; gutterL: string; }; ruleMargins: { marginXSmall: string; marginSmall: string; marginMedium: string; marginLarge: string; marginXLarge: string; marginXXLarge: string; }; euiIconLoadingOpacity: number; euiIconColors: { accent: string; danger: string; ghost: string; primary: string; secondary: string; success: string; subdued: string; text: string; warning: string; }; euiIconSizes: { small: string; medium: string; large: string; xLarge: string; xxLarge: string; }; euiKeyPadMenuSize: string; euiKeyPadMenuItemBetaBadgeSize: string; euiLinkColors: { subdued: string; primary: string; secondary: string; accent: string; warning: string; danger: string; text: string; ghost: string; }; euiListGroupItemHoverBackground: string; euiListGroupItemHoverBackgroundGhost: string; euiListGroupGutterTypes: { gutterSmall: string; gutterMedium: string; }; euiListGroupItemColorTypes: { primary: string; text: string; subdued: string; ghost: string; }; euiListGroupItemSizeTypes: { xSmall: string; small: string; medium: string; large: string; }; euiGradientStartStop: string; euiGradientMiddle: string; browserDefaultFontSize: string; euiMarkdownEditorMinHeight: string; euiPopoverArrowSize: string; euiPopoverTranslateDistance: string; euiProgressSizes: { xs: string; s: string; m: string; l: string; }; euiProgressColors: { primary: string; secondary: string; success: string; warning: string; danger: string; accent: string; subdued: string; vis0: string; vis1: string; vis2: string; vis3: string; vis4: string; vis5: string; vis6: string; vis7: string; vis8: string; vis9: string; customColor: string; }; euiResizableButtonTransitionSpeed: string; euiResizableButtonSize: string; euiSelectableListItemBorder: string; euiSelectableListItemPadding: string; euiSelectableTemplateSitewideTypes: { application: { color: string; 'font-weight': number; }; deployment: { color: string; 'font-weight': number; }; article: { color: string; 'font-weight': number; }; case: { color: string; 'font-weight': number; }; platform: { color: string; 'font-weight': number; }; }; euiSideNavEmphasizedBackgroundColor: string; euiSideNavRootTextcolor: string; euiSideNavBranchTextcolor: string; euiSideNavSelectedTextcolor: string; spacerSizes: { xs: string; s: string; m: string; l: string; xl: string; xxl: string; }; euiStepNumberSize: string; euiStepNumberSmallSize: string; euiStepNumberMargin: string; euiStepStatusColorsToFade: { warning: string; danger: string; disabled: string; incomplete: string; }; euiSuggestItemColors: { tint0: string; tint1: string; tint2: string; tint3: string; tint4: string; tint5: string; tint6: string; tint7: string; tint8: string; tint9: string; tint10: string; }; euiTableCellContentPadding: string; euiTableCellContentPaddingCompressed: string; euiTableCellCheckboxWidth: string; euiTableActionsAreaWidth: string; euiTableHoverColor: string; euiTableSelectedColor: string; euiTableHoverSelectedColor: string; euiTableActionsBorderColor: string; euiTableHoverClickableColor: string; euiTableFocusClickableColor: string; euiTabFontSize: string; euiTabFontSizeS: string; euiTabFontSizeL: string; euiTextColors: { default: string; subdued: string; secondary: string; accent: string; warning: string; danger: string; ghost: string; }; euiTextConstrainedMaxWidth: string; euiToastWidth: string; euiToastTypes: { primary: string; success: string; warning: string; danger: string; }; euiTokenGrayColor: string; euiTokenTypes: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; gray: { graphic: string; behindText: string; }; }; euiTokenTypeKeys: string; euiAnimSlightBounce: string; euiAnimSlightResistance: string; euiAnimSpeedExtraFast: string; euiAnimSpeedFast: string; euiAnimSpeedNormal: string; euiAnimSpeedSlow: string; euiAnimSpeedExtraSlow: string; euiBorderWidthThin: string; euiBorderWidthThick: string; euiBorderColor: string; euiBorderRadius: string; euiBorderRadiusSmall: string; euiBorderThick: string; euiBorderThin: string; euiBorderEditable: string; euiButtonHeight: string; euiButtonHeightSmall: string; euiButtonHeightXSmall: string; euiButtonColorDisabled: string; euiButtonColorDisabledText: string; euiButtonColorGhostDisabled: string; euiButtonTypes: { primary: string; secondary: string; warning: string; danger: string; ghost: string; text: string; }; euiColorGhost: string; euiColorInk: string; euiColorPrimary: string; euiColorSecondary: string; euiColorAccent: string; euiColorSuccess: string; euiColorWarning: string; euiColorDanger: string; euiColorEmptyShade: string; euiColorLightestShade: string; euiColorLightShade: string; euiColorMediumShade: string; euiColorDarkShade: string; euiColorDarkestShade: string; euiColorFullShade: string; euiPageBackgroundColor: string; euiColorHighlight: string; euiTextColor: string; euiTitleColor: string; euiTextSubduedColor: string; euiColorDisabled: string; euiColorPrimaryText: string; euiColorSecondaryText: string; euiColorAccentText: string; euiColorWarningText: string; euiColorDangerText: string; euiColorDisabledText: string; euiColorSuccessText: string; euiLinkColor: string; euiPaletteColorBlind: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; }; euiPaletteColorBlindKeys: string; euiColorVis0: string; euiColorVis1: string; euiColorVis2: string; euiColorVis3: string; euiColorVis4: string; euiColorVis5: string; euiColorVis6: string; euiColorVis7: string; euiColorVis8: string; euiColorVis9: string; euiColorVis0_behindText: string; euiColorVis1_behindText: string; euiColorVis2_behindText: string; euiColorVis3_behindText: string; euiColorVis4_behindText: string; euiColorVis5_behindText: string; euiColorVis6_behindText: string; euiColorVis7_behindText: string; euiColorVis8_behindText: string; euiColorVis9_behindText: string; euiColorChartLines: string; euiColorChartBand: string; euiCodeBlockBackgroundColor: string; euiCodeBlockColor: string; euiCodeBlockSelectedBackgroundColor: string; euiCodeBlockCommentColor: string; euiCodeBlockSelectorTagColor: string; euiCodeBlockStringColor: string; euiCodeBlockTagColor: string; euiCodeBlockNameColor: string; euiCodeBlockNumberColor: string; euiCodeBlockKeywordColor: string; euiCodeBlockFunctionTitleColor: string; euiCodeBlockTypeColor: string; euiCodeBlockAttributeColor: string; euiCodeBlockSymbolColor: string; euiCodeBlockParamsColor: string; euiCodeBlockMetaColor: string; euiCodeBlockTitleColor: string; euiCodeBlockSectionColor: string; euiCodeBlockAdditionColor: string; euiCodeBlockDeletionColor: string; euiCodeBlockSelectorClassColor: string; euiCodeBlockSelectorIdColor: string; euiFormMaxWidth: string; euiFormControlHeight: string; euiFormControlCompressedHeight: string; euiFormControlPadding: string; euiFormControlCompressedPadding: string; euiFormControlBorderRadius: number; euiFormControlCompressedBorderRadius: string; euiRadioSize: string; euiCheckBoxSize: string; euiCheckboxBorderRadius: string; euiSwitchHeight: string; euiSwitchWidth: string; euiSwitchThumbSize: string; euiSwitchIconHeight: string; euiSwitchHeightCompressed: string; euiSwitchWidthCompressed: string; euiSwitchThumbSizeCompressed: string; euiSwitchHeightMini: string; euiSwitchWidthMini: string; euiSwitchThumbSizeMini: string; euiFormBackgroundColor: string; euiFormBackgroundDisabledColor: string; euiFormBackgroundReadOnlyColor: string; euiFormBorderOpaqueColor: string; euiFormBorderColor: string; euiFormBorderDisabledColor: string; euiFormCustomControlDisabledIconColor: string; euiFormCustomControlBorderColor: string; euiFormControlDisabledColor: string; euiFormControlBoxShadow: string; euiFormInputGroupLabelBackground: string; euiFormInputGroupBorder: string; euiSwitchOffColor: string; euiFormControlLayoutGroupInputHeight: string; euiFormControlLayoutGroupInputCompressedHeight: string; euiFormControlLayoutGroupInputCompressedBorderRadius: string; euiRangeTrackColor: string; euiRangeThumbRadius: string; euiRangeThumbHeight: string; euiRangeThumbWidth: string; euiRangeThumbBorderColor: string; euiRangeTrackWidth: string; euiRangeTrackHeight: string; euiRangeTrackBorderWidth: number; euiRangeTrackBorderColor: string; euiRangeTrackRadius: string; euiRangeDisabledOpacity: number; euiRangeHighlightHeight: string; euiHeaderBackgroundColor: string; euiHeaderDarkBackgroundColor: string; euiHeaderBorderColor: string; euiHeaderBreadcrumbColor: string; euiHeaderHeight: string; euiHeaderChildSize: string; euiHeaderHeightCompensation: string; euiPageDefaultMaxWidth: string; euiPageSidebarMinWidth: string; euiPanelPaddingModifiers: { paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiPanelBorderRadiusModifiers: { borderRadiusNone: number; borderRadiusMedium: string; }; euiPanelBackgroundColorModifiers: { transparent: string; plain: string; subdued: string; accent: string; primary: string; success: string; warning: string; danger: string; }; euiBreakpoints: { xs: number; s: string; m: string; l: string; xl: string; }; euiBreakpointKeys: string; euiShadowColor: string; euiShadowColorLarge: string; euiSize: string; euiSizeXS: string; euiSizeS: string; euiSizeM: string; euiSizeL: string; euiSizeXL: string; euiSizeXXL: string; euiButtonMinWidth: string; euiScrollBar: string; euiScrollBarCorner: string; euiFocusRingColor: string; euiFocusRingAnimStartColor: string; euiFocusRingAnimStartSize: string; euiFocusRingAnimStartSizeLarge: string; euiFocusRingSizeLarge: string; euiFocusRingSize: string; euiFocusTransparency: number; euiFocusBackgroundColor: string; euiTooltipBackgroundColor: string; euiTooltipAnimations: { top: string; left: string; bottom: string; right: string; }; euiFontFamily: string; euiCodeFontFamily: string; euiFontFeatureSettings: string; euiTextScale: string; euiFontSize: string; euiFontSizeXS: string; euiFontSizeS: string; euiFontSizeM: string; euiFontSizeL: string; euiFontSizeXL: string; euiFontSizeXXL: string; euiLineHeight: number; euiBodyLineHeight: number; euiFontWeightLight: number; euiFontWeightRegular: number; euiFontWeightMedium: number; euiFontWeightSemiBold: number; euiFontWeightBold: number; euiCodeFontWeightRegular: number; euiCodeFontWeightBold: number; euiTitles: { xxxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xs: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; s: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; m: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; l: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; }; euiZLevel0: number; euiZLevel1: number; euiZLevel2: number; euiZLevel3: number; euiZLevel4: number; euiZLevel5: number; euiZLevel6: number; euiZLevel7: number; euiZLevel8: number; euiZLevel9: number; euiZContent: number; euiZHeader: number; euiZContentMenu: number; euiZFlyout: number; euiZNavigation: number; euiZMask: number; euiZModal: number; euiZToastList: number; }" + "{ paddingSizes: { xs: string; s: string; m: string; l: string; xl: string; }; avatarSizing: { s: { size: string; 'font-size': string; }; m: { size: string; 'font-size': string; }; l: { size: string; 'font-size': string; }; xl: { size: string; 'font-size': string; }; }; euiBadgeGroupGutterTypes: { gutterExtraSmall: string; gutterSmall: string; }; euiBreadcrumbSpacing: string; euiBreadcrumbTruncateWidth: string; euiButtonEmptyTypes: { primary: string; danger: string; disabled: string; ghost: string; text: string; success: string; warning: string; }; euiButtonIconTypes: { accent: string; danger: string; ghost: string; primary: string; subdued: string; success: string; text: string; warning: string; }; euiCallOutTypes: { primary: string; success: string; warning: string; danger: string; }; euiCardSpacing: string; euiCardBottomNodeHeight: string; euiCardSelectButtonBorders: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardSelectButtonBackgrounds: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiCheckableCardPadding: string; euiCollapsibleNavWidth: string; euiCollapsibleNavGroupLightBackgroundColor: string; euiCollapsibleNavGroupDarkBackgroundColor: string; euiCollapsibleNavGroupDarkHighContrastColor: string; euiColorPickerValueRange0: string; euiColorPickerValueRange1: string; euiColorPickerSaturationRange0: string; euiColorPickerSaturationRange1: string; euiColorPickerIndicatorSize: string; euiColorPickerWidth: string; euiColorPaletteDisplaySizes: { sizeExtraSmall: string; sizeSmall: string; sizeMedium: string; }; euiContextMenuWidth: string; euiControlBarBackground: string; euiControlBarText: string; euiControlBarBorderColor: string; euiControlBarInitialHeight: string; euiControlBarMaxHeight: string; euiControlBarHeights: { s: string; m: string; l: string; }; euiDataGridPrefix: string; euiDataGridStyles: string; euiDataGridColumnResizerWidth: string; euiDataGridPopoverMaxHeight: string; euiDataGridCellPaddingS: string; euiDataGridCellPaddingM: string; euiDataGridCellPaddingL: string; euiDataGridVerticalBorder: string; euiDatePickerCalendarWidth: string; euiSuperDatePickerWidth: string; euiSuperDatePickerButtonWidth: string; euiDragAndDropSpacing: { s: string; m: string; l: string; }; euiExpressionColors: { subdued: string; primary: string; secondary: string; warning: string; danger: string; accent: string; }; euiFacetGutterSizes: { gutterNone: number; gutterSmall: string; gutterMedium: string; gutterLarge: string; }; gutterTypes: { gutterExtraSmall: string; gutterSmall: string; gutterMedium: string; gutterLarge: string; gutterExtraLarge: string; }; fractions: { fourths: { percentage: string; count: number; }; thirds: { percentage: string; count: number; }; halves: { percentage: string; count: number; }; single: { percentage: string; count: number; }; }; flyoutSizes: { small: { min: string; width: string; max: string; }; medium: { min: string; width: string; max: string; }; large: { min: string; width: string; max: string; }; }; euiFlyoutBorder: string; euiFlyoutPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiFilePickerTallHeight: string; euiRangeLevelColors: { primary: string; success: string; warning: string; danger: string; }; textareaResizing: { vertical: string; horizontal: string; both: string; none: string; }; euiHeaderLinksGutterSizes: { gutterXS: string; gutterS: string; gutterM: string; gutterL: string; }; ruleMargins: { marginXSmall: string; marginSmall: string; marginMedium: string; marginLarge: string; marginXLarge: string; marginXXLarge: string; }; euiIconLoadingOpacity: number; euiIconColors: { accent: string; danger: string; ghost: string; primary: string; secondary: string; success: string; subdued: string; text: string; warning: string; inherit: string; }; euiIconSizes: { small: string; medium: string; large: string; xLarge: string; xxLarge: string; }; euiKeyPadMenuSize: string; euiKeyPadMenuItemBetaBadgeSize: string; euiLinkColors: { subdued: string; primary: string; secondary: string; accent: string; warning: string; danger: string; text: string; ghost: string; }; euiListGroupItemHoverBackground: string; euiListGroupItemHoverBackgroundGhost: string; euiListGroupGutterTypes: { gutterSmall: string; gutterMedium: string; }; euiListGroupItemColorTypes: { primary: string; text: string; subdued: string; ghost: string; }; euiListGroupItemSizeTypes: { xSmall: string; small: string; medium: string; large: string; }; euiGradientStartStop: string; euiGradientMiddle: string; browserDefaultFontSize: string; euiMarkdownEditorMinHeight: string; euiPopoverArrowSize: string; euiPopoverTranslateDistance: string; euiProgressSizes: { xs: string; s: string; m: string; l: string; }; euiProgressColors: { primary: string; secondary: string; success: string; warning: string; danger: string; accent: string; subdued: string; vis0: string; vis1: string; vis2: string; vis3: string; vis4: string; vis5: string; vis6: string; vis7: string; vis8: string; vis9: string; customColor: string; }; euiResizableButtonTransitionSpeed: string; euiResizableButtonSize: string; euiSelectableListItemBorder: string; euiSelectableListItemPadding: string; euiSelectableTemplateSitewideTypes: { application: { color: string; 'font-weight': number; }; deployment: { color: string; 'font-weight': number; }; article: { color: string; 'font-weight': number; }; case: { color: string; 'font-weight': number; }; platform: { color: string; 'font-weight': number; }; }; euiSideNavEmphasizedBackgroundColor: string; euiSideNavRootTextcolor: string; euiSideNavBranchTextcolor: string; euiSideNavSelectedTextcolor: string; spacerSizes: { xs: string; s: string; m: string; l: string; xl: string; xxl: string; }; euiStepNumberSize: string; euiStepNumberSmallSize: string; euiStepNumberMargin: string; euiStepStatusColorsToFade: { warning: string; danger: string; disabled: string; incomplete: string; }; euiSuggestItemColors: { tint0: string; tint1: string; tint2: string; tint3: string; tint4: string; tint5: string; tint6: string; tint7: string; tint8: string; tint9: string; tint10: string; }; euiTableCellContentPadding: string; euiTableCellContentPaddingCompressed: string; euiTableCellCheckboxWidth: string; euiTableActionsAreaWidth: string; euiTableHoverColor: string; euiTableSelectedColor: string; euiTableHoverSelectedColor: string; euiTableActionsBorderColor: string; euiTableHoverClickableColor: string; euiTableFocusClickableColor: string; euiTabFontSize: string; euiTabFontSizeS: string; euiTabFontSizeL: string; euiTextColors: { default: string; subdued: string; secondary: string; accent: string; warning: string; danger: string; ghost: string; }; euiTextConstrainedMaxWidth: string; euiToastWidth: string; euiToastTypes: { primary: string; success: string; warning: string; danger: string; }; euiTokenGrayColor: string; euiTokenTypes: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; gray: { graphic: string; behindText: string; }; }; euiTokenTypeKeys: string; euiAnimSlightBounce: string; euiAnimSlightResistance: string; euiAnimSpeedExtraFast: string; euiAnimSpeedFast: string; euiAnimSpeedNormal: string; euiAnimSpeedSlow: string; euiAnimSpeedExtraSlow: string; euiBorderWidthThin: string; euiBorderWidthThick: string; euiBorderColor: string; euiBorderRadius: string; euiBorderRadiusSmall: string; euiBorderThick: string; euiBorderThin: string; euiBorderEditable: string; euiButtonHeight: string; euiButtonHeightSmall: string; euiButtonHeightXSmall: string; euiButtonColorDisabled: string; euiButtonColorDisabledText: string; euiButtonColorGhostDisabled: string; euiButtonTypes: { primary: string; secondary: string; warning: string; danger: string; ghost: string; text: string; }; euiColorGhost: string; euiColorInk: string; euiColorPrimary: string; euiColorSecondary: string; euiColorAccent: string; euiColorSuccess: string; euiColorWarning: string; euiColorDanger: string; euiColorEmptyShade: string; euiColorLightestShade: string; euiColorLightShade: string; euiColorMediumShade: string; euiColorDarkShade: string; euiColorDarkestShade: string; euiColorFullShade: string; euiPageBackgroundColor: string; euiColorHighlight: string; euiTextColor: string; euiTitleColor: string; euiTextSubduedColor: string; euiColorDisabled: string; euiColorPrimaryText: string; euiColorSecondaryText: string; euiColorAccentText: string; euiColorWarningText: string; euiColorDangerText: string; euiColorDisabledText: string; euiColorSuccessText: string; euiLinkColor: string; euiPaletteColorBlind: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; }; euiPaletteColorBlindKeys: string; euiColorVis0: string; euiColorVis1: string; euiColorVis2: string; euiColorVis3: string; euiColorVis4: string; euiColorVis5: string; euiColorVis6: string; euiColorVis7: string; euiColorVis8: string; euiColorVis9: string; euiColorVis0_behindText: string; euiColorVis1_behindText: string; euiColorVis2_behindText: string; euiColorVis3_behindText: string; euiColorVis4_behindText: string; euiColorVis5_behindText: string; euiColorVis6_behindText: string; euiColorVis7_behindText: string; euiColorVis8_behindText: string; euiColorVis9_behindText: string; euiColorChartLines: string; euiColorChartBand: string; euiCodeBlockBackgroundColor: string; euiCodeBlockColor: string; euiCodeBlockSelectedBackgroundColor: string; euiCodeBlockCommentColor: string; euiCodeBlockSelectorTagColor: string; euiCodeBlockStringColor: string; euiCodeBlockTagColor: string; euiCodeBlockNameColor: string; euiCodeBlockNumberColor: string; euiCodeBlockKeywordColor: string; euiCodeBlockFunctionTitleColor: string; euiCodeBlockTypeColor: string; euiCodeBlockAttributeColor: string; euiCodeBlockSymbolColor: string; euiCodeBlockParamsColor: string; euiCodeBlockMetaColor: string; euiCodeBlockTitleColor: string; euiCodeBlockSectionColor: string; euiCodeBlockAdditionColor: string; euiCodeBlockDeletionColor: string; euiCodeBlockSelectorClassColor: string; euiCodeBlockSelectorIdColor: string; euiFormMaxWidth: string; euiFormControlHeight: string; euiFormControlCompressedHeight: string; euiFormControlPadding: string; euiFormControlCompressedPadding: string; euiFormControlBorderRadius: number; euiFormControlCompressedBorderRadius: string; euiRadioSize: string; euiCheckBoxSize: string; euiCheckboxBorderRadius: string; euiSwitchHeight: string; euiSwitchWidth: string; euiSwitchThumbSize: string; euiSwitchIconHeight: string; euiSwitchHeightCompressed: string; euiSwitchWidthCompressed: string; euiSwitchThumbSizeCompressed: string; euiSwitchHeightMini: string; euiSwitchWidthMini: string; euiSwitchThumbSizeMini: string; euiFormBackgroundColor: string; euiFormBackgroundDisabledColor: string; euiFormBackgroundReadOnlyColor: string; euiFormBorderOpaqueColor: string; euiFormBorderColor: string; euiFormBorderDisabledColor: string; euiFormCustomControlDisabledIconColor: string; euiFormCustomControlBorderColor: string; euiFormControlDisabledColor: string; euiFormControlBoxShadow: string; euiFormControlPlaceholderText: string; euiFormInputGroupLabelBackground: string; euiFormInputGroupBorder: string; euiSwitchOffColor: string; euiFormControlLayoutGroupInputHeight: string; euiFormControlLayoutGroupInputCompressedHeight: string; euiFormControlLayoutGroupInputCompressedBorderRadius: string; euiRangeTrackColor: string; euiRangeThumbRadius: string; euiRangeThumbHeight: string; euiRangeThumbWidth: string; euiRangeThumbBorderColor: string; euiRangeTrackWidth: string; euiRangeTrackHeight: string; euiRangeTrackBorderWidth: number; euiRangeTrackBorderColor: string; euiRangeTrackRadius: string; euiRangeDisabledOpacity: number; euiRangeHighlightHeight: string; euiHeaderBackgroundColor: string; euiHeaderDarkBackgroundColor: string; euiHeaderBorderColor: string; euiHeaderBreadcrumbColor: string; euiHeaderHeight: string; euiHeaderChildSize: string; euiHeaderHeightCompensation: string; euiPageDefaultMaxWidth: string; euiPageSidebarMinWidth: string; euiPanelPaddingModifiers: { paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiPanelBorderRadiusModifiers: { borderRadiusNone: number; borderRadiusMedium: string; }; euiPanelBackgroundColorModifiers: { transparent: string; plain: string; subdued: string; accent: string; primary: string; success: string; warning: string; danger: string; }; euiBreakpoints: { xs: number; s: string; m: string; l: string; xl: string; }; euiBreakpointKeys: string; euiShadowColor: string; euiShadowColorLarge: string; euiSize: string; euiSizeXS: string; euiSizeS: string; euiSizeM: string; euiSizeL: string; euiSizeXL: string; euiSizeXXL: string; euiButtonMinWidth: string; euiScrollBar: string; euiScrollBarCorner: string; euiFocusRingColor: string; euiFocusRingAnimStartColor: string; euiFocusRingAnimStartSize: string; euiFocusRingAnimStartSizeLarge: string; euiFocusRingSizeLarge: string; euiFocusRingSize: string; euiFocusTransparency: number; euiFocusBackgroundColor: string; euiTooltipBackgroundColor: string; euiTooltipAnimations: { top: string; left: string; bottom: string; right: string; }; euiFontFamily: string; euiCodeFontFamily: string; euiFontFeatureSettings: string; euiTextScale: string; euiFontSize: string; euiFontSizeXS: string; euiFontSizeS: string; euiFontSizeM: string; euiFontSizeL: string; euiFontSizeXL: string; euiFontSizeXXL: string; euiLineHeight: number; euiBodyLineHeight: number; euiFontWeightLight: number; euiFontWeightRegular: number; euiFontWeightMedium: number; euiFontWeightSemiBold: number; euiFontWeightBold: number; euiCodeFontWeightRegular: number; euiCodeFontWeightBold: number; euiTitles: { xxxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xs: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; s: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; m: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; l: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; }; euiZLevel0: number; euiZLevel1: number; euiZLevel2: number; euiZLevel3: number; euiZLevel4: number; euiZLevel5: number; euiZLevel6: number; euiZLevel7: number; euiZLevel8: number; euiZLevel9: number; euiZContent: number; euiZHeader: number; euiZContentMenu: number; euiZFlyout: number; euiZNavigation: number; euiZMask: number; euiZModal: number; euiZToastList: number; } | { paddingSizes: { xs: string; s: string; m: string; l: string; xl: string; }; avatarSizing: { s: { size: string; 'font-size': string; }; m: { size: string; 'font-size': string; }; l: { size: string; 'font-size': string; }; xl: { size: string; 'font-size': string; }; }; euiBadgeGroupGutterTypes: { gutterExtraSmall: string; gutterSmall: string; }; euiBreadcrumbSpacing: string; euiBreadcrumbTruncateWidth: string; euiButtonEmptyTypes: { primary: string; danger: string; disabled: string; ghost: string; text: string; success: string; warning: string; }; euiButtonIconTypes: { accent: string; danger: string; ghost: string; primary: string; subdued: string; success: string; text: string; warning: string; }; euiCallOutTypes: { primary: string; success: string; warning: string; danger: string; }; euiCardSpacing: string; euiCardBottomNodeHeight: string; euiCardSelectButtonBorders: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardSelectButtonBackgrounds: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiCheckableCardPadding: string; euiCollapsibleNavWidth: string; euiCollapsibleNavGroupLightBackgroundColor: string; euiCollapsibleNavGroupDarkBackgroundColor: string; euiCollapsibleNavGroupDarkHighContrastColor: string; euiColorPickerValueRange0: string; euiColorPickerValueRange1: string; euiColorPickerSaturationRange0: string; euiColorPickerSaturationRange1: string; euiColorPickerIndicatorSize: string; euiColorPickerWidth: string; euiColorPaletteDisplaySizes: { sizeExtraSmall: string; sizeSmall: string; sizeMedium: string; }; euiContextMenuWidth: string; euiControlBarBackground: string; euiControlBarText: string; euiControlBarBorderColor: string; euiControlBarInitialHeight: string; euiControlBarMaxHeight: string; euiControlBarHeights: { s: string; m: string; l: string; }; euiDataGridPrefix: string; euiDataGridStyles: string; euiDataGridColumnResizerWidth: string; euiDataGridPopoverMaxHeight: string; euiDataGridCellPaddingS: string; euiDataGridCellPaddingM: string; euiDataGridCellPaddingL: string; euiDataGridVerticalBorder: string; euiDatePickerCalendarWidth: string; euiSuperDatePickerWidth: string; euiSuperDatePickerButtonWidth: string; euiDragAndDropSpacing: { s: string; m: string; l: string; }; euiExpressionColors: { subdued: string; primary: string; secondary: string; warning: string; danger: string; accent: string; }; euiFacetGutterSizes: { gutterNone: number; gutterSmall: string; gutterMedium: string; gutterLarge: string; }; gutterTypes: { gutterExtraSmall: string; gutterSmall: string; gutterMedium: string; gutterLarge: string; gutterExtraLarge: string; }; fractions: { fourths: { percentage: string; count: number; }; thirds: { percentage: string; count: number; }; halves: { percentage: string; count: number; }; single: { percentage: string; count: number; }; }; flyoutSizes: { small: { min: string; width: string; max: string; }; medium: { min: string; width: string; max: string; }; large: { min: string; width: string; max: string; }; }; euiFlyoutBorder: string; euiFlyoutPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiFilePickerTallHeight: string; euiRangeLevelColors: { primary: string; success: string; warning: string; danger: string; }; textareaResizing: { vertical: string; horizontal: string; both: string; none: string; }; euiHeaderLinksGutterSizes: { gutterXS: string; gutterS: string; gutterM: string; gutterL: string; }; ruleMargins: { marginXSmall: string; marginSmall: string; marginMedium: string; marginLarge: string; marginXLarge: string; marginXXLarge: string; }; euiIconLoadingOpacity: number; euiIconColors: { accent: string; danger: string; ghost: string; primary: string; secondary: string; success: string; subdued: string; text: string; warning: string; inherit: string; }; euiIconSizes: { small: string; medium: string; large: string; xLarge: string; xxLarge: string; }; euiKeyPadMenuSize: string; euiKeyPadMenuItemBetaBadgeSize: string; euiLinkColors: { subdued: string; primary: string; secondary: string; accent: string; warning: string; danger: string; text: string; ghost: string; }; euiListGroupItemHoverBackground: string; euiListGroupItemHoverBackgroundGhost: string; euiListGroupGutterTypes: { gutterSmall: string; gutterMedium: string; }; euiListGroupItemColorTypes: { primary: string; text: string; subdued: string; ghost: string; }; euiListGroupItemSizeTypes: { xSmall: string; small: string; medium: string; large: string; }; euiGradientStartStop: string; euiGradientMiddle: string; browserDefaultFontSize: string; euiMarkdownEditorMinHeight: string; euiPopoverArrowSize: string; euiPopoverTranslateDistance: string; euiProgressSizes: { xs: string; s: string; m: string; l: string; }; euiProgressColors: { primary: string; secondary: string; success: string; warning: string; danger: string; accent: string; subdued: string; vis0: string; vis1: string; vis2: string; vis3: string; vis4: string; vis5: string; vis6: string; vis7: string; vis8: string; vis9: string; customColor: string; }; euiResizableButtonTransitionSpeed: string; euiResizableButtonSize: string; euiSelectableListItemBorder: string; euiSelectableListItemPadding: string; euiSelectableTemplateSitewideTypes: { application: { color: string; 'font-weight': number; }; deployment: { color: string; 'font-weight': number; }; article: { color: string; 'font-weight': number; }; case: { color: string; 'font-weight': number; }; platform: { color: string; 'font-weight': number; }; }; euiSideNavEmphasizedBackgroundColor: string; euiSideNavRootTextcolor: string; euiSideNavBranchTextcolor: string; euiSideNavSelectedTextcolor: string; spacerSizes: { xs: string; s: string; m: string; l: string; xl: string; xxl: string; }; euiStepNumberSize: string; euiStepNumberSmallSize: string; euiStepNumberMargin: string; euiStepStatusColorsToFade: { warning: string; danger: string; disabled: string; incomplete: string; }; euiSuggestItemColors: { tint0: string; tint1: string; tint2: string; tint3: string; tint4: string; tint5: string; tint6: string; tint7: string; tint8: string; tint9: string; tint10: string; }; euiTableCellContentPadding: string; euiTableCellContentPaddingCompressed: string; euiTableCellCheckboxWidth: string; euiTableActionsAreaWidth: string; euiTableHoverColor: string; euiTableSelectedColor: string; euiTableHoverSelectedColor: string; euiTableActionsBorderColor: string; euiTableHoverClickableColor: string; euiTableFocusClickableColor: string; euiTabFontSize: string; euiTabFontSizeS: string; euiTabFontSizeL: string; euiTextColors: { default: string; subdued: string; secondary: string; accent: string; warning: string; danger: string; ghost: string; }; euiTextConstrainedMaxWidth: string; euiToastWidth: string; euiToastTypes: { primary: string; success: string; warning: string; danger: string; }; euiTokenGrayColor: string; euiTokenTypes: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; gray: { graphic: string; behindText: string; }; }; euiTokenTypeKeys: string; euiAnimSlightBounce: string; euiAnimSlightResistance: string; euiAnimSpeedExtraFast: string; euiAnimSpeedFast: string; euiAnimSpeedNormal: string; euiAnimSpeedSlow: string; euiAnimSpeedExtraSlow: string; euiBorderWidthThin: string; euiBorderWidthThick: string; euiBorderColor: string; euiBorderRadius: string; euiBorderRadiusSmall: string; euiBorderThick: string; euiBorderThin: string; euiBorderEditable: string; euiButtonHeight: string; euiButtonHeightSmall: string; euiButtonHeightXSmall: string; euiButtonColorDisabled: string; euiButtonColorDisabledText: string; euiButtonColorGhostDisabled: string; euiButtonTypes: { primary: string; secondary: string; warning: string; danger: string; ghost: string; text: string; }; euiColorGhost: string; euiColorInk: string; euiColorPrimary: string; euiColorSecondary: string; euiColorAccent: string; euiColorSuccess: string; euiColorWarning: string; euiColorDanger: string; euiColorEmptyShade: string; euiColorLightestShade: string; euiColorLightShade: string; euiColorMediumShade: string; euiColorDarkShade: string; euiColorDarkestShade: string; euiColorFullShade: string; euiPageBackgroundColor: string; euiColorHighlight: string; euiTextColor: string; euiTitleColor: string; euiTextSubduedColor: string; euiColorDisabled: string; euiColorPrimaryText: string; euiColorSecondaryText: string; euiColorAccentText: string; euiColorWarningText: string; euiColorDangerText: string; euiColorDisabledText: string; euiColorSuccessText: string; euiLinkColor: string; euiPaletteColorBlind: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; }; euiPaletteColorBlindKeys: string; euiColorVis0: string; euiColorVis1: string; euiColorVis2: string; euiColorVis3: string; euiColorVis4: string; euiColorVis5: string; euiColorVis6: string; euiColorVis7: string; euiColorVis8: string; euiColorVis9: string; euiColorVis0_behindText: string; euiColorVis1_behindText: string; euiColorVis2_behindText: string; euiColorVis3_behindText: string; euiColorVis4_behindText: string; euiColorVis5_behindText: string; euiColorVis6_behindText: string; euiColorVis7_behindText: string; euiColorVis8_behindText: string; euiColorVis9_behindText: string; euiColorChartLines: string; euiColorChartBand: string; euiCodeBlockBackgroundColor: string; euiCodeBlockColor: string; euiCodeBlockSelectedBackgroundColor: string; euiCodeBlockCommentColor: string; euiCodeBlockSelectorTagColor: string; euiCodeBlockStringColor: string; euiCodeBlockTagColor: string; euiCodeBlockNameColor: string; euiCodeBlockNumberColor: string; euiCodeBlockKeywordColor: string; euiCodeBlockFunctionTitleColor: string; euiCodeBlockTypeColor: string; euiCodeBlockAttributeColor: string; euiCodeBlockSymbolColor: string; euiCodeBlockParamsColor: string; euiCodeBlockMetaColor: string; euiCodeBlockTitleColor: string; euiCodeBlockSectionColor: string; euiCodeBlockAdditionColor: string; euiCodeBlockDeletionColor: string; euiCodeBlockSelectorClassColor: string; euiCodeBlockSelectorIdColor: string; euiFormMaxWidth: string; euiFormControlHeight: string; euiFormControlCompressedHeight: string; euiFormControlPadding: string; euiFormControlCompressedPadding: string; euiFormControlBorderRadius: number; euiFormControlCompressedBorderRadius: string; euiRadioSize: string; euiCheckBoxSize: string; euiCheckboxBorderRadius: string; euiSwitchHeight: string; euiSwitchWidth: string; euiSwitchThumbSize: string; euiSwitchIconHeight: string; euiSwitchHeightCompressed: string; euiSwitchWidthCompressed: string; euiSwitchThumbSizeCompressed: string; euiSwitchHeightMini: string; euiSwitchWidthMini: string; euiSwitchThumbSizeMini: string; euiFormBackgroundColor: string; euiFormBackgroundDisabledColor: string; euiFormBackgroundReadOnlyColor: string; euiFormBorderOpaqueColor: string; euiFormBorderColor: string; euiFormBorderDisabledColor: string; euiFormCustomControlDisabledIconColor: string; euiFormCustomControlBorderColor: string; euiFormControlDisabledColor: string; euiFormControlBoxShadow: string; euiFormControlPlaceholderText: string; euiFormInputGroupLabelBackground: string; euiFormInputGroupBorder: string; euiSwitchOffColor: string; euiFormControlLayoutGroupInputHeight: string; euiFormControlLayoutGroupInputCompressedHeight: string; euiFormControlLayoutGroupInputCompressedBorderRadius: string; euiRangeTrackColor: string; euiRangeThumbRadius: string; euiRangeThumbHeight: string; euiRangeThumbWidth: string; euiRangeThumbBorderColor: string; euiRangeTrackWidth: string; euiRangeTrackHeight: string; euiRangeTrackBorderWidth: number; euiRangeTrackBorderColor: string; euiRangeTrackRadius: string; euiRangeDisabledOpacity: number; euiRangeHighlightHeight: string; euiHeaderBackgroundColor: string; euiHeaderDarkBackgroundColor: string; euiHeaderBorderColor: string; euiHeaderBreadcrumbColor: string; euiHeaderHeight: string; euiHeaderChildSize: string; euiHeaderHeightCompensation: string; euiPageDefaultMaxWidth: string; euiPageSidebarMinWidth: string; euiPanelPaddingModifiers: { paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiPanelBorderRadiusModifiers: { borderRadiusNone: number; borderRadiusMedium: string; }; euiPanelBackgroundColorModifiers: { transparent: string; plain: string; subdued: string; accent: string; primary: string; success: string; warning: string; danger: string; }; euiBreakpoints: { xs: number; s: string; m: string; l: string; xl: string; }; euiBreakpointKeys: string; euiShadowColor: string; euiShadowColorLarge: string; euiSize: string; euiSizeXS: string; euiSizeS: string; euiSizeM: string; euiSizeL: string; euiSizeXL: string; euiSizeXXL: string; euiButtonMinWidth: string; euiScrollBar: string; euiScrollBarCorner: string; euiFocusRingColor: string; euiFocusRingAnimStartColor: string; euiFocusRingAnimStartSize: string; euiFocusRingAnimStartSizeLarge: string; euiFocusRingSizeLarge: string; euiFocusRingSize: string; euiFocusTransparency: number; euiFocusBackgroundColor: string; euiTooltipBackgroundColor: string; euiTooltipAnimations: { top: string; left: string; bottom: string; right: string; }; euiFontFamily: string; euiCodeFontFamily: string; euiFontFeatureSettings: string; euiTextScale: string; euiFontSize: string; euiFontSizeXS: string; euiFontSizeS: string; euiFontSizeM: string; euiFontSizeL: string; euiFontSizeXL: string; euiFontSizeXXL: string; euiLineHeight: number; euiBodyLineHeight: number; euiFontWeightLight: number; euiFontWeightRegular: number; euiFontWeightMedium: number; euiFontWeightSemiBold: number; euiFontWeightBold: number; euiCodeFontWeightRegular: number; euiCodeFontWeightBold: number; euiTitles: { xxxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xs: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; s: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; m: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; l: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; }; euiZLevel0: number; euiZLevel1: number; euiZLevel2: number; euiZLevel3: number; euiZLevel4: number; euiZLevel5: number; euiZLevel6: number; euiZLevel7: number; euiZLevel8: number; euiZLevel9: number; euiZContent: number; euiZHeader: number; euiZContentMenu: number; euiZFlyout: number; euiZNavigation: number; euiZMask: number; euiZModal: number; euiZToastList: number; }" ], "source": { "path": "src/plugins/kibana_react/common/eui_styled_components.tsx", diff --git a/api_docs/kibana_utils.json b/api_docs/kibana_utils.json index 66eefa9097bfb1..99296f3235f0f7 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/lens.json b/api_docs/lens.json index 196361f65682b9..782d060f398cb3 100644 --- a/api_docs/lens.json +++ b/api_docs/lens.json @@ -87,7 +87,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/cardinality.tsx", - "lineNumber": 45 + "lineNumber": 52 }, "deprecated": false, "children": [ @@ -103,7 +103,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/cardinality.tsx", - "lineNumber": 48 + "lineNumber": 55 }, "deprecated": false } @@ -119,7 +119,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx", - "lineNumber": 42 + "lineNumber": 48 }, "deprecated": false, "children": [ @@ -136,7 +136,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx", - "lineNumber": 43 + "lineNumber": 49 }, "deprecated": false }, @@ -149,7 +149,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx", - "lineNumber": 44 + "lineNumber": 50 }, "deprecated": false }, @@ -166,7 +166,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx", - "lineNumber": 45 + "lineNumber": 51 }, "deprecated": false } @@ -199,7 +199,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.tsx", - "lineNumber": 43 + "lineNumber": 44 }, "deprecated": false, "children": [ @@ -215,7 +215,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.tsx", - "lineNumber": 44 + "lineNumber": 45 }, "deprecated": false }, @@ -231,7 +231,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.tsx", - "lineNumber": 45 + "lineNumber": 46 }, "deprecated": false } @@ -308,7 +308,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/column_types.ts", - "lineNumber": 45 + "lineNumber": 46 }, "deprecated": false, "children": [ @@ -324,7 +324,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/column_types.ts", - "lineNumber": 46 + "lineNumber": 47 }, "deprecated": false }, @@ -340,7 +340,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/column_types.ts", - "lineNumber": 47 + "lineNumber": 48 }, "deprecated": false } @@ -407,7 +407,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/last_value.tsx", - "lineNumber": 80 + "lineNumber": 87 }, "deprecated": false, "children": [ @@ -423,7 +423,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/last_value.tsx", - "lineNumber": 81 + "lineNumber": 88 }, "deprecated": false }, @@ -439,7 +439,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/last_value.tsx", - "lineNumber": 82 + "lineNumber": 89 }, "deprecated": false } @@ -522,7 +522,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 83 + "lineNumber": 84 }, "deprecated": false, "children": [ @@ -558,7 +558,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 92 + "lineNumber": 93 }, "deprecated": false }, @@ -580,7 +580,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 101 + "lineNumber": 102 }, "deprecated": false, "returnComment": [], @@ -599,7 +599,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 101 + "lineNumber": 102 }, "deprecated": false }, @@ -615,7 +615,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 101 + "lineNumber": 102 }, "deprecated": false } @@ -635,7 +635,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 105 + "lineNumber": 106 }, "deprecated": false, "returnComment": [], @@ -657,7 +657,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 110 + "lineNumber": 111 }, "deprecated": false, "returnComment": [], @@ -720,7 +720,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/types.ts", - "lineNumber": 363 + "lineNumber": 362 }, "deprecated": false, "children": [ @@ -736,7 +736,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/types.ts", - "lineNumber": 365 + "lineNumber": 364 }, "deprecated": false }, @@ -749,7 +749,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/types.ts", - "lineNumber": 368 + "lineNumber": 367 }, "deprecated": false }, @@ -767,7 +767,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/types.ts", - "lineNumber": 374 + "lineNumber": 373 }, "deprecated": false } @@ -800,7 +800,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.tsx", - "lineNumber": 24 + "lineNumber": 25 }, "deprecated": false, "children": [ @@ -816,7 +816,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.tsx", - "lineNumber": 25 + "lineNumber": 26 }, "deprecated": false }, @@ -832,7 +832,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.tsx", - "lineNumber": 26 + "lineNumber": 27 }, "deprecated": false } @@ -1039,7 +1039,7 @@ "label": "numberDisplay", "description": [], "signature": [ - "\"hidden\" | \"value\" | \"percent\"" + "\"percent\" | \"hidden\" | \"value\"" ], "source": { "path": "x-pack/plugins/lens/public/pie_visualization/types.ts", @@ -1156,7 +1156,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", - "lineNumber": 56 + "lineNumber": 161 }, "deprecated": false, "children": [ @@ -1172,7 +1172,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", - "lineNumber": 57 + "lineNumber": 162 }, "deprecated": false }, @@ -1188,7 +1188,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", - "lineNumber": 58 + "lineNumber": 163 }, "deprecated": false } @@ -1277,7 +1277,13 @@ "label": "yConfig", "description": [], "signature": [ - "YConfig", + { + "pluginId": "lens", + "scope": "public", + "docId": "kibLensPluginApi", + "section": "def-public.YConfig", + "text": "YConfig" + }, "[] | undefined" ], "source": { @@ -1353,7 +1359,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 474 + "lineNumber": 475 }, "deprecated": false, "children": [ @@ -1369,7 +1375,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 475 + "lineNumber": 476 }, "deprecated": false }, @@ -1391,7 +1397,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 476 + "lineNumber": 477 }, "deprecated": false }, @@ -1407,7 +1413,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 477 + "lineNumber": 478 }, "deprecated": false }, @@ -1423,7 +1429,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 478 + "lineNumber": 479 }, "deprecated": false }, @@ -1440,7 +1446,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 479 + "lineNumber": 480 }, "deprecated": false }, @@ -1457,7 +1463,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 480 + "lineNumber": 481 }, "deprecated": false }, @@ -1480,7 +1486,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 481 + "lineNumber": 482 }, "deprecated": false }, @@ -1496,7 +1502,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 482 + "lineNumber": 483 }, "deprecated": false }, @@ -1512,7 +1518,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 483 + "lineNumber": 484 }, "deprecated": false }, @@ -1528,7 +1534,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 484 + "lineNumber": 485 }, "deprecated": false }, @@ -1551,7 +1557,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 485 + "lineNumber": 486 }, "deprecated": false }, @@ -1574,7 +1580,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 486 + "lineNumber": 487 }, "deprecated": false }, @@ -1597,7 +1603,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 487 + "lineNumber": 488 }, "deprecated": false }, @@ -1613,7 +1619,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 488 + "lineNumber": 489 }, "deprecated": false }, @@ -1629,7 +1635,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 489 + "lineNumber": 490 }, "deprecated": false }, @@ -1645,7 +1651,84 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 490 + "lineNumber": 491 + }, + "deprecated": false + }, + { + "parentPluginId": "lens", + "id": "def-public.XYState.valuesInLegend", + "type": "CompoundType", + "tags": [], + "label": "valuesInLegend", + "description": [], + "signature": [ + "boolean | undefined" + ], + "source": { + "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", + "lineNumber": 492 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "lens", + "id": "def-public.YConfig", + "type": "Interface", + "tags": [], + "label": "YConfig", + "description": [], + "source": { + "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", + "lineNumber": 418 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "lens", + "id": "def-public.YConfig.forAccessor", + "type": "string", + "tags": [], + "label": "forAccessor", + "description": [], + "source": { + "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", + "lineNumber": 419 + }, + "deprecated": false + }, + { + "parentPluginId": "lens", + "id": "def-public.YConfig.axisMode", + "type": "CompoundType", + "tags": [], + "label": "axisMode", + "description": [], + "signature": [ + "\"left\" | \"right\" | \"auto\" | undefined" + ], + "source": { + "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", + "lineNumber": 420 + }, + "deprecated": false + }, + { + "parentPluginId": "lens", + "id": "def-public.YConfig.color", + "type": "string", + "tags": [], + "label": "color", + "description": [], + "signature": [ + "string | undefined" + ], + "source": { + "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", + "lineNumber": 421 }, "deprecated": false } @@ -1676,7 +1759,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx", - "lineNumber": 132 + "lineNumber": 139 }, "deprecated": false, "initialIsOpen": false @@ -1742,7 +1825,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/cumulative_sum.tsx", - "lineNumber": 33 + "lineNumber": 34 }, "deprecated": false, "initialIsOpen": false @@ -1759,7 +1842,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/types.ts", - "lineNumber": 352 + "lineNumber": 351 }, "deprecated": false, "initialIsOpen": false @@ -1875,7 +1958,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts", - "lineNumber": 79 + "lineNumber": 80 }, "deprecated": false, "initialIsOpen": false @@ -1992,7 +2075,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts", - "lineNumber": 58 + "lineNumber": 59 }, "deprecated": false, "initialIsOpen": false @@ -2018,7 +2101,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx", - "lineNumber": 134 + "lineNumber": 141 }, "deprecated": false, "initialIsOpen": false @@ -2044,7 +2127,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx", - "lineNumber": 135 + "lineNumber": 142 }, "deprecated": false, "initialIsOpen": false @@ -2070,7 +2153,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx", - "lineNumber": 133 + "lineNumber": 140 }, "deprecated": false, "initialIsOpen": false @@ -2090,7 +2173,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/moving_average.tsx", - "lineNumber": 47 + "lineNumber": 43 }, "deprecated": false, "initialIsOpen": false @@ -2109,7 +2192,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts", - "lineNumber": 498 + "lineNumber": 533 }, "deprecated": false, "initialIsOpen": false @@ -2209,7 +2292,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx", - "lineNumber": 131 + "lineNumber": 138 }, "deprecated": false, "initialIsOpen": false @@ -2296,7 +2379,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 471 + "lineNumber": 472 }, "deprecated": false, "initialIsOpen": false @@ -2350,7 +2433,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 31 + "lineNumber": 34 }, "deprecated": false, "children": [ @@ -2366,7 +2449,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 35 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -2389,7 +2472,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 35 + "lineNumber": 38 }, "deprecated": false, "isRequired": true @@ -2433,7 +2516,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 39 + "lineNumber": 42 }, "deprecated": false, "children": [ @@ -2464,7 +2547,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 39 + "lineNumber": 42 }, "deprecated": false, "isRequired": true @@ -2487,7 +2570,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 39 + "lineNumber": 42 }, "deprecated": false, "isRequired": true @@ -2523,7 +2606,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 59 + "lineNumber": 63 }, "deprecated": false, "children": [ @@ -2545,7 +2628,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 59 + "lineNumber": 63 }, "deprecated": false, "isRequired": true @@ -2568,7 +2651,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 59 + "lineNumber": 63 }, "deprecated": false, "isRequired": true @@ -2588,7 +2671,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 66 + "lineNumber": 70 }, "deprecated": false, "children": [], @@ -2609,7 +2692,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 21 + "lineNumber": 23 }, "deprecated": false, "children": [ @@ -2632,7 +2715,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 22 + "lineNumber": 24 }, "deprecated": false }, @@ -2655,7 +2738,29 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 23 + "lineNumber": 25 + }, + "deprecated": false + }, + { + "parentPluginId": "lens", + "id": "def-server.PluginSetupContract.embeddable", + "type": "Object", + "tags": [], + "label": "embeddable", + "description": [], + "signature": [ + { + "pluginId": "embeddable", + "scope": "server", + "docId": "kibEmbeddablePluginApi", + "section": "def-server.EmbeddableSetup", + "text": "EmbeddableSetup" + } + ], + "source": { + "path": "x-pack/plugins/lens/server/plugin.tsx", + "lineNumber": 26 }, "deprecated": false } @@ -2671,7 +2776,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 26 + "lineNumber": 29 }, "deprecated": false, "children": [ @@ -2694,7 +2799,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 27 + "lineNumber": 30 }, "deprecated": false }, @@ -2716,7 +2821,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 28 + "lineNumber": 31 }, "deprecated": false } diff --git a/api_docs/licensing.json b/api_docs/licensing.json index 1451cff869f47a..862a00e65215f4 100644 --- a/api_docs/licensing.json +++ b/api_docs/licensing.json @@ -45,7 +45,7 @@ "\nThe validity status of the license." ], "signature": [ - "\"active\" | \"invalid\" | \"expired\" | undefined" + "\"invalid\" | \"active\" | \"expired\" | undefined" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -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", @@ -492,7 +492,7 @@ "\nThe validity status of the license." ], "signature": [ - "\"active\" | \"invalid\" | \"expired\"" + "\"invalid\" | \"active\" | \"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", @@ -856,7 +856,7 @@ "label": "LicenseStatus", "description": [], "signature": [ - "\"active\" | \"invalid\" | \"expired\"" + "\"invalid\" | \"active\" | \"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 } }, { @@ -1001,7 +1001,7 @@ "plugin": "ml", "link": { "path": "x-pack/plugins/ml/public/plugin.ts", - "lineNumber": 136 + "lineNumber": 141 } }, { @@ -1022,7 +1022,7 @@ "plugin": "fleet", "link": { "path": "x-pack/plugins/fleet/public/plugin.ts", - "lineNumber": 97 + "lineNumber": 94 } }, { @@ -2078,7 +2078,7 @@ "\nThe validity status of the license." ], "signature": [ - "\"active\" | \"invalid\" | \"expired\" | undefined" + "\"invalid\" | \"active\" | \"expired\" | undefined" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -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", @@ -2581,7 +2581,7 @@ "\nThe validity status of the license." ], "signature": [ - "\"active\" | \"invalid\" | \"expired\"" + "\"invalid\" | \"active\" | \"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", @@ -2964,7 +2964,7 @@ "label": "LicenseStatus", "description": [], "signature": [ - "\"active\" | \"invalid\" | \"expired\"" + "\"invalid\" | \"active\" | \"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 } }, { @@ -3119,13 +3119,6 @@ "lineNumber": 139 } }, - { - "plugin": "indexManagement", - "link": { - "path": "x-pack/plugins/index_management/server/services/license.ts", - "lineNumber": 36 - } - }, { "plugin": "remoteClusters", "link": { @@ -3137,7 +3130,7 @@ "plugin": "fleet", "link": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 213 + "lineNumber": 214 } }, { @@ -3154,18 +3147,11 @@ "lineNumber": 41 } }, - { - "plugin": "ingestPipelines", - "link": { - "path": "x-pack/plugins/ingest_pipelines/server/services/license.ts", - "lineNumber": 40 - } - }, { "plugin": "maps", "link": { "path": "x-pack/plugins/maps/server/plugin.ts", - "lineNumber": 164 + "lineNumber": 167 } }, { diff --git a/api_docs/lists.json b/api_docs/lists.json index 90f5cd726287b9..061227499d67f2 100644 --- a/api_docs/lists.json +++ b/api_docs/lists.json @@ -341,7 +341,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 56 + "lineNumber": 59 }, "deprecated": false, "children": [ @@ -357,7 +357,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 61 + "lineNumber": 64 }, "deprecated": false, "children": [ @@ -373,7 +373,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 61 + "lineNumber": 64 }, "deprecated": false, "isRequired": true @@ -395,7 +395,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 66 + "lineNumber": 69 }, "deprecated": false, "children": [ @@ -411,7 +411,45 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 66 + "lineNumber": 69 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "lists", + "id": "def-server.ExceptionListClient.getExceptionListSummary", + "type": "Function", + "tags": [], + "label": "getExceptionListSummary", + "description": [], + "signature": [ + "({ listId, id, namespaceType, }: ", + "GetExceptionListSummaryOptions", + ") => Promise<{ windows: number; linux: number; macos: number; total: number; } | null>" + ], + "source": { + "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", + "lineNumber": 78 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "lists", + "id": "def-server.ExceptionListClient.getExceptionListSummary.$1", + "type": "Object", + "tags": [], + "label": "{\n listId,\n id,\n namespaceType,\n }", + "description": [], + "signature": [ + "GetExceptionListSummaryOptions" + ], + "source": { + "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", + "lineNumber": 78 }, "deprecated": false, "isRequired": true @@ -429,11 +467,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 75 + "lineNumber": 87 }, "deprecated": false, "children": [ @@ -449,7 +487,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 75 + "lineNumber": 87 }, "deprecated": false, "isRequired": true @@ -471,7 +509,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 90 + "lineNumber": 102 }, "deprecated": false, "children": [], @@ -493,7 +531,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 102 + "lineNumber": 114 }, "deprecated": false, "children": [], @@ -513,7 +551,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 114 + "lineNumber": 126 }, "deprecated": false, "children": [], @@ -531,11 +569,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 128 + "lineNumber": 140 }, "deprecated": false, "children": [ @@ -551,7 +589,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 128 + "lineNumber": 140 }, "deprecated": false, "isRequired": true @@ -571,11 +609,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 164 + "lineNumber": 176 }, "deprecated": false, "children": [ @@ -591,7 +629,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 164 + "lineNumber": 176 }, "deprecated": false, "isRequired": true @@ -611,11 +649,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 200 + "lineNumber": 212 }, "deprecated": false, "children": [ @@ -631,7 +669,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 200 + "lineNumber": 212 }, "deprecated": false, "isRequired": true @@ -653,7 +691,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 208 + "lineNumber": 220 }, "deprecated": false, "children": [ @@ -669,7 +707,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 208 + "lineNumber": 220 }, "deprecated": false, "isRequired": true @@ -691,7 +729,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 235 + "lineNumber": 247 }, "deprecated": false, "children": [ @@ -707,7 +745,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 235 + "lineNumber": 247 }, "deprecated": false, "isRequired": true @@ -729,7 +767,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 266 + "lineNumber": 278 }, "deprecated": false, "children": [ @@ -745,7 +783,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 266 + "lineNumber": 278 }, "deprecated": false, "isRequired": true @@ -769,11 +807,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 280 + "lineNumber": 292 }, "deprecated": false, "children": [ @@ -795,7 +833,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 280 + "lineNumber": 292 }, "deprecated": false, "isRequired": true @@ -819,11 +857,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 311 + "lineNumber": 323 }, "deprecated": false, "children": [ @@ -845,7 +883,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 311 + "lineNumber": 323 }, "deprecated": false, "isRequired": true @@ -863,11 +901,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 344 + "lineNumber": 356 }, "deprecated": false, "children": [ @@ -883,7 +921,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 344 + "lineNumber": 356 }, "deprecated": false, "isRequired": true @@ -905,7 +943,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 358 + "lineNumber": 370 }, "deprecated": false, "children": [ @@ -921,7 +959,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 358 + "lineNumber": 370 }, "deprecated": false, "isRequired": true @@ -941,11 +979,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 373 + "lineNumber": 385 }, "deprecated": false, "children": [ @@ -961,7 +999,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 373 + "lineNumber": 385 }, "deprecated": false, "isRequired": true @@ -979,11 +1017,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 386 + "lineNumber": 398 }, "deprecated": false, "children": [ @@ -999,7 +1037,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 386 + "lineNumber": 398 }, "deprecated": false, "isRequired": true @@ -1017,11 +1055,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 408 + "lineNumber": 420 }, "deprecated": false, "children": [ @@ -1037,7 +1075,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 408 + "lineNumber": 420 }, "deprecated": false, "isRequired": true @@ -1055,11 +1093,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 430 + "lineNumber": 442 }, "deprecated": false, "children": [ @@ -1075,7 +1113,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 430 + "lineNumber": 442 }, "deprecated": false, "isRequired": true @@ -1097,7 +1135,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 448 + "lineNumber": 460 }, "deprecated": false, "children": [ @@ -1113,7 +1151,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 448 + "lineNumber": 460 }, "deprecated": false, "isRequired": true @@ -1133,11 +1171,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 476 + "lineNumber": 488 }, "deprecated": false, "children": [ @@ -1153,7 +1191,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 476 + "lineNumber": 488 }, "deprecated": false, "isRequired": true @@ -1259,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\" | \"text\" | \"keyword\" | \"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", @@ -1297,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\" | \"text\" | \"keyword\" | \"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", @@ -1335,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\" | \"text\" | \"keyword\" | \"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", @@ -1733,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\" | \"text\" | \"keyword\" | \"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", @@ -1771,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\" | \"text\" | \"keyword\" | \"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", @@ -1809,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\" | \"text\" | \"keyword\" | \"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", @@ -1885,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\" | \"text\" | \"keyword\" | \"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 +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\" | \"text\" | \"keyword\" | \"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", @@ -1961,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\" | \"text\" | \"keyword\" | \"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", @@ -1999,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\" | \"text\" | \"keyword\" | \"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 +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\" | \"text\" | \"keyword\" | \"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", @@ -2075,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\" | \"text\" | \"keyword\" | \"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", @@ -2113,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\" | \"text\" | \"keyword\" | \"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", @@ -2151,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\" | \"text\" | \"keyword\" | \"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", @@ -2189,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\" | \"text\" | \"keyword\" | \"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", @@ -2227,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\" | \"text\" | \"keyword\" | \"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", @@ -2270,7 +2308,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 118 + "lineNumber": 124 }, "deprecated": false, "children": [ @@ -2286,7 +2324,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 119 + "lineNumber": 125 }, "deprecated": false }, @@ -2298,11 +2336,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 120 + "lineNumber": 126 }, "deprecated": false }, @@ -2315,7 +2353,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 121 + "lineNumber": 127 }, "deprecated": false }, @@ -2328,7 +2366,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 122 + "lineNumber": 128 }, "deprecated": false }, @@ -2344,7 +2382,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 123 + "lineNumber": 129 }, "deprecated": false }, @@ -2357,7 +2395,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 124 + "lineNumber": 130 }, "deprecated": false }, @@ -2373,7 +2411,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 125 + "lineNumber": 131 }, "deprecated": false }, @@ -2386,7 +2424,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 126 + "lineNumber": 132 }, "deprecated": false }, @@ -2402,7 +2440,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 127 + "lineNumber": 133 }, "deprecated": false }, @@ -2418,7 +2456,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 128 + "lineNumber": 134 }, "deprecated": false }, @@ -2434,7 +2472,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 129 + "lineNumber": 135 }, "deprecated": false } @@ -2859,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", @@ -2981,7 +3019,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 144 + "lineNumber": 150 }, "deprecated": false, "children": [ @@ -2997,7 +3035,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 145 + "lineNumber": 151 }, "deprecated": false }, @@ -3013,7 +3051,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 146 + "lineNumber": 152 }, "deprecated": false }, @@ -3025,11 +3063,11 @@ "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\" | \"text\" | \"keyword\" | \"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", - "lineNumber": 147 + "lineNumber": 153 }, "deprecated": false }, @@ -3045,7 +3083,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 148 + "lineNumber": 154 }, "deprecated": false }, @@ -3061,7 +3099,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 149 + "lineNumber": 155 }, "deprecated": false }, @@ -3077,7 +3115,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 150 + "lineNumber": 156 }, "deprecated": false }, @@ -3093,7 +3131,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 151 + "lineNumber": 157 }, "deprecated": false }, @@ -3109,7 +3147,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 152 + "lineNumber": 158 }, "deprecated": false }, @@ -3125,7 +3163,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 153 + "lineNumber": 159 }, "deprecated": false }, @@ -3141,7 +3179,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 154 + "lineNumber": 160 }, "deprecated": false }, @@ -3157,7 +3195,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 155 + "lineNumber": 161 }, "deprecated": false }, @@ -3173,7 +3211,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 156 + "lineNumber": 162 }, "deprecated": false } diff --git a/api_docs/maps.json b/api_docs/maps.json index d418518dcb0d2c..9c1c7243a41bc5 100644 --- a/api_docs/maps.json +++ b/api_docs/maps.json @@ -57,7 +57,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 95 + "lineNumber": 93 }, "deprecated": false, "children": [ @@ -70,7 +70,7 @@ "description": [], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 98 + "lineNumber": 96 }, "deprecated": false }, @@ -86,7 +86,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 118 + "lineNumber": 115 }, "deprecated": false, "children": [ @@ -102,7 +102,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 118 + "lineNumber": 115 }, "deprecated": false, "isRequired": true @@ -125,7 +125,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 118 + "lineNumber": 115 }, "deprecated": false, "isRequired": true @@ -165,7 +165,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 118 + "lineNumber": 115 }, "deprecated": false, "isRequired": false @@ -194,7 +194,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 200 + "lineNumber": 194 }, "deprecated": false, "children": [ @@ -216,7 +216,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 201 + "lineNumber": 195 }, "deprecated": false, "isRequired": true @@ -238,7 +238,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 206 + "lineNumber": 200 }, "deprecated": false, "children": [], @@ -258,7 +258,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 214 + "lineNumber": 208 }, "deprecated": false, "children": [], @@ -276,7 +276,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 219 + "lineNumber": 213 }, "deprecated": false, "children": [], @@ -294,7 +294,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 223 + "lineNumber": 217 }, "deprecated": false, "children": [], @@ -314,7 +314,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 227 + "lineNumber": 221 }, "deprecated": false, "children": [ @@ -330,7 +330,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 227 + "lineNumber": 221 }, "deprecated": false, "isRequired": true @@ -352,7 +352,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 231 + "lineNumber": 225 }, "deprecated": false, "children": [ @@ -368,7 +368,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 231 + "lineNumber": 225 }, "deprecated": false, "isRequired": true @@ -395,7 +395,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 235 + "lineNumber": 229 }, "deprecated": false, "children": [], @@ -413,7 +413,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 239 + "lineNumber": 233 }, "deprecated": false, "children": [], @@ -439,7 +439,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 283 + "lineNumber": 273 }, "deprecated": false, "children": [], @@ -457,7 +457,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 291 + "lineNumber": 281 }, "deprecated": false, "children": [], @@ -475,7 +475,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 301 + "lineNumber": 291 }, "deprecated": false, "children": [ @@ -488,7 +488,7 @@ "description": [], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 301 + "lineNumber": 291 }, "deprecated": false, "children": [ @@ -501,7 +501,7 @@ "description": [], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 301 + "lineNumber": 291 }, "deprecated": false } @@ -510,56 +510,6 @@ ], "returnComment": [] }, - { - "parentPluginId": "maps", - "id": "def-public.MapEmbeddable._dispatchSetRefreshConfig", - "type": "Function", - "tags": [], - "label": "_dispatchSetRefreshConfig", - "description": [], - "signature": [ - "(refreshConfig: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataQueryPluginApi", - "section": "def-common.RefreshInterval", - "text": "RefreshInterval" - }, - ") => void" - ], - "source": { - "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 321 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "maps", - "id": "def-public.MapEmbeddable._dispatchSetRefreshConfig.$1", - "type": "Object", - "tags": [], - "label": "refreshConfig", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataQueryPluginApi", - "section": "def-common.RefreshInterval", - "text": "RefreshInterval" - } - ], - "source": { - "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 321 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, { "parentPluginId": "maps", "id": "def-public.MapEmbeddable._dispatchSetChartsPaletteServiceGetColor", @@ -572,7 +522,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 331 + "lineNumber": 311 }, "deprecated": false, "children": [ @@ -588,7 +538,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 331 + "lineNumber": 311 }, "deprecated": false, "isRequired": false @@ -610,7 +560,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 349 + "lineNumber": 329 }, "deprecated": false, "children": [ @@ -626,7 +576,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 349 + "lineNumber": 329 }, "deprecated": false, "isRequired": true @@ -648,7 +598,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 375 + "lineNumber": 355 }, "deprecated": false, "children": [ @@ -665,7 +615,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 375 + "lineNumber": 355 }, "deprecated": false, "isRequired": true @@ -693,7 +643,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 392 + "lineNumber": 372 }, "deprecated": false, "children": [ @@ -709,7 +659,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 392 + "lineNumber": 372 }, "deprecated": false, "isRequired": true @@ -726,7 +676,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 392 + "lineNumber": 372 }, "deprecated": false, "isRequired": true @@ -749,7 +699,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 392 + "lineNumber": 372 }, "deprecated": false, "isRequired": false @@ -777,7 +727,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 406 + "lineNumber": 386 }, "deprecated": false, "children": [ @@ -800,7 +750,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 406 + "lineNumber": 386 }, "deprecated": false, "isRequired": true @@ -817,7 +767,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 406 + "lineNumber": 386 }, "deprecated": false, "isRequired": true @@ -845,7 +795,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 418 + "lineNumber": 398 }, "deprecated": false, "children": [], @@ -871,7 +821,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 439 + "lineNumber": 419 }, "deprecated": false, "children": [], @@ -889,7 +839,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 450 + "lineNumber": 430 }, "deprecated": false, "children": [], @@ -907,7 +857,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 487 + "lineNumber": 466 }, "deprecated": false, "children": [], @@ -925,7 +875,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 501 + "lineNumber": 480 }, "deprecated": false, "children": [], @@ -943,7 +893,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 517 + "lineNumber": 496 }, "deprecated": false, "children": [], @@ -961,7 +911,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 523 + "lineNumber": 502 }, "deprecated": false, "children": [], @@ -1377,7 +1327,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/types.ts", - "lineNumber": 42 + "lineNumber": 41 }, "deprecated": false, "initialIsOpen": false @@ -1409,7 +1359,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/types.ts", - "lineNumber": 44 + "lineNumber": 43 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/metrics_entities.json b/api_docs/metrics_entities.json index 3e67e8e7500076..b78278a84162a3 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/ml.json b/api_docs/ml.json index dee66858b9be94..2e0e6364993d53 100644 --- a/api_docs/ml.json +++ b/api_docs/ml.json @@ -868,7 +868,7 @@ "description": [], "source": { "path": "x-pack/plugins/ml/common/types/capabilities.ts", - "lineNumber": 153 + "lineNumber": 161 }, "deprecated": false, "children": [ @@ -884,7 +884,7 @@ ], "source": { "path": "x-pack/plugins/ml/common/types/capabilities.ts", - "lineNumber": 154 + "lineNumber": 162 }, "deprecated": false }, @@ -897,7 +897,7 @@ "description": [], "source": { "path": "x-pack/plugins/ml/common/types/capabilities.ts", - "lineNumber": 155 + "lineNumber": 163 }, "deprecated": false }, @@ -910,7 +910,7 @@ "description": [], "source": { "path": "x-pack/plugins/ml/common/types/capabilities.ts", - "lineNumber": 156 + "lineNumber": 164 }, "deprecated": false }, @@ -923,7 +923,7 @@ "description": [], "source": { "path": "x-pack/plugins/ml/common/types/capabilities.ts", - "lineNumber": 157 + "lineNumber": 165 }, "deprecated": false } @@ -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 @@ -1563,7 +1563,7 @@ ], "source": { "path": "x-pack/plugins/ml/public/plugin.ts", - "lineNumber": 213 + "lineNumber": 212 }, "deprecated": false, "lifecycle": "start", @@ -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/monitoring.json b/api_docs/monitoring.json index 188e3f7b321001..2569619f007d71 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/newsfeed.json b/api_docs/newsfeed.json index 45ec0de037851f..eec5a9c5642e50 100644 --- a/api_docs/newsfeed.json +++ b/api_docs/newsfeed.json @@ -228,7 +228,7 @@ "description": [], "source": { "path": "src/plugins/newsfeed/public/lib/api.ts", - "lineNumber": 25 + "lineNumber": 16 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/observability.json b/api_docs/observability.json index fc645dd7e2e6b8..f59cf6407de756 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", @@ -417,7 +421,7 @@ "signature": [ "({ children, ...props }: { children?: React.ReactNode; } & ", "CommonProps", - " & Pick, \"children\" | \"onClick\" | \"onChange\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\"> & { bordered?: boolean | undefined; flush?: boolean | undefined; gutterSize?: \"m\" | \"s\" | \"none\" | undefined; listItems?: ", + " & Pick, \"children\" | \"onClick\" | \"onChange\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\"> & { bordered?: boolean | undefined; flush?: boolean | undefined; gutterSize?: \"none\" | \"m\" | \"s\" | undefined; listItems?: ", "EuiListGroupItemProps", "[] | undefined; color?: \"text\" | \"primary\" | \"inherit\" | \"ghost\" | \"subdued\" | undefined; size?: \"m\" | \"s\" | \"l\" | \"xs\" | undefined; maxWidth?: string | number | boolean | undefined; showToolTips?: boolean | undefined; wrapText?: boolean | undefined; ariaLabelledby?: string | undefined; }) => JSX.Element" ], @@ -437,7 +441,7 @@ "signature": [ "{ children?: React.ReactNode; } & ", "CommonProps", - " & Pick, \"children\" | \"onClick\" | \"onChange\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\"> & { bordered?: boolean | undefined; flush?: boolean | undefined; gutterSize?: \"m\" | \"s\" | \"none\" | undefined; listItems?: ", + " & Pick, \"children\" | \"onClick\" | \"onChange\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\"> & { bordered?: boolean | undefined; flush?: boolean | undefined; gutterSize?: \"none\" | \"m\" | \"s\" | undefined; listItems?: ", "EuiListGroupItemProps", "[] | undefined; color?: \"text\" | \"primary\" | \"inherit\" | \"ghost\" | \"subdued\" | undefined; size?: \"m\" | \"s\" | \"l\" | \"xs\" | undefined; maxWidth?: string | number | boolean | undefined; showToolTips?: boolean | undefined; wrapText?: boolean | undefined; ariaLabelledby?: string | undefined; }" ], @@ -573,6 +577,46 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "observability", + "id": "def-public.useBreadcrumbs", + "type": "Function", + "tags": [], + "label": "useBreadcrumbs", + "description": [], + "signature": [ + "(extraCrumbs: ", + "EuiBreadcrumb", + "[]) => void" + ], + "source": { + "path": "x-pack/plugins/observability/public/hooks/use_breadcrumbs.ts", + "lineNumber": 43 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "observability", + "id": "def-public.useBreadcrumbs.$1", + "type": "Array", + "tags": [], + "label": "extraCrumbs", + "description": [], + "signature": [ + "EuiBreadcrumb", + "[]" + ], + "source": { + "path": "x-pack/plugins/observability/public/hooks/use_breadcrumbs.ts", + "lineNumber": 43 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "observability", "id": "def-public.useChartTheme", @@ -887,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", @@ -924,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", @@ -2267,7 +2311,7 @@ "description": [], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 73 + "lineNumber": 82 }, "deprecated": false, "children": [ @@ -2283,7 +2327,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 74 + "lineNumber": 83 }, "deprecated": false }, @@ -2299,7 +2343,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 78 + "lineNumber": 87 }, "deprecated": false }, @@ -2316,7 +2360,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 79 + "lineNumber": 88 }, "deprecated": false }, @@ -2332,7 +2376,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 80 + "lineNumber": 89 }, "deprecated": false }, @@ -2344,11 +2388,11 @@ "label": "reportType", "description": [], "signature": [ - "\"logs\" | \"cpu\" | \"pld\" | \"kpi\" | \"upd\" | \"upp\" | \"svl\" | \"tpt\" | \"mem\" | \"nwk\"" + "\"logs\" | \"cpu\" | \"pld\" | \"kpi\" | \"cwv\" | \"upd\" | \"upp\" | \"svl\" | \"tpt\" | \"mem\" | \"nwk\"" ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 81 + "lineNumber": 90 }, "deprecated": false }, @@ -2364,7 +2408,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 82 + "lineNumber": 91 }, "deprecated": false }, @@ -2380,7 +2424,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 83 + "lineNumber": 92 }, "deprecated": false }, @@ -2396,7 +2440,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 84 + "lineNumber": 93 }, "deprecated": false } @@ -3006,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", @@ -3046,7 +3094,9 @@ "DisambiguateSet", ", \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"download\" | \"media\" | \"target\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes)> & ", "DisambiguateSet", - ", \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"download\" | \"media\" | \"target\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes), \"children\" | \"type\" | \"onChange\" | \"onKeyDown\" | \"title\" | \"id\" | \"name\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"download\" | \"autoFocus\" | \"disabled\" | \"form\" | \"formAction\" | \"formEncType\" | \"formMethod\" | \"formNoValidate\" | \"formTarget\" | \"value\" | \"media\" | \"ping\" | \"hrefLang\" | \"referrerPolicy\"> & { size?: \"m\" | \"s\" | \"l\" | \"xs\" | undefined; color?: \"text\" | \"primary\" | \"inherit\" | \"ghost\" | \"subdued\" | undefined; label: React.ReactNode; isActive?: boolean | undefined; isDisabled?: boolean | undefined; href?: string | undefined; target?: string | undefined; rel?: string | undefined; iconType?: string | React.ComponentClass<{}, any> | React.FunctionComponent<{}> | undefined; icon?: React.ReactElement React.ReactElement React.Component)> | null) | (new (props: any) => React.Component)> | undefined; showToolTip?: boolean | undefined; extraAction?: ({ type?: \"reset\" | \"button\" | \"submit\" | undefined; } & ", + ", \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"download\" | \"media\" | \"target\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes), \"children\" | \"type\" | \"onChange\" | \"onKeyDown\" | \"title\" | \"id\" | \"name\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"download\" | \"autoFocus\" | \"disabled\" | \"form\" | \"formAction\" | \"formEncType\" | \"formMethod\" | \"formNoValidate\" | \"formTarget\" | \"value\" | \"media\" | \"ping\" | \"hrefLang\" | \"referrerPolicy\"> & { size?: \"m\" | \"s\" | \"l\" | \"xs\" | undefined; color?: \"text\" | \"primary\" | \"inherit\" | \"ghost\" | \"subdued\" | undefined; label: React.ReactNode; isActive?: boolean | undefined; isDisabled?: boolean | undefined; href?: string | undefined; target?: string | undefined; rel?: string | undefined; iconType?: string | React.ComponentClass<{}, any> | React.FunctionComponent<{}> | undefined; iconProps?: Pick<", + "EuiIconProps", + ", \"string\" | \"children\" | \"from\" | \"origin\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"y\" | \"d\" | \"x\" | \"title\" | \"id\" | \"operator\" | \"name\" | \"version\" | \"filter\" | \"size\" | \"format\" | \"order\" | \"className\" | \"lang\" | \"style\" | \"tabIndex\" | \"role\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"scale\" | \"height\" | \"max\" | \"media\" | \"method\" | \"min\" | \"target\" | \"width\" | \"crossOrigin\" | \"accentHeight\" | \"accumulate\" | \"additive\" | \"alignmentBaseline\" | \"allowReorder\" | \"alphabetic\" | \"amplitude\" | \"arabicForm\" | \"ascent\" | \"attributeName\" | \"attributeType\" | \"autoReverse\" | \"azimuth\" | \"baseFrequency\" | \"baselineShift\" | \"baseProfile\" | \"bbox\" | \"begin\" | \"bias\" | \"by\" | \"calcMode\" | \"capHeight\" | \"clip\" | \"clipPath\" | \"clipPathUnits\" | \"clipRule\" | \"colorInterpolation\" | \"colorInterpolationFilters\" | \"colorProfile\" | \"colorRendering\" | \"contentScriptType\" | \"contentStyleType\" | \"cursor\" | \"cx\" | \"cy\" | \"decelerate\" | \"descent\" | \"diffuseConstant\" | \"direction\" | \"display\" | \"divisor\" | \"dominantBaseline\" | \"dur\" | \"dx\" | \"dy\" | \"edgeMode\" | \"elevation\" | \"enableBackground\" | \"end\" | \"exponent\" | \"externalResourcesRequired\" | \"fill\" | \"fillOpacity\" | \"fillRule\" | \"filterRes\" | \"filterUnits\" | \"floodColor\" | \"floodOpacity\" | \"focusable\" | \"fontFamily\" | \"fontSize\" | \"fontSizeAdjust\" | \"fontStretch\" | \"fontStyle\" | \"fontVariant\" | \"fontWeight\" | \"fx\" | \"fy\" | \"g1\" | \"g2\" | \"glyphName\" | \"glyphOrientationHorizontal\" | \"glyphOrientationVertical\" | \"glyphRef\" | \"gradientTransform\" | \"gradientUnits\" | \"hanging\" | \"horizAdvX\" | \"horizOriginX\" | \"href\" | \"ideographic\" | \"imageRendering\" | \"in2\" | \"in\" | \"intercept\" | \"k1\" | \"k2\" | \"k3\" | \"k4\" | \"k\" | \"kernelMatrix\" | \"kernelUnitLength\" | \"kerning\" | \"keyPoints\" | \"keySplines\" | \"keyTimes\" | \"lengthAdjust\" | \"letterSpacing\" | \"lightingColor\" | \"limitingConeAngle\" | \"local\" | \"markerEnd\" | \"markerHeight\" | \"markerMid\" | \"markerStart\" | \"markerUnits\" | \"markerWidth\" | \"mask\" | \"maskContentUnits\" | \"maskUnits\" | \"mathematical\" | \"mode\" | \"numOctaves\" | \"offset\" | \"opacity\" | \"orient\" | \"orientation\" | \"overflow\" | \"overlinePosition\" | \"overlineThickness\" | \"paintOrder\" | \"panose1\" | \"path\" | \"pathLength\" | \"patternContentUnits\" | \"patternTransform\" | \"patternUnits\" | \"pointerEvents\" | \"points\" | \"pointsAtX\" | \"pointsAtY\" | \"pointsAtZ\" | \"preserveAlpha\" | \"preserveAspectRatio\" | \"primitiveUnits\" | \"r\" | \"radius\" | \"refX\" | \"refY\" | \"renderingIntent\" | \"repeatCount\" | \"repeatDur\" | \"requiredExtensions\" | \"requiredFeatures\" | \"restart\" | \"result\" | \"rotate\" | \"rx\" | \"ry\" | \"seed\" | \"shapeRendering\" | \"slope\" | \"spacing\" | \"specularConstant\" | \"specularExponent\" | \"speed\" | \"spreadMethod\" | \"startOffset\" | \"stdDeviation\" | \"stemh\" | \"stemv\" | \"stitchTiles\" | \"stopColor\" | \"stopOpacity\" | \"strikethroughPosition\" | \"strikethroughThickness\" | \"stroke\" | \"strokeDasharray\" | \"strokeDashoffset\" | \"strokeLinecap\" | \"strokeLinejoin\" | \"strokeMiterlimit\" | \"strokeOpacity\" | \"strokeWidth\" | \"surfaceScale\" | \"systemLanguage\" | \"tableValues\" | \"targetX\" | \"targetY\" | \"textAnchor\" | \"textDecoration\" | \"textLength\" | \"textRendering\" | \"to\" | \"transform\" | \"u1\" | \"u2\" | \"underlinePosition\" | \"underlineThickness\" | \"unicode\" | \"unicodeBidi\" | \"unicodeRange\" | \"unitsPerEm\" | \"vAlphabetic\" | \"values\" | \"vectorEffect\" | \"vertAdvY\" | \"vertOriginX\" | \"vertOriginY\" | \"vHanging\" | \"vIdeographic\" | \"viewBox\" | \"viewTarget\" | \"visibility\" | \"vMathematical\" | \"widths\" | \"wordSpacing\" | \"writingMode\" | \"x1\" | \"x2\" | \"xChannelSelector\" | \"xHeight\" | \"xlinkActuate\" | \"xlinkArcrole\" | \"xlinkHref\" | \"xlinkRole\" | \"xlinkShow\" | \"xlinkTitle\" | \"xlinkType\" | \"xmlBase\" | \"xmlLang\" | \"xmlns\" | \"xmlnsXlink\" | \"xmlSpace\" | \"y1\" | \"y2\" | \"yChannelSelector\" | \"z\" | \"zoomAndPan\" | \"titleId\" | \"onIconLoad\"> | undefined; icon?: React.ReactElement React.ReactElement React.Component)> | null) | (new (props: any) => React.Component)> | undefined; showToolTip?: boolean | undefined; extraAction?: ({ type?: \"reset\" | \"button\" | \"submit\" | undefined; } & ", "EuiButtonIconProps", " & { onClick?: ((event: React.MouseEvent) => void) | undefined; } & React.ButtonHTMLAttributes & { buttonRef?: ((instance: HTMLButtonElement | null) => void) | React.RefObject | null | undefined; } & { alwaysShow?: boolean | undefined; }) | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; wrapText?: boolean | undefined; buttonRef?: ((instance: HTMLButtonElement | null) => void) | React.RefObject | null | undefined; }" ], @@ -3142,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", @@ -3328,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", @@ -3385,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", @@ -3432,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": [ @@ -3453,7 +3511,7 @@ ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 35 + "lineNumber": 39 }, "deprecated": false, "isRequired": false @@ -3471,7 +3529,7 @@ "description": [], "signature": [ "(start: number | undefined, end: number | undefined, field: string) => ", - "QueryContainer", + "QueryDslQueryContainer", "[]" ], "source": { @@ -3492,7 +3550,7 @@ ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 21 + "lineNumber": 22 }, "deprecated": false, "isRequired": false @@ -3509,7 +3567,7 @@ ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 21 + "lineNumber": 23 }, "deprecated": false, "isRequired": false @@ -3526,7 +3584,7 @@ ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 21 + "lineNumber": 24 }, "deprecated": false, "isRequired": true @@ -3799,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/rule_registry.json b/api_docs/rule_registry.json index cd1f4994c1da61..f114f1bf227516 100644 --- a/api_docs/rule_registry.json +++ b/api_docs/rule_registry.json @@ -342,6 +342,115 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.createPersistenceRuleTypeFactory", + "type": "Function", + "tags": [], + "label": "createPersistenceRuleTypeFactory", + "description": [], + "signature": [ + "({ logger, ruleDataClient, }: { ruleDataClient: ", + { + "pluginId": "ruleRegistry", + "scope": "server", + "docId": "kibRuleRegistryPluginApi", + "section": "def-server.RuleDataClient", + "text": "RuleDataClient" + }, + "; logger: ", + "Logger", + "; }) => , TAlertInstanceContext extends { [x: string]: unknown; }, TServices extends { alertWithPersistence: PersistenceAlertService; findAlerts: PersistenceAlertQueryService; }>(type: ", + "AlertTypeWithExecutor", + ") => { executor: (options: ", + { + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.AlertExecutorOptions", + "text": "AlertExecutorOptions" + }, + ", { [x: string]: unknown; }, TAlertInstanceContext, never> & { services: any; }) => Promise; id: string; name: string; validate?: { params?: ", + "AlertTypeParamsValidator", + " | undefined; } | undefined; actionGroups: ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.ActionGroup", + "text": "ActionGroup" + }, + "[]; defaultActionGroupId: string; recoveryActionGroup?: ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.ActionGroup", + "text": "ActionGroup" + }, + " | undefined; producer: string; actionVariables?: { context?: ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + "[] | undefined; state?: ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + "[] | undefined; params?: ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + "[] | undefined; } | undefined; minimumLicenseRequired: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\"; }" + ], + "source": { + "path": "x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_factory.ts", + "lineNumber": 42 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "ruleRegistry", + "id": "def-server.createPersistenceRuleTypeFactory.$1", + "type": "Object", + "tags": [], + "label": "{\n logger,\n ruleDataClient,\n}", + "description": [], + "signature": [ + "{ ruleDataClient: ", + { + "pluginId": "ruleRegistry", + "scope": "server", + "docId": "kibRuleRegistryPluginApi", + "section": "def-server.RuleDataClient", + "text": "RuleDataClient" + }, + "; logger: ", + "Logger", + "; }" + ], + "source": { + "path": "x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_factory.ts", + "lineNumber": 42 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "ruleRegistry", "id": "def-server.getRuleExecutorData", @@ -784,7 +893,7 @@ "signature": [ "(input: unknown) => OutputOf<", "Optional", - "<{ readonly \"kibana.rac.alert.producer\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.uuid\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.id\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.start\": { readonly type: \"date\"; }; readonly \"kibana.rac.alert.end\": { readonly type: \"date\"; }; readonly \"kibana.rac.alert.duration.us\": { readonly type: \"long\"; }; readonly \"kibana.rac.alert.severity.level\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.severity.value\": { readonly type: \"long\"; }; readonly \"kibana.rac.alert.status\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.evaluation.threshold\": { readonly type: \"scaled_float\"; readonly scaling_factor: 100; }; readonly \"kibana.rac.alert.evaluation.value\": { readonly type: \"scaled_float\"; readonly scaling_factor: 100; }; readonly '@timestamp': { readonly type: \"date\"; readonly array: false; readonly required: true; }; readonly tags: { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly 'event.kind': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'event.action': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.uuid': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.id': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.name': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.category': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; }, \"tags\" | \"kibana.rac.alert.uuid\" | \"event.kind\" | \"event.action\" | \"rule.uuid\" | \"rule.id\" | \"rule.name\" | \"rule.category\" | \"kibana.rac.alert.producer\" | \"kibana.rac.alert.id\" | \"kibana.rac.alert.start\" | \"kibana.rac.alert.end\" | \"kibana.rac.alert.duration.us\" | \"kibana.rac.alert.severity.level\" | \"kibana.rac.alert.severity.value\" | \"kibana.rac.alert.status\" | \"kibana.rac.alert.evaluation.threshold\" | \"kibana.rac.alert.evaluation.value\">>" + "<{ readonly \"kibana.rac.alert.producer\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.uuid\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.id\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.start\": { readonly type: \"date\"; }; readonly \"kibana.rac.alert.end\": { readonly type: \"date\"; }; readonly \"kibana.rac.alert.duration.us\": { readonly type: \"long\"; }; readonly \"kibana.rac.alert.severity.level\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.severity.value\": { readonly type: \"long\"; }; readonly \"kibana.rac.alert.status\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.evaluation.threshold\": { readonly type: \"scaled_float\"; readonly scaling_factor: 100; }; readonly \"kibana.rac.alert.evaluation.value\": { readonly type: \"scaled_float\"; readonly scaling_factor: 100; }; readonly tags: { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly '@timestamp': { readonly type: \"date\"; readonly array: false; readonly required: true; }; readonly 'event.kind': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'event.action': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.uuid': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.id': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.name': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.category': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; }, \"tags\" | \"kibana.rac.alert.uuid\" | \"event.kind\" | \"event.action\" | \"rule.uuid\" | \"rule.id\" | \"rule.name\" | \"rule.category\" | \"kibana.rac.alert.producer\" | \"kibana.rac.alert.id\" | \"kibana.rac.alert.start\" | \"kibana.rac.alert.end\" | \"kibana.rac.alert.duration.us\" | \"kibana.rac.alert.severity.level\" | \"kibana.rac.alert.severity.value\" | \"kibana.rac.alert.status\" | \"kibana.rac.alert.evaluation.threshold\" | \"kibana.rac.alert.evaluation.value\">>" ], "source": { "path": "x-pack/plugins/rule_registry/common/parse_technical_fields.ts", diff --git a/api_docs/saved_objects.json b/api_docs/saved_objects.json index 48579ca8e589e0..6af18c749db67c 100644 --- a/api_docs/saved_objects.json +++ b/api_docs/saved_objects.json @@ -781,15 +781,15 @@ { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/types.ts", - "lineNumber": 25 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 33 } }, { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/types.ts", - "lineNumber": 74 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 186 } }, { @@ -803,7 +803,7 @@ "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 126 + "lineNumber": 127 } }, { @@ -1383,20 +1383,20 @@ "plugin": "embeddable", "link": { "path": "src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx", - "lineNumber": 167 + "lineNumber": 165 } }, { "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 } }, @@ -2670,42 +2670,42 @@ "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 18 + "lineNumber": 19 } }, { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx", - "lineNumber": 14 + "path": "src/plugins/dashboard/public/application/lib/dashboard_tagging.ts", + "lineNumber": 10 } }, { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx", - "lineNumber": 98 + "path": "src/plugins/dashboard/public/application/lib/dashboard_tagging.ts", + "lineNumber": 15 } }, { "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx", - "lineNumber": 126 + "lineNumber": 14 } }, { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts", - "lineNumber": 23 + "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx", + "lineNumber": 98 } }, { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts", - "lineNumber": 35 + "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx", + "lineNumber": 126 } }, { @@ -4337,7 +4337,7 @@ "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 41 + "lineNumber": 42 } } ] @@ -4364,14 +4364,14 @@ "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/application/listing/dashboard_listing.tsx", - "lineNumber": 87 + "lineNumber": 92 } }, { "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/application/listing/dashboard_listing.tsx", - "lineNumber": 172 + "lineNumber": 177 } }, { diff --git a/api_docs/saved_objects_management.json b/api_docs/saved_objects_management.json index 5d95b713715fa6..8e8e7850261a34 100644 --- a/api_docs/saved_objects_management.json +++ b/api_docs/saved_objects_management.json @@ -987,7 +987,7 @@ "label": "euiColumn", "description": [], "signature": [ - "{ children?: React.ReactNode; headers?: string | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; onChange?: ((event: React.FormEvent) => void) | undefined; color?: string | undefined; onKeyDown?: ((event: React.KeyboardEvent) => void) | undefined; description?: string | undefined; title?: string | undefined; id?: string | undefined; name: React.ReactNode; field: string; defaultChecked?: boolean | undefined; defaultValue?: string | number | string[] | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; accessKey?: string | undefined; className?: string | undefined; contentEditable?: boolean | \"true\" | \"false\" | \"inherit\" | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: boolean | \"true\" | \"false\" | undefined; hidden?: boolean | undefined; lang?: string | undefined; placeholder?: string | undefined; slot?: string | undefined; spellCheck?: boolean | \"true\" | \"false\" | undefined; style?: React.CSSProperties | undefined; tabIndex?: number | undefined; translate?: \"yes\" | \"no\" | undefined; radioGroup?: string | undefined; role?: string | undefined; about?: string | undefined; datatype?: string | undefined; inlist?: any; prefix?: string | undefined; property?: string | undefined; resource?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; security?: string | undefined; unselectable?: \"on\" | \"off\" | undefined; inputMode?: \"text\" | \"none\" | \"search\" | \"email\" | \"tel\" | \"url\" | \"numeric\" | \"decimal\" | undefined; is?: string | undefined; 'aria-activedescendant'?: string | undefined; 'aria-atomic'?: boolean | \"true\" | \"false\" | undefined; 'aria-autocomplete'?: \"none\" | \"list\" | \"inline\" | \"both\" | undefined; 'aria-busy'?: boolean | \"true\" | \"false\" | undefined; 'aria-checked'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-colcount'?: number | undefined; 'aria-colindex'?: number | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; 'aria-current'?: boolean | \"date\" | \"location\" | \"page\" | \"true\" | \"false\" | \"step\" | \"time\" | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: boolean | \"true\" | \"false\" | undefined; 'aria-dropeffect'?: \"none\" | \"copy\" | \"link\" | \"execute\" | \"move\" | \"popup\" | undefined; 'aria-errormessage'?: string | undefined; 'aria-expanded'?: boolean | \"true\" | \"false\" | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: boolean | \"true\" | \"false\" | undefined; 'aria-haspopup'?: boolean | \"grid\" | \"menu\" | \"true\" | \"false\" | \"listbox\" | \"tree\" | \"dialog\" | undefined; 'aria-hidden'?: boolean | \"true\" | \"false\" | undefined; 'aria-invalid'?: boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\" | undefined; 'aria-keyshortcuts'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-level'?: number | undefined; 'aria-live'?: \"off\" | \"assertive\" | \"polite\" | undefined; 'aria-modal'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiline'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiselectable'?: boolean | \"true\" | \"false\" | undefined; 'aria-orientation'?: \"horizontal\" | \"vertical\" | undefined; 'aria-owns'?: string | undefined; 'aria-placeholder'?: string | undefined; 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-readonly'?: boolean | \"true\" | \"false\" | undefined; 'aria-relevant'?: \"text\" | \"additions\" | \"additions text\" | \"all\" | \"removals\" | undefined; 'aria-required'?: boolean | \"true\" | \"false\" | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; 'aria-rowindex'?: number | undefined; 'aria-rowspan'?: number | undefined; 'aria-selected'?: boolean | \"true\" | \"false\" | undefined; 'aria-setsize'?: number | undefined; 'aria-sort'?: \"none\" | \"ascending\" | \"descending\" | \"other\" | undefined; 'aria-valuemax'?: number | undefined; 'aria-valuemin'?: number | undefined; 'aria-valuenow'?: number | undefined; 'aria-valuetext'?: string | undefined; dangerouslySetInnerHTML?: { __html: string; } | undefined; onCopy?: ((event: React.ClipboardEvent) => void) | undefined; onCopyCapture?: ((event: React.ClipboardEvent) => void) | undefined; onCut?: ((event: React.ClipboardEvent) => void) | undefined; onCutCapture?: ((event: React.ClipboardEvent) => void) | undefined; onPaste?: ((event: React.ClipboardEvent) => void) | undefined; onPasteCapture?: ((event: React.ClipboardEvent) => void) | undefined; onCompositionEnd?: ((event: React.CompositionEvent) => void) | undefined; onCompositionEndCapture?: ((event: React.CompositionEvent) => void) | undefined; onCompositionStart?: ((event: React.CompositionEvent) => void) | undefined; onCompositionStartCapture?: ((event: React.CompositionEvent) => void) | undefined; onCompositionUpdate?: ((event: React.CompositionEvent) => void) | undefined; onCompositionUpdateCapture?: ((event: React.CompositionEvent) => void) | undefined; onFocus?: ((event: React.FocusEvent) => void) | undefined; onFocusCapture?: ((event: React.FocusEvent) => void) | undefined; onBlur?: ((event: React.FocusEvent) => void) | undefined; onBlurCapture?: ((event: React.FocusEvent) => void) | undefined; onChangeCapture?: ((event: React.FormEvent) => void) | undefined; onBeforeInput?: ((event: React.FormEvent) => void) | undefined; onBeforeInputCapture?: ((event: React.FormEvent) => void) | undefined; onInput?: ((event: React.FormEvent) => void) | undefined; onInputCapture?: ((event: React.FormEvent) => void) | undefined; onReset?: ((event: React.FormEvent) => void) | undefined; onResetCapture?: ((event: React.FormEvent) => void) | undefined; onSubmit?: ((event: React.FormEvent) => void) | undefined; onSubmitCapture?: ((event: React.FormEvent) => void) | undefined; onInvalid?: ((event: React.FormEvent) => void) | undefined; onInvalidCapture?: ((event: React.FormEvent) => void) | undefined; onLoad?: ((event: React.SyntheticEvent) => void) | undefined; onLoadCapture?: ((event: React.SyntheticEvent) => void) | undefined; onError?: ((event: React.SyntheticEvent) => void) | undefined; onErrorCapture?: ((event: React.SyntheticEvent) => void) | undefined; onKeyDownCapture?: ((event: React.KeyboardEvent) => void) | undefined; onKeyPress?: ((event: React.KeyboardEvent) => void) | undefined; onKeyPressCapture?: ((event: React.KeyboardEvent) => void) | undefined; onKeyUp?: ((event: React.KeyboardEvent) => void) | undefined; onKeyUpCapture?: ((event: React.KeyboardEvent) => void) | undefined; onAbort?: ((event: React.SyntheticEvent) => void) | undefined; onAbortCapture?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlay?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayCapture?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayThrough?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayThroughCapture?: ((event: React.SyntheticEvent) => void) | undefined; onDurationChange?: ((event: React.SyntheticEvent) => void) | undefined; onDurationChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEmptied?: ((event: React.SyntheticEvent) => void) | undefined; onEmptiedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEncrypted?: ((event: React.SyntheticEvent) => void) | undefined; onEncryptedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEnded?: ((event: React.SyntheticEvent) => void) | undefined; onEndedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedData?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedDataCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedMetadata?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedMetadataCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadStart?: ((event: React.SyntheticEvent) => void) | undefined; onLoadStartCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPause?: ((event: React.SyntheticEvent) => void) | undefined; onPauseCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPlay?: ((event: React.SyntheticEvent) => void) | undefined; onPlayCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPlaying?: ((event: React.SyntheticEvent) => void) | undefined; onPlayingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onProgress?: ((event: React.SyntheticEvent) => void) | undefined; onProgressCapture?: ((event: React.SyntheticEvent) => void) | undefined; onRateChange?: ((event: React.SyntheticEvent) => void) | undefined; onRateChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSeeked?: ((event: React.SyntheticEvent) => void) | undefined; onSeekedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSeeking?: ((event: React.SyntheticEvent) => void) | undefined; onSeekingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onStalled?: ((event: React.SyntheticEvent) => void) | undefined; onStalledCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSuspend?: ((event: React.SyntheticEvent) => void) | undefined; onSuspendCapture?: ((event: React.SyntheticEvent) => void) | undefined; onTimeUpdate?: ((event: React.SyntheticEvent) => void) | undefined; onTimeUpdateCapture?: ((event: React.SyntheticEvent) => void) | undefined; onVolumeChange?: ((event: React.SyntheticEvent) => void) | undefined; onVolumeChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onWaiting?: ((event: React.SyntheticEvent) => void) | undefined; onWaitingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onAuxClick?: ((event: React.MouseEvent) => void) | undefined; onAuxClickCapture?: ((event: React.MouseEvent) => void) | undefined; onClickCapture?: ((event: React.MouseEvent) => void) | undefined; onContextMenu?: ((event: React.MouseEvent) => void) | undefined; onContextMenuCapture?: ((event: React.MouseEvent) => void) | undefined; onDoubleClick?: ((event: React.MouseEvent) => void) | undefined; onDoubleClickCapture?: ((event: React.MouseEvent) => void) | undefined; onDrag?: ((event: React.DragEvent) => void) | undefined; onDragCapture?: ((event: React.DragEvent) => void) | undefined; onDragEnd?: ((event: React.DragEvent) => void) | undefined; onDragEndCapture?: ((event: React.DragEvent) => void) | undefined; onDragEnter?: ((event: React.DragEvent) => void) | undefined; onDragEnterCapture?: ((event: React.DragEvent) => void) | undefined; onDragExit?: ((event: React.DragEvent) => void) | undefined; onDragExitCapture?: ((event: React.DragEvent) => void) | undefined; onDragLeave?: ((event: React.DragEvent) => void) | undefined; onDragLeaveCapture?: ((event: React.DragEvent) => void) | undefined; onDragOver?: ((event: React.DragEvent) => void) | undefined; onDragOverCapture?: ((event: React.DragEvent) => void) | undefined; onDragStart?: ((event: React.DragEvent) => void) | undefined; onDragStartCapture?: ((event: React.DragEvent) => void) | undefined; onDrop?: ((event: React.DragEvent) => void) | undefined; onDropCapture?: ((event: React.DragEvent) => void) | undefined; onMouseDown?: ((event: React.MouseEvent) => void) | undefined; onMouseDownCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseEnter?: ((event: React.MouseEvent) => void) | undefined; onMouseLeave?: ((event: React.MouseEvent) => void) | undefined; onMouseMove?: ((event: React.MouseEvent) => void) | undefined; onMouseMoveCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseOut?: ((event: React.MouseEvent) => void) | undefined; onMouseOutCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseOver?: ((event: React.MouseEvent) => void) | undefined; onMouseOverCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseUp?: ((event: React.MouseEvent) => void) | undefined; onMouseUpCapture?: ((event: React.MouseEvent) => void) | undefined; onSelect?: ((event: React.SyntheticEvent) => void) | undefined; onSelectCapture?: ((event: React.SyntheticEvent) => void) | undefined; onTouchCancel?: ((event: React.TouchEvent) => void) | undefined; onTouchCancelCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchEnd?: ((event: React.TouchEvent) => void) | undefined; onTouchEndCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchMove?: ((event: React.TouchEvent) => void) | undefined; onTouchMoveCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchStart?: ((event: React.TouchEvent) => void) | undefined; onTouchStartCapture?: ((event: React.TouchEvent) => void) | undefined; onPointerDown?: ((event: React.PointerEvent) => void) | undefined; onPointerDownCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerMove?: ((event: React.PointerEvent) => void) | undefined; onPointerMoveCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerUp?: ((event: React.PointerEvent) => void) | undefined; onPointerUpCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerCancel?: ((event: React.PointerEvent) => void) | undefined; onPointerCancelCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerEnter?: ((event: React.PointerEvent) => void) | undefined; onPointerEnterCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerLeave?: ((event: React.PointerEvent) => void) | undefined; onPointerLeaveCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerOver?: ((event: React.PointerEvent) => void) | undefined; onPointerOverCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerOut?: ((event: React.PointerEvent) => void) | undefined; onPointerOutCapture?: ((event: React.PointerEvent) => void) | undefined; onGotPointerCapture?: ((event: React.PointerEvent) => void) | undefined; onGotPointerCaptureCapture?: ((event: React.PointerEvent) => void) | undefined; onLostPointerCapture?: ((event: React.PointerEvent) => void) | undefined; onLostPointerCaptureCapture?: ((event: React.PointerEvent) => void) | undefined; onScroll?: ((event: React.UIEvent) => void) | undefined; onScrollCapture?: ((event: React.UIEvent) => void) | undefined; onWheel?: ((event: React.WheelEvent) => void) | undefined; onWheelCapture?: ((event: React.WheelEvent) => void) | undefined; onAnimationStart?: ((event: React.AnimationEvent) => void) | undefined; onAnimationStartCapture?: ((event: React.AnimationEvent) => void) | undefined; onAnimationEnd?: ((event: React.AnimationEvent) => void) | undefined; onAnimationEndCapture?: ((event: React.AnimationEvent) => void) | undefined; onAnimationIteration?: ((event: React.AnimationEvent) => void) | undefined; onAnimationIterationCapture?: ((event: React.AnimationEvent) => void) | undefined; onTransitionEnd?: ((event: React.TransitionEvent) => void) | undefined; onTransitionEndCapture?: ((event: React.TransitionEvent) => void) | undefined; css?: ", + "{ children?: React.ReactNode; headers?: string | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; onChange?: ((event: React.FormEvent) => void) | undefined; color?: string | undefined; onKeyDown?: ((event: React.KeyboardEvent) => void) | undefined; description?: string | undefined; title?: string | undefined; id?: string | undefined; name: React.ReactNode; field: string; defaultChecked?: boolean | undefined; defaultValue?: string | number | string[] | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; accessKey?: string | undefined; className?: string | undefined; contentEditable?: boolean | \"true\" | \"false\" | \"inherit\" | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: boolean | \"true\" | \"false\" | undefined; hidden?: boolean | undefined; lang?: string | undefined; placeholder?: string | undefined; slot?: string | undefined; spellCheck?: boolean | \"true\" | \"false\" | undefined; style?: React.CSSProperties | undefined; tabIndex?: number | undefined; translate?: \"yes\" | \"no\" | undefined; radioGroup?: string | undefined; role?: string | undefined; about?: string | undefined; datatype?: string | undefined; inlist?: any; prefix?: string | undefined; property?: string | undefined; resource?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; security?: string | undefined; unselectable?: \"on\" | \"off\" | undefined; inputMode?: \"none\" | \"text\" | \"search\" | \"email\" | \"tel\" | \"url\" | \"numeric\" | \"decimal\" | undefined; is?: string | undefined; 'aria-activedescendant'?: string | undefined; 'aria-atomic'?: boolean | \"true\" | \"false\" | undefined; 'aria-autocomplete'?: \"none\" | \"list\" | \"inline\" | \"both\" | undefined; 'aria-busy'?: boolean | \"true\" | \"false\" | undefined; 'aria-checked'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-colcount'?: number | undefined; 'aria-colindex'?: number | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; 'aria-current'?: boolean | \"date\" | \"location\" | \"page\" | \"true\" | \"false\" | \"step\" | \"time\" | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: boolean | \"true\" | \"false\" | undefined; 'aria-dropeffect'?: \"none\" | \"copy\" | \"link\" | \"execute\" | \"move\" | \"popup\" | undefined; 'aria-errormessage'?: string | undefined; 'aria-expanded'?: boolean | \"true\" | \"false\" | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: boolean | \"true\" | \"false\" | undefined; 'aria-haspopup'?: boolean | \"grid\" | \"menu\" | \"true\" | \"false\" | \"listbox\" | \"tree\" | \"dialog\" | undefined; 'aria-hidden'?: boolean | \"true\" | \"false\" | undefined; 'aria-invalid'?: boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\" | undefined; 'aria-keyshortcuts'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-level'?: number | undefined; 'aria-live'?: \"off\" | \"assertive\" | \"polite\" | undefined; 'aria-modal'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiline'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiselectable'?: boolean | \"true\" | \"false\" | undefined; 'aria-orientation'?: \"horizontal\" | \"vertical\" | undefined; 'aria-owns'?: string | undefined; 'aria-placeholder'?: string | undefined; 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-readonly'?: boolean | \"true\" | \"false\" | undefined; 'aria-relevant'?: \"all\" | \"text\" | \"additions\" | \"additions text\" | \"removals\" | undefined; 'aria-required'?: boolean | \"true\" | \"false\" | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; 'aria-rowindex'?: number | undefined; 'aria-rowspan'?: number | undefined; 'aria-selected'?: boolean | \"true\" | \"false\" | undefined; 'aria-setsize'?: number | undefined; 'aria-sort'?: \"none\" | \"ascending\" | \"descending\" | \"other\" | undefined; 'aria-valuemax'?: number | undefined; 'aria-valuemin'?: number | undefined; 'aria-valuenow'?: number | undefined; 'aria-valuetext'?: string | undefined; dangerouslySetInnerHTML?: { __html: string; } | undefined; onCopy?: ((event: React.ClipboardEvent) => void) | undefined; onCopyCapture?: ((event: React.ClipboardEvent) => void) | undefined; onCut?: ((event: React.ClipboardEvent) => void) | undefined; onCutCapture?: ((event: React.ClipboardEvent) => void) | undefined; onPaste?: ((event: React.ClipboardEvent) => void) | undefined; onPasteCapture?: ((event: React.ClipboardEvent) => void) | undefined; onCompositionEnd?: ((event: React.CompositionEvent) => void) | undefined; onCompositionEndCapture?: ((event: React.CompositionEvent) => void) | undefined; onCompositionStart?: ((event: React.CompositionEvent) => void) | undefined; onCompositionStartCapture?: ((event: React.CompositionEvent) => void) | undefined; onCompositionUpdate?: ((event: React.CompositionEvent) => void) | undefined; onCompositionUpdateCapture?: ((event: React.CompositionEvent) => void) | undefined; onFocus?: ((event: React.FocusEvent) => void) | undefined; onFocusCapture?: ((event: React.FocusEvent) => void) | undefined; onBlur?: ((event: React.FocusEvent) => void) | undefined; onBlurCapture?: ((event: React.FocusEvent) => void) | undefined; onChangeCapture?: ((event: React.FormEvent) => void) | undefined; onBeforeInput?: ((event: React.FormEvent) => void) | undefined; onBeforeInputCapture?: ((event: React.FormEvent) => void) | undefined; onInput?: ((event: React.FormEvent) => void) | undefined; onInputCapture?: ((event: React.FormEvent) => void) | undefined; onReset?: ((event: React.FormEvent) => void) | undefined; onResetCapture?: ((event: React.FormEvent) => void) | undefined; onSubmit?: ((event: React.FormEvent) => void) | undefined; onSubmitCapture?: ((event: React.FormEvent) => void) | undefined; onInvalid?: ((event: React.FormEvent) => void) | undefined; onInvalidCapture?: ((event: React.FormEvent) => void) | undefined; onLoad?: ((event: React.SyntheticEvent) => void) | undefined; onLoadCapture?: ((event: React.SyntheticEvent) => void) | undefined; onError?: ((event: React.SyntheticEvent) => void) | undefined; onErrorCapture?: ((event: React.SyntheticEvent) => void) | undefined; onKeyDownCapture?: ((event: React.KeyboardEvent) => void) | undefined; onKeyPress?: ((event: React.KeyboardEvent) => void) | undefined; onKeyPressCapture?: ((event: React.KeyboardEvent) => void) | undefined; onKeyUp?: ((event: React.KeyboardEvent) => void) | undefined; onKeyUpCapture?: ((event: React.KeyboardEvent) => void) | undefined; onAbort?: ((event: React.SyntheticEvent) => void) | undefined; onAbortCapture?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlay?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayCapture?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayThrough?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayThroughCapture?: ((event: React.SyntheticEvent) => void) | undefined; onDurationChange?: ((event: React.SyntheticEvent) => void) | undefined; onDurationChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEmptied?: ((event: React.SyntheticEvent) => void) | undefined; onEmptiedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEncrypted?: ((event: React.SyntheticEvent) => void) | undefined; onEncryptedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEnded?: ((event: React.SyntheticEvent) => void) | undefined; onEndedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedData?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedDataCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedMetadata?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedMetadataCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadStart?: ((event: React.SyntheticEvent) => void) | undefined; onLoadStartCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPause?: ((event: React.SyntheticEvent) => void) | undefined; onPauseCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPlay?: ((event: React.SyntheticEvent) => void) | undefined; onPlayCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPlaying?: ((event: React.SyntheticEvent) => void) | undefined; onPlayingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onProgress?: ((event: React.SyntheticEvent) => void) | undefined; onProgressCapture?: ((event: React.SyntheticEvent) => void) | undefined; onRateChange?: ((event: React.SyntheticEvent) => void) | undefined; onRateChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSeeked?: ((event: React.SyntheticEvent) => void) | undefined; onSeekedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSeeking?: ((event: React.SyntheticEvent) => void) | undefined; onSeekingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onStalled?: ((event: React.SyntheticEvent) => void) | undefined; onStalledCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSuspend?: ((event: React.SyntheticEvent) => void) | undefined; onSuspendCapture?: ((event: React.SyntheticEvent) => void) | undefined; onTimeUpdate?: ((event: React.SyntheticEvent) => void) | undefined; onTimeUpdateCapture?: ((event: React.SyntheticEvent) => void) | undefined; onVolumeChange?: ((event: React.SyntheticEvent) => void) | undefined; onVolumeChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onWaiting?: ((event: React.SyntheticEvent) => void) | undefined; onWaitingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onAuxClick?: ((event: React.MouseEvent) => void) | undefined; onAuxClickCapture?: ((event: React.MouseEvent) => void) | undefined; onClickCapture?: ((event: React.MouseEvent) => void) | undefined; onContextMenu?: ((event: React.MouseEvent) => void) | undefined; onContextMenuCapture?: ((event: React.MouseEvent) => void) | undefined; onDoubleClick?: ((event: React.MouseEvent) => void) | undefined; onDoubleClickCapture?: ((event: React.MouseEvent) => void) | undefined; onDrag?: ((event: React.DragEvent) => void) | undefined; onDragCapture?: ((event: React.DragEvent) => void) | undefined; onDragEnd?: ((event: React.DragEvent) => void) | undefined; onDragEndCapture?: ((event: React.DragEvent) => void) | undefined; onDragEnter?: ((event: React.DragEvent) => void) | undefined; onDragEnterCapture?: ((event: React.DragEvent) => void) | undefined; onDragExit?: ((event: React.DragEvent) => void) | undefined; onDragExitCapture?: ((event: React.DragEvent) => void) | undefined; onDragLeave?: ((event: React.DragEvent) => void) | undefined; onDragLeaveCapture?: ((event: React.DragEvent) => void) | undefined; onDragOver?: ((event: React.DragEvent) => void) | undefined; onDragOverCapture?: ((event: React.DragEvent) => void) | undefined; onDragStart?: ((event: React.DragEvent) => void) | undefined; onDragStartCapture?: ((event: React.DragEvent) => void) | undefined; onDrop?: ((event: React.DragEvent) => void) | undefined; onDropCapture?: ((event: React.DragEvent) => void) | undefined; onMouseDown?: ((event: React.MouseEvent) => void) | undefined; onMouseDownCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseEnter?: ((event: React.MouseEvent) => void) | undefined; onMouseLeave?: ((event: React.MouseEvent) => void) | undefined; onMouseMove?: ((event: React.MouseEvent) => void) | undefined; onMouseMoveCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseOut?: ((event: React.MouseEvent) => void) | undefined; onMouseOutCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseOver?: ((event: React.MouseEvent) => void) | undefined; onMouseOverCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseUp?: ((event: React.MouseEvent) => void) | undefined; onMouseUpCapture?: ((event: React.MouseEvent) => void) | undefined; onSelect?: ((event: React.SyntheticEvent) => void) | undefined; onSelectCapture?: ((event: React.SyntheticEvent) => void) | undefined; onTouchCancel?: ((event: React.TouchEvent) => void) | undefined; onTouchCancelCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchEnd?: ((event: React.TouchEvent) => void) | undefined; onTouchEndCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchMove?: ((event: React.TouchEvent) => void) | undefined; onTouchMoveCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchStart?: ((event: React.TouchEvent) => void) | undefined; onTouchStartCapture?: ((event: React.TouchEvent) => void) | undefined; onPointerDown?: ((event: React.PointerEvent) => void) | undefined; onPointerDownCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerMove?: ((event: React.PointerEvent) => void) | undefined; onPointerMoveCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerUp?: ((event: React.PointerEvent) => void) | undefined; onPointerUpCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerCancel?: ((event: React.PointerEvent) => void) | undefined; onPointerCancelCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerEnter?: ((event: React.PointerEvent) => void) | undefined; onPointerEnterCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerLeave?: ((event: React.PointerEvent) => void) | undefined; onPointerLeaveCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerOver?: ((event: React.PointerEvent) => void) | undefined; onPointerOverCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerOut?: ((event: React.PointerEvent) => void) | undefined; onPointerOutCapture?: ((event: React.PointerEvent) => void) | undefined; onGotPointerCapture?: ((event: React.PointerEvent) => void) | undefined; onGotPointerCaptureCapture?: ((event: React.PointerEvent) => void) | undefined; onLostPointerCapture?: ((event: React.PointerEvent) => void) | undefined; onLostPointerCaptureCapture?: ((event: React.PointerEvent) => void) | undefined; onScroll?: ((event: React.UIEvent) => void) | undefined; onScrollCapture?: ((event: React.UIEvent) => void) | undefined; onWheel?: ((event: React.WheelEvent) => void) | undefined; onWheelCapture?: ((event: React.WheelEvent) => void) | undefined; onAnimationStart?: ((event: React.AnimationEvent) => void) | undefined; onAnimationStartCapture?: ((event: React.AnimationEvent) => void) | undefined; onAnimationEnd?: ((event: React.AnimationEvent) => void) | undefined; onAnimationEndCapture?: ((event: React.AnimationEvent) => void) | undefined; onAnimationIteration?: ((event: React.AnimationEvent) => void) | undefined; onAnimationIterationCapture?: ((event: React.AnimationEvent) => void) | undefined; onTransitionEnd?: ((event: React.TransitionEvent) => void) | undefined; onTransitionEndCapture?: ((event: React.TransitionEvent) => void) | undefined; css?: ", "InterpolationWithTheme", "; 'data-test-subj'?: string | undefined; width?: string | undefined; render?: ((value: any, record: ", { @@ -1320,7 +1320,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - " | undefined; register: (entry: ", + " | undefined; all: () => ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1328,7 +1328,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - ") => void; all: () => ", + "[]; register: (entry: ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1336,7 +1336,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - "[]; }" + ") => void; }" ], "source": { "path": "src/plugins/saved_objects_management/public/services/service_registry.ts", @@ -1448,7 +1448,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - " | undefined; register: (entry: ", + " | undefined; all: () => ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1456,7 +1456,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - ") => void; all: () => ", + "[]; register: (entry: ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1464,7 +1464,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - "[]; }" + ") => void; }" ], "source": { "path": "src/plugins/saved_objects_management/public/plugin.ts", diff --git a/api_docs/screenshot_mode.json b/api_docs/screenshot_mode.json index b7d680b6e93b1e..22b613bf0b04bc 100644 --- a/api_docs/screenshot_mode.json +++ b/api_docs/screenshot_mode.json @@ -2,11 +2,83 @@ "id": "screenshotMode", "client": { "classes": [], - "functions": [], + "functions": [ + { + "parentPluginId": "screenshotMode", + "id": "def-public.setScreenshotModeEnabled", + "type": "Function", + "tags": [], + "label": "setScreenshotModeEnabled", + "description": [ + "\nUse this function to set the current browser to screenshot mode.\n\nThis function should be called as early as possible to ensure that screenshot mode is\ncorrectly detected for the first page load. It is not suitable for use inside any plugin\ncode unless the plugin code is guaranteed to, somehow, load before any other code.\n\nAdditionally, we don't know what environment this code will run in so we remove as many external\nreferences as possible to make it portable. For instance, running inside puppeteer." + ], + "signature": [ + "() => void" + ], + "source": { + "path": "src/plugins/screenshot_mode/common/get_set_browser_screenshot_mode.ts", + "lineNumber": 39 + }, + "deprecated": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + } + ], "interfaces": [], "enums": [], - "misc": [], - "objects": [] + "misc": [ + { + "parentPluginId": "screenshotMode", + "id": "def-public.KBN_SCREENSHOT_MODE_ENABLED_KEY", + "type": "string", + "tags": [], + "label": "KBN_SCREENSHOT_MODE_ENABLED_KEY", + "description": [], + "signature": [ + "\"__KBN_SCREENSHOT_MODE_ENABLED_KEY__\"" + ], + "source": { + "path": "src/plugins/screenshot_mode/common/get_set_browser_screenshot_mode.ts", + "lineNumber": 13 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "screenshotMode", + "id": "def-public.KBN_SCREENSHOT_MODE_HEADER", + "type": "string", + "tags": [], + "label": "KBN_SCREENSHOT_MODE_HEADER", + "description": [], + "source": { + "path": "src/plugins/screenshot_mode/common/constants.ts", + "lineNumber": 9 + }, + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [], + "setup": { + "parentPluginId": "screenshotMode", + "id": "def-public.ScreenshotModePluginSetup", + "type": "Type", + "tags": [], + "label": "ScreenshotModePluginSetup", + "description": [], + "signature": [ + "IScreenshotModeService" + ], + "source": { + "path": "src/plugins/screenshot_mode/public/types.ts", + "lineNumber": 17 + }, + "deprecated": false, + "lifecycle": "setup", + "initialIsOpen": true + } }, "server": { "classes": [], @@ -86,6 +158,23 @@ ], "enums": [], "misc": [ + { + "parentPluginId": "screenshotMode", + "id": "def-server.KBN_SCREENSHOT_MODE_ENABLED_KEY", + "type": "string", + "tags": [], + "label": "KBN_SCREENSHOT_MODE_ENABLED_KEY", + "description": [], + "signature": [ + "\"__KBN_SCREENSHOT_MODE_ENABLED_KEY__\"" + ], + "source": { + "path": "src/plugins/screenshot_mode/common/get_set_browser_screenshot_mode.ts", + "lineNumber": 13 + }, + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "screenshotMode", "id": "def-server.KBN_SCREENSHOT_MODE_HEADER", @@ -325,6 +414,23 @@ "interfaces": [], "enums": [], "misc": [ + { + "parentPluginId": "screenshotMode", + "id": "def-common.KBN_SCREENSHOT_MODE_ENABLED_KEY", + "type": "string", + "tags": [], + "label": "KBN_SCREENSHOT_MODE_ENABLED_KEY", + "description": [], + "signature": [ + "\"__KBN_SCREENSHOT_MODE_ENABLED_KEY__\"" + ], + "source": { + "path": "src/plugins/screenshot_mode/common/get_set_browser_screenshot_mode.ts", + "lineNumber": 13 + }, + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "screenshotMode", "id": "def-common.KBN_SCREENSHOT_MODE_HEADER", diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 115a348cbe2e6e..cdb70b22b0837c 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -11,6 +11,17 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import screenshotModeObj from './screenshot_mode.json'; +## Client + +### Setup + + +### Functions + + +### Consts, variables and types + + ## Server ### Setup diff --git a/api_docs/security.json b/api_docs/security.json index 7e28ad2a222bb3..f7547221cec666 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", @@ -832,7 +1395,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 56 + "lineNumber": 62 }, "deprecated": false, "children": [ @@ -847,7 +1410,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 60 + "lineNumber": 66 }, "deprecated": false }, @@ -862,7 +1425,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 64 + "lineNumber": 70 }, "deprecated": false }, @@ -880,7 +1443,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 68 + "lineNumber": 74 }, "deprecated": false }, @@ -895,7 +1458,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 72 + "lineNumber": 78 }, "deprecated": false } @@ -911,7 +1474,7 @@ "description": [], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 75 + "lineNumber": 81 }, "deprecated": false, "children": [ @@ -926,7 +1489,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 79 + "lineNumber": 85 }, "deprecated": false }, @@ -941,7 +1504,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 83 + "lineNumber": 89 }, "deprecated": false }, @@ -956,7 +1519,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 87 + "lineNumber": 93 }, "deprecated": false } @@ -974,7 +1537,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 93 + "lineNumber": 99 }, "deprecated": false, "children": [ @@ -992,7 +1555,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 97 + "lineNumber": 103 }, "deprecated": false }, @@ -1010,7 +1573,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 101 + "lineNumber": 107 }, "deprecated": false }, @@ -1025,7 +1588,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 105 + "lineNumber": 111 }, "deprecated": false }, @@ -1043,7 +1606,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 109 + "lineNumber": 115 }, "deprecated": false } @@ -1061,7 +1624,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 46 + "lineNumber": 52 }, "deprecated": false, "children": [ @@ -1077,7 +1640,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 47 + "lineNumber": 53 }, "deprecated": false } @@ -1234,256 +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.SecurityPluginSetup", + "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-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": "cases", - "link": { - "path": "x-pack/plugins/cases/server/plugin.ts", - "lineNumber": 89 - } - }, - { - "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 } @@ -1492,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-server.SecurityPluginStart.authz", + "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-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 } @@ -1562,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 4d2afe42cb1515..250ceff429207b 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -22,11 +22,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_solution.json b/api_docs/security_solution.json index a265ea7fdc7ac2..747ef4b4b715b0 100644 --- a/api_docs/security_solution.json +++ b/api_docs/security_solution.json @@ -43,7 +43,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 74 + "lineNumber": 75 }, "deprecated": false, "children": [ @@ -59,7 +59,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 78 + "lineNumber": 79 }, "deprecated": false, "children": [ @@ -82,7 +82,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 78 + "lineNumber": 79 }, "deprecated": false, "isRequired": true @@ -123,7 +123,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 102 + "lineNumber": 103 }, "deprecated": false, "children": [ @@ -150,7 +150,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 102 + "lineNumber": 103 }, "deprecated": false, "isRequired": true @@ -167,7 +167,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 102 + "lineNumber": 103 }, "deprecated": false, "isRequired": true @@ -197,7 +197,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 343 + "lineNumber": 344 }, "deprecated": false, "children": [ @@ -219,7 +219,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 343 + "lineNumber": 344 }, "deprecated": false, "isRequired": true @@ -236,7 +236,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 343 + "lineNumber": 344 }, "deprecated": false, "isRequired": true @@ -256,7 +256,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 388 + "lineNumber": 389 }, "deprecated": false, "children": [], @@ -445,7 +445,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 133 + "lineNumber": 143 }, "deprecated": false, "children": [ @@ -461,7 +461,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 148 + "lineNumber": 159 }, "deprecated": false, "children": [ @@ -484,7 +484,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 148 + "lineNumber": 159 }, "deprecated": false, "isRequired": true @@ -524,7 +524,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 160 + "lineNumber": 171 }, "deprecated": false, "children": [ @@ -557,7 +557,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 160 + "lineNumber": 171 }, "deprecated": false, "isRequired": true @@ -574,7 +574,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 160 + "lineNumber": 171 }, "deprecated": false, "isRequired": true @@ -604,7 +604,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 345 + "lineNumber": 471 }, "deprecated": false, "children": [ @@ -626,7 +626,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 345 + "lineNumber": 471 }, "deprecated": false, "isRequired": true @@ -643,7 +643,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 345 + "lineNumber": 471 }, "deprecated": false, "isRequired": true @@ -663,7 +663,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 420 + "lineNumber": 546 }, "deprecated": false, "children": [], @@ -747,7 +747,7 @@ "description": [], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 109 + "lineNumber": 127 }, "deprecated": false, "children": [], @@ -763,7 +763,7 @@ "description": [], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 112 + "lineNumber": 130 }, "deprecated": false, "children": [], diff --git a/api_docs/share.json b/api_docs/share.json index 82f5b8697b72df..41b7ecc38e1f05 100644 --- a/api_docs/share.json +++ b/api_docs/share.json @@ -124,7 +124,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 25 + "lineNumber": 35 }, "deprecated": false, "children": [ @@ -140,7 +140,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 30 + "lineNumber": 40 }, "deprecated": false, "children": [], @@ -167,7 +167,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 32 + "lineNumber": 42 }, "deprecated": false, "children": [ @@ -190,7 +190,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 32 + "lineNumber": 42 }, "deprecated": false, "isRequired": true @@ -219,7 +219,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 45 + "lineNumber": 55 }, "deprecated": false, "children": [ @@ -241,7 +241,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 45 + "lineNumber": 55 }, "deprecated": false, "isRequired": true @@ -261,7 +261,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 52 + "lineNumber": 62 }, "deprecated": false, "children": [], @@ -1316,11 +1316,13 @@ }, ") => void; } & { urlGenerators: ", "UrlGeneratorsSetup", + "; url: ", + "UrlService", "; }" ], "source": { "path": "src/plugins/share/public/plugin.ts", - "lineNumber": 56 + "lineNumber": 32 }, "deprecated": false, "lifecycle": "setup", @@ -1344,11 +1346,13 @@ }, ") => void; } & { urlGenerators: ", "UrlGeneratorsStart", + "; url: ", + "UrlService", "; }" ], "source": { "path": "src/plugins/share/public/plugin.ts", - "lineNumber": 61 + "lineNumber": 47 }, "deprecated": false, "lifecycle": "start", diff --git a/api_docs/spaces.json b/api_docs/spaces.json index 2f2d79c2379d58..002145f3b48db6 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 } }, { @@ -1245,7 +1245,7 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 194 + "lineNumber": 206 } }, { @@ -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 } }, { @@ -2086,7 +2086,7 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 194 + "lineNumber": 206 } } ] diff --git a/api_docs/task_manager.json b/api_docs/task_manager.json index 61e37fa5acc0ce..34f16e8ad309b6 100644 --- a/api_docs/task_manager.json +++ b/api_docs/task_manager.json @@ -364,7 +364,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 297 + "lineNumber": 302 }, "deprecated": false, "children": [ @@ -379,7 +379,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 302 + "lineNumber": 307 }, "deprecated": false }, @@ -397,7 +397,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 307 + "lineNumber": 312 }, "deprecated": false }, @@ -415,7 +415,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 313 + "lineNumber": 318 }, "deprecated": false }, @@ -430,7 +430,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 319 + "lineNumber": 324 }, "deprecated": false }, @@ -454,7 +454,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 324 + "lineNumber": 329 }, "deprecated": false }, @@ -472,7 +472,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 330 + "lineNumber": 335 }, "deprecated": false }, @@ -490,7 +490,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 337 + "lineNumber": 342 }, "deprecated": false }, @@ -508,7 +508,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 343 + "lineNumber": 348 }, "deprecated": false }, @@ -526,7 +526,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 353 + "lineNumber": 358 }, "deprecated": false }, @@ -544,7 +544,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 358 + "lineNumber": 363 }, "deprecated": false } @@ -766,6 +766,24 @@ }, "deprecated": false }, + { + "parentPluginId": "taskManager", + "id": "def-server.TaskInstance.traceparent", + "type": "string", + "tags": [], + "label": "traceparent", + "description": [ + "\nThe serialized traceparent string of the current APM transaction or span." + ], + "signature": [ + "string | undefined" + ], + "source": { + "path": "x-pack/plugins/task_manager/server/task.ts", + "lineNumber": 263 + }, + "deprecated": false + }, { "parentPluginId": "taskManager", "id": "def-server.TaskInstance.user", @@ -780,7 +798,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 263 + "lineNumber": 268 }, "deprecated": false }, @@ -798,7 +816,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 269 + "lineNumber": 274 }, "deprecated": false }, @@ -816,7 +834,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 274 + "lineNumber": 279 }, "deprecated": false } diff --git a/api_docs/telemetry.json b/api_docs/telemetry.json index 5a4d029dc0938b..30c80119d62e25 100644 --- a/api_docs/telemetry.json +++ b/api_docs/telemetry.json @@ -15,7 +15,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 82 + "lineNumber": 90 }, "deprecated": false, "children": [ @@ -30,7 +30,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 84 + "lineNumber": 92 }, "deprecated": false }, @@ -45,7 +45,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 86 + "lineNumber": 94 }, "deprecated": false }, @@ -60,7 +60,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 88 + "lineNumber": 96 }, "deprecated": false }, @@ -75,7 +75,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 90 + "lineNumber": 98 }, "deprecated": false }, @@ -93,7 +93,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 92 + "lineNumber": 100 }, "deprecated": false }, @@ -108,7 +108,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 94 + "lineNumber": 102 }, "deprecated": false }, @@ -126,7 +126,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 96 + "lineNumber": 104 }, "deprecated": false }, @@ -144,7 +144,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 98 + "lineNumber": 106 }, "deprecated": false }, @@ -162,7 +162,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 100 + "lineNumber": 108 }, "deprecated": false } @@ -180,7 +180,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 36 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -198,7 +198,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 38 + "lineNumber": 40 }, "deprecated": false, "returnComment": [], @@ -215,10 +215,30 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 40 + "lineNumber": 42 }, "deprecated": false }, + { + "parentPluginId": "telemetry", + "id": "def-public.TelemetryServicePublicApis.canSendTelemetry", + "type": "Function", + "tags": [], + "label": "canSendTelemetry", + "description": [ + "Can phone-home telemetry calls be made? This depends on whether we have opted-in or if we are rendering a report" + ], + "signature": [ + "() => boolean" + ], + "source": { + "path": "src/plugins/telemetry/public/plugin.ts", + "lineNumber": 44 + }, + "deprecated": false, + "returnComment": [], + "children": [] + }, { "parentPluginId": "telemetry", "id": "def-public.TelemetryServicePublicApis.getCanChangeOptInStatus", @@ -233,7 +253,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 42 + "lineNumber": 46 }, "deprecated": false, "returnComment": [], @@ -253,7 +273,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 44 + "lineNumber": 48 }, "deprecated": false, "returnComment": [], @@ -273,7 +293,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 50 + "lineNumber": 54 }, "deprecated": false, "returnComment": [], @@ -289,7 +309,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 50 + "lineNumber": 54 }, "deprecated": false } @@ -313,7 +333,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 64 + "lineNumber": 68 }, "deprecated": false, "children": [ @@ -337,7 +357,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 66 + "lineNumber": 70 }, "deprecated": false }, @@ -355,7 +375,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 68 + "lineNumber": 72 }, "deprecated": false }, @@ -373,7 +393,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 73 + "lineNumber": 77 }, "deprecated": false } @@ -392,7 +412,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 56 + "lineNumber": 60 }, "deprecated": false, "children": [ @@ -416,7 +436,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 58 + "lineNumber": 62 }, "deprecated": false } @@ -641,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_collection_manager.json b/api_docs/telemetry_collection_manager.json index d30ff36b560934..681e10bd3ffaa4 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_xpack.json b/api_docs/telemetry_collection_xpack.json index a97647773c7f14..1dd45d1d619f16 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/triggers_actions_ui.json b/api_docs/triggers_actions_ui.json index de7a13b3080fe0..bccb50d96759ad 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": 62 - }, - "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": 67 - }, - "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": 63 - }, - "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": 98 - }, - "deprecated": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.getTimeFieldOptions", diff --git a/api_docs/ui_actions.json b/api_docs/ui_actions.json index b623984736ee15..cb35cacedf7bae 100644 --- a/api_docs/ui_actions.json +++ b/api_docs/ui_actions.json @@ -775,7 +775,7 @@ "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 114 + "lineNumber": 115 } }, { diff --git a/api_docs/usage_collection.json b/api_docs/usage_collection.json index ab02b8b567fb8b..e0912fe6bed40a 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\" | \"text\" | \"keyword\" | \"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/visualizations.json b/api_docs/visualizations.json index 0df428a158a3da..83f9436420dcd2 100644 --- a/api_docs/visualizations.json +++ b/api_docs/visualizations.json @@ -1888,7 +1888,7 @@ "label": "group", "description": [], "signature": [ - "\"buckets\" | \"metrics\" | \"none\"" + "\"none\" | \"buckets\" | \"metrics\"" ], "source": { "path": "src/plugins/visualizations/public/vis_types/types.ts", diff --git a/dev_docs/tutorials/expressions.mdx b/dev_docs/tutorials/expressions.mdx index 288fb9afdd7220..4688da98b7b019 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/index-patterns.asciidoc b/docs/api/index-patterns.asciidoc index 79d2f164fb8c3b..b343d80b4fc15c 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 771292d6f934d5..521e25931ad49f 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 3f53bf0726bf14..64588e63f62ae3 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 00000000000000..b0773c29e5309f --- /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 00000000000000..840789fe1ec23f --- /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 00000000000000..42bd209c708bc3 --- /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 00000000000000..f34460896f7bc9 --- /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 00000000000000..1b436db19c62e4 --- /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 8ed0ff89fb928c..2d5fe882d448df 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/developer/contributing/development-functional-tests.asciidoc b/docs/developer/contributing/development-functional-tests.asciidoc index f0041b85c14ebf..6f5c05f526bd6b 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/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 7d06562547f70c..6675a8dd283c9b 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 b39d576d852685..55b311794f9dcb 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.euiicontype.md b/docs/development/core/public/kibana-plugin-core-public.app.euiicontype.md deleted file mode 100644 index ff79d832f92e2b..00000000000000 --- a/docs/development/core/public/kibana-plugin-core-public.app.euiicontype.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[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) - -## App.euiIconType property - -A EUI iconType that will be used for the app's icon. This icon takes precendence over the `icon` property. - -Signature: - -```typescript -euiIconType?: string; -``` diff --git a/docs/development/core/public/kibana-plugin-core-public.app.icon.md b/docs/development/core/public/kibana-plugin-core-public.app.icon.md deleted file mode 100644 index 98260da5d20219..00000000000000 --- a/docs/development/core/public/kibana-plugin-core-public.app.icon.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[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) - -## App.icon property - -A URL to an image file used as an icon. Used as a fallback if `euiIconType` is not provided. - -Signature: - -```typescript -icon?: string; -``` 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 721d9a2f121c73..d79a12a83367d0 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.order.md b/docs/development/core/public/kibana-plugin-core-public.app.order.md deleted file mode 100644 index bb6be116b6b587..00000000000000 --- a/docs/development/core/public/kibana-plugin-core-public.app.order.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[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) - -## App.order property - -An ordinal used to sort nav links relative to one another for display. - -Signature: - -```typescript -order?: number; -``` 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 00000000000000..ab1b559a7f6a1d --- /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.app.tooltip.md b/docs/development/core/public/kibana-plugin-core-public.app.tooltip.md deleted file mode 100644 index e901de0fdccc98..00000000000000 --- a/docs/development/core/public/kibana-plugin-core-public.app.tooltip.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[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) - -## App.tooltip property - -A tooltip shown when hovering over app link. - -Signature: - -```typescript -tooltip?: string; -``` 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 5aa951cffdcb54..30fd3085a4341a 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.appnavoptions.euiicontype.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.euiicontype.md new file mode 100644 index 00000000000000..069eccf63a2351 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.euiicontype.md @@ -0,0 +1,13 @@ + + +[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) + +## AppNavOptions.euiIconType property + +A EUI iconType that will be used for the app's icon. This icon takes precendence over the `icon` property. + +Signature: + +```typescript +euiIconType?: string; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appnavoptions.icon.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.icon.md new file mode 100644 index 00000000000000..3b809fc4aec396 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.icon.md @@ -0,0 +1,13 @@ + + +[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) + +## AppNavOptions.icon property + +A URL to an image file used as an icon. Used as a fallback if `euiIconType` is not provided. + +Signature: + +```typescript +icon?: string; +``` 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 00000000000000..52c28c861dc704 --- /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.appnavoptions.order.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.order.md new file mode 100644 index 00000000000000..ca7ae482a04adb --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.order.md @@ -0,0 +1,13 @@ + + +[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) + +## AppNavOptions.order property + +An ordinal used to sort nav links relative to one another for display. + +Signature: + +```typescript +order?: number; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appnavoptions.tooltip.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.tooltip.md new file mode 100644 index 00000000000000..97c18c2e56a1ee --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.tooltip.md @@ -0,0 +1,13 @@ + + +[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) + +## AppNavOptions.tooltip property + +A tooltip shown when hovering over app link. + +Signature: + +```typescript +tooltip?: string; +``` 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 d7b12d4b707010..c24da05abe7ecd 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 dfe8f119505aa8..c7dd461617e344 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 833930c4947862..b9d12e450df505 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 6239279f275d1c..f341a7cd9315f8 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 00000000000000..4039e1338fc1c0 --- /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 79b59a19508e76..7b01bab056d843 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 095553d05778c9..b39fc8c324ad9a 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 d3a6a4de905fdf..40fd98687c6194 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 a5563eae83563f..01d23ae47a0d95 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 7be45c6c173b45..706408f81f02a8 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 36f99e51ea8c65..506fb9041e353b 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 32a2f3312708ce..604cdea1a7fbe6 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.savedobjectscomplexfieldmapping.doc_values.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md deleted file mode 100644 index 3f2d81cc97c7c8..00000000000000 --- 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 b01da3c62fda67..00000000000000 --- 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 08513aa2a849b7..00000000000000 --- 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 fc262cad54f183..00000000000000 --- 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 613a36a09ba1ed..00000000000000 --- 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 8aaa524dad43a9..00000000000000 --- 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 2a79eafd85a6c2..00000000000000 --- 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 4f88b635ca2f7c..00000000000000 --- 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 e3cf685e310d27..00000000000000 --- 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 e9b9c2bcf51b55..00000000000000 --- 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 627ea3695383a0..00000000000000 --- 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 94d395d7983e57..00000000000000 --- 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 925ca4be92e663..85b52bacafa252 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 a92b1f48d08ebc..d3696ee71049a2 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 e1c657e3a5171f..dca5a7d8c75836 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 a994fc458cfb6f..f99e7ba8b967ec 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 4e3dea5549b566..29377ff8fd392a 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 812f014b15a6c9..e0ee1f0ec15a4c 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 1792a979bf7490..94adbefe535dd3 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 00000000000000..c0aca53255b8fd --- /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 b6b3dcb19bac17..57e1b5f49371bf 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 00000000000000..96dbe13a7f1978 --- /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 53d173d39f50d0..51ca42fdce70a7 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 7a5228fece782e..f2774924fc73c1 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 91f25c09ab197a..d3e1b26810fd74 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 00000000000000..076b2b38cf474a --- /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 b81218eb088866..3666e503e27227 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 05c807b1cd8457..8cd1a476cf32f8 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 f0600dd20658a8..8882fa05ce0c25 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 090b78a7078cc5..8d0447d58634c9 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 fbe04f5e0a2a94..1cb627ec3a8f93 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 095142cf0f05b1..757d8f34a0c3ab 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 a1a76f2d2a295e..fb39333cf245e0 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 d033804cb6fcbb..3d5a757cb8f187 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 5ac48d26a85d6d..bbc4cc2135d406 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 981f28a51ae09d..33f1ac5e316605 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 cff2c5de98de61..e791dfc7c3738f 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 00000000000000..d5dc8f966316b0 --- /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 62b8f1b62ac787..95f9f31309674c 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 00000000000000..5000d5e645cbb9 --- /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 97d1cd91152623..27b8a31a2582ba 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 da8e7e40a7fac2..ef32b80ba8502e 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 f6beed7389e438..b351eba2ace4f6 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 00000000000000..35df871763f8a1 --- /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/discover/images/discover-search-for-relevance.png b/docs/discover/images/discover-search-for-relevance.png index 4d59ad186ded42..e42ed2416f79ef 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 00000000000000..ba4ee11ebf7381 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 00000000000000..47b03cfe82b348 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 0232c02b6e0614..f3cf1c3a7f52c6 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 06d8c0b2e827b9..7bcbc9f0751249 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/user/dashboard/timelion.asciidoc b/docs/user/dashboard/timelion.asciidoc index 675fd03df36484..ec9e8b56f9342c 100644 --- a/docs/user/dashboard/timelion.asciidoc +++ b/docs/user/dashboard/timelion.asciidoc @@ -4,7 +4,7 @@ To use *Timelion*, you define a graph by chaining functions together, using the *Timelion*-specific syntax. The syntax enables some features that classical point series charts don't offer, such as pulling data from different indices or data sources into one graph. -deprecated::[7.0.0,"*Timelion* is still supported. The *Timelion app* is deprecated in 7.0, replaced by dashboard features. In the last 7.x minor version and later, the *Timelion app* is removed from {kib}. To prepare for the removal of *Timelion app*, you must migrate *Timelion app* worksheets to a dashboard. For information on how to migrate *Timelion app* worksheets, refer to the link:https://www.elastic.co/guide/en/kibana/7.10/release-notes-7.10.0.html#deprecation-v7.10.0[7.10.0 Release Notes]."] +deprecated::[7.0.0,"*Timelion* is still supported. The *Timelion app* is deprecated in 7.0, replaced by dashboard features. In 7.16 and later, the *Timelion app* is removed from {kib}. To prepare for the removal of *Timelion app*, you must migrate *Timelion app* worksheets to a dashboard. For information on how to migrate *Timelion app* worksheets, refer to the link:https://www.elastic.co/guide/en/kibana/7.10/release-notes-7.10.0.html#deprecation-v7.10.0[7.10.0 Release Notes]."] [float] ==== Timelion expressions diff --git a/examples/search_examples/public/search_sessions/app.tsx b/examples/search_examples/public/search_sessions/app.tsx index a768600db24eea..7fdf91537c977c 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 65cb1e51866df5..6f5994a8679d68 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": "29.2.0", + "@elastic/charts": "30.0.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", @@ -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", @@ -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", @@ -748,6 +747,7 @@ "jest-cli": "^26.6.3", "jest-diff": "^26.6.2", "jest-environment-jsdom": "^26.6.2", + "jest-environment-jsdom-thirteen": "^1.0.1", "jest-raw-loader": "^1.0.1", "jest-silent-reporter": "^0.5.0", "jest-snapshot": "^26.6.2", 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 a0afbe3a9b8c90..34c6be02847a7a 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-docs-utils/src/api_docs/tests/snapshots/plugin_a.json b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json index 7d8a90c3aad77a..0c3f65bc1b205d 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-es-archiver/src/actions/edit.ts b/packages/kbn-es-archiver/src/actions/edit.ts index eb28985f714370..7a97bf08f36751 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 248c4a65cb20a6..673fa7e7d96c86 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 1581ff41b95fca..f286f9719bdf1f 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 c90f241a1c6399..da0966920de24e 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 f4e37871a53371..d8bc013b40991b 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 9617457d4573ed..9268f5fa7bbb5c 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 93ce97efd4c84a..06a56b79e30120 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 b45a8b18a5776a..fba3df24e896f8 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 2a42d52e2ca80b..d3d6f85d7a360b 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 51d4f28d20f2e0..0712d2789a91ae 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-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 3427eee4b5c0ba..9b4199c8128644 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -34,7 +34,7 @@ pageLoadAssetSize: indexManagement: 140608 indexPatternManagement: 28222 infra: 184320 - fleet: 415829 + fleet: 450005 ingestPipelines: 58003 inputControlVis: 172675 inspector: 148711 @@ -87,7 +87,6 @@ pageLoadAssetSize: visDefaultEditor: 50178 visTypeMarkdown: 30896 visTypeMetric: 42790 - visTypePie: 34051 visTypeTable: 94934 visTypeTagcloud: 37575 visTypeTimelion: 68883 @@ -105,9 +104,10 @@ pageLoadAssetSize: indexPatternFieldEditor: 90489 osquery: 107090 fileUpload: 25664 - fileDataVisualizer: 27530 + dataVisualizer: 27530 banners: 17946 mapsEms: 26072 timelines: 28613 cases: 162385 screenshotMode: 17856 + visTypePie: 35583 diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index 4c4c0259f066b8..e455f487d13843 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; } @@ -48471,7 +48480,7 @@ async function runBazelCommandWithRunner(bazelCommandRunner, bazelArgs, offline }); if (offline) { - bazelArgs.push('--config=offline'); + bazelArgs = [...bazelArgs, '--config=offline']; } const bazelProc = Object(_child_process__WEBPACK_IMPORTED_MODULE_4__["spawn"])(bazelCommandRunner, bazelArgs, bazelOpts); diff --git a/packages/kbn-pm/src/utils/bazel/run.ts b/packages/kbn-pm/src/utils/bazel/run.ts index 7b20ea43982e6a..c030081e53daaf 100644 --- a/packages/kbn-pm/src/utils/bazel/run.ts +++ b/packages/kbn-pm/src/utils/bazel/run.ts @@ -30,7 +30,7 @@ async function runBazelCommandWithRunner( }; if (offline) { - bazelArgs.push('--config=offline'); + bazelArgs = [...bazelArgs, '--config=offline']; } const bazelProc = spawn(bazelCommandRunner, bazelArgs, bazelOpts); 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 e5d0fdc122a1ac..6a8f384208fd84 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/testbed/types.ts b/packages/kbn-test/src/jest/utils/testbed/types.ts index 520a78d03d7013..fdc000215c4f19 100644 --- a/packages/kbn-test/src/jest/utils/testbed/types.ts +++ b/packages/kbn-test/src/jest/utils/testbed/types.ts @@ -121,7 +121,7 @@ export interface TestBed { * * @param switchTestSubject The test subject of the EuiSwitch (can be a nested path. e.g. "myForm.mySwitch"). */ - toggleEuiSwitch: (switchTestSubject: T, isChecked?: boolean) => void; + toggleEuiSwitch: (switchTestSubject: T) => void; /** * The EUI ComboBox is a special input as it needs the ENTER key to be pressed * in order to register the value set. This helpers automatically does that. diff --git a/src/core/TESTING.md b/src/core/TESTING.md index ef6db57c1a9930..10ead1ea8cfe22 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 2e2f1cad49f199..5658d3f6260772 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 bbfea61220b513..32d45b32c32ffd 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 68e1991646afbd..882555fcd60e09 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/utils.tsx b/src/core/public/application/integration_tests/utils.tsx index 40f8f3b7957192..dcf071719c11ad 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 ffc41955360bdf..60b0dbf158dd91 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/utils/get_app_info.test.ts b/src/core/public/application/utils/get_app_info.test.ts index ef4a06707d6664..fa1e2dd9a4537d 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 4c94e24f501bc4..6c753b7a71a0f7 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 87175ea465b7f1..4e9158cac5cd47 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 afb902fd6bd83d..e1d537da6959b7 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 d41d8ae964d622..af961987a63095 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 db783d0028f075..9791f1bd1354b6 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 f56d496f42d8f6..6acf37d40f089b 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 0f5efe667ec2fc..3668829a6888cd 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 b5b2919b659bdf..0e85dbea237cb2 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 e0f10fe66c9f06..fdbdde8556eebf 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 84f758e2c737e5..b0ebf7cc5f8e5e 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 36d613ec82f9e0..d4ab8f624f7111 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,14 +128,14 @@ 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`, @@ -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}alert-management.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-getting-started.html#alerting-setup-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 24b48683cdd937..32737ff427ef3e 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 667863d29623ed..235110aeb4633c 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/styles/_base.scss b/src/core/public/styles/_base.scss index 46f46b469783b8..3386fa73f328aa 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 43cd52f1b57211..e1f18f8ad836ad 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 5433f0d3c3e31c..99b63fc73687a1 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/index.ts b/src/core/server/index.ts index 2e495657d34104..ef1ee69ff529b5 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/saved_objects/index.ts b/src/core/server/saved_objects/index.ts index 2af25e0cdef3f2..b1b1584d7de88c 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 bf1029e9f3b81d..5da185ace79c63 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 dab712bbb87add..8732b5e07d3fa7 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 c2daa1e70a898a..2a9993bc175ca1 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 2daca3a1fdd83c..cbc6808418bc06 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 3a25865c03b265..54ea4eafc186f9 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 25fb61de935187..e2ad2a91fd000a 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 5465da2f620adb..a39fff20abbe71 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 c7a3251e33ab18..731b7f8c029c24 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 1d2ec6abc0dd14..c9c24cc85a4528 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 76fdd5e73d804f..296a4cee07c11b 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 fcc03f363139b0..64d4fa3609e90f 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 5f2e8a37ec4279..240b41266abb66 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 37cea5d2de3d2c..d0cc52f2dd9bd1 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 47ee44e762db79..8e5042a5ff8fe0 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 b508a6198bfb34..3fa4d59e383bfa 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 16f1df05f26b3e..b101e7db0141ca 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 ca8d3b594703c3..e9cfb4b61dace5 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 c55e4a235fbf10..b5bf64d5c29f75 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 7406cd35b1593e..c27170a78245b2 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 fcadb5e80298a7..18cf3350292b5c 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 4e3631797e34bc..0cdaa88c535ab7 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/migration.test.ts b/src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts index 5e4b8feefbd958..f9d8e7cc4fbaab 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/model.test.ts b/src/core/server/saved_objects/migrationsv2/model.test.ts index 186cb24b4a34a8..86dc590aabdad8 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 adcd2ad32fd24e..1151e8337d3d59 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 a63837132b652e..ba5960c59239d7 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 57421db76f5b6e..53f1b5c9d78c57 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 cd41a23f4a28b5..5ef89f297a796b 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 25c3aea474ecec..0425e46b4477e6 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 2ef5219ccfff16..e6934398862dc0 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 c626a2b2acfb58..6b51bd57248a1d 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 64b3dd428fb8bf..3196a59ca39ee4 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 1376f0d50a9da6..e2a21cc03ce3be 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 64849c308f3f09..592110a5413ec7 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 079549265385cd..3131d0240f96b9 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 d3bfdcc6923dcf..964ba671b59646 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 379e4147ae024c..acec03902bf6aa 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -2361,38 +2361,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 +2522,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 +2553,7 @@ export interface SavedObjectsFindOptions { // (undocumented) sortField?: string; // (undocumented) - sortOrder?: estypes.SortOrder; + sortOrder?: estypes.SearchSortOrder; // (undocumented) type: string | string[]; typeToNamespacesMap?: Map; diff --git a/src/dev/build/lib/version_info.ts b/src/dev/build/lib/version_info.ts index 6be34a54e24f8c..9ad20b4a6935bb 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 c7a8c0a6135c7a..1391312df5231a 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 d953bb8f6a6f61..0b08a317e87c9f 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/dashboard/public/application/actions/expand_panel_action.tsx b/src/plugins/dashboard/public/application/actions/expand_panel_action.tsx index f90a0cef95bb8f..98f7bbbee3d7cd 100644 --- a/src/plugins/dashboard/public/application/actions/expand_panel_action.tsx +++ b/src/plugins/dashboard/public/application/actions/expand_panel_action.tsx @@ -6,14 +6,11 @@ * Side Public License, v 1. */ -import { dashboardExpandPanelAction } from '../../dashboard_strings'; +import { DashboardContainerInput } from '../..'; import { IEmbeddable } from '../../services/embeddable'; +import { dashboardExpandPanelAction } from '../../dashboard_strings'; import { Action, IncompatibleActionError } from '../../services/ui_actions'; -import { - DASHBOARD_CONTAINER_TYPE, - DashboardContainer, - DashboardContainerInput, -} from '../embeddable'; +import { DASHBOARD_CONTAINER_TYPE, DashboardContainer } from '../embeddable'; export const ACTION_EXPAND_PANEL = 'togglePanel'; diff --git a/src/plugins/dashboard/public/application/dashboard_app.tsx b/src/plugins/dashboard/public/application/dashboard_app.tsx index 93310bb8213615..8db6a0e8a8c7fd 100644 --- a/src/plugins/dashboard/public/application/dashboard_app.tsx +++ b/src/plugins/dashboard/public/application/dashboard_app.tsx @@ -7,35 +7,20 @@ */ import { History } from 'history'; -import { merge, Subject, Subscription } from 'rxjs'; -import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import React, { useEffect, useMemo } from 'react'; -import { debounceTime, finalize, switchMap, tap } from 'rxjs/operators'; +import { useDashboardSelector } from './state'; +import { useDashboardAppState } from './hooks'; import { useKibana } from '../../../kibana_react/public'; -import { DashboardConstants } from '../dashboard_constants'; -import { DashboardTopNav } from './top_nav/dashboard_top_nav'; -import { DashboardAppServices, DashboardEmbedSettings, DashboardRedirect } from './types'; import { - getChangesFromAppStateForContainerState, - getDashboardContainerInput, - getFiltersSubscription, - getInputSubscription, - getOutputSubscription, - getSearchSessionIdFromURL, -} from './dashboard_app_functions'; -import { - useDashboardBreadcrumbs, - useDashboardContainer, - useDashboardStateManager, - useSavedDashboard, -} from './hooks'; - -import { IndexPattern, waitUntilNextSessionCompletes$ } from '../services/data'; + getDashboardBreadcrumb, + getDashboardTitle, + leaveConfirmStrings, +} from '../dashboard_strings'; import { EmbeddableRenderer } from '../services/embeddable'; -import { DashboardContainerInput } from '.'; -import { leaveConfirmStrings } from '../dashboard_strings'; -import { createQueryParamObservable, replaceUrlHashQuery } from '../../../kibana_utils/public'; - +import { DashboardTopNav, isCompleteDashboardAppState } from './top_nav/dashboard_top_nav'; +import { DashboardAppServices, DashboardEmbedSettings, DashboardRedirect } from '../types'; +import { createKbnUrlStateStorage, withNotifyOnErrors } from '../services/kibana_utils'; export interface DashboardAppProps { history: History; savedDashboardId?: string; @@ -50,236 +35,37 @@ export function DashboardApp({ history, }: DashboardAppProps) { const { - data, core, + chrome, + embeddable, onAppLeave, uiSettings, - embeddable, - dashboardCapabilities, - indexPatterns: indexPatternService, } = useKibana().services; - const triggerRefresh$ = useMemo(() => new Subject<{ force?: boolean }>(), []); - const [indexPatterns, setIndexPatterns] = useState([]); - - const savedDashboard = useSavedDashboard(savedDashboardId, history); - - const getIncomingEmbeddable = useCallback( - (removeAfterFetch?: boolean) => { - return embeddable - .getStateTransfer() - .getIncomingEmbeddablePackage(DashboardConstants.DASHBOARDS_ID, removeAfterFetch); - }, - [embeddable] + const kbnUrlStateStorage = useMemo( + () => + createKbnUrlStateStorage({ + history, + useHash: uiSettings.get('state:storeInSessionStorage'), + ...withNotifyOnErrors(core.notifications.toasts), + }), + [core.notifications.toasts, history, uiSettings] ); - const { dashboardStateManager, viewMode, setViewMode } = useDashboardStateManager( - savedDashboard, - history, - getIncomingEmbeddable - ); - const [unsavedChanges, setUnsavedChanges] = useState(false); - const dashboardContainer = useDashboardContainer({ - timeFilter: data.query.timefilter.timefilter, - dashboardStateManager, - getIncomingEmbeddable, - setUnsavedChanges, + const dashboardState = useDashboardSelector((state) => state.dashboardStateReducer); + const dashboardAppState = useDashboardAppState({ history, + redirectTo, + savedDashboardId, + kbnUrlStateStorage, + isEmbeddedExternally: Boolean(embedSettings), }); - const searchSessionIdQuery$ = useMemo( - () => createQueryParamObservable(history, DashboardConstants.SEARCH_SESSION_ID), - [history] - ); - - const refreshDashboardContainer = useCallback( - (force?: boolean) => { - if (!dashboardContainer || !dashboardStateManager) { - return; - } - - const changes = getChangesFromAppStateForContainerState({ - dashboardContainer, - appStateDashboardInput: getDashboardContainerInput({ - isEmbeddedExternally: Boolean(embedSettings), - dashboardStateManager, - lastReloadRequestTime: force ? Date.now() : undefined, - dashboardCapabilities, - query: data.query, - }), - }); - - if (changes) { - // state keys change in which likely won't need a data fetch - const noRefetchKeys: Array = [ - 'viewMode', - 'title', - 'description', - 'expandedPanelId', - 'useMargins', - 'isEmbeddedExternally', - 'isFullScreenMode', - ]; - const shouldRefetch = Object.keys(changes).some( - (changeKey) => !noRefetchKeys.includes(changeKey as keyof DashboardContainerInput) - ); - - const newSearchSessionId: string | undefined = (() => { - // do not update session id if this is irrelevant state change to prevent excessive searches - if (!shouldRefetch) return; - - let searchSessionIdFromURL = getSearchSessionIdFromURL(history); - if (searchSessionIdFromURL) { - if ( - data.search.session.isRestore() && - data.search.session.isCurrentSession(searchSessionIdFromURL) - ) { - // navigating away from a restored session - dashboardStateManager.kbnUrlStateStorage.kbnUrlControls.updateAsync((nextUrl) => { - if (nextUrl.includes(DashboardConstants.SEARCH_SESSION_ID)) { - return replaceUrlHashQuery(nextUrl, (query) => { - delete query[DashboardConstants.SEARCH_SESSION_ID]; - return query; - }); - } - return nextUrl; - }); - searchSessionIdFromURL = undefined; - } else { - data.search.session.restore(searchSessionIdFromURL); - } - } - - return searchSessionIdFromURL ?? data.search.session.start(); - })(); - - if (changes.viewMode) { - setViewMode(changes.viewMode); - } - dashboardContainer.updateInput({ - ...changes, - ...(newSearchSessionId && { searchSessionId: newSearchSessionId }), - }); - } - }, - [ - history, - data.query, - setViewMode, - embedSettings, - dashboardContainer, - data.search.session, - dashboardCapabilities, - dashboardStateManager, - ] - ); - - // Manage dashboard container subscriptions - useEffect(() => { - if (!dashboardStateManager || !dashboardContainer) { - return; - } - const timeFilter = data.query.timefilter.timefilter; - const subscriptions = new Subscription(); - - subscriptions.add( - getInputSubscription({ - dashboardContainer, - dashboardStateManager, - filterManager: data.query.filterManager, - }) - ); - subscriptions.add( - getOutputSubscription({ - dashboardContainer, - indexPatterns: indexPatternService, - onUpdateIndexPatterns: (newIndexPatterns) => setIndexPatterns(newIndexPatterns), - }) - ); - subscriptions.add( - getFiltersSubscription({ - query: data.query, - dashboardStateManager, - }) - ); - subscriptions.add( - merge( - ...[timeFilter.getRefreshIntervalUpdate$(), timeFilter.getTimeUpdate$()] - ).subscribe(() => triggerRefresh$.next()) - ); - - subscriptions.add( - searchSessionIdQuery$.subscribe(() => { - triggerRefresh$.next({ force: true }); - }) - ); - - subscriptions.add( - data.query.timefilter.timefilter - .getAutoRefreshFetch$() - .pipe( - tap(() => { - triggerRefresh$.next({ force: true }); - }), - switchMap((done) => - // best way on a dashboard to estimate that panels are updated is to rely on search session service state - waitUntilNextSessionCompletes$(data.search.session).pipe(finalize(done)) - ) - ) - .subscribe() - ); - - dashboardStateManager.registerChangeListener(() => { - setUnsavedChanges(dashboardStateManager.getIsDirty(data.query.timefilter.timefilter)); - // we aren't checking dirty state because there are changes the container needs to know about - // that won't make the dashboard "dirty" - like a view mode change. - triggerRefresh$.next(); - }); - - // debounce `refreshDashboardContainer()` - // use `forceRefresh=true` in case at least one debounced trigger asked for it - let forceRefresh: boolean = false; - subscriptions.add( - triggerRefresh$ - .pipe( - tap((trigger) => { - forceRefresh = forceRefresh || (trigger?.force ?? false); - }), - debounceTime(50) - ) - .subscribe(() => { - refreshDashboardContainer(forceRefresh); - forceRefresh = false; - }) - ); - - return () => { - subscriptions.unsubscribe(); - }; - }, [ - core.http, - uiSettings, - data.query, - dashboardContainer, - data.search.session, - indexPatternService, - dashboardStateManager, - searchSessionIdQuery$, - triggerRefresh$, - refreshDashboardContainer, - ]); - - // Sync breadcrumbs when Dashboard State Manager changes - useDashboardBreadcrumbs(dashboardStateManager, redirectTo); - - // Build onAppLeave when Dashboard State Manager changes + // Build app leave handler whenever hasUnsavedChanges changes useEffect(() => { - if (!dashboardStateManager || !dashboardContainer) { - return; - } onAppLeave((actions) => { if ( - dashboardStateManager?.getIsDirty() && + dashboardAppState.hasUnsavedChanges && !embeddable.getStateTransfer().isTransferInProgress ) { return actions.confirm( @@ -293,37 +79,36 @@ export function DashboardApp({ // reset on app leave handler so leaving from the listing page doesn't trigger a confirmation onAppLeave((actions) => actions.default()); }; - }, [dashboardStateManager, dashboardContainer, onAppLeave, embeddable]); + }, [onAppLeave, embeddable, dashboardAppState.hasUnsavedChanges]); + + // Set breadcrumbs when dashboard's title or view mode changes + useEffect(() => { + if (!dashboardState.title && savedDashboardId) return; + chrome.setBreadcrumbs([ + { + text: getDashboardBreadcrumb(), + 'data-test-subj': 'dashboardListingBreadcrumb', + onClick: () => { + redirectTo({ destination: 'listing' }); + }, + }, + { + text: getDashboardTitle(dashboardState.title, dashboardState.viewMode, !savedDashboardId), + }, + ]); + }, [chrome, dashboardState.title, dashboardState.viewMode, redirectTo, savedDashboardId]); return ( <> - {savedDashboard && dashboardStateManager && dashboardContainer && viewMode && ( + {isCompleteDashboardAppState(dashboardAppState) && ( <> setUnsavedChanges(false)} - timefilter={data.query.timefilter.timefilter} - onQuerySubmit={(_payload, isUpdate) => { - if (isUpdate === false) { - // The user can still request a reload in the query bar, even if the - // query is the same, and in that case, we have to explicitly ask for - // a reload, since no state changes will cause it. - triggerRefresh$.next({ force: true }); - } - }} + redirectTo={redirectTo} + embedSettings={embedSettings} + dashboardAppState={dashboardAppState} />
- +
)} diff --git a/src/plugins/dashboard/public/application/dashboard_app_functions.ts b/src/plugins/dashboard/public/application/dashboard_app_functions.ts deleted file mode 100644 index 895a56242bf96e..00000000000000 --- a/src/plugins/dashboard/public/application/dashboard_app_functions.ts +++ /dev/null @@ -1,277 +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 { History } from 'history'; - -import _, { uniqBy } from 'lodash'; -import deepEqual from 'fast-deep-equal'; -import { merge, Observable, pipe } from 'rxjs'; -import { - debounceTime, - distinctUntilChanged, - filter, - map, - mapTo, - startWith, - switchMap, -} from 'rxjs/operators'; - -import { DashboardAppCapabilities } from './types'; -import { DashboardConstants } from '../dashboard_constants'; -import { DashboardStateManager } from './dashboard_state_manager'; -import { convertSavedDashboardPanelToPanelState } from '../../common/embeddable/embeddable_saved_object_converters'; -import { - DashboardPanelState, - DashboardContainer, - DashboardContainerInput, - SavedDashboardPanel, -} from '.'; - -import { getQueryParams } from '../services/kibana_utils'; -import { EmbeddablePackageState, isErrorEmbeddable } from '../services/embeddable'; -import { - esFilters, - FilterManager, - IndexPattern, - IndexPatternsContract, - QueryStart, -} from '../services/data'; - -export const getChangesFromAppStateForContainerState = ({ - dashboardContainer, - appStateDashboardInput, -}: { - dashboardContainer: DashboardContainer; - appStateDashboardInput: DashboardContainerInput; -}) => { - if (!dashboardContainer || isErrorEmbeddable(dashboardContainer)) { - return appStateDashboardInput; - } - const containerInput = dashboardContainer.getInput(); - const differences: Partial = {}; - - // Filters shouldn't be compared using regular isEqual - if ( - !esFilters.compareFilters( - containerInput.filters, - appStateDashboardInput.filters, - esFilters.COMPARE_ALL_OPTIONS - ) - ) { - differences.filters = appStateDashboardInput.filters; - } - - Object.keys( - _.omit(containerInput, [ - 'filters', - 'searchSessionId', - 'lastReloadRequestTime', - 'switchViewMode', - ]) - ).forEach((key) => { - const containerValue = (containerInput as { [key: string]: unknown })[key]; - const appStateValue = ((appStateDashboardInput as unknown) as { [key: string]: unknown })[key]; - if (!_.isEqual(containerValue, appStateValue)) { - (differences as { [key: string]: unknown })[key] = appStateValue; - } - }); - - // last reload request time can be undefined without causing a refresh - if ( - appStateDashboardInput.lastReloadRequestTime && - containerInput.lastReloadRequestTime !== appStateDashboardInput.lastReloadRequestTime - ) { - differences.lastReloadRequestTime = appStateDashboardInput.lastReloadRequestTime; - } - - // cloneDeep hack is needed, as there are multiple places, where container's input mutated, - // but values from appStateValue are deeply frozen, as they can't be mutated directly - return Object.values(differences).length === 0 ? undefined : _.cloneDeep(differences); -}; - -export const getDashboardContainerInput = ({ - query, - searchSessionId, - incomingEmbeddable, - isEmbeddedExternally, - lastReloadRequestTime, - dashboardStateManager, - dashboardCapabilities, -}: { - dashboardCapabilities: DashboardAppCapabilities; - dashboardStateManager: DashboardStateManager; - incomingEmbeddable?: EmbeddablePackageState; - lastReloadRequestTime?: number; - isEmbeddedExternally: boolean; - searchSessionId?: string; - query: QueryStart; -}): DashboardContainerInput => { - const embeddablesMap: { - [key: string]: DashboardPanelState; - } = {}; - dashboardStateManager.getPanels().forEach((panel: SavedDashboardPanel) => { - embeddablesMap[panel.panelIndex] = convertSavedDashboardPanelToPanelState(panel); - }); - - // If the incoming embeddable state's id already exists in the embeddables map, replace the input, retaining the existing gridData for that panel. - if (incomingEmbeddable?.embeddableId && embeddablesMap[incomingEmbeddable.embeddableId]) { - const originalPanelState = embeddablesMap[incomingEmbeddable.embeddableId]; - embeddablesMap[incomingEmbeddable.embeddableId] = { - gridData: originalPanelState.gridData, - type: incomingEmbeddable.type, - explicitInput: { - ...originalPanelState.explicitInput, - ...incomingEmbeddable.input, - id: incomingEmbeddable.embeddableId, - }, - }; - } - - return { - refreshConfig: query.timefilter.timefilter.getRefreshInterval(), - hidePanelTitles: dashboardStateManager.getHidePanelTitles(), - isFullScreenMode: dashboardStateManager.getFullScreenMode(), - expandedPanelId: dashboardStateManager.getExpandedPanelId(), - description: dashboardStateManager.getDescription(), - id: dashboardStateManager.savedDashboard.id || '', - useMargins: dashboardStateManager.getUseMargins(), - syncColors: dashboardStateManager.getSyncColors(), - viewMode: dashboardStateManager.getViewMode(), - filters: query.filterManager.getFilters(), - query: dashboardStateManager.getQuery(), - title: dashboardStateManager.getTitle(), - panels: embeddablesMap, - lastReloadRequestTime, - dashboardCapabilities, - isEmbeddedExternally, - searchSessionId, - timeRange: { - ..._.cloneDeep(query.timefilter.timefilter.getTime()), - }, - }; -}; - -export const getInputSubscription = ({ - dashboardContainer, - dashboardStateManager, - filterManager, -}: { - dashboardContainer: DashboardContainer; - dashboardStateManager: DashboardStateManager; - filterManager: FilterManager; -}) => - dashboardContainer.getInput$().subscribe(() => { - // This has to be first because handleDashboardContainerChanges causes - // appState.save which will cause refreshDashboardContainer to be called. - - if ( - !esFilters.compareFilters( - dashboardContainer.getInput().filters, - filterManager.getFilters(), - esFilters.COMPARE_ALL_OPTIONS - ) - ) { - // Add filters modifies the object passed to it, hence the clone deep. - filterManager.addFilters(_.cloneDeep(dashboardContainer.getInput().filters)); - - dashboardStateManager.applyFilters( - dashboardStateManager.getQuery(), - dashboardContainer.getInput().filters - ); - } - - dashboardStateManager.handleDashboardContainerChanges(dashboardContainer); - }); - -export const getOutputSubscription = ({ - dashboardContainer, - indexPatterns, - onUpdateIndexPatterns, -}: { - dashboardContainer: DashboardContainer; - indexPatterns: IndexPatternsContract; - onUpdateIndexPatterns: (newIndexPatterns: IndexPattern[]) => void; -}) => { - const updateIndexPatternsOperator = pipe( - filter((container: DashboardContainer) => !!container && !isErrorEmbeddable(container)), - map((container: DashboardContainer): IndexPattern[] => { - let panelIndexPatterns: IndexPattern[] = []; - Object.values(container.getChildIds()).forEach((id) => { - const embeddableInstance = container.getChild(id); - if (isErrorEmbeddable(embeddableInstance)) return; - const embeddableIndexPatterns = (embeddableInstance.getOutput() as any).indexPatterns; - if (!embeddableIndexPatterns) return; - panelIndexPatterns.push(...embeddableIndexPatterns); - }); - panelIndexPatterns = uniqBy(panelIndexPatterns, 'id'); - return panelIndexPatterns; - }), - distinctUntilChanged((a, b) => - deepEqual( - a.map((ip) => ip && ip.id), - b.map((ip) => ip && ip.id) - ) - ), - // using switchMap for previous task cancellation - switchMap((panelIndexPatterns: IndexPattern[]) => { - return new Observable((observer) => { - if (panelIndexPatterns && panelIndexPatterns.length > 0) { - if (observer.closed) return; - onUpdateIndexPatterns(panelIndexPatterns); - observer.complete(); - } else { - indexPatterns.getDefault().then((defaultIndexPattern) => { - if (observer.closed) return; - onUpdateIndexPatterns([defaultIndexPattern as IndexPattern]); - observer.complete(); - }); - } - }); - }) - ); - - return merge( - // output of dashboard container itself - dashboardContainer.getOutput$(), - // plus output of dashboard container children, - // children may change, so make sure we subscribe/unsubscribe with switchMap - dashboardContainer.getOutput$().pipe( - map(() => dashboardContainer!.getChildIds()), - distinctUntilChanged(deepEqual), - switchMap((newChildIds: string[]) => - merge(...newChildIds.map((childId) => dashboardContainer!.getChild(childId).getOutput$())) - ) - ) - ) - .pipe( - mapTo(dashboardContainer), - startWith(dashboardContainer), // to trigger initial index pattern update - updateIndexPatternsOperator - ) - .subscribe(); -}; - -export const getFiltersSubscription = ({ - query, - dashboardStateManager, -}: { - query: QueryStart; - dashboardStateManager: DashboardStateManager; -}) => { - return merge(query.filterManager.getUpdates$(), query.queryString.getUpdates$()) - .pipe(debounceTime(100)) - .subscribe(() => { - dashboardStateManager.applyFilters( - query.queryString.getQuery(), - query.filterManager.getFilters() - ); - }); -}; - -export const getSearchSessionIdFromURL = (history: History): string | undefined => - getQueryParams(history.location)[DashboardConstants.SEARCH_SESSION_ID] as string | undefined; diff --git a/src/plugins/dashboard/public/application/dashboard_router.tsx b/src/plugins/dashboard/public/application/dashboard_router.tsx index be279ed98492e7..e77353000ced46 100644 --- a/src/plugins/dashboard/public/application/dashboard_router.tsx +++ b/src/plugins/dashboard/public/application/dashboard_router.tsx @@ -8,36 +8,37 @@ import './index.scss'; import React from 'react'; +import { History } from 'history'; +import { Provider } from 'react-redux'; +import { first } from 'rxjs/operators'; import { I18nProvider } from '@kbn/i18n/react'; import { parse, ParsedQuery } from 'query-string'; import { render, unmountComponentAtNode } from 'react-dom'; import { Switch, Route, RouteComponentProps, HashRouter, Redirect } from 'react-router-dom'; -import { first } from 'rxjs/operators'; import { DashboardListing } from './listing'; +import { dashboardStateStore } from './state'; import { DashboardApp } from './dashboard_app'; -import { addHelpMenuToAppChrome, DashboardPanelStorage } from './lib'; +import { DashboardNoMatch } from './listing/dashboard_no_match'; +import { KibanaContextProvider } from '../services/kibana_react'; +import { addHelpMenuToAppChrome, DashboardSessionStorage } from './lib'; import { createDashboardListingFilterUrl } from '../dashboard_constants'; -import { getDashboardPageTitle, dashboardReadonlyBadge } from '../dashboard_strings'; import { createDashboardEditUrl, DashboardConstants } from '../dashboard_constants'; -import { DashboardAppServices, DashboardEmbedSettings, RedirectToProps } from './types'; +import { getDashboardPageTitle, dashboardReadonlyBadge } from '../dashboard_strings'; +import { createKbnUrlStateStorage, withNotifyOnErrors } from '../services/kibana_utils'; +import { DashboardAppServices, DashboardEmbedSettings, RedirectToProps } from '../types'; import { DashboardFeatureFlagConfig, DashboardSetupDependencies, DashboardStart, DashboardStartDependencies, } from '../plugin'; - -import { createKbnUrlStateStorage, withNotifyOnErrors } from '../services/kibana_utils'; -import { KibanaContextProvider } from '../services/kibana_react'; - import { AppMountParameters, CoreSetup, PluginInitializerContext, ScopedHistory, } from '../services/core'; -import { DashboardNoMatch } from './listing/dashboard_no_match'; export const dashboardUrlParams = { showTopMenu: 'show-top-menu', @@ -89,12 +90,14 @@ export async function mountApp({ const activeSpaceId = spacesApi && (await spacesApi.getActiveSpace$().pipe(first()).toPromise())?.id; let globalEmbedSettings: DashboardEmbedSettings | undefined; + let routerHistory: History; const dashboardServices: DashboardAppServices = { navigation, onAppLeave, savedObjects, urlForwarding, + visualizations, usageCollection, core: coreStart, data: dataStart, @@ -109,10 +112,6 @@ export async function mountApp({ indexPatterns: dataStart.indexPatterns, savedQueryService: dataStart.query.savedQueries, savedObjectsClient: coreStart.savedObjects.client, - dashboardPanelStorage: new DashboardPanelStorage( - core.notifications.toasts, - activeSpaceId || 'default' - ), savedDashboards: dashboardStart.getSavedDashboardLoader(), savedObjectsTagging: savedObjectsTaggingOss?.getTaggingApi(), allowByValueEmbeddables: initializerContext.config.get() @@ -127,7 +126,10 @@ export async function mountApp({ visualizeCapabilities: { save: Boolean(coreStart.application.capabilities.visualize?.save) }, storeSearchSession: Boolean(coreStart.application.capabilities.dashboard.storeSearchSession), }, - visualizations, + dashboardSessionStorage: new DashboardSessionStorage( + core.notifications.toasts, + activeSpaceId || 'default' + ), }; const getUrlStateStorage = (history: RouteComponentProps['history']) => @@ -137,10 +139,9 @@ export async function mountApp({ ...withNotifyOnErrors(core.notifications.toasts), }); - const redirect = (routeProps: RouteComponentProps, redirectTo: RedirectToProps) => { - const historyFunction = redirectTo.useReplace - ? routeProps.history.replace - : routeProps.history.push; + const redirect = (redirectTo: RedirectToProps) => { + if (!routerHistory) return; + const historyFunction = redirectTo.useReplace ? routerHistory.replace : routerHistory.push; let destination; if (redirectTo.destination === 'dashboard') { destination = redirectTo.id @@ -168,12 +169,15 @@ export async function mountApp({ if (routeParams.embed && !globalEmbedSettings) { globalEmbedSettings = getDashboardEmbedSettings(routeParams); } + if (!routerHistory) { + routerHistory = routeProps.history; + } return ( redirect(routeProps, props)} + redirectTo={redirect} /> ); }; @@ -183,13 +187,15 @@ export async function mountApp({ const routeParams = parse(routeProps.history.location.search); const title = (routeParams.title as string) || undefined; const filter = (routeParams.filter as string) || undefined; - + if (!routerHistory) { + routerHistory = routeProps.history; + } return ( redirect(routeProps, props)} + redirectTo={redirect} /> ); }; @@ -215,26 +221,32 @@ export async function mountApp({ const app = ( - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + ); diff --git a/src/plugins/dashboard/public/application/dashboard_state.test.ts b/src/plugins/dashboard/public/application/dashboard_state.test.ts deleted file mode 100644 index ffe5c80febe026..00000000000000 --- a/src/plugins/dashboard/public/application/dashboard_state.test.ts +++ /dev/null @@ -1,272 +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 { createBrowserHistory } from 'history'; -import { getSavedDashboardMock } from './test_helpers'; -import { DashboardContainer, DashboardContainerInput, DashboardPanelState } from '.'; -import { DashboardStateManager } from './dashboard_state_manager'; -import { DashboardContainerServices } from './embeddable/dashboard_container'; - -import { EmbeddableInput, ViewMode } from '../services/embeddable'; -import { createKbnUrlStateStorage } from '../services/kibana_utils'; -import { InputTimeRange, TimefilterContract, TimeRange } from '../services/data'; - -import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks'; -import { coreMock } from '../../../../core/public/mocks'; - -describe('DashboardState', function () { - let dashboardState: DashboardStateManager; - const savedDashboard = getSavedDashboardMock(); - - let mockTime: TimeRange = { to: 'now', from: 'now-15m' }; - const mockTimefilter = { - getTime: () => { - return mockTime; - }, - setTime: (time: InputTimeRange) => { - mockTime = time as TimeRange; - }, - } as TimefilterContract; - - // TS is *very* picky with type guards / predicates. can't just use jest.fn() - function mockHasTaggingCapabilities(obj: any): obj is any { - return false; - } - - function initDashboardState() { - dashboardState = new DashboardStateManager({ - savedDashboard, - hideWriteControls: false, - allowByValueEmbeddables: false, - hasPendingEmbeddable: () => false, - kibanaVersion: '7.0.0', - kbnUrlStateStorage: createKbnUrlStateStorage(), - history: createBrowserHistory(), - toasts: coreMock.createStart().notifications.toasts, - hasTaggingCapabilities: mockHasTaggingCapabilities, - }); - } - - function initDashboardContainer(initialInput?: Partial) { - const { doStart } = embeddablePluginMock.createInstance(); - const defaultInput: DashboardContainerInput = { - id: '123', - viewMode: ViewMode.EDIT, - filters: [] as DashboardContainerInput['filters'], - query: {} as DashboardContainerInput['query'], - timeRange: {} as DashboardContainerInput['timeRange'], - useMargins: true, - syncColors: false, - title: 'ultra awesome test dashboard', - isFullScreenMode: false, - panels: {} as DashboardContainerInput['panels'], - }; - const input = { ...defaultInput, ...(initialInput ?? {}) }; - return new DashboardContainer(input, { embeddable: doStart() } as DashboardContainerServices); - } - - describe('syncTimefilterWithDashboard', function () { - test('syncs quick time', function () { - savedDashboard.timeRestore = true; - savedDashboard.timeFrom = 'now/w'; - savedDashboard.timeTo = 'now/w'; - - mockTime.from = '2015-09-19 06:31:44.000'; - mockTime.to = '2015-09-29 06:31:44.000'; - - initDashboardState(); - dashboardState.syncTimefilterWithDashboardTime(mockTimefilter); - - expect(mockTime.to).toBe('now/w'); - expect(mockTime.from).toBe('now/w'); - }); - - test('syncs relative time', function () { - savedDashboard.timeRestore = true; - savedDashboard.timeFrom = 'now-13d'; - savedDashboard.timeTo = 'now'; - - mockTime.from = '2015-09-19 06:31:44.000'; - mockTime.to = '2015-09-29 06:31:44.000'; - - initDashboardState(); - dashboardState.syncTimefilterWithDashboardTime(mockTimefilter); - - expect(mockTime.to).toBe('now'); - expect(mockTime.from).toBe('now-13d'); - }); - - test('syncs absolute time', function () { - savedDashboard.timeRestore = true; - savedDashboard.timeFrom = '2015-09-19 06:31:44.000'; - savedDashboard.timeTo = '2015-09-29 06:31:44.000'; - - mockTime.from = 'now/w'; - mockTime.to = 'now/w'; - - initDashboardState(); - dashboardState.syncTimefilterWithDashboardTime(mockTimefilter); - - expect(mockTime.to).toBe(savedDashboard.timeTo); - expect(mockTime.from).toBe(savedDashboard.timeFrom); - }); - }); - - describe('Dashboard Container Changes', () => { - beforeEach(() => { - initDashboardState(); - }); - - test('expanedPanelId in container input casues state update', () => { - dashboardState.setExpandedPanelId = jest.fn(); - - const dashboardContainer = initDashboardContainer({ - expandedPanelId: 'theCoolestPanelOnThisDashboard', - panels: { - theCoolestPanelOnThisDashboard: { - explicitInput: { id: 'theCoolestPanelOnThisDashboard' }, - } as DashboardPanelState, - }, - }); - - dashboardState.handleDashboardContainerChanges(dashboardContainer); - expect(dashboardState.setExpandedPanelId).toHaveBeenCalledWith( - 'theCoolestPanelOnThisDashboard' - ); - }); - - test('expanedPanelId is not updated when it is the same', () => { - dashboardState.setExpandedPanelId = jest - .fn() - .mockImplementation(dashboardState.setExpandedPanelId); - - const dashboardContainer = initDashboardContainer({ - expandedPanelId: 'theCoolestPanelOnThisDashboard', - panels: { - theCoolestPanelOnThisDashboard: { - explicitInput: { id: 'theCoolestPanelOnThisDashboard' }, - } as DashboardPanelState, - }, - }); - - dashboardState.handleDashboardContainerChanges(dashboardContainer); - dashboardState.handleDashboardContainerChanges(dashboardContainer); - expect(dashboardState.setExpandedPanelId).toHaveBeenCalledTimes(1); - }); - - test('expandedPanelId is set to undefined if panel does not exist in input', () => { - dashboardState.setExpandedPanelId = jest - .fn() - .mockImplementation(dashboardState.setExpandedPanelId); - const dashboardContainer = initDashboardContainer({ - expandedPanelId: 'theCoolestPanelOnThisDashboard', - panels: { - theCoolestPanelOnThisDashboard: { - explicitInput: { id: 'theCoolestPanelOnThisDashboard' }, - } as DashboardPanelState, - }, - }); - - dashboardState.handleDashboardContainerChanges(dashboardContainer); - expect(dashboardState.setExpandedPanelId).toHaveBeenCalledWith( - 'theCoolestPanelOnThisDashboard' - ); - - dashboardContainer.updateInput({ expandedPanelId: 'theLeastCoolPanelOnThisDashboard' }); - dashboardState.handleDashboardContainerChanges(dashboardContainer); - expect(dashboardState.setExpandedPanelId).toHaveBeenCalledWith(undefined); - }); - }); - - describe('isDirty', function () { - beforeAll(() => { - initDashboardState(); - }); - - test('getIsDirty is true if isDirty is true and editing', () => { - dashboardState.switchViewMode(ViewMode.EDIT); - dashboardState.isDirty = true; - expect(dashboardState.getIsDirty()).toBeTruthy(); - }); - - test('getIsDirty is false if isDirty is true and editing', () => { - dashboardState.switchViewMode(ViewMode.VIEW); - dashboardState.isDirty = true; - expect(dashboardState.getIsDirty()).toBeFalsy(); - }); - }); - - describe('initial view mode', () => { - test('initial view mode set to view when hideWriteControls is true', () => { - const initialViewModeDashboardState = new DashboardStateManager({ - savedDashboard, - hideWriteControls: true, - allowByValueEmbeddables: false, - hasPendingEmbeddable: () => false, - kibanaVersion: '7.0.0', - kbnUrlStateStorage: createKbnUrlStateStorage(), - history: createBrowserHistory(), - toasts: coreMock.createStart().notifications.toasts, - hasTaggingCapabilities: mockHasTaggingCapabilities, - }); - expect(initialViewModeDashboardState.getViewMode()).toBe(ViewMode.VIEW); - }); - - test('initial view mode set to edit if edit mode specified in URL', () => { - const kbnUrlStateStorage = createKbnUrlStateStorage(); - kbnUrlStateStorage.set('_a', { viewMode: ViewMode.EDIT }); - - const initialViewModeDashboardState = new DashboardStateManager({ - savedDashboard, - kbnUrlStateStorage, - kibanaVersion: '7.0.0', - hideWriteControls: false, - allowByValueEmbeddables: false, - history: createBrowserHistory(), - hasPendingEmbeddable: () => false, - toasts: coreMock.createStart().notifications.toasts, - hasTaggingCapabilities: mockHasTaggingCapabilities, - }); - expect(initialViewModeDashboardState.getViewMode()).toBe(ViewMode.EDIT); - }); - - test('initial view mode set to edit if the dashboard is new', () => { - const newDashboard = getSavedDashboardMock(); - newDashboard.id = undefined; - const initialViewModeDashboardState = new DashboardStateManager({ - savedDashboard: newDashboard, - kibanaVersion: '7.0.0', - hideWriteControls: false, - allowByValueEmbeddables: false, - history: createBrowserHistory(), - hasPendingEmbeddable: () => false, - kbnUrlStateStorage: createKbnUrlStateStorage(), - toasts: coreMock.createStart().notifications.toasts, - hasTaggingCapabilities: mockHasTaggingCapabilities, - }); - expect(initialViewModeDashboardState.getViewMode()).toBe(ViewMode.EDIT); - }); - - test('initial view mode set to edit if there is a pending embeddable', () => { - const newDashboard = getSavedDashboardMock(); - newDashboard.id = undefined; - const initialViewModeDashboardState = new DashboardStateManager({ - savedDashboard: newDashboard, - kibanaVersion: '7.0.0', - hideWriteControls: false, - allowByValueEmbeddables: false, - history: createBrowserHistory(), - hasPendingEmbeddable: () => true, - kbnUrlStateStorage: createKbnUrlStateStorage(), - toasts: coreMock.createStart().notifications.toasts, - hasTaggingCapabilities: mockHasTaggingCapabilities, - }); - expect(initialViewModeDashboardState.getViewMode()).toBe(ViewMode.EDIT); - }); - }); -}); diff --git a/src/plugins/dashboard/public/application/dashboard_state_manager.ts b/src/plugins/dashboard/public/application/dashboard_state_manager.ts deleted file mode 100644 index 58b413f4303e66..00000000000000 --- a/src/plugins/dashboard/public/application/dashboard_state_manager.ts +++ /dev/null @@ -1,771 +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 _ from 'lodash'; -import { Moment } from 'moment'; -import { i18n } from '@kbn/i18n'; -import { History } from 'history'; -import { Observable, Subscription } from 'rxjs'; - -import { FilterUtils } from './lib/filter_utils'; -import { DashboardContainer } from './embeddable'; -import { DashboardSavedObject } from '../saved_dashboards'; -import { migrateLegacyQuery } from './lib/migrate_legacy_query'; -import { - getAppStateDefaults, - migrateAppState, - getDashboardIdFromUrl, - DashboardPanelStorage, -} from './lib'; -import { convertPanelStateToSavedDashboardPanel } from '../../common/embeddable/embeddable_saved_object_converters'; -import { - DashboardAppState, - DashboardAppStateDefaults, - DashboardAppStateInUrl, - DashboardAppStateTransitions, - SavedDashboardPanel, -} from '../types'; - -import { ViewMode } from '../services/embeddable'; -import { UsageCollectionSetup } from '../services/usage_collection'; -import { Filter, Query, TimefilterContract as Timefilter } from '../services/data'; -import type { SavedObjectTagDecoratorTypeGuard } from '../services/saved_objects_tagging_oss'; -import { - createStateContainer, - IKbnUrlStateStorage, - ISyncStateRef, - ReduxLikeStateContainer, - syncState, -} from '../services/kibana_utils'; -import { STATE_STORAGE_KEY } from '../url_generator'; -import { NotificationsStart } from '../services/core'; -import { getMigratedToastText } from '../dashboard_strings'; - -/** - * Dashboard state manager handles connecting angular and redux state between the angular and react portions of the - * app. There are two "sources of truth" that need to stay in sync - AppState (aka the `_a` portion of the url) and - * the Store. They aren't complete duplicates of each other as AppState has state that the Store doesn't, and vice - * versa. They should be as decoupled as possible so updating the store won't affect bwc of urls. - */ -export class DashboardStateManager { - public savedDashboard: DashboardSavedObject; - public lastSavedDashboardFilters: { - timeTo?: string | Moment; - timeFrom?: string | Moment; - filterBars: Filter[]; - query: Query; - }; - private stateDefaults: DashboardAppStateDefaults; - private toasts: NotificationsStart['toasts']; - private hideWriteControls: boolean; - private kibanaVersion: string; - public isDirty: boolean; - private changeListeners: Array<(status: { dirty: boolean }) => void>; - private hasShownMigrationToast = false; - - public get appState(): DashboardAppState { - return this.stateContainer.get(); - } - - public get appState$(): Observable { - return this.stateContainer.state$; - } - - private readonly stateContainer: ReduxLikeStateContainer< - DashboardAppState, - DashboardAppStateTransitions - >; - private readonly stateContainerChangeSub: Subscription; - private readonly dashboardPanelStorage?: DashboardPanelStorage; - public readonly kbnUrlStateStorage: IKbnUrlStateStorage; - private readonly stateSyncRef: ISyncStateRef; - private readonly allowByValueEmbeddables: boolean; - - private readonly usageCollection: UsageCollectionSetup | undefined; - public readonly hasTaggingCapabilities: SavedObjectTagDecoratorTypeGuard; - private hasPendingEmbeddable: () => boolean; - - /** - * - * @param savedDashboard - * @param hideWriteControls true if write controls should be hidden. - * @param kibanaVersion current kibanaVersion - * @param - */ - constructor({ - toasts, - history, - kibanaVersion, - savedDashboard, - usageCollection, - hideWriteControls, - kbnUrlStateStorage, - hasPendingEmbeddable, - dashboardPanelStorage, - hasTaggingCapabilities, - allowByValueEmbeddables, - }: { - history: History; - kibanaVersion: string; - hideWriteControls: boolean; - hasPendingEmbeddable: () => boolean; - allowByValueEmbeddables: boolean; - savedDashboard: DashboardSavedObject; - toasts: NotificationsStart['toasts']; - usageCollection?: UsageCollectionSetup; - kbnUrlStateStorage: IKbnUrlStateStorage; - dashboardPanelStorage?: DashboardPanelStorage; - hasTaggingCapabilities: SavedObjectTagDecoratorTypeGuard; - }) { - this.toasts = toasts; - this.kibanaVersion = kibanaVersion; - this.savedDashboard = savedDashboard; - this.hideWriteControls = hideWriteControls; - this.usageCollection = usageCollection; - this.hasTaggingCapabilities = hasTaggingCapabilities; - this.allowByValueEmbeddables = allowByValueEmbeddables; - this.hasPendingEmbeddable = hasPendingEmbeddable; - this.dashboardPanelStorage = dashboardPanelStorage; - this.kbnUrlStateStorage = kbnUrlStateStorage; - - // get state defaults from saved dashboard, make sure it is migrated - const viewMode = this.getInitialViewMode(); - this.stateDefaults = migrateAppState( - getAppStateDefaults(viewMode, this.savedDashboard, this.hasTaggingCapabilities), - kibanaVersion, - usageCollection - ); - - // setup initial state by merging defaults with state from url & panels storage - // also run migration, as state in url could be of older version - const initialUrlState = this.kbnUrlStateStorage.get(STATE_STORAGE_KEY); - - const initialState = migrateAppState( - { - ...this.stateDefaults, - ...this.getUnsavedPanelState(), - ...initialUrlState, - }, - kibanaVersion, - usageCollection - ); - - this.isDirty = false; - - if (initialUrlState?.panels && !_.isEqual(initialUrlState.panels, this.stateDefaults.panels)) { - this.isDirty = true; - this.setUnsavedPanels(initialState.panels); - } - - // setup state container using initial state both from defaults and from url - this.stateContainer = createStateContainer( - initialState, - { - set: (state) => (prop, value) => ({ ...state, [prop]: value }), - setOption: (state) => (option, value) => ({ - ...state, - options: { - ...state.options, - [option]: value, - }, - }), - } - ); - - // We can't compare the filters stored on this.appState to this.savedDashboard because in order to apply - // the filters to the visualizations, we need to save it on the dashboard. We keep track of the original - // filter state in order to let the user know if their filters changed and provide this specific information - // in the 'lose changes' warning message. - this.lastSavedDashboardFilters = this.getFilterState(); - - this.changeListeners = []; - - this.stateContainerChangeSub = this.stateContainer.state$.subscribe(() => { - this.isDirty = this.checkIsDirty(); - this.changeListeners.forEach((listener) => listener({ dirty: this.isDirty })); - }); - - // setup state syncing utils. state container will be synced with url into `STATE_STORAGE_KEY` query param - this.stateSyncRef = syncState({ - storageKey: STATE_STORAGE_KEY, - stateContainer: { - ...this.stateContainer, - get: () => this.toUrlState(this.stateContainer.get()), - set: (stateFromUrl: DashboardAppStateInUrl | null) => { - // sync state required state container to be able to handle null - // overriding set() so it could handle null coming from url - if (stateFromUrl) { - // Skip this update if current dashboardId in the url is different from what we have in the current instance of state manager - // As dashboard is driven by angular at the moment, the destroy cycle happens async, - // If the dashboardId has changed it means this instance - // is going to be destroyed soon and we shouldn't sync state anymore, - // as it could potentially trigger further url updates - const currentDashboardIdInUrl = getDashboardIdFromUrl(history.location.pathname); - if (currentDashboardIdInUrl !== this.savedDashboard.id) return; - - // set View mode before the rest of the state so unsaved panels can be added correctly. - if (this.appState.viewMode !== stateFromUrl.viewMode) { - this.switchViewMode(stateFromUrl.viewMode); - } - - this.stateContainer.set({ - ...this.stateDefaults, - ...this.getUnsavedPanelState(), - ...stateFromUrl, - }); - } else { - // Do nothing in case when state from url is empty, - // this fixes: https://github.com/elastic/kibana/issues/57789 - // There are not much cases when state in url could become empty: - // 1. User manually removed `_a` from the url - // 2. Browser is navigating away from the page and most likely there is no `_a` in the url. - // In this case we don't want to do any state updates - // and just allow $scope.$on('destroy') fire later and clean up everything - } - }, - }, - stateStorage: this.kbnUrlStateStorage, - }); - } - - public startStateSyncing() { - this.saveState({ replace: true }); - this.stateSyncRef.start(); - } - - public registerChangeListener(callback: (status: { dirty: boolean }) => void) { - this.changeListeners.push(callback); - } - - public handleDashboardContainerChanges(dashboardContainer: DashboardContainer) { - let dirty = false; - let dirtyBecauseOfInitialStateMigration = false; - - const savedDashboardPanelMap: { [key: string]: SavedDashboardPanel } = {}; - - const input = dashboardContainer.getInput(); - - this.getPanels().forEach((savedDashboardPanel) => { - if (input.panels[savedDashboardPanel.panelIndex] !== undefined) { - savedDashboardPanelMap[savedDashboardPanel.panelIndex] = savedDashboardPanel; - } else { - // A panel was deleted. - dirty = true; - } - }); - - const convertedPanelStateMap: { [key: string]: SavedDashboardPanel } = {}; - - let expandedPanelValid = false; - Object.values(input.panels).forEach((panelState) => { - if (savedDashboardPanelMap[panelState.explicitInput.id] === undefined) { - dirty = true; - } - - if (panelState.explicitInput.id === input.expandedPanelId) { - expandedPanelValid = true; - } - - convertedPanelStateMap[panelState.explicitInput.id] = convertPanelStateToSavedDashboardPanel( - panelState, - this.kibanaVersion - ); - - if ( - !_.isEqual( - convertedPanelStateMap[panelState.explicitInput.id], - savedDashboardPanelMap[panelState.explicitInput.id] - ) - ) { - // A panel was changed - dirty = true; - - const oldVersion = savedDashboardPanelMap[panelState.explicitInput.id]?.version; - const newVersion = convertedPanelStateMap[panelState.explicitInput.id]?.version; - if (oldVersion && newVersion && oldVersion !== newVersion) { - dirtyBecauseOfInitialStateMigration = true; - } - } - }); - - if (dirty) { - this.stateContainer.transitions.set('panels', Object.values(convertedPanelStateMap)); - if (dirtyBecauseOfInitialStateMigration) { - if (this.getIsEditMode() && !this.hasShownMigrationToast) { - this.toasts.addSuccess(getMigratedToastText()); - this.hasShownMigrationToast = true; - } - this.saveState({ replace: true }); - } - - // If a panel has been changed, and the state is now equal to the state in the saved object, remove the unsaved panels - if (!this.isDirty && this.getIsEditMode()) { - this.clearUnsavedPanels(); - } else { - this.setUnsavedPanels(this.getPanels()); - } - } - - if (input.isFullScreenMode !== this.getFullScreenMode()) { - this.setFullScreenMode(input.isFullScreenMode); - } - - if (expandedPanelValid && input.expandedPanelId !== this.getExpandedPanelId()) { - this.setExpandedPanelId(input.expandedPanelId); - } else if (!expandedPanelValid && this.getExpandedPanelId()) { - this.setExpandedPanelId(undefined); - } - - if (!_.isEqual(input.query, this.getQuery())) { - this.setQuery(input.query); - } - - this.changeListeners.forEach((listener) => listener({ dirty })); - } - - public getFullScreenMode() { - return this.appState.fullScreenMode; - } - - public setFullScreenMode(fullScreenMode: boolean) { - this.stateContainer.transitions.set('fullScreenMode', fullScreenMode); - } - - public getExpandedPanelId() { - return this.appState.expandedPanelId; - } - - public setExpandedPanelId(expandedPanelId?: string) { - this.stateContainer.transitions.set('expandedPanelId', expandedPanelId); - } - - public setFilters(filters: Filter[]) { - this.stateContainer.transitions.set('filters', filters); - } - - /** - * Resets the state back to the last saved version of the dashboard. - */ - public resetState() { - // In order to show the correct warning, we have to store the unsaved - // title on the dashboard object. We should fix this at some point, but this is how all the other object - // save panels work at the moment. - this.savedDashboard.title = this.savedDashboard.lastSavedTitle; - - // appState.reset uses the internal defaults to reset the state, but some of the default settings (e.g. the panels - // array) point to the same object that is stored on appState and is getting modified. - // The right way to fix this might be to ensure the defaults object stored on state is a deep - // clone, but given how much code uses the state object, I determined that to be too risky of a change for - // now. TODO: revisit this! - const currentViewMode = this.stateContainer.get().viewMode; - this.stateDefaults = migrateAppState( - getAppStateDefaults(currentViewMode, this.savedDashboard, this.hasTaggingCapabilities), - this.kibanaVersion, - this.usageCollection - ); - // The original query won't be restored by the above because the query on this.savedDashboard is applied - // in place in order for it to affect the visualizations. - this.stateDefaults.query = this.lastSavedDashboardFilters.query; - // Need to make a copy to ensure they are not overwritten. - this.stateDefaults.filters = [...this.getLastSavedFilterBars()]; - this.isDirty = false; - - this.stateContainer.set(this.stateDefaults); - } - - /** - * Returns an object which contains the current filter state of this.savedDashboard. - */ - public getFilterState() { - return { - timeTo: this.savedDashboard.timeTo, - timeFrom: this.savedDashboard.timeFrom, - filterBars: this.savedDashboard.getFilters(), - query: this.savedDashboard.getQuery(), - }; - } - - public getTitle() { - return this.appState.title; - } - - public isSaved() { - return !!this.savedDashboard.id; - } - - public isNew() { - return !this.isSaved(); - } - - public getDescription() { - return this.appState.description; - } - - public getTags() { - return this.appState.tags; - } - - public setDescription(description: string) { - this.stateContainer.transitions.set('description', description); - } - - public setTitle(title: string) { - this.savedDashboard.title = title; - this.stateContainer.transitions.set('title', title); - } - - public setTags(tags: string[]) { - this.stateContainer.transitions.set('tags', tags); - } - - public getAppState() { - return this.stateContainer.get(); - } - - public getQuery(): Query { - return migrateLegacyQuery(this.stateContainer.get().query); - } - - public getSavedQueryId() { - return this.stateContainer.get().savedQuery; - } - - public setSavedQueryId(id?: string) { - this.stateContainer.transitions.set('savedQuery', id); - } - - public getUseMargins() { - // Existing dashboards that don't define this should default to false. - return this.appState.options.useMargins === undefined - ? false - : this.appState.options.useMargins; - } - - public setUseMargins(useMargins: boolean) { - this.stateContainer.transitions.setOption('useMargins', useMargins); - } - - public getSyncColors() { - // Existing dashboards that don't define this should default to true. - return this.appState.options.syncColors === undefined ? true : this.appState.options.syncColors; - } - - public setSyncColors(syncColors: boolean) { - this.stateContainer.transitions.setOption('syncColors', syncColors); - } - - public getHidePanelTitles() { - return this.appState.options.hidePanelTitles; - } - - public setHidePanelTitles(hidePanelTitles: boolean) { - this.stateContainer.transitions.setOption('hidePanelTitles', hidePanelTitles); - } - - public getTimeRestore() { - return this.appState.timeRestore; - } - - public setTimeRestore(timeRestore: boolean) { - this.stateContainer.transitions.set('timeRestore', timeRestore); - } - - public getIsTimeSavedWithDashboard() { - return this.savedDashboard.timeRestore; - } - - public getLastSavedFilterBars(): Filter[] { - return this.lastSavedDashboardFilters.filterBars; - } - - public getLastSavedQuery() { - return this.lastSavedDashboardFilters.query; - } - - /** - * @returns True if the query changed since the last time the dashboard was saved, or if it's a - * new dashboard, if the query differs from the default. - */ - public getQueryChanged() { - const currentQuery = this.appState.query; - const lastSavedQuery = this.getLastSavedQuery(); - - const query = migrateLegacyQuery(currentQuery); - - const isLegacyStringQuery = - _.isString(lastSavedQuery) && _.isPlainObject(currentQuery) && _.has(currentQuery, 'query'); - if (isLegacyStringQuery) { - return lastSavedQuery !== query.query; - } - - return !_.isEqual(currentQuery, lastSavedQuery); - } - - /** - * @returns True if the filter bar state has changed since the last time the dashboard was saved, - * or if it's a new dashboard, if the query differs from the default. - */ - public getFilterBarChanged() { - return !_.isEqual( - FilterUtils.cleanFiltersForComparison(this.appState.filters), - FilterUtils.cleanFiltersForComparison(this.getLastSavedFilterBars()) - ); - } - - /** - * @param timeFilter - * @returns True if the time state has changed since the time saved with the dashboard. - */ - public getTimeChanged(timeFilter: Timefilter) { - return ( - !FilterUtils.areTimesEqual( - this.lastSavedDashboardFilters.timeFrom, - timeFilter.getTime().from - ) || - !FilterUtils.areTimesEqual(this.lastSavedDashboardFilters.timeTo, timeFilter.getTime().to) - ); - } - - public getViewMode() { - if (this.hideWriteControls) { - return ViewMode.VIEW; - } - if (this.stateContainer) { - return this.appState.viewMode; - } - // get viewMode should work properly even before the state container is created - return this.getInitialViewMode(); - } - - public getIsViewMode() { - return this.getViewMode() === ViewMode.VIEW; - } - - public getIsEditMode() { - return this.getViewMode() === ViewMode.EDIT; - } - - /** - * - * @returns True if the dashboard has changed since the last save (or, is new). - */ - public getIsDirty(timeFilter?: Timefilter) { - // Filter bar comparison is done manually (see cleanFiltersForComparison for the reason) and time picker - // changes are not tracked by the state monitor. - const hasTimeFilterChanged = timeFilter ? this.getFiltersChanged(timeFilter) : false; - return ( - this.hasUnsavedPanelState() || - (this.getIsEditMode() && (this.isDirty || hasTimeFilterChanged)) - ); - } - - public getPanels(): SavedDashboardPanel[] { - return this.appState.panels; - } - - public updatePanel(panelIndex: string, panelAttributes: any) { - const foundPanel = this.getPanels().find( - (panel: SavedDashboardPanel) => panel.panelIndex === panelIndex - ); - Object.assign(foundPanel, panelAttributes); - return foundPanel; - } - - /** - * @param timeFilter - * @returns An array of user friendly strings indicating the filter types that have changed. - */ - public getChangedFilterTypes(timeFilter: Timefilter) { - const changedFilters = []; - if (this.getFilterBarChanged()) { - changedFilters.push('filter'); - } - if (this.getQueryChanged()) { - changedFilters.push('query'); - } - if (this.savedDashboard.timeRestore && this.getTimeChanged(timeFilter)) { - changedFilters.push('time range'); - } - return changedFilters; - } - - /** - * @returns True if filters (query, filter bar filters, and time picker if time is stored - * with the dashboard) have changed since the last saved state (or if the dashboard hasn't been saved, - * the default state). - */ - public getFiltersChanged(timeFilter: Timefilter) { - return this.getChangedFilterTypes(timeFilter).length > 0; - } - - /** - * Updates timeFilter to match the time saved with the dashboard. - * @param timeFilter - * @param timeFilter.setTime - * @param timeFilter.setRefreshInterval - */ - public syncTimefilterWithDashboardTime(timeFilter: Timefilter) { - if (!this.getIsTimeSavedWithDashboard()) { - throw new Error( - i18n.translate('dashboard.stateManager.timeNotSavedWithDashboardErrorMessage', { - defaultMessage: 'The time is not saved with this dashboard so should not be synced.', - }) - ); - } - - if (this.savedDashboard.timeFrom && this.savedDashboard.timeTo) { - timeFilter.setTime({ - from: this.savedDashboard.timeFrom, - to: this.savedDashboard.timeTo, - }); - } - } - - /** - * Updates timeFilter to match the refreshInterval saved with the dashboard. - * @param timeFilter - */ - public syncTimefilterWithDashboardRefreshInterval(timeFilter: Timefilter) { - if (!this.getIsTimeSavedWithDashboard()) { - throw new Error( - i18n.translate('dashboard.stateManager.timeNotSavedWithDashboardErrorMessage', { - defaultMessage: 'The time is not saved with this dashboard so should not be synced.', - }) - ); - } - - if (this.savedDashboard.refreshInterval) { - timeFilter.setRefreshInterval(this.savedDashboard.refreshInterval); - } - } - - /** - * Synchronously writes current state to url - * returned boolean indicates whether the update happened and if history was updated - */ - private saveState({ replace }: { replace: boolean }): boolean { - // schedules setting current state to url - this.kbnUrlStateStorage.set( - STATE_STORAGE_KEY, - this.toUrlState(this.stateContainer.get()) - ); - // immediately forces scheduled updates and changes location - return !!this.kbnUrlStateStorage.kbnUrlControls.flush(replace); - } - - public setQuery(query: Query) { - this.stateContainer.transitions.set('query', query); - } - - /** - * Applies the current filter state to the dashboard. - * @param filter An array of filter bar filters. - */ - public applyFilters(query: Query, filters: Filter[]) { - this.savedDashboard.searchSource.setField('query', query); - this.savedDashboard.searchSource.setField('filter', filters); - this.stateContainer.transitions.set('query', query); - } - - public switchViewMode(newMode: ViewMode) { - this.stateContainer.transitions.set('viewMode', newMode); - this.restorePanels(); - } - - /** - * Destroys and cleans up this object when it's no longer used. - */ - public destroy() { - this.stateContainerChangeSub.unsubscribe(); - this.savedDashboard.destroy(); - if (this.stateSyncRef) { - this.stateSyncRef.stop(); - } - } - - public restorePanels() { - const unsavedState = this.getUnsavedPanelState(); - if (!unsavedState || unsavedState.panels?.length === 0) { - return; - } - this.stateContainer.set( - migrateAppState( - { - ...this.stateDefaults, - ...unsavedState, - ...this.kbnUrlStateStorage.get(STATE_STORAGE_KEY), - viewMode: this.getViewMode(), - }, - this.kibanaVersion, - this.usageCollection - ) - ); - } - - public clearUnsavedPanels() { - if (!this.allowByValueEmbeddables || !this.dashboardPanelStorage) { - return; - } - this.dashboardPanelStorage.clearPanels(this.savedDashboard?.id); - } - - public hasUnsavedPanelState(): boolean { - const panels = this.dashboardPanelStorage?.getPanels(this.savedDashboard?.id); - return panels !== undefined && panels.length > 0; - } - - private getUnsavedPanelState(): { panels?: SavedDashboardPanel[] } { - if (!this.allowByValueEmbeddables || this.getIsViewMode() || !this.dashboardPanelStorage) { - return {}; - } - const panels = this.dashboardPanelStorage.getPanels(this.savedDashboard?.id); - return panels ? { panels } : {}; - } - - private setUnsavedPanels(newPanels: SavedDashboardPanel[]) { - if ( - !this.allowByValueEmbeddables || - this.getIsViewMode() || - !this.getIsDirty() || - !this.dashboardPanelStorage - ) { - return; - } - this.dashboardPanelStorage.setPanels(this.savedDashboard?.id, newPanels); - } - - private toUrlState(state: DashboardAppState): DashboardAppStateInUrl { - if (this.getIsEditMode() && !this.allowByValueEmbeddables) { - return state; - } - const { panels, ...stateWithoutPanels } = state; - return stateWithoutPanels; - } - - private getInitialViewMode() { - if (this.hideWriteControls) { - return ViewMode.VIEW; - } - const viewModeFromUrl = this.kbnUrlStateStorage.get(STATE_STORAGE_KEY) - ?.viewMode; - if (viewModeFromUrl) { - return viewModeFromUrl; - } - return !this.savedDashboard.id || this.hasPendingEmbeddable() ? ViewMode.EDIT : ViewMode.VIEW; - } - - private checkIsDirty() { - // Filters need to be compared manually because they sometimes have a $$hashkey stored on the object. - // Query needs to be compared manually because saved legacy queries get migrated in app state automatically - const propsToIgnore: Array = ['viewMode', 'filters', 'query']; - - const initial = _.omit(this.stateDefaults, propsToIgnore); - const current = _.omit(this.stateContainer.get(), propsToIgnore); - return !_.isEqual(initial, current); - } -} diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx b/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx index 847a190a6e083a..b6e2a7c4b8f021 100644 --- a/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx +++ b/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import _ from 'lodash'; import React from 'react'; import ReactDOM from 'react-dom'; import { I18nProvider } from '@kbn/i18n/react'; @@ -20,7 +21,6 @@ import { Container, PanelState, IEmbeddable, - ContainerInput, EmbeddableInput, EmbeddableStart, EmbeddableOutput, @@ -36,30 +36,13 @@ import { KibanaReactContextValue, } from '../../services/kibana_react'; import { PLACEHOLDER_EMBEDDABLE } from './placeholder'; -import { PanelPlacementMethod, IPanelPlacementArgs } from './panel/dashboard_panel_placement'; -import { DashboardAppCapabilities } from '../types'; +import { DashboardAppCapabilities, DashboardContainerInput } from '../../types'; import { PresentationUtilPluginStart } from '../../services/presentation_util'; +import { PanelPlacementMethod, IPanelPlacementArgs } from './panel/dashboard_panel_placement'; -export interface DashboardContainerInput extends ContainerInput { - dashboardCapabilities?: DashboardAppCapabilities; - refreshConfig?: RefreshInterval; - isEmbeddedExternally?: boolean; - isFullScreenMode: boolean; - expandedPanelId?: string; - timeRange: TimeRange; - description?: string; - useMargins: boolean; - syncColors?: boolean; - viewMode: ViewMode; - filters: Filter[]; - title: string; - query: Query; - panels: { - [panelId: string]: DashboardPanelState; - }; -} export interface DashboardContainerServices { ExitFullScreenButton: React.ComponentType; + presentationUtil: PresentationUtilPluginStart; SavedObjectFinder: React.ComponentType; notifications: CoreStart['notifications']; application: CoreStart['application']; @@ -69,7 +52,6 @@ export interface DashboardContainerServices { embeddable: EmbeddableStart; uiActions: UiActionsStart; http: CoreStart['http']; - presentationUtil: PresentationUtilPluginStart; } interface IndexSignature { @@ -104,7 +86,6 @@ const defaultCapabilities: DashboardAppCapabilities = { export class DashboardContainer extends Container { public readonly type = DASHBOARD_CONTAINER_TYPE; - public switchViewMode?: (newViewMode: ViewMode) => void; public getPanelCount = () => { return Object.keys(this.getInput().panels).length; @@ -134,7 +115,8 @@ export class DashboardContainer extends Container = {} ): DashboardPanelState { const panelState = super.createNewPanelState(factory, partial); - return createPanelState(panelState, this.input.panels); + const { newPanel } = createPanelState(panelState, this.input.panels); + return newPanel; } public showPlaceholderUntil( @@ -155,7 +137,8 @@ export class DashboardContainer extends Container; - const placeholderPanelState = createPanelState( + + const { otherPanels, newPanel: placeholderPanelState } = createPanelState( originalPanelState, this.input.panels, placementMethod, @@ -164,7 +147,7 @@ export class DashboardContainer extends Container - + , diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_container_by_value_renderer.tsx b/src/plugins/dashboard/public/application/embeddable/dashboard_container_by_value_renderer.tsx index 05e1e7eb9ec356..a4d96b557ac978 100644 --- a/src/plugins/dashboard/public/application/embeddable/dashboard_container_by_value_renderer.tsx +++ b/src/plugins/dashboard/public/application/embeddable/dashboard_container_by_value_renderer.tsx @@ -7,7 +7,7 @@ */ import * as React from 'react'; -import { DashboardContainerInput } from './dashboard_container'; +import { DashboardContainerInput } from '../..'; import { DashboardContainerFactory } from './dashboard_container_factory'; import { EmbeddableRenderer } from '../../services/embeddable'; diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx b/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx index ff592742488f5d..2e984ccfa5ba9e 100644 --- a/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx +++ b/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx @@ -8,6 +8,10 @@ import { i18n } from '@kbn/i18n'; import { EmbeddablePersistableStateService } from 'src/plugins/embeddable/common'; + +import { DashboardContainerInput } from '../..'; +import { DASHBOARD_CONTAINER_TYPE } from './dashboard_constants'; +import { DashboardContainer, DashboardContainerServices } from './dashboard_container'; import { Container, ErrorEmbeddable, @@ -15,12 +19,6 @@ import { EmbeddableFactory, EmbeddableFactoryDefinition, } from '../../services/embeddable'; -import { - DashboardContainer, - DashboardContainerInput, - DashboardContainerServices, -} from './dashboard_container'; -import { DASHBOARD_CONTAINER_TYPE } from './dashboard_constants'; import { createExtract, createInject, diff --git a/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap b/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap index ae8943e9f6b3e3..9f56740fdac221 100644 --- a/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap +++ b/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap @@ -1025,30 +1025,7 @@ exports[`DashboardEmptyScreen renders correctly with view mode 1`] = ` className="euiTextColor euiTextColor--subdued" >

- Click - -   - - - - - -   - - in the menu bar above to start adding panels. + Click edit in the menu bar above to start adding panels.

diff --git a/src/plugins/dashboard/public/application/embeddable/empty_screen/dashboard_empty_screen.tsx b/src/plugins/dashboard/public/application/embeddable/empty_screen/dashboard_empty_screen.tsx index 6d5ff7e26958db..b2f1302c65c9c6 100644 --- a/src/plugins/dashboard/public/application/embeddable/empty_screen/dashboard_empty_screen.tsx +++ b/src/plugins/dashboard/public/application/embeddable/empty_screen/dashboard_empty_screen.tsx @@ -10,7 +10,6 @@ import React from 'react'; import { I18nProvider } from '@kbn/i18n/react'; import { EuiIcon, - EuiLink, EuiSpacer, EuiPageContent, EuiPageBody, @@ -24,7 +23,6 @@ import { emptyScreenStrings } from '../../../dashboard_strings'; export interface DashboardEmptyScreenProps { isEditMode?: boolean; - onLinkClick: () => void; uiSettings: IUiSettingsClient; http: HttpStart; isReadonlyMode?: boolean; @@ -32,7 +30,6 @@ export interface DashboardEmptyScreenProps { export function DashboardEmptyScreen({ isEditMode, - onLinkClick, uiSettings, http, isReadonlyMode, @@ -41,33 +38,7 @@ export function DashboardEmptyScreen({ const emptyStateGraphicURL = IS_DARK_THEME ? '/plugins/home/assets/welcome_graphic_dark_2x.png' : '/plugins/home/assets/welcome_graphic_light_2x.png'; - const paragraph = ( - description1: string | null, - description2: string, - linkText: string, - ariaLabel: string, - dataTestSubj?: string - ) => { - return ( - -

- {description1} - {description1 &&  } - - {linkText} - -   - {description2} -

-
- ); - }; - const enterEditModeParagraph = paragraph( - emptyScreenStrings.getHowToStartWorkingOnNewDashboardDescription1(), - emptyScreenStrings.getHowToStartWorkingOnNewDashboardDescription2(), - emptyScreenStrings.getHowToStartWorkingOnNewDashboardEditLinkText(), - emptyScreenStrings.getHowToStartWorkingOnNewDashboardEditLinkAriaLabel() - ); + const page = (mainText: string, showAdditionalParagraph?: boolean, additionalText?: string) => { return ( -
{enterEditModeParagraph}
+
+ +

{emptyScreenStrings.getHowToStartWorkingOnNewDashboardDescription()}

+
+
) : null} diff --git a/src/plugins/dashboard/public/application/embeddable/index.ts b/src/plugins/dashboard/public/application/embeddable/index.ts index 24b5362359d25b..a678dbea16a55f 100644 --- a/src/plugins/dashboard/public/application/embeddable/index.ts +++ b/src/plugins/dashboard/public/application/embeddable/index.ts @@ -10,7 +10,7 @@ export { DashboardContainerFactoryDefinition, DashboardContainerFactory, } from './dashboard_container_factory'; -export { DashboardContainer, DashboardContainerInput } from './dashboard_container'; +export { DashboardContainer } from './dashboard_container'; export { createPanelState } from './panel'; export * from './types'; diff --git a/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.test.ts b/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.test.ts index 7563d07154d6e7..97e078246aca6b 100644 --- a/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.test.ts +++ b/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.test.ts @@ -18,7 +18,7 @@ interface TestInput extends EmbeddableInput { const panels: { [key: string]: DashboardPanelState } = {}; test('createPanelState adds a new panel state in 0,0 position', () => { - const panelState = createPanelState( + const { newPanel: panelState } = createPanelState( { type: CONTACT_CARD_EMBEDDABLE, explicitInput: { test: 'hi', id: '123' }, @@ -37,7 +37,7 @@ test('createPanelState adds a new panel state in 0,0 position', () => { }); test('createPanelState adds a second new panel state', () => { - const panelState = createPanelState( + const { newPanel: panelState } = createPanelState( { type: CONTACT_CARD_EMBEDDABLE, explicitInput: { test: 'bye', id: '456' } }, panels ); @@ -51,7 +51,7 @@ test('createPanelState adds a second new panel state', () => { }); test('createPanelState adds a third new panel state', () => { - const panelState = createPanelState( + const { newPanel: panelState } = createPanelState( { type: CONTACT_CARD_EMBEDDABLE, explicitInput: { test: 'bye', id: '789' }, @@ -68,7 +68,7 @@ test('createPanelState adds a third new panel state', () => { test('createPanelState adds a new panel state in the top most position', () => { delete panels['456']; - const panelState = createPanelState( + const { newPanel: panelState } = createPanelState( { type: CONTACT_CARD_EMBEDDABLE, explicitInput: { test: 'bye', id: '987' }, diff --git a/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.ts b/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.ts index 775ac7d7078ad1..46a75ca06bdb53 100644 --- a/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.ts +++ b/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.ts @@ -26,7 +26,10 @@ export function createPanelState< currentPanels: { [key: string]: DashboardPanelState }, placementMethod?: PanelPlacementMethod, placementArgs?: TPlacementMethodArgs -): DashboardPanelState { +): { + newPanel: DashboardPanelState; + otherPanels: { [key: string]: DashboardPanelState }; +} { const defaultPlacementArgs = { width: DEFAULT_PANEL_WIDTH, height: DEFAULT_PANEL_HEIGHT, @@ -39,15 +42,18 @@ export function createPanelState< } : defaultPlacementArgs; - const gridDataLocation = placementMethod + const { newPanelPlacement, otherPanels } = placementMethod ? placementMethod(finalPlacementArgs as TPlacementMethodArgs) : findTopLeftMostOpenSpace(defaultPlacementArgs); return { - gridData: { - ...gridDataLocation, - i: panelState.explicitInput.id, + newPanel: { + gridData: { + ...newPanelPlacement, + i: panelState.explicitInput.id, + }, + ...panelState, }, - ...panelState, + otherPanels, }; } diff --git a/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts b/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts index c8e5fcbe4240b8..64b398200db1d3 100644 --- a/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts +++ b/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts @@ -13,7 +13,12 @@ import { DashboardPanelState, DASHBOARD_GRID_COLUMN_COUNT } from '..'; export type PanelPlacementMethod = ( args: PlacementArgs -) => Omit; +) => PanelPlacementMethodReturn; + +interface PanelPlacementMethodReturn { + newPanelPlacement: Omit; + otherPanels: { [key: string]: DashboardPanelState }; +} export interface IPanelPlacementArgs { width: number; @@ -30,7 +35,7 @@ export function findTopLeftMostOpenSpace({ width, height, currentPanels, -}: IPanelPlacementArgs): Omit { +}: IPanelPlacementArgs): PanelPlacementMethodReturn { let maxY = -1; const currentPanelsArray = Object.values(currentPanels); @@ -40,7 +45,7 @@ export function findTopLeftMostOpenSpace({ // Handle case of empty grid. if (maxY < 0) { - return { x: 0, y: 0, w: width, h: height }; + return { newPanelPlacement: { x: 0, y: 0, w: width, h: height }, otherPanels: currentPanels }; } const grid = new Array(maxY); @@ -80,7 +85,10 @@ export function findTopLeftMostOpenSpace({ if (spaceIsEmpty && fitsPanelWidth && fitsPanelHeight) { // Found space - return { x, y, w: width, h: height }; + return { + newPanelPlacement: { x, y, w: width, h: height }, + otherPanels: currentPanels, + }; } else if (grid[h][w] === 1) { // x, y spot doesn't work, break. break; @@ -90,7 +98,7 @@ export function findTopLeftMostOpenSpace({ } } } - return { x: 0, y: maxY, w: width, h: height }; + return { newPanelPlacement: { x: 0, y: maxY, w: width, h: height }, otherPanels: currentPanels }; } interface IplacementDirection { @@ -123,15 +131,15 @@ export function placePanelBeside({ height, currentPanels, placeBesideId, -}: IPanelPlacementBesideArgs): Omit { +}: IPanelPlacementBesideArgs): PanelPlacementMethodReturn { const panelToPlaceBeside = currentPanels[placeBesideId]; if (!panelToPlaceBeside) { throw new PanelNotFoundError(); } const beside = panelToPlaceBeside.gridData; - const otherPanels: GridData[] = []; + const otherPanelGridData: GridData[] = []; _.forOwn(currentPanels, (panel: DashboardPanelState, key: string | undefined) => { - otherPanels.push(panel.gridData); + otherPanelGridData.push(panel.gridData); }); const possiblePlacementDirections: IplacementDirection[] = [ @@ -147,7 +155,7 @@ export function placePanelBeside({ direction.grid.x + direction.grid.w <= DASHBOARD_GRID_COLUMN_COUNT && direction.grid.y >= 0 ) { - const intersection = otherPanels.some((currentPanelGrid: GridData) => { + const intersection = otherPanelGridData.some((currentPanelGrid: GridData) => { return ( direction.grid.x + direction.grid.w > currentPanelGrid.x && direction.grid.x < currentPanelGrid.x + currentPanelGrid.w && @@ -156,7 +164,7 @@ export function placePanelBeside({ ); }); if (!intersection) { - return direction.grid; + return { newPanelPlacement: direction.grid, otherPanels: currentPanels }; } } else { direction.fits = false; @@ -168,7 +176,8 @@ export function placePanelBeside({ * 2. place the cloned panel to the bottom * 3. reposition the panels after the cloned panel in the grid */ - const grid = otherPanels.sort(comparePanels); + const otherPanels = { ...currentPanels }; + const grid = otherPanelGridData.sort(comparePanels); let position = 0; for (position; position < grid.length; position++) { @@ -182,13 +191,13 @@ export function placePanelBeside({ const diff = bottomPlacement.grid.y + bottomPlacement.grid.h - - currentPanels[originalPositionInTheGrid].gridData.y; + otherPanels[originalPositionInTheGrid].gridData.y; for (let j = position + 1; j < grid.length; j++) { originalPositionInTheGrid = grid[j].i; - const movedPanel = _.cloneDeep(currentPanels[originalPositionInTheGrid]); + const movedPanel = _.cloneDeep(otherPanels[originalPositionInTheGrid]); movedPanel.gridData.y = movedPanel.gridData.y + diff; - currentPanels[originalPositionInTheGrid] = movedPanel; + otherPanels[originalPositionInTheGrid] = movedPanel; } - return bottomPlacement.grid; + return { newPanelPlacement: bottomPlacement.grid, otherPanels }; } diff --git a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx index 442bae8dd1dff4..cbe10438e578aa 100644 --- a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx +++ b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx @@ -15,7 +15,6 @@ import { context } from '../../../services/kibana_react'; import { DashboardEmptyScreen } from '../empty_screen/dashboard_empty_screen'; export interface DashboardViewportProps { - switchViewMode?: (newViewMode: ViewMode) => void; container: DashboardContainer; } @@ -120,7 +119,6 @@ export class DashboardViewport extends React.Component this.props.switchViewMode?.(ViewMode.EDIT)} isEditMode={isEditMode} uiSettings={this.context.services.uiSettings} http={this.context.services.http} diff --git a/src/plugins/dashboard/public/application/hooks/index.ts b/src/plugins/dashboard/public/application/hooks/index.ts index 09b7aea9c6a6da..d9c3cd231c3c3b 100644 --- a/src/plugins/dashboard/public/application/hooks/index.ts +++ b/src/plugins/dashboard/public/application/hooks/index.ts @@ -6,7 +6,4 @@ * Side Public License, v 1. */ -export { useSavedDashboard } from './use_saved_dashboard'; -export { useDashboardContainer } from './use_dashboard_container'; -export { useDashboardBreadcrumbs } from './use_dashboard_breadcrumbs'; -export { useDashboardStateManager } from './use_dashboard_state_manager'; +export { useDashboardAppState } from './use_dashboard_app_state'; diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx new file mode 100644 index 00000000000000..0e15c655749678 --- /dev/null +++ b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx @@ -0,0 +1,337 @@ +/* + * Copyright 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 { of } from 'rxjs'; +import { Provider } from 'react-redux'; +import { createBrowserHistory } from 'history'; +import { renderHook, act, RenderHookResult } from '@testing-library/react-hooks'; + +import { DashboardContainer } from '..'; +import { DashboardSessionStorage } from '../lib'; +import { coreMock } from '../../../../../core/public/mocks'; +import { DashboardConstants } from '../../dashboard_constants'; +import { dataPluginMock } from '../../../../data/public/mocks'; +import { SavedObjectLoader } from '../../services/saved_objects'; +import { DashboardAppServices, DashboardAppState } from '../../types'; +import { KibanaContextProvider } from '../../../../kibana_react/public'; +import { EmbeddableFactory, ViewMode } from '../../services/embeddable'; +import { dashboardStateStore, setDescription, setViewMode } from '../state'; +import { DashboardContainerServices } from '../embeddable/dashboard_container'; +import { createKbnUrlStateStorage, defer } from '../../../../kibana_utils/public'; +import { Filter, IIndexPattern, IndexPatternsContract } from '../../services/data'; +import { useDashboardAppState, UseDashboardStateProps } from './use_dashboard_app_state'; +import { + getSampleDashboardInput, + getSavedDashboardMock, + makeDefaultServices, +} from '../test_helpers'; + +interface SetupEmbeddableFactoryReturn { + finalizeEmbeddableCreation: () => void; + dashboardContainer: DashboardContainer; + dashboardDestroySpy: jest.SpyInstance; +} + +interface RenderDashboardStateHookReturn { + embeddableFactoryResult: SetupEmbeddableFactoryReturn; + renderHookResult: RenderHookResult, DashboardAppState>; + services: DashboardAppServices; + props: UseDashboardStateProps; +} + +const originalDashboardEmbeddableId = 'originalDashboardEmbeddableId'; + +const createDashboardAppStateProps = (): UseDashboardStateProps => ({ + kbnUrlStateStorage: createKbnUrlStateStorage(), + savedDashboardId: 'testDashboardId', + history: createBrowserHistory(), + isEmbeddedExternally: false, + redirectTo: jest.fn(), +}); + +const createDashboardAppStateServices = () => { + const defaults = makeDefaultServices(); + const indexPatterns = {} as IndexPatternsContract; + const defaultIndexPattern = { id: 'foo', fields: [{ name: 'bar' }] } as IIndexPattern; + indexPatterns.ensureDefaultIndexPattern = jest + .fn() + .mockImplementation(() => Promise.resolve(true)); + indexPatterns.getDefault = jest + .fn() + .mockImplementation(() => Promise.resolve(defaultIndexPattern)); + + const data = dataPluginMock.createStartContract(); + data.query.filterManager.getUpdates$ = jest.fn().mockImplementation(() => of(void 0)); + data.query.queryString.getUpdates$ = jest.fn().mockImplementation(() => of({})); + data.query.timefilter.timefilter.getTimeUpdate$ = jest.fn().mockImplementation(() => of(void 0)); + data.query.timefilter.timefilter.getRefreshIntervalUpdate$ = jest + .fn() + .mockImplementation(() => of(void 0)); + + return { ...defaults, indexPatterns, data }; +}; + +const setupEmbeddableFactory = ( + services: DashboardAppServices, + id: string +): SetupEmbeddableFactoryReturn => { + const coreStart = coreMock.createStart(); + const containerOptions = ({ + notifications: services.core.notifications, + savedObjectMetaData: {} as unknown, + ExitFullScreenButton: () => null, + embeddable: services.embeddable, + uiSettings: services.uiSettings, + SavedObjectFinder: () => null, + overlays: coreStart.overlays, + application: {} as unknown, + inspector: {} as unknown, + uiActions: {} as unknown, + http: coreStart.http, + } as unknown) as DashboardContainerServices; + + const dashboardContainer = new DashboardContainer( + { ...getSampleDashboardInput(), id }, + containerOptions + ); + const deferEmbeddableCreate = defer(); + services.embeddable.getEmbeddableFactory = jest.fn().mockImplementation( + () => + (({ + create: () => deferEmbeddableCreate.promise, + } as unknown) as EmbeddableFactory) + ); + const dashboardDestroySpy = jest.spyOn(dashboardContainer, 'destroy'); + + return { + dashboardContainer, + dashboardDestroySpy, + finalizeEmbeddableCreation: () => { + act(() => { + deferEmbeddableCreate.resolve(dashboardContainer); + }); + }, + }; +}; + +const renderDashboardAppStateHook = ({ + partialProps, + partialServices, +}: { + partialProps?: Partial; + partialServices?: Partial; +}): RenderDashboardStateHookReturn => { + const props = { ...createDashboardAppStateProps(), ...(partialProps ?? {}) }; + const services = { ...createDashboardAppStateServices(), ...(partialServices ?? {}) }; + const embeddableFactoryResult = setupEmbeddableFactory(services, originalDashboardEmbeddableId); + const renderHookResult = renderHook( + (replaceProps: Partial) => + useDashboardAppState({ ...props, ...replaceProps }), + { + wrapper: ({ children }) => ( + + {children} + + ), + } + ); + return { embeddableFactoryResult, renderHookResult, services, props }; +}; + +describe('Dashboard container lifecycle', () => { + test('Dashboard container is destroyed on unmount', async () => { + const { renderHookResult, embeddableFactoryResult } = renderDashboardAppStateHook({}); + embeddableFactoryResult.finalizeEmbeddableCreation(); + await renderHookResult.waitForNextUpdate(); + + expect(embeddableFactoryResult.dashboardContainer).toBe( + renderHookResult.result.current.dashboardContainer + ); + expect(embeddableFactoryResult.dashboardDestroySpy).not.toBeCalled(); + renderHookResult.unmount(); + expect(embeddableFactoryResult.dashboardDestroySpy).toBeCalled(); + }); + + test('Old dashboard container is destroyed when new dashboardId is given', async () => { + const { renderHookResult, embeddableFactoryResult, services } = renderDashboardAppStateHook({}); + const getResult = () => renderHookResult.result.current; + + // on initial render dashboard container is undefined + expect(getResult().dashboardContainer).toBeUndefined(); + embeddableFactoryResult.finalizeEmbeddableCreation(); + + await renderHookResult.waitForNextUpdate(); + expect(embeddableFactoryResult.dashboardContainer).toBe(getResult().dashboardContainer); + expect(embeddableFactoryResult.dashboardDestroySpy).not.toBeCalled(); + + const newDashboardId = 'wow_a_new_dashboard_id'; + const embeddableFactoryNew = setupEmbeddableFactory(services, newDashboardId); + renderHookResult.rerender({ savedDashboardId: newDashboardId }); + + embeddableFactoryNew.finalizeEmbeddableCreation(); + await renderHookResult.waitForNextUpdate(); + + expect(embeddableFactoryNew.dashboardContainer).toEqual(getResult().dashboardContainer); + expect(embeddableFactoryNew.dashboardDestroySpy).not.toBeCalled(); + expect(embeddableFactoryResult.dashboardDestroySpy).toBeCalled(); + }); + + test('Dashboard container is destroyed if dashboard id is changed before container is resolved', async () => { + const { renderHookResult, embeddableFactoryResult, services } = renderDashboardAppStateHook({}); + const getResult = () => renderHookResult.result.current; + + // on initial render dashboard container is undefined + expect(getResult().dashboardContainer).toBeUndefined(); + await act(() => Promise.resolve()); // wait for the original savedDashboard to be loaded... + + const newDashboardId = 'wow_a_new_dashboard_id'; + const embeddableFactoryNew = setupEmbeddableFactory(services, newDashboardId); + + renderHookResult.rerender({ savedDashboardId: newDashboardId }); + await act(() => Promise.resolve()); // wait for the new savedDashboard to be loaded... + embeddableFactoryNew.finalizeEmbeddableCreation(); + await renderHookResult.waitForNextUpdate(); + expect(embeddableFactoryNew.dashboardContainer).toBe(getResult().dashboardContainer); + expect(embeddableFactoryNew.dashboardDestroySpy).not.toBeCalled(); + + embeddableFactoryResult.finalizeEmbeddableCreation(); + await act(() => Promise.resolve()); // Can't use waitFor from hooks, because there is no hook update + expect(embeddableFactoryNew.dashboardContainer).toBe(getResult().dashboardContainer); + expect(embeddableFactoryNew.dashboardDestroySpy).not.toBeCalled(); + expect(embeddableFactoryResult.dashboardDestroySpy).toBeCalled(); + }); +}); + +describe('Dashboard initial state', () => { + it('Extracts state from Dashboard Saved Object', async () => { + const { renderHookResult, embeddableFactoryResult } = renderDashboardAppStateHook({}); + const getResult = () => renderHookResult.result.current; + + // saved dashboard isn't applied until after the dashboard embeddable has been created. + expect(getResult().savedDashboard).toBeUndefined(); + + embeddableFactoryResult.finalizeEmbeddableCreation(); + await renderHookResult.waitForNextUpdate(); + + expect(getResult().savedDashboard).toBeDefined(); + expect(getResult().savedDashboard?.title).toEqual( + getResult().getLatestDashboardState?.().title + ); + }); + + it('Sets initial time range and filters from saved dashboard', async () => { + const savedDashboards = {} as SavedObjectLoader; + savedDashboards.get = jest.fn().mockImplementation((id?: string) => + Promise.resolve( + getSavedDashboardMock({ + getFilters: () => [({ meta: { test: 'filterMeTimbers' } } as unknown) as Filter], + timeRestore: true, + timeFrom: 'now-13d', + timeTo: 'now', + id, + }) + ) + ); + const partialServices: Partial = { savedDashboards }; + const { renderHookResult, embeddableFactoryResult, services } = renderDashboardAppStateHook({ + partialServices, + }); + const getResult = () => renderHookResult.result.current; + + embeddableFactoryResult.finalizeEmbeddableCreation(); + await renderHookResult.waitForNextUpdate(); + + expect(getResult().getLatestDashboardState?.().timeRestore).toEqual(true); + expect(services.data.query.timefilter.timefilter.setTime).toHaveBeenCalledWith({ + from: 'now-13d', + to: 'now', + }); + expect(services.data.query.filterManager.setAppFilters).toHaveBeenCalledWith([ + ({ meta: { test: 'filterMeTimbers' } } as unknown) as Filter, + ]); + }); + + it('Combines session state and URL state into initial state', async () => { + const dashboardSessionStorage = ({ + getState: jest + .fn() + .mockReturnValue({ viewMode: ViewMode.EDIT, description: 'this should be overwritten' }), + } as unknown) as DashboardSessionStorage; + const kbnUrlStateStorage = createKbnUrlStateStorage(); + kbnUrlStateStorage.set('_a', { description: 'with this' }); + const { renderHookResult, embeddableFactoryResult } = renderDashboardAppStateHook({ + partialProps: { kbnUrlStateStorage }, + partialServices: { dashboardSessionStorage }, + }); + const getResult = () => renderHookResult.result.current; + + embeddableFactoryResult.finalizeEmbeddableCreation(); + await renderHookResult.waitForNextUpdate(); + expect(getResult().getLatestDashboardState?.().description).toEqual('with this'); + expect(getResult().getLatestDashboardState?.().viewMode).toEqual(ViewMode.EDIT); + }); +}); + +describe('Dashboard state sync', () => { + let defaultDashboardAppStateHookResult: RenderDashboardStateHookReturn; + const getResult = () => defaultDashboardAppStateHookResult.renderHookResult.result.current; + + beforeEach(async () => { + DashboardConstants.CHANGE_APPLY_DEBOUNCE = 0; + DashboardConstants.CHANGE_CHECK_DEBOUNCE = 0; + defaultDashboardAppStateHookResult = renderDashboardAppStateHook({}); + defaultDashboardAppStateHookResult.embeddableFactoryResult.finalizeEmbeddableCreation(); + await defaultDashboardAppStateHookResult.renderHookResult.waitForNextUpdate(); + }); + + it('Updates Dashboard container input when state changes', async () => { + const { embeddableFactoryResult } = defaultDashboardAppStateHookResult; + embeddableFactoryResult.dashboardContainer.updateInput = jest.fn(); + act(() => { + dashboardStateStore.dispatch(setDescription('Well hello there new description')); + }); + await act(async () => { + await new Promise((resolve) => setTimeout(resolve, 3)); // So that $triggerDashboardRefresh.next is called + }); + expect(embeddableFactoryResult.dashboardContainer.updateInput).toHaveBeenCalledWith( + expect.objectContaining({ description: 'Well hello there new description' }) + ); + }); + + it('Updates state when dashboard container input changes', async () => { + const { embeddableFactoryResult } = defaultDashboardAppStateHookResult; + expect(getResult().getLatestDashboardState?.().fullScreenMode).toBe(false); + act(() => { + embeddableFactoryResult.dashboardContainer.updateInput({ + isFullScreenMode: true, + }); + }); + await act(() => Promise.resolve()); + expect(getResult().getLatestDashboardState?.().fullScreenMode).toBe(true); + }); + + it('pushes unsaved changes to the session storage', async () => { + const { services } = defaultDashboardAppStateHookResult; + expect(getResult().getLatestDashboardState?.().fullScreenMode).toBe(false); + act(() => { + dashboardStateStore.dispatch(setViewMode(ViewMode.EDIT)); // session storage is only populated in edit mode + dashboardStateStore.dispatch(setDescription('Wow an even cooler description.')); + }); + await act(async () => { + await new Promise((resolve) => setTimeout(resolve, 3)); + }); + expect(services.dashboardSessionStorage.setState).toHaveBeenCalledWith( + 'testDashboardId', + expect.objectContaining({ + description: 'Wow an even cooler description.', + viewMode: ViewMode.EDIT, + }) + ); + }); +}); diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.ts b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.ts new file mode 100644 index 00000000000000..e9a5275300ffe9 --- /dev/null +++ b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.ts @@ -0,0 +1,351 @@ +/* + * Copyright 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 _ from 'lodash'; +import { History } from 'history'; +import { debounceTime } from 'rxjs/operators'; +import { useCallback, useEffect, useMemo, useState } from 'react'; +import { BehaviorSubject, combineLatest, Subject } from 'rxjs'; + +import { DashboardConstants } from '../..'; +import { ViewMode } from '../../services/embeddable'; +import { useKibana } from '../../services/kibana_react'; +import { getNewDashboardTitle } from '../../dashboard_strings'; +import { IKbnUrlStateStorage } from '../../services/kibana_utils'; +import { setDashboardState, useDashboardDispatch, useDashboardSelector } from '../state'; +import { + DashboardBuildContext, + DashboardAppServices, + DashboardAppState, + DashboardRedirect, + DashboardState, +} from '../../types'; +import { + tryDestroyDashboardContainer, + syncDashboardContainerInput, + savedObjectToDashboardState, + syncDashboardIndexPatterns, + syncDashboardFilterState, + loadSavedDashboardState, + buildDashboardContainer, + loadDashboardUrlState, + diffDashboardState, + areTimeRangesEqual, +} from '../lib'; + +export interface UseDashboardStateProps { + history: History; + savedDashboardId?: string; + redirectTo: DashboardRedirect; + isEmbeddedExternally: boolean; + kbnUrlStateStorage: IKbnUrlStateStorage; +} + +export const useDashboardAppState = ({ + history, + redirectTo, + savedDashboardId, + kbnUrlStateStorage, + isEmbeddedExternally, +}: UseDashboardStateProps) => { + const dispatchDashboardStateChange = useDashboardDispatch(); + const dashboardState = useDashboardSelector((state) => state.dashboardStateReducer); + + /** + * Dashboard app state is the return value for this hook and contains interaction points that the rest of the app can use + * to read or manipulate dashboard state. + */ + const [dashboardAppState, setDashboardAppState] = useState(() => ({ + $onDashboardStateChange: new BehaviorSubject({} as DashboardState), + $triggerDashboardRefresh: new Subject<{ force?: boolean }>(), + })); + + /** + * Last saved state is diffed against the current dashboard state any time either changes. This is used to set the + * unsaved changes portion of the dashboardAppState. + */ + const [lastSavedState, setLastSavedState] = useState(); + const $onLastSavedStateChange = useMemo(() => new Subject(), []); + + /** + * Unpack services + */ + const services = useKibana().services; + const { + data, + core, + chrome, + embeddable, + indexPatterns, + usageCollection, + savedDashboards, + initializerContext, + savedObjectsTagging, + dashboardCapabilities, + dashboardSessionStorage, + } = services; + const { docTitle } = chrome; + const { notifications } = core; + const { query, search } = data; + const { getStateTransfer } = embeddable; + const { version: kibanaVersion } = initializerContext.env.packageInfo; + + /** + * This useEffect triggers when the dashboard ID changes, and is in charge of loading the saved dashboard, + * fetching the initial state, building the Dashboard Container embeddable, and setting up all state syncing. + */ + useEffect(() => { + // fetch incoming embeddable from state transfer service. + const incomingEmbeddable = getStateTransfer().getIncomingEmbeddablePackage( + DashboardConstants.DASHBOARDS_ID, + true + ); + + let canceled = false; + let onDestroy: () => void; + + /** + * The dashboard build context is a collection of all of the services and props required in subsequent steps to build the dashboard + * from the dashboardId. This build context doesn't contain any extrenuous services. + */ + const dashboardBuildContext: DashboardBuildContext = { + query, + search, + history, + embeddable, + indexPatterns, + notifications, + kibanaVersion, + savedDashboards, + kbnUrlStateStorage, + initializerContext, + isEmbeddedExternally, + dashboardCapabilities, + dispatchDashboardStateChange, + $checkForUnsavedChanges: new Subject(), + $onDashboardStateChange: dashboardAppState.$onDashboardStateChange, + $triggerDashboardRefresh: dashboardAppState.$triggerDashboardRefresh, + getLatestDashboardState: () => dashboardAppState.$onDashboardStateChange.value, + }; + + (async () => { + /** + * Load and unpack state from dashboard saved object. + */ + const loadSavedDashboardResult = await loadSavedDashboardState({ + ...dashboardBuildContext, + savedDashboardId, + }); + if (canceled || !loadSavedDashboardResult) return; + const { savedDashboard, savedDashboardState } = loadSavedDashboardResult; + + /** + * Combine initial state from the saved object, session storage, and URL, then dispatch it to Redux. + */ + const dashboardSessionStorageState = dashboardSessionStorage.getState(savedDashboardId) || {}; + const dashboardURLState = loadDashboardUrlState(dashboardBuildContext); + const initialDashboardState = { + ...savedDashboardState, + ...dashboardSessionStorageState, + ...dashboardURLState, + + // if there is an incoming embeddable, dashboard always needs to be in edit mode to receive it. + ...(incomingEmbeddable ? { viewMode: ViewMode.EDIT } : {}), + }; + dispatchDashboardStateChange(setDashboardState(initialDashboardState)); + + /** + * Start syncing dashboard state with the Query, Filters and Timepicker from the Query Service. + */ + const { applyFilters, stopSyncingDashboardFilterState } = syncDashboardFilterState({ + ...dashboardBuildContext, + initialDashboardState, + savedDashboard, + }); + + /** + * Build the dashboard container embeddable, and apply the incoming embeddable if it exists. + */ + const dashboardContainer = await buildDashboardContainer({ + ...dashboardBuildContext, + initialDashboardState, + incomingEmbeddable, + savedDashboard, + data, + }); + if (canceled || !dashboardContainer) { + tryDestroyDashboardContainer(dashboardContainer); + return; + } + + /** + * Start syncing index patterns between the Query Service and the Dashboard Container. + */ + const indexPatternsSubscription = syncDashboardIndexPatterns({ + dashboardContainer, + indexPatterns: dashboardBuildContext.indexPatterns, + onUpdateIndexPatterns: (newIndexPatterns) => + setDashboardAppState((s) => ({ ...s, indexPatterns: newIndexPatterns })), + }); + + /** + * Set up the two way syncing between the Dashboard Container and the Redux Store. + */ + const stopSyncingContainerInput = syncDashboardContainerInput({ + ...dashboardBuildContext, + dashboardContainer, + savedDashboard, + applyFilters, + }); + + /** + * Any time the redux state, or the last saved state changes, compare them, set the unsaved + * changes state, and and push the unsaved changes to session storage. + */ + const { timefilter } = dashboardBuildContext.query.timefilter; + const lastSavedSubscription = combineLatest([ + $onLastSavedStateChange, + dashboardAppState.$onDashboardStateChange, + dashboardBuildContext.$checkForUnsavedChanges, + ]) + .pipe(debounceTime(DashboardConstants.CHANGE_CHECK_DEBOUNCE)) + .subscribe((states) => { + const [lastSaved, current] = states; + const unsavedChanges = + current.viewMode === ViewMode.EDIT ? diffDashboardState(lastSaved, current) : {}; + + if (current.viewMode === ViewMode.EDIT) { + const savedTimeChanged = + lastSaved.timeRestore && + !areTimeRangesEqual( + { + from: savedDashboard?.timeFrom, + to: savedDashboard?.timeTo, + }, + timefilter.getTime() + ); + const hasUnsavedChanges = Object.keys(unsavedChanges).length > 0 || savedTimeChanged; + setDashboardAppState((s) => ({ ...s, hasUnsavedChanges })); + } + + unsavedChanges.viewMode = current.viewMode; // always push view mode into session store. + dashboardSessionStorage.setState(savedDashboardId, unsavedChanges); + }); + + /** + * initialize the last saved state, and build a callback which can be used to update + * the last saved state on save. + */ + setLastSavedState(savedDashboardState); + dashboardBuildContext.$checkForUnsavedChanges.next(); + const updateLastSavedState = () => { + setLastSavedState( + savedObjectToDashboardState({ + hideWriteControls: dashboardBuildContext.dashboardCapabilities.hideWriteControls, + version: dashboardBuildContext.kibanaVersion, + savedObjectsTagging, + usageCollection, + savedDashboard, + }) + ); + }; + + /** + * Apply changes to the dashboard app state, and set the document title + */ + docTitle.change(savedDashboardState.title || getNewDashboardTitle()); + setDashboardAppState((s) => ({ + ...s, + applyFilters, + savedDashboard, + dashboardContainer, + updateLastSavedState, + getLatestDashboardState: dashboardBuildContext.getLatestDashboardState, + })); + + onDestroy = () => { + stopSyncingContainerInput(); + stopSyncingDashboardFilterState(); + lastSavedSubscription.unsubscribe(); + indexPatternsSubscription.unsubscribe(); + tryDestroyDashboardContainer(dashboardContainer); + setDashboardAppState((state) => ({ + ...state, + dashboardContainer: undefined, + })); + }; + })(); + return () => { + canceled = true; + onDestroy?.(); + }; + }, [ + dashboardAppState.$triggerDashboardRefresh, + dashboardAppState.$onDashboardStateChange, + dispatchDashboardStateChange, + $onLastSavedStateChange, + dashboardSessionStorage, + dashboardCapabilities, + isEmbeddedExternally, + kbnUrlStateStorage, + savedObjectsTagging, + initializerContext, + savedDashboardId, + getStateTransfer, + savedDashboards, + usageCollection, + notifications, + indexPatterns, + kibanaVersion, + embeddable, + docTitle, + history, + search, + query, + data, + ]); + + /** + * rebuild reset to last saved state callback whenever last saved state changes + */ + const resetToLastSavedState = useCallback(() => { + if ( + !lastSavedState || + !dashboardAppState.savedDashboard || + !dashboardAppState.getLatestDashboardState + ) { + return; + } + + if (dashboardAppState.getLatestDashboardState().timeRestore) { + const { timefilter } = data.query.timefilter; + const { timeFrom: from, timeTo: to, refreshInterval } = dashboardAppState.savedDashboard; + if (from && to) timefilter.setTime({ from, to }); + if (refreshInterval) timefilter.setRefreshInterval(refreshInterval); + } + dispatchDashboardStateChange(setDashboardState(lastSavedState)); + }, [lastSavedState, dashboardAppState, data.query.timefilter, dispatchDashboardStateChange]); + + /** + * publish state to the state change observable when redux state changes + */ + useEffect(() => { + if (!dashboardState || Object.keys(dashboardState).length === 0) return; + dashboardAppState.$onDashboardStateChange.next(dashboardState); + }, [dashboardAppState.$onDashboardStateChange, dashboardState]); + + /** + * push last saved state to the state change observable when last saved state changes + */ + useEffect(() => { + if (!lastSavedState) return; + $onLastSavedStateChange.next(lastSavedState); + }, [$onLastSavedStateChange, lastSavedState]); + + return { ...dashboardAppState, resetToLastSavedState }; +}; diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_breadcrumbs.ts b/src/plugins/dashboard/public/application/hooks/use_dashboard_breadcrumbs.ts deleted file mode 100644 index 50465cc4ab58b2..00000000000000 --- a/src/plugins/dashboard/public/application/hooks/use_dashboard_breadcrumbs.ts +++ /dev/null @@ -1,53 +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 { useEffect } from 'react'; -import _ from 'lodash'; - -import { useKibana } from '../../services/kibana_react'; - -import { DashboardStateManager } from '../dashboard_state_manager'; -import { getDashboardBreadcrumb, getDashboardTitle } from '../../dashboard_strings'; -import { DashboardAppServices, DashboardRedirect } from '../types'; - -export const useDashboardBreadcrumbs = ( - dashboardStateManager: DashboardStateManager | null, - redirectTo: DashboardRedirect -) => { - const { data, core, chrome } = useKibana().services; - - // Destructure and rename services; makes the Effect hook more specific, makes later - // abstraction of service dependencies easier. - const { setBreadcrumbs } = chrome; - const { timefilter } = data.query.timefilter; - const { openConfirm } = core.overlays; - - // Sync breadcrumbs when Dashboard State Manager changes - useEffect(() => { - if (!dashboardStateManager) { - return; - } - - setBreadcrumbs([ - { - text: getDashboardBreadcrumb(), - 'data-test-subj': 'dashboardListingBreadcrumb', - onClick: () => { - redirectTo({ destination: 'listing' }); - }, - }, - { - text: getDashboardTitle( - dashboardStateManager.getTitle(), - dashboardStateManager.getViewMode(), - dashboardStateManager.isNew() - ), - }, - ]); - }, [dashboardStateManager, timefilter, openConfirm, redirectTo, setBreadcrumbs]); -}; diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_container.test.tsx b/src/plugins/dashboard/public/application/hooks/use_dashboard_container.test.tsx deleted file mode 100644 index 196af9a171dd8b..00000000000000 --- a/src/plugins/dashboard/public/application/hooks/use_dashboard_container.test.tsx +++ /dev/null @@ -1,199 +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 { useDashboardContainer } from './use_dashboard_container'; -import { renderHook, act } from '@testing-library/react-hooks'; -import { KibanaContextProvider } from '../../../../kibana_react/public'; -import React from 'react'; -import { DashboardStateManager } from '../dashboard_state_manager'; -import { getSavedDashboardMock } from '../test_helpers'; -import { createKbnUrlStateStorage, defer } from '../../../../kibana_utils/public'; -import { createBrowserHistory } from 'history'; -import { dataPluginMock } from '../../../../data/public/mocks'; -import { embeddablePluginMock } from '../../../../embeddable/public/mocks'; -import { DashboardAppCapabilities } from '../types'; -import { EmbeddableFactory } from '../../../../embeddable/public'; -import { HelloWorldEmbeddable } from '../../../../embeddable/public/tests/fixtures'; -import { DashboardContainer } from '../embeddable'; -import { coreMock } from 'src/core/public/mocks'; - -const savedDashboard = getSavedDashboardMock(); - -// TS is *very* picky with type guards / predicates. can't just use jest.fn() -function mockHasTaggingCapabilities(obj: any): obj is any { - return false; -} - -const history = createBrowserHistory(); -const createDashboardState = () => - new DashboardStateManager({ - savedDashboard, - kibanaVersion: '7.0.0', - hideWriteControls: false, - allowByValueEmbeddables: false, - history: createBrowserHistory(), - hasPendingEmbeddable: () => false, - kbnUrlStateStorage: createKbnUrlStateStorage(), - hasTaggingCapabilities: mockHasTaggingCapabilities, - toasts: coreMock.createStart().notifications.toasts, - }); - -const defaultCapabilities: DashboardAppCapabilities = { - show: false, - createNew: false, - saveQuery: false, - createShortUrl: false, - hideWriteControls: true, - mapsCapabilities: { save: false }, - visualizeCapabilities: { save: false }, - storeSearchSession: true, -}; - -const getIncomingEmbeddable = () => undefined; - -const services = { - dashboardCapabilities: defaultCapabilities, - data: dataPluginMock.createStartContract(), - embeddable: embeddablePluginMock.createStartContract(), - scopedHistory: history, -}; - -const setupEmbeddableFactory = () => { - const embeddable = new HelloWorldEmbeddable({ id: 'id' }); - const deferEmbeddableCreate = defer(); - services.embeddable.getEmbeddableFactory.mockImplementation( - () => - (({ - create: () => deferEmbeddableCreate.promise, - } as unknown) as EmbeddableFactory) - ); - const destroySpy = jest.spyOn(embeddable, 'destroy'); - - return { - destroySpy, - embeddable, - createEmbeddable: () => { - act(() => { - deferEmbeddableCreate.resolve(embeddable); - }); - }, - }; -}; - -test('container is destroyed on unmount', async () => { - const { createEmbeddable, destroySpy, embeddable } = setupEmbeddableFactory(); - - const dashboardStateManager = createDashboardState(); - const { result, unmount, waitForNextUpdate } = renderHook( - () => - useDashboardContainer({ - getIncomingEmbeddable, - dashboardStateManager, - history, - }), - { - wrapper: ({ children }) => ( - {children} - ), - } - ); - - expect(result.current).toBeNull(); // null on initial render - - createEmbeddable(); - - await waitForNextUpdate(); - - expect(embeddable).toBe(result.current); - expect(destroySpy).not.toBeCalled(); - - unmount(); - - expect(destroySpy).toBeCalled(); -}); - -test('old container is destroyed on new dashboardStateManager', async () => { - const embeddableFactoryOld = setupEmbeddableFactory(); - - const { result, waitForNextUpdate, rerender } = renderHook< - DashboardStateManager, - DashboardContainer | null - >( - (dashboardStateManager) => - useDashboardContainer({ - getIncomingEmbeddable, - dashboardStateManager, - history, - }), - { - wrapper: ({ children }) => ( - {children} - ), - initialProps: createDashboardState(), - } - ); - - expect(result.current).toBeNull(); // null on initial render - - embeddableFactoryOld.createEmbeddable(); - - await waitForNextUpdate(); - - expect(embeddableFactoryOld.embeddable).toBe(result.current); - expect(embeddableFactoryOld.destroySpy).not.toBeCalled(); - - const embeddableFactoryNew = setupEmbeddableFactory(); - rerender(createDashboardState()); - - embeddableFactoryNew.createEmbeddable(); - - await waitForNextUpdate(); - - expect(embeddableFactoryNew.embeddable).toBe(result.current); - - expect(embeddableFactoryNew.destroySpy).not.toBeCalled(); - expect(embeddableFactoryOld.destroySpy).toBeCalled(); -}); - -test('destroyed if rerendered before resolved', async () => { - const embeddableFactoryOld = setupEmbeddableFactory(); - - const { result, waitForNextUpdate, rerender } = renderHook< - DashboardStateManager, - DashboardContainer | null - >( - (dashboardStateManager) => - useDashboardContainer({ - getIncomingEmbeddable, - dashboardStateManager, - history, - }), - { - wrapper: ({ children }) => ( - {children} - ), - initialProps: createDashboardState(), - } - ); - - expect(result.current).toBeNull(); // null on initial render - - const embeddableFactoryNew = setupEmbeddableFactory(); - rerender(createDashboardState()); - embeddableFactoryNew.createEmbeddable(); - await waitForNextUpdate(); - expect(embeddableFactoryNew.embeddable).toBe(result.current); - expect(embeddableFactoryNew.destroySpy).not.toBeCalled(); - - embeddableFactoryOld.createEmbeddable(); - - await act(() => Promise.resolve()); // Can't use waitFor from hooks, because there is no hook update - expect(embeddableFactoryNew.embeddable).toBe(result.current); - expect(embeddableFactoryNew.destroySpy).not.toBeCalled(); - expect(embeddableFactoryOld.destroySpy).toBeCalled(); -}); diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_container.ts b/src/plugins/dashboard/public/application/hooks/use_dashboard_container.ts deleted file mode 100644 index d715fb70ec91a8..00000000000000 --- a/src/plugins/dashboard/public/application/hooks/use_dashboard_container.ts +++ /dev/null @@ -1,169 +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 { useEffect, useState } from 'react'; -import { History } from 'history'; - -import { useKibana } from '../../services/kibana_react'; -import { - ContainerOutput, - EmbeddableFactoryNotFoundError, - EmbeddableInput, - EmbeddablePackageState, - ErrorEmbeddable, - isErrorEmbeddable, - ViewMode, -} from '../../services/embeddable'; - -import { DashboardStateManager } from '../dashboard_state_manager'; -import { getDashboardContainerInput, getSearchSessionIdFromURL } from '../dashboard_app_functions'; -import { DashboardContainer, DashboardContainerInput } from '../..'; -import { DashboardAppServices } from '../types'; -import { DASHBOARD_CONTAINER_TYPE } from '..'; -import { TimefilterContract } from '../../services/data'; - -export const useDashboardContainer = ({ - history, - timeFilter, - setUnsavedChanges, - getIncomingEmbeddable, - dashboardStateManager, - isEmbeddedExternally, -}: { - history: History; - isEmbeddedExternally?: boolean; - timeFilter?: TimefilterContract; - setUnsavedChanges?: (dirty: boolean) => void; - dashboardStateManager: DashboardStateManager | null; - getIncomingEmbeddable: (removeAfterFetch?: boolean) => EmbeddablePackageState | undefined; -}) => { - const { - dashboardCapabilities, - data, - embeddable, - scopedHistory, - } = useKibana().services; - - // Destructure and rename services; makes the Effect hook more specific, makes later - // abstraction of service dependencies easier. - const { query } = data; - const { session: searchSession } = data.search; - - const [dashboardContainer, setDashboardContainer] = useState(null); - - useEffect(() => { - if (!dashboardStateManager) { - return; - } - - // Load dashboard container - const dashboardFactory = embeddable.getEmbeddableFactory< - DashboardContainerInput, - ContainerOutput, - DashboardContainer - >(DASHBOARD_CONTAINER_TYPE); - - if (!dashboardFactory) { - throw new EmbeddableFactoryNotFoundError( - 'dashboard app requires dashboard embeddable factory' - ); - } - - const searchSessionIdFromURL = getSearchSessionIdFromURL(history); - - if (searchSessionIdFromURL) { - searchSession.restore(searchSessionIdFromURL); - } - - const incomingEmbeddable = getIncomingEmbeddable(true); - - let canceled = false; - let pendingContainer: DashboardContainer | ErrorEmbeddable | null | undefined; - (async function createContainer() { - const existingSession = searchSession.getSessionId(); - pendingContainer = await dashboardFactory.create( - getDashboardContainerInput({ - isEmbeddedExternally: Boolean(isEmbeddedExternally), - dashboardCapabilities, - dashboardStateManager, - incomingEmbeddable, - query, - searchSessionId: - searchSessionIdFromURL ?? - (existingSession && incomingEmbeddable ? existingSession : searchSession.start()), - }) - ); - - // already new container is being created - // no longer interested in the pending one - if (canceled) { - try { - pendingContainer?.destroy(); - pendingContainer = null; - } catch (e) { - // destroy could throw if something has already destroyed the container - // eslint-disable-next-line no-console - console.warn(e); - } - - return; - } - - if (!pendingContainer || isErrorEmbeddable(pendingContainer)) { - return; - } - - // inject switch view mode callback for the empty screen to use - pendingContainer.switchViewMode = (newViewMode: ViewMode) => - dashboardStateManager.switchViewMode(newViewMode); - - // If the incoming embeddable is newly created, or doesn't exist in the current panels list, - // add it with `addNewEmbeddable` - if ( - incomingEmbeddable && - (!incomingEmbeddable?.embeddableId || - (incomingEmbeddable.embeddableId && - !pendingContainer.getInput().panels[incomingEmbeddable.embeddableId])) - ) { - pendingContainer.addNewEmbeddable( - incomingEmbeddable.type, - incomingEmbeddable.input - ); - } - setDashboardContainer(pendingContainer); - setUnsavedChanges?.(dashboardStateManager.getIsDirty(data.query.timefilter.timefilter)); - })(); - return () => { - canceled = true; - try { - pendingContainer?.destroy(); - } catch (e) { - // destroy could throw if something has already destroyed the container - // eslint-disable-next-line no-console - console.warn(e); - } - - setDashboardContainer(null); - }; - }, [ - data.query.timefilter.timefilter, - dashboardCapabilities, - dashboardStateManager, - getIncomingEmbeddable, - isEmbeddedExternally, - setUnsavedChanges, - searchSession, - scopedHistory, - timeFilter, - embeddable, - history, - query, - ]); - - return dashboardContainer; -}; diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts b/src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts deleted file mode 100644 index 72b43723f07fbf..00000000000000 --- a/src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts +++ /dev/null @@ -1,220 +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 { useEffect, useState } from 'react'; -import { History } from 'history'; -import _ from 'lodash'; -import { map } from 'rxjs/operators'; - -import { createKbnUrlStateStorage, withNotifyOnErrors } from '../../services/kibana_utils'; -import { useKibana } from '../../services/kibana_react'; -import { - connectToQueryState, - esFilters, - noSearchSessionStorageCapabilityMessage, - QueryState, - syncQueryStateWithUrl, -} from '../../services/data'; -import { SavedObject } from '../../services/saved_objects'; -import type { TagDecoratedSavedObject } from '../../services/saved_objects_tagging_oss'; - -import { DashboardSavedObject } from '../../saved_dashboards'; -import { migrateLegacyQuery } from '../lib/migrate_legacy_query'; -import { createSessionRestorationDataProvider } from '../lib/session_restoration'; -import { DashboardStateManager } from '../dashboard_state_manager'; -import { getDashboardTitle } from '../../dashboard_strings'; -import { DashboardAppServices } from '../types'; -import { EmbeddablePackageState, ViewMode } from '../../services/embeddable'; - -// TS is picky with type guards, we can't just inline `() => false` -function defaultTaggingGuard(_obj: SavedObject): _obj is TagDecoratedSavedObject { - return false; -} - -interface DashboardStateManagerReturn { - dashboardStateManager: DashboardStateManager | null; - viewMode: ViewMode | null; - setViewMode: (value: ViewMode) => void; -} - -export const useDashboardStateManager = ( - savedDashboard: DashboardSavedObject | null, - history: History, - getIncomingEmbeddable: () => EmbeddablePackageState | undefined -): DashboardStateManagerReturn => { - const { - data: dataPlugin, - core, - uiSettings, - usageCollection, - initializerContext, - savedObjectsTagging, - dashboardCapabilities, - dashboardPanelStorage, - allowByValueEmbeddables, - } = useKibana().services; - - // Destructure and rename services; makes the Effect hook more specific, makes later - // abstraction of service dependencies easier. - const { query: queryService } = dataPlugin; - const { session: searchSession } = dataPlugin.search; - const { filterManager, queryString: queryStringManager } = queryService; - const { timefilter } = queryService.timefilter; - const { toasts } = core.notifications; - const { hideWriteControls } = dashboardCapabilities; - const { version: kibanaVersion } = initializerContext.env.packageInfo; - - const [dashboardStateManager, setDashboardStateManager] = useState( - null - ); - const [viewMode, setViewMode] = useState(null); - - const hasTaggingCapabilities = savedObjectsTagging?.ui.hasTagDecoration || defaultTaggingGuard; - - useEffect(() => { - if (!savedDashboard) { - return; - } - - const kbnUrlStateStorage = createKbnUrlStateStorage({ - history, - useHash: uiSettings.get('state:storeInSessionStorage'), - ...withNotifyOnErrors(toasts), - }); - - const stateManager = new DashboardStateManager({ - hasPendingEmbeddable: () => Boolean(getIncomingEmbeddable()), - toasts: core.notifications.toasts, - hasTaggingCapabilities, - dashboardPanelStorage, - hideWriteControls, - history, - kbnUrlStateStorage, - kibanaVersion, - savedDashboard, - usageCollection, - allowByValueEmbeddables, - }); - - // sync initial app filters from state to filterManager - // if there is an existing similar global filter, then leave it as global - filterManager.setAppFilters(_.cloneDeep(stateManager.appState.filters)); - queryStringManager.setQuery(migrateLegacyQuery(stateManager.appState.query)); - - // setup syncing of app filters between appState and filterManager - const stopSyncingAppFilters = connectToQueryState( - queryService, - { - set: ({ filters, query }) => { - stateManager.setFilters(filters || []); - stateManager.setQuery(query || queryStringManager.getDefaultQuery()); - }, - get: () => ({ - filters: stateManager.appState.filters, - query: stateManager.getQuery(), - }), - state$: stateManager.appState$.pipe( - map((appState) => ({ - filters: appState.filters, - query: queryStringManager.formatQuery(appState.query), - })) - ), - }, - { - filters: esFilters.FilterStateStore.APP_STATE, - query: true, - } - ); - - // Apply initial filters to Dashboard State Manager - stateManager.applyFilters( - stateManager.getQuery() || queryStringManager.getDefaultQuery(), - filterManager.getFilters() - ); - - // The hash check is so we only update the time filter on dashboard open, not during - // normal cross app navigation. - if (stateManager.getIsTimeSavedWithDashboard()) { - const initialGlobalStateInUrl = kbnUrlStateStorage.get('_g'); - if (!initialGlobalStateInUrl?.time) { - stateManager.syncTimefilterWithDashboardTime(timefilter); - } - if (!initialGlobalStateInUrl?.refreshInterval) { - stateManager.syncTimefilterWithDashboardRefreshInterval(timefilter); - } - } - - // starts syncing `_g` portion of url with query services - // it is important to start this syncing after `dashboardStateManager.syncTimefilterWithDashboard(timefilter);` above is run, - // otherwise it will case redundant browser history records - const { stop: stopSyncingQueryServiceStateWithUrl } = syncQueryStateWithUrl( - queryService, - kbnUrlStateStorage - ); - - // starts syncing `_a` portion of url - stateManager.startStateSyncing(); - - const dashboardTitle = getDashboardTitle( - stateManager.getTitle(), - stateManager.getViewMode(), - stateManager.isNew() - ); - - searchSession.enableStorage( - createSessionRestorationDataProvider({ - data: dataPlugin, - getDashboardTitle: () => dashboardTitle, - getDashboardId: () => savedDashboard?.id || '', - getAppState: () => stateManager.getAppState(), - }), - { - isDisabled: () => - dashboardCapabilities.storeSearchSession - ? { disabled: false } - : { - disabled: true, - reasonText: noSearchSessionStorageCapabilityMessage, - }, - } - ); - - setDashboardStateManager(stateManager); - setViewMode(stateManager.getViewMode()); - - return () => { - stateManager?.destroy(); - setDashboardStateManager(null); - stopSyncingAppFilters(); - stopSyncingQueryServiceStateWithUrl(); - }; - }, [ - dataPlugin, - filterManager, - hasTaggingCapabilities, - initializerContext.config, - dashboardPanelStorage, - getIncomingEmbeddable, - hideWriteControls, - history, - kibanaVersion, - queryService, - queryStringManager, - savedDashboard, - searchSession, - timefilter, - toasts, - uiSettings, - usageCollection, - allowByValueEmbeddables, - core.notifications.toasts, - dashboardCapabilities.storeSearchSession, - ]); - - return { dashboardStateManager, viewMode, setViewMode }; -}; diff --git a/src/plugins/dashboard/public/application/hooks/use_saved_dashboard.ts b/src/plugins/dashboard/public/application/hooks/use_saved_dashboard.ts deleted file mode 100644 index 639bc830803a44..00000000000000 --- a/src/plugins/dashboard/public/application/hooks/use_saved_dashboard.ts +++ /dev/null @@ -1,66 +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 { useEffect, useState } from 'react'; -import { History } from 'history'; -import _ from 'lodash'; - -import { useKibana } from '../../services/kibana_react'; - -import { DashboardConstants } from '../..'; -import { DashboardSavedObject } from '../../saved_dashboards'; -import { getDashboard60Warning, getNewDashboardTitle } from '../../dashboard_strings'; -import { DashboardAppServices } from '../types'; - -export const useSavedDashboard = (savedDashboardId: string | undefined, history: History) => { - const { data, core, chrome, savedDashboards } = useKibana().services; - const [savedDashboard, setSavedDashboard] = useState(null); - - // Destructure and rename services; makes the Effect hook more specific, makes later - // abstraction of service dependencies easier. - const { indexPatterns } = data; - const { recentlyAccessed: recentlyAccessedPaths, docTitle } = chrome; - const { toasts } = core.notifications; - - useEffect(() => { - (async function loadSavedDashboard() { - if (savedDashboardId === 'create') { - history.replace({ - ...history.location, // preserve query, - pathname: DashboardConstants.CREATE_NEW_DASHBOARD_URL, - }); - - toasts.addWarning(getDashboard60Warning()); - return; - } - - await indexPatterns.ensureDefaultIndexPattern(); - - try { - const dashboard = (await savedDashboards.get(savedDashboardId)) as DashboardSavedObject; - docTitle.change(dashboard.title || getNewDashboardTitle()); - setSavedDashboard(dashboard); - } catch (error) { - // E.g. a corrupt or deleted dashboard - toasts.addDanger(error.message); - history.push(DashboardConstants.LANDING_PAGE_PATH); - } - })(); - return () => setSavedDashboard(null); - }, [ - toasts, - docTitle, - history, - indexPatterns, - recentlyAccessedPaths, - savedDashboardId, - savedDashboards, - ]); - - return savedDashboard; -}; diff --git a/src/plugins/dashboard/public/application/lib/build_dashboard_container.ts b/src/plugins/dashboard/public/application/lib/build_dashboard_container.ts new file mode 100644 index 00000000000000..cb8c5ac5745e4c --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/build_dashboard_container.ts @@ -0,0 +1,160 @@ +/* + * Copyright 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 _ from 'lodash'; +import { DashboardSavedObject } from '../../saved_dashboards'; +import { DashboardContainer, DASHBOARD_CONTAINER_TYPE } from '../embeddable'; +import { + DashboardBuildContext, + DashboardState, + DashboardContainerInput, + DashboardAppServices, +} from '../../types'; +import { + enableDashboardSearchSessions, + getSearchSessionIdFromURL, + stateToDashboardContainerInput, +} from '.'; +import { + ContainerOutput, + EmbeddableFactoryNotFoundError, + EmbeddableInput, + EmbeddablePackageState, + ErrorEmbeddable, + isErrorEmbeddable, +} from '../../services/embeddable'; + +type BuildDashboardContainerProps = DashboardBuildContext & { + data: DashboardAppServices['data']; // the whole data service is required here because it is required by getUrlGeneratorState + savedDashboard: DashboardSavedObject; + initialDashboardState: DashboardState; + incomingEmbeddable?: EmbeddablePackageState; +}; + +/** + * Builds the dashboard container and manages initial search session + */ +export const buildDashboardContainer = async ({ + getLatestDashboardState, + initialDashboardState, + isEmbeddedExternally, + dashboardCapabilities, + incomingEmbeddable, + savedDashboard, + kibanaVersion, + embeddable, + history, + data, +}: BuildDashboardContainerProps) => { + const { + search: { session }, + } = data; + + // set up search session + enableDashboardSearchSessions({ + data, + kibanaVersion, + savedDashboard, + initialDashboardState, + getLatestDashboardState, + canStoreSearchSession: dashboardCapabilities.storeSearchSession, + }); + const searchSessionIdFromURL = getSearchSessionIdFromURL(history); + if (searchSessionIdFromURL) { + session.restore(searchSessionIdFromURL); + } + + const dashboardFactory = embeddable.getEmbeddableFactory< + DashboardContainerInput, + ContainerOutput, + DashboardContainer + >(DASHBOARD_CONTAINER_TYPE); + + if (!dashboardFactory) { + throw new EmbeddableFactoryNotFoundError('dashboard app requires dashboard embeddable factory'); + } + + /** + * Use an existing session instead of starting a new one if there is a session already, and dashboard is being created with an incoming + * embeddable. + */ + const existingSession = session.getSessionId(); + const searchSessionId = + searchSessionIdFromURL ?? + (existingSession && incomingEmbeddable ? existingSession : session.start()); + + // Build the initial input for the dashboard container based on the dashboard state. + const initialInput = stateToDashboardContainerInput({ + isEmbeddedExternally: Boolean(isEmbeddedExternally), + dashboardState: initialDashboardState, + dashboardCapabilities, + incomingEmbeddable, + query: data.query, + searchSessionId, + savedDashboard, + }); + + /** + * Handle the Incoming Embeddable Part 1: + * If the incoming embeddable already exists e.g. if it has been edited by value, the incoming state for that panel needs to replace the + * state for the matching panel already in the dashboard. This needs to happen BEFORE the dashboard container is built, so that the panel + * retains the same placement. + */ + if (incomingEmbeddable?.embeddableId && initialInput.panels[incomingEmbeddable.embeddableId]) { + const originalPanelState = initialInput.panels[incomingEmbeddable.embeddableId]; + initialInput.panels = { + ...initialInput.panels, + [incomingEmbeddable.embeddableId]: { + gridData: originalPanelState.gridData, + type: incomingEmbeddable.type, + explicitInput: { + ...originalPanelState.explicitInput, + ...incomingEmbeddable.input, + id: incomingEmbeddable.embeddableId, + }, + }, + }; + } + + const dashboardContainer = await dashboardFactory.create(initialInput); + if (!dashboardContainer || isErrorEmbeddable(dashboardContainer)) { + tryDestroyDashboardContainer(dashboardContainer); + return; + } + + /** + * Handle the Incoming Embeddable Part 2: + * If the incoming embeddable is new, we can add it to the container using `addNewEmbeddable` after the container is created + * this lets the container handle the placement of it (using the default placement algorithm "top left most open space") + */ + if ( + incomingEmbeddable && + (!incomingEmbeddable?.embeddableId || + (incomingEmbeddable.embeddableId && + !dashboardContainer.getInput().panels[incomingEmbeddable.embeddableId])) + ) { + dashboardContainer.addNewEmbeddable( + incomingEmbeddable.type, + incomingEmbeddable.input + ); + } + + return dashboardContainer; +}; + +export const tryDestroyDashboardContainer = ( + container: DashboardContainer | ErrorEmbeddable | undefined +) => { + try { + container?.destroy(); + } catch (e) { + // destroy could throw if something has already destroyed the container + // eslint-disable-next-line no-console + console.warn(e); + } +}; diff --git a/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts b/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts new file mode 100644 index 00000000000000..ee2ec2bb14fe47 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts @@ -0,0 +1,143 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import _ from 'lodash'; +import { DashboardSavedObject } from '../../saved_dashboards'; +import { getTagsFromSavedDashboard, migrateAppState } from '.'; +import { EmbeddablePackageState, ViewMode } from '../../services/embeddable'; +import { + convertPanelStateToSavedDashboardPanel, + convertSavedDashboardPanelToPanelState, +} from '../../../common/embeddable/embeddable_saved_object_converters'; +import { + DashboardState, + RawDashboardState, + DashboardPanelMap, + SavedDashboardPanel, + DashboardAppServices, + DashboardContainerInput, + DashboardBuildContext, +} from '../../types'; + +interface SavedObjectToDashboardStateProps { + version: string; + hideWriteControls: boolean; + savedDashboard: DashboardSavedObject; + usageCollection: DashboardAppServices['usageCollection']; + savedObjectsTagging: DashboardAppServices['savedObjectsTagging']; +} + +interface StateToDashboardContainerInputProps { + searchSessionId?: string; + isEmbeddedExternally?: boolean; + dashboardState: DashboardState; + savedDashboard: DashboardSavedObject; + query: DashboardBuildContext['query']; + incomingEmbeddable?: EmbeddablePackageState; + dashboardCapabilities: DashboardBuildContext['dashboardCapabilities']; +} + +interface StateToRawDashboardStateProps { + version: string; + state: DashboardState; +} +/** + * Converts a dashboard saved object to a dashboard state by extracting raw state from the given Dashboard + * Saved Object migrating the panel states to the latest version, then converting each panel from a saved + * dashboard panel to a panel state. + */ +export const savedObjectToDashboardState = ({ + version, + hideWriteControls, + savedDashboard, + usageCollection, + savedObjectsTagging, +}: SavedObjectToDashboardStateProps): DashboardState => { + const rawState = migrateAppState( + { + fullScreenMode: false, + title: savedDashboard.title, + query: savedDashboard.getQuery(), + filters: savedDashboard.getFilters(), + timeRestore: savedDashboard.timeRestore, + description: savedDashboard.description || '', + tags: getTagsFromSavedDashboard(savedDashboard, savedObjectsTagging), + panels: savedDashboard.panelsJSON ? JSON.parse(savedDashboard.panelsJSON) : [], + viewMode: savedDashboard.id || hideWriteControls ? ViewMode.VIEW : ViewMode.EDIT, + options: savedDashboard.optionsJSON ? JSON.parse(savedDashboard.optionsJSON) : {}, + }, + version, + usageCollection + ); + + const panels: DashboardPanelMap = {}; + rawState.panels?.forEach((panel: SavedDashboardPanel) => { + panels[panel.panelIndex] = convertSavedDashboardPanelToPanelState(panel); + }); + return { ...rawState, panels }; +}; + +/** + * Converts a dashboard state object to dashboard container input + */ +export const stateToDashboardContainerInput = ({ + dashboardCapabilities, + isEmbeddedExternally, + query: queryService, + searchSessionId, + savedDashboard, + dashboardState, +}: StateToDashboardContainerInputProps): DashboardContainerInput => { + const { filterManager, timefilter: timefilterService } = queryService; + const { timefilter } = timefilterService; + + const { + expandedPanelId, + fullScreenMode, + description, + options, + viewMode, + panels, + query, + title, + } = dashboardState; + + return { + refreshConfig: timefilter.getRefreshInterval(), + filters: filterManager.getFilters(), + isFullScreenMode: fullScreenMode, + id: savedDashboard.id || '', + dashboardCapabilities, + isEmbeddedExternally, + ...(options || {}), + searchSessionId, + expandedPanelId, + description, + viewMode, + panels, + query, + title, + timeRange: { + ..._.cloneDeep(timefilter.getTime()), + }, + }; +}; + +/** + * Converts a given dashboard state object to raw dashboard state. This is useful for sharing, and session restoration, as + * they require panels to be formatted as an array. + */ +export const stateToRawDashboardState = ({ + version, + state, +}: StateToRawDashboardStateProps): RawDashboardState => { + const savedDashboardPanels = Object.values(state.panels).map((panel) => + convertPanelStateToSavedDashboardPanel(panel, version) + ); + return { ..._.omit(state, 'panels'), panels: savedDashboardPanels }; +}; diff --git a/src/plugins/dashboard/public/application/lib/dashboard_panel_storage.ts b/src/plugins/dashboard/public/application/lib/dashboard_panel_storage.ts deleted file mode 100644 index 02890f6aaa7904..00000000000000 --- a/src/plugins/dashboard/public/application/lib/dashboard_panel_storage.ts +++ /dev/null @@ -1,82 +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 { set } from '@elastic/safer-lodash-set'; -import { Storage } from '../../services/kibana_utils'; -import { NotificationsStart } from '../../services/core'; -import { panelStorageErrorStrings } from '../../dashboard_strings'; -import { SavedDashboardPanel } from '..'; - -export const DASHBOARD_PANELS_UNSAVED_ID = 'unsavedDashboard'; -const DASHBOARD_PANELS_SESSION_KEY = 'dashboardStateManagerPanels'; - -export class DashboardPanelStorage { - private sessionStorage: Storage; - - constructor(private toasts: NotificationsStart['toasts'], private activeSpaceId: string) { - this.sessionStorage = new Storage(sessionStorage); - } - - public clearPanels(id = DASHBOARD_PANELS_UNSAVED_ID) { - try { - const sessionStorage = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY); - const sessionStorageForSpace = sessionStorage?.[this.activeSpaceId] || {}; - if (sessionStorageForSpace[id]) { - delete sessionStorageForSpace[id]; - this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, sessionStorage); - } - } catch (e) { - this.toasts.addDanger({ - title: panelStorageErrorStrings.getPanelsClearError(e.message), - 'data-test-subj': 'dashboardPanelsClearFailure', - }); - } - } - - public getPanels(id = DASHBOARD_PANELS_UNSAVED_ID): SavedDashboardPanel[] | undefined { - try { - return this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId]?.[id]; - } catch (e) { - this.toasts.addDanger({ - title: panelStorageErrorStrings.getPanelsGetError(e.message), - 'data-test-subj': 'dashboardPanelsGetFailure', - }); - } - } - - public setPanels(id = DASHBOARD_PANELS_UNSAVED_ID, newPanels: SavedDashboardPanel[]) { - try { - const sessionStoragePanels = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY) || {}; - set(sessionStoragePanels, [this.activeSpaceId, id], newPanels); - this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, sessionStoragePanels); - } catch (e) { - this.toasts.addDanger({ - title: panelStorageErrorStrings.getPanelsSetError(e.message), - 'data-test-subj': 'dashboardPanelsSetFailure', - }); - } - } - - public getDashboardIdsWithUnsavedChanges() { - try { - return Object.keys( - this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId] || {} - ); - } catch (e) { - this.toasts.addDanger({ - title: panelStorageErrorStrings.getPanelsGetError(e.message), - 'data-test-subj': 'dashboardPanelsGetFailure', - }); - return []; - } - } - - public dashboardHasUnsavedEdits(id = DASHBOARD_PANELS_UNSAVED_ID) { - return this.getDashboardIdsWithUnsavedChanges().indexOf(id) !== -1; - } -} diff --git a/src/plugins/dashboard/public/application/lib/dashboard_session_restoration.ts b/src/plugins/dashboard/public/application/lib/dashboard_session_restoration.ts new file mode 100644 index 00000000000000..7dd2b53a581558 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/dashboard_session_restoration.ts @@ -0,0 +1,131 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { DashboardConstants } from '../..'; +import { DashboardState } from '../../types'; +import { getDashboardTitle } from '../../dashboard_strings'; +import { DashboardSavedObject } from '../../saved_dashboards'; +import { getQueryParams } from '../../services/kibana_utils'; +import { createQueryParamObservable } from '../../../../kibana_utils/public'; +import { DASHBOARD_APP_URL_GENERATOR, DashboardUrlGeneratorState } from '../../url_generator'; +import { + DataPublicPluginStart, + noSearchSessionStorageCapabilityMessage, +} from '../../services/data'; +import { stateToRawDashboardState } from './convert_dashboard_state'; + +export const getSearchSessionIdFromURL = (history: History): string | undefined => + getQueryParams(history.location)[DashboardConstants.SEARCH_SESSION_ID] as string | undefined; + +export const getSessionURLObservable = (history: History) => + createQueryParamObservable(history, DashboardConstants.SEARCH_SESSION_ID); + +export function createSessionRestorationDataProvider(deps: { + kibanaVersion: string; + data: DataPublicPluginStart; + getAppState: () => DashboardState; + getDashboardTitle: () => string; + getDashboardId: () => string; +}) { + return { + getName: async () => deps.getDashboardTitle(), + getUrlGeneratorData: async () => { + return { + urlGeneratorId: DASHBOARD_APP_URL_GENERATOR, + initialState: getUrlGeneratorState({ ...deps, shouldRestoreSearchSession: false }), + restoreState: getUrlGeneratorState({ ...deps, shouldRestoreSearchSession: true }), + }; + }, + }; +} + +/** + * Enables dashboard search sessions. + */ +export function enableDashboardSearchSessions({ + canStoreSearchSession, + initialDashboardState, + getLatestDashboardState, + savedDashboard, + kibanaVersion, + data, +}: { + kibanaVersion: string; + data: DataPublicPluginStart; + canStoreSearchSession: boolean; + savedDashboard: DashboardSavedObject; + initialDashboardState: DashboardState; + getLatestDashboardState: () => DashboardState; +}) { + const dashboardTitle = getDashboardTitle( + initialDashboardState.title, + initialDashboardState.viewMode, + !savedDashboard.id + ); + + data.search.session.enableStorage( + createSessionRestorationDataProvider({ + data, + kibanaVersion, + getDashboardTitle: () => dashboardTitle, + getDashboardId: () => savedDashboard?.id || '', + getAppState: getLatestDashboardState, + }), + { + isDisabled: () => + canStoreSearchSession + ? { disabled: false } + : { + disabled: true, + reasonText: noSearchSessionStorageCapabilityMessage, + }, + } + ); +} + +/** + * Fetches the state to store when a session is saved so that this dashboard can be recreated exactly + * as it was. + */ +function getUrlGeneratorState({ + data, + getAppState, + kibanaVersion, + getDashboardId, + shouldRestoreSearchSession, +}: { + kibanaVersion: string; + data: DataPublicPluginStart; + getAppState: () => DashboardState; + getDashboardId: () => string; + shouldRestoreSearchSession: boolean; +}): DashboardUrlGeneratorState { + const appState = stateToRawDashboardState({ state: getAppState(), version: kibanaVersion }); + const { filterManager, queryString } = data.query; + const { timefilter } = data.query.timefilter; + + return { + timeRange: shouldRestoreSearchSession ? timefilter.getAbsoluteTime() : timefilter.getTime(), + searchSessionId: shouldRestoreSearchSession ? data.search.session.getSessionId() : undefined, + panels: getDashboardId() ? undefined : appState.panels, + query: queryString.formatQuery(appState.query), + filters: filterManager.getFilters(), + savedQuery: appState.savedQuery, + dashboardId: getDashboardId(), + preserveSavedFilters: false, + viewMode: appState.viewMode, + useHash: false, + refreshInterval: shouldRestoreSearchSession + ? { + pause: true, // force pause refresh interval when restoring a session + value: 0, + } + : undefined, + }; +} diff --git a/src/plugins/dashboard/public/application/lib/dashboard_session_storage.ts b/src/plugins/dashboard/public/application/lib/dashboard_session_storage.ts new file mode 100644 index 00000000000000..7d0e60c0609a8e --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/dashboard_session_storage.ts @@ -0,0 +1,91 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { set } from '@elastic/safer-lodash-set'; +import { Storage } from '../../services/kibana_utils'; +import { NotificationsStart } from '../../services/core'; +import { panelStorageErrorStrings } from '../../dashboard_strings'; +import { DashboardState } from '../../types'; + +export const DASHBOARD_PANELS_UNSAVED_ID = 'unsavedDashboard'; +const DASHBOARD_PANELS_SESSION_KEY = 'dashboardStateManagerPanels'; + +export class DashboardSessionStorage { + private sessionStorage: Storage; + + constructor(private toasts: NotificationsStart['toasts'], private activeSpaceId: string) { + this.sessionStorage = new Storage(sessionStorage); + } + + public clearState(id = DASHBOARD_PANELS_UNSAVED_ID) { + try { + const sessionStorage = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY); + const sessionStorageForSpace = sessionStorage?.[this.activeSpaceId] || {}; + if (sessionStorageForSpace[id]) { + delete sessionStorageForSpace[id]; + this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, sessionStorage); + } + } catch (e) { + this.toasts.addDanger({ + title: panelStorageErrorStrings.getPanelsClearError(e.message), + 'data-test-subj': 'dashboardPanelsClearFailure', + }); + } + } + + public getState(id = DASHBOARD_PANELS_UNSAVED_ID): Partial | undefined { + try { + return this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId]?.[id]; + } catch (e) { + this.toasts.addDanger({ + title: panelStorageErrorStrings.getPanelsGetError(e.message), + 'data-test-subj': 'dashboardPanelsGetFailure', + }); + } + } + + public setState(id = DASHBOARD_PANELS_UNSAVED_ID, newState: Partial) { + try { + const sessionStateStorage = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY) || {}; + set(sessionStateStorage, [this.activeSpaceId, id], newState); + this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, sessionStateStorage); + } catch (e) { + this.toasts.addDanger({ + title: panelStorageErrorStrings.getPanelsSetError(e.message), + 'data-test-subj': 'dashboardPanelsSetFailure', + }); + } + } + + public getDashboardIdsWithUnsavedChanges() { + try { + const dashboardStatesInSpace = + this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId] || {}; + const dashboardsWithUnsavedChanges: string[] = []; + Object.keys(dashboardStatesInSpace).map((dashboardId) => { + if ( + Object.keys(dashboardStatesInSpace[dashboardId]).some( + (stateKey) => stateKey !== 'viewMode' + ) + ) + dashboardsWithUnsavedChanges.push(dashboardId); + }); + return dashboardsWithUnsavedChanges; + } catch (e) { + this.toasts.addDanger({ + title: panelStorageErrorStrings.getPanelsGetError(e.message), + 'data-test-subj': 'dashboardPanelsGetFailure', + }); + return []; + } + } + + public dashboardHasUnsavedEdits(id = DASHBOARD_PANELS_UNSAVED_ID) { + return this.getDashboardIdsWithUnsavedChanges().indexOf(id) !== -1; + } +} diff --git a/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts b/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts new file mode 100644 index 00000000000000..df2521044d1a3f --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { DashboardSavedObject } from '../..'; +import { SavedObject } from '../../services/saved_objects'; +import { SavedObjectsTaggingApi } from '../../services/saved_objects_tagging_oss'; +import type { TagDecoratedSavedObject } from '../../services/saved_objects_tagging_oss'; + +// TS is picky with type guards, we can't just inline `() => false` +function defaultTaggingGuard(_obj: SavedObject): _obj is TagDecoratedSavedObject { + return false; +} + +export const getTagsFromSavedDashboard = ( + savedDashboard: DashboardSavedObject, + api?: SavedObjectsTaggingApi +) => { + const hasTaggingCapabilities = getHasTaggingCapabilitiesGuard(api); + return hasTaggingCapabilities(savedDashboard) ? savedDashboard.getTags() : []; +}; + +export const getHasTaggingCapabilitiesGuard = (api?: SavedObjectsTaggingApi) => + api?.ui.hasTagDecoration || defaultTaggingGuard; diff --git a/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts b/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts new file mode 100644 index 00000000000000..b1abba44891fcf --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts @@ -0,0 +1,129 @@ +/* + * Copyright 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 _ from 'lodash'; +import { DashboardPanelState } from '..'; +import { esFilters, Filter } from '../../services/data'; +import { + DashboardContainerInput, + DashboardOptions, + DashboardPanelMap, + DashboardState, +} from '../../types'; + +interface DashboardDiffCommon { + [key: string]: unknown; +} + +type DashboardDiffCommonFilters = DashboardDiffCommon & { filters: Filter[] }; + +export const diffDashboardContainerInput = ( + originalInput: DashboardContainerInput, + newInput: DashboardContainerInput +) => { + return commonDiffFilters( + (originalInput as unknown) as DashboardDiffCommonFilters, + (newInput as unknown) as DashboardDiffCommonFilters, + ['searchSessionId', 'lastReloadRequestTime'] + ); +}; + +export const diffDashboardState = ( + original: DashboardState, + newState: DashboardState +): Partial => { + const common = commonDiffFilters( + (original as unknown) as DashboardDiffCommonFilters, + (newState as unknown) as DashboardDiffCommonFilters, + ['viewMode', 'panels', 'options', 'savedQuery', 'expandedPanelId'], + true + ); + + return { + ...common, + ...(panelsAreEqual(original.panels, newState.panels) ? {} : { panels: newState.panels }), + ...(optionsAreEqual(original.options, newState.options) ? {} : { options: newState.options }), + }; +}; + +const optionsAreEqual = (optionsA: DashboardOptions, optionsB: DashboardOptions): boolean => { + const optionKeys = [...Object.keys(optionsA), ...Object.keys(optionsB)]; + for (const key of optionKeys) { + if ( + Boolean(((optionsA as unknown) as { [key: string]: boolean })[key]) !== + Boolean(((optionsB as unknown) as { [key: string]: boolean })[key]) + ) { + return false; + } + } + return true; +}; + +const panelsAreEqual = (panelsA: DashboardPanelMap, panelsB: DashboardPanelMap): boolean => { + const embeddableIdsA = Object.keys(panelsA); + const embeddableIdsB = Object.keys(panelsB); + if ( + embeddableIdsA.length !== embeddableIdsB.length || + _.xor(embeddableIdsA, embeddableIdsB).length > 0 + ) { + return false; + } + // embeddable ids are equal so let's compare individual panels. + for (const id of embeddableIdsA) { + if ( + Object.keys( + commonDiff( + (panelsA[id] as unknown) as DashboardDiffCommon, + (panelsB[id] as unknown) as DashboardDiffCommon, + ['panelRefName'] + ) + ).length > 0 + ) { + return false; + } + } + + return true; +}; + +const commonDiffFilters = ( + originalObj: DashboardDiffCommonFilters, + newObj: DashboardDiffCommonFilters, + omitKeys: string[], + ignorePinned?: boolean +): Partial => { + const filtersAreDifferent = () => + !esFilters.compareFilters( + originalObj.filters, + ignorePinned ? newObj.filters.filter((f) => !esFilters.isFilterPinned(f)) : newObj.filters, + esFilters.COMPARE_ALL_OPTIONS + ); + const otherDifferences = commonDiff(originalObj, newObj, [...omitKeys, 'filters']); + return _.cloneDeep({ + ...otherDifferences, + ...(filtersAreDifferent() ? { filters: newObj.filters } : {}), + }); +}; + +const commonDiff = ( + originalObj: DashboardDiffCommon, + newObj: DashboardDiffCommon, + omitKeys: string[] +) => { + const differences: Partial = {}; + const keys = [...Object.keys(originalObj), ...Object.keys(newObj)].filter( + (key) => !omitKeys.includes(key) + ); + keys.forEach((key) => { + if (key === undefined) return; + if (!_.isEqual(originalObj[key], newObj[key])) { + (differences as { [key: string]: unknown })[key] = newObj[key]; + } + }); + return differences; +}; diff --git a/src/plugins/dashboard/public/application/lib/filter_utils.ts b/src/plugins/dashboard/public/application/lib/filter_utils.ts index 83dd036285a512..51acc4676c5433 100644 --- a/src/plugins/dashboard/public/application/lib/filter_utils.ts +++ b/src/plugins/dashboard/public/application/lib/filter_utils.ts @@ -8,59 +8,68 @@ import _ from 'lodash'; import moment, { Moment } from 'moment'; -import { Filter } from '../../services/data'; +import { Optional } from '@kbn/utility-types'; + +import { Filter, TimeRange } from '../../services/data'; + +type TimeRangeCompare = Optional; /** - * @typedef {Object} QueryFilter - * @property query_string {Object} - * @property query_string.query {String} + * Converts the time to a utc formatted string. If the time is not valid (e.g. it might be in a relative format like + * 'now-15m', then it just returns what it was passed). + * @param time {string|Moment} + * @returns the time represented in utc format, or if the time range was not able to be parsed into a moment + * object, it returns the same object it was given. */ - -export class FilterUtils { - /** - * Converts the time to a utc formatted string. If the time is not valid (e.g. it might be in a relative format like - * 'now-15m', then it just returns what it was passed). - * @param time {string|Moment} - * @returns the time represented in utc format, or if the time range was not able to be parsed into a moment - * object, it returns the same object it was given. - */ - public static convertTimeToUTCString(time?: string | Moment): undefined | string { - if (moment(time).isValid()) { - return moment(time).utc().format('YYYY-MM-DDTHH:mm:ss.SSS[Z]'); - } else { - // If it's not a valid moment date, then it should be a string representing a relative time - // like 'now' or 'now-15m'. - return time as string; - } +export const convertTimeToUTCString = (time?: string | Moment): undefined | string => { + if (moment(time).isValid()) { + return moment(time).utc().format('YYYY-MM-DDTHH:mm:ss.SSS[Z]'); + } else { + // If it's not a valid moment date, then it should be a string representing a relative time + // like 'now' or 'now-15m'. + return time as string; } +}; - /** - * Compares the two times, making sure they are in both compared in string format. Absolute times - * are sometimes stored as moment objects, but converted to strings when reloaded. Relative times are - * strings that are not convertible to moment objects. - * @param timeA {string|Moment} - * @param timeB {string|Moment} - * @returns {boolean} - */ - public static areTimesEqual(timeA?: string | Moment, timeB?: string | Moment) { - return this.convertTimeToUTCString(timeA) === this.convertTimeToUTCString(timeB); - } +export const areTimeRangesEqual = (rangeA: TimeRangeCompare, rangeB: TimeRangeCompare): boolean => { + return areTimesEqual(rangeA.from, rangeB.from) && areTimesEqual(rangeA.to, rangeB.to); +}; - /** - * Depending on how a dashboard is loaded, the filter object may contain a $$hashKey and $state that will throw - * off a filter comparison. This removes those variables. - * @param filters {Array.} - * @returns {Array.} - */ - public static cleanFiltersForComparison(filters: Filter[]) { - return _.map(filters, (filter) => { - const f: Partial = _.omit(filter, ['$$hashKey', '$state']); - if (f.meta) { - // f.meta.value is the value displayed in the filter bar. - // It may also be loaded differently and shouldn't be used in this comparison. - return _.omit(f.meta, ['value']); - } - return f; - }); - } -} +/** + * Compares the two times, making sure they are in both compared in string format. Absolute times + * are sometimes stored as moment objects, but converted to strings when reloaded. Relative times are + * strings that are not convertible to moment objects. + * @param timeA {string|Moment} + * @param timeB {string|Moment} + * @returns {boolean} + */ +export const areTimesEqual = (timeA?: string | Moment, timeB?: string | Moment) => { + return convertTimeToUTCString(timeA) === convertTimeToUTCString(timeB); +}; + +/** + * Depending on how a dashboard is loaded, the filter object may contain a $$hashKey and $state that will throw + * off a filter comparison. This removes those variables. + * @param filters {Array.} + * @returns {Array.} + */ +export const cleanFiltersForComparison = (filters: Filter[]) => { + return _.map(filters, (filter) => { + const f: Partial = _.omit(filter, ['$$hashKey', '$state']); + if (f.meta) { + // f.meta.value is the value displayed in the filter bar. + // It may also be loaded differently and shouldn't be used in this comparison. + return _.omit(f.meta, ['value']); + } + return f; + }); +}; + +export const cleanFiltersForSerialize = (filters: Filter[]): Filter[] => { + return filters.map((filter) => { + if (filter.meta.value) { + delete filter.meta.value; + } + return filter; + }); +}; diff --git a/src/plugins/dashboard/public/application/lib/get_app_state_defaults.ts b/src/plugins/dashboard/public/application/lib/get_app_state_defaults.ts deleted file mode 100644 index d8d335317c2b23..00000000000000 --- a/src/plugins/dashboard/public/application/lib/get_app_state_defaults.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 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 { SavedObjectTagDecoratorTypeGuard } from '../../services/saved_objects_tagging_oss'; -import { ViewMode } from '../../services/embeddable'; -import { DashboardSavedObject } from '../../saved_dashboards'; -import { DashboardAppStateDefaults } from '../../types'; - -export function getAppStateDefaults( - viewMode: ViewMode, - savedDashboard: DashboardSavedObject, - hasTaggingCapabilities: SavedObjectTagDecoratorTypeGuard -): DashboardAppStateDefaults { - return { - fullScreenMode: false, - title: savedDashboard.title, - description: savedDashboard.description || '', - tags: hasTaggingCapabilities(savedDashboard) ? savedDashboard.getTags() : [], - timeRestore: savedDashboard.timeRestore, - panels: savedDashboard.panelsJSON ? JSON.parse(savedDashboard.panelsJSON) : [], - options: savedDashboard.optionsJSON ? JSON.parse(savedDashboard.optionsJSON) : {}, - query: savedDashboard.getQuery(), - filters: savedDashboard.getFilters(), - viewMode, - }; -} diff --git a/src/plugins/dashboard/public/application/lib/index.ts b/src/plugins/dashboard/public/application/lib/index.ts index f457589c7588ea..937c1d2a77c06b 100644 --- a/src/plugins/dashboard/public/application/lib/index.ts +++ b/src/plugins/dashboard/public/application/lib/index.ts @@ -6,11 +6,28 @@ * Side Public License, v 1. */ +export * from './filter_utils'; +export { getDashboardIdFromUrl } from './url'; export { saveDashboard } from './save_dashboard'; -export { getAppStateDefaults } from './get_app_state_defaults'; export { migrateAppState } from './migrate_app_state'; -export { getDashboardIdFromUrl } from './url'; -export { createSessionRestorationDataProvider } from './session_restoration'; export { addHelpMenuToAppChrome } from './help_menu_util'; +export { getTagsFromSavedDashboard } from './dashboard_tagging'; +export { loadDashboardUrlState } from './load_dashboard_url_state'; +export { DashboardSessionStorage } from './dashboard_session_storage'; +export { loadSavedDashboardState } from './load_saved_dashboard_state'; export { attemptLoadDashboardByTitle } from './load_dashboard_by_title'; -export { DashboardPanelStorage } from './dashboard_panel_storage'; +export { syncDashboardFilterState } from './sync_dashboard_filter_state'; +export { syncDashboardIndexPatterns } from './sync_dashboard_index_patterns'; +export { syncDashboardContainerInput } from './sync_dashboard_container_input'; +export { diffDashboardContainerInput, diffDashboardState } from './diff_dashboard_state'; +export { buildDashboardContainer, tryDestroyDashboardContainer } from './build_dashboard_container'; +export { + stateToDashboardContainerInput, + savedObjectToDashboardState, +} from './convert_dashboard_state'; +export { + createSessionRestorationDataProvider, + enableDashboardSearchSessions, + getSearchSessionIdFromURL, + getSessionURLObservable, +} from './dashboard_session_restoration'; diff --git a/src/plugins/dashboard/public/application/lib/load_dashboard_url_state.ts b/src/plugins/dashboard/public/application/lib/load_dashboard_url_state.ts new file mode 100644 index 00000000000000..efff2ba6bc0870 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/load_dashboard_url_state.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 _ from 'lodash'; + +import { migrateAppState } from '.'; +import { replaceUrlHashQuery } from '../../../../kibana_utils/public'; +import { DASHBOARD_STATE_STORAGE_KEY } from '../../dashboard_constants'; +import { convertSavedDashboardPanelToPanelState } from '../../../common/embeddable/embeddable_saved_object_converters'; +import { + DashboardBuildContext, + DashboardPanelMap, + DashboardState, + RawDashboardState, + SavedDashboardPanel, +} from '../../types'; +import { migrateLegacyQuery } from './migrate_legacy_query'; + +/** + * Loads any dashboard state from the URL, and removes the state from the URL. + */ +export const loadDashboardUrlState = ({ + kibanaVersion, + usageCollection, + kbnUrlStateStorage, +}: DashboardBuildContext): Partial => { + const rawAppStateInUrl = kbnUrlStateStorage.get(DASHBOARD_STATE_STORAGE_KEY); + if (!rawAppStateInUrl) return {}; + + const panelsMap: DashboardPanelMap = {}; + if (rawAppStateInUrl.panels && rawAppStateInUrl.panels.length > 0) { + const rawState = migrateAppState(rawAppStateInUrl, kibanaVersion, usageCollection); + rawState.panels?.forEach((panel: SavedDashboardPanel) => { + panelsMap[panel.panelIndex] = convertSavedDashboardPanelToPanelState(panel); + }); + } + + const migratedQuery = rawAppStateInUrl.query + ? migrateLegacyQuery(rawAppStateInUrl.query) + : undefined; + + // remove state from URL + kbnUrlStateStorage.kbnUrlControls.updateAsync((nextUrl) => { + if (nextUrl.includes(DASHBOARD_STATE_STORAGE_KEY)) { + return replaceUrlHashQuery(nextUrl, (query) => { + delete query[DASHBOARD_STATE_STORAGE_KEY]; + return query; + }); + } + return nextUrl; + }, true); + + return { + ..._.omit(rawAppStateInUrl, ['panels', 'query']), + ...(migratedQuery ? { query: migratedQuery } : {}), + ...(rawAppStateInUrl.panels ? { panels: panelsMap } : {}), + }; +}; diff --git a/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts b/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts new file mode 100644 index 00000000000000..9069173c15e8f8 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts @@ -0,0 +1,82 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 _ from 'lodash'; + +import { savedObjectToDashboardState } from './convert_dashboard_state'; +import { DashboardState, DashboardBuildContext } from '../../types'; +import { DashboardConstants, DashboardSavedObject } from '../..'; +import { getDashboard60Warning } from '../../dashboard_strings'; +import { migrateLegacyQuery } from './migrate_legacy_query'; +import { cleanFiltersForSerialize } from './filter_utils'; +import { ViewMode } from '../../services/embeddable'; + +interface LoadSavedDashboardStateReturn { + savedDashboardState: DashboardState; + savedDashboard: DashboardSavedObject; +} + +/** + * Loads, migrates, and returns state from a dashboard saved object. + */ +export const loadSavedDashboardState = async ({ + query, + history, + notifications, + indexPatterns, + savedDashboards, + usageCollection, + savedDashboardId, + initializerContext, + savedObjectsTagging, + dashboardCapabilities, +}: DashboardBuildContext & { savedDashboardId?: string }): Promise< + LoadSavedDashboardStateReturn | undefined +> => { + const { hideWriteControls } = dashboardCapabilities; + const { queryString } = query; + + // BWC - remove for 8.0 + if (savedDashboardId === 'create') { + history.replace({ + ...history.location, // preserve query, + pathname: DashboardConstants.CREATE_NEW_DASHBOARD_URL, + }); + + notifications.toasts.addWarning(getDashboard60Warning()); + return; + } + await indexPatterns.ensureDefaultIndexPattern(); + let savedDashboard: DashboardSavedObject | undefined; + try { + savedDashboard = (await savedDashboards.get(savedDashboardId)) as DashboardSavedObject; + } catch (error) { + // E.g. a corrupt or deleted dashboard + notifications.toasts.addDanger(error.message); + history.push(DashboardConstants.LANDING_PAGE_PATH); + return; + } + if (!savedDashboard) return; + + const savedDashboardState = savedObjectToDashboardState({ + savedDashboard, + usageCollection, + hideWriteControls, + savedObjectsTagging, + version: initializerContext.env.packageInfo.version, + }); + + const isViewMode = hideWriteControls || Boolean(savedDashboard.id); + savedDashboardState.viewMode = isViewMode ? ViewMode.VIEW : ViewMode.EDIT; + savedDashboardState.filters = cleanFiltersForSerialize(savedDashboardState.filters); + savedDashboardState.query = migrateLegacyQuery( + savedDashboardState.query || queryString.getDefaultQuery() + ); + + return { savedDashboardState, savedDashboard }; +}; diff --git a/src/plugins/dashboard/public/application/lib/migrate_app_state.ts b/src/plugins/dashboard/public/application/lib/migrate_app_state.ts index 9f60b3b539e269..fb8ef1b9ba2da1 100644 --- a/src/plugins/dashboard/public/application/lib/migrate_app_state.ts +++ b/src/plugins/dashboard/public/application/lib/migrate_app_state.ts @@ -11,7 +11,7 @@ import { i18n } from '@kbn/i18n'; import { METRIC_TYPE } from '@kbn/analytics'; import { UsageCollectionSetup } from '../../services/usage_collection'; -import { DashboardAppState, SavedDashboardPanel } from '../../types'; +import { RawDashboardState, SavedDashboardPanel } from '../../types'; import { migratePanelsTo730, SavedDashboardPanelTo60, @@ -28,10 +28,10 @@ import { * Once we hit a major version, we can remove support for older style URLs and get rid of this logic. */ export function migrateAppState( - appState: { [key: string]: any } & DashboardAppState, + appState: { [key: string]: any } & RawDashboardState, kibanaVersion: string, usageCollection?: UsageCollectionSetup -): DashboardAppState { +): RawDashboardState { if (!appState.panels) { throw new Error( i18n.translate('dashboard.panel.invalidData', { diff --git a/src/plugins/dashboard/public/application/lib/save_dashboard.ts b/src/plugins/dashboard/public/application/lib/save_dashboard.ts index 684d8b4c5e8d80..960d7d9cc86872 100644 --- a/src/plugins/dashboard/public/application/lib/save_dashboard.ts +++ b/src/plugins/dashboard/public/application/lib/save_dashboard.ts @@ -6,40 +6,110 @@ * Side Public License, v 1. */ -import { TimefilterContract } from '../../services/data'; +import _ from 'lodash'; + +import { convertTimeToUTCString } from '.'; +import { NotificationsStart } from '../../services/core'; +import { DashboardSavedObject } from '../../saved_dashboards'; +import { DashboardRedirect, DashboardState } from '../../types'; import { SavedObjectSaveOpts } from '../../services/saved_objects'; -import { updateSavedDashboard } from './update_saved_dashboard'; -import { DashboardStateManager } from '../dashboard_state_manager'; +import { dashboardSaveToastStrings } from '../../dashboard_strings'; +import { getHasTaggingCapabilitiesGuard } from './dashboard_tagging'; +import { SavedObjectsTaggingApi } from '../../services/saved_objects_tagging_oss'; +import { RefreshInterval, TimefilterContract, esFilters } from '../../services/data'; +import { convertPanelStateToSavedDashboardPanel } from '../../../common/embeddable/embeddable_saved_object_converters'; +import { DashboardSessionStorage } from './dashboard_session_storage'; export type SavedDashboardSaveOpts = SavedObjectSaveOpts & { stayInEditMode?: boolean }; -/** - * Saves the dashboard. - * @param toJson A custom toJson function. Used because the previous code used - * the angularized toJson version, and it was unclear whether there was a reason not to use - * JSON.stringify - * @returns A promise that if resolved, will contain the id of the newly saved - * dashboard. - */ -export function saveDashboard( - toJson: (obj: any) => string, - timeFilter: TimefilterContract, - dashboardStateManager: DashboardStateManager, - saveOptions: SavedDashboardSaveOpts -): Promise { - const savedDashboard = dashboardStateManager.savedDashboard; - const appState = dashboardStateManager.appState; - const hasTaggingCapabilities = dashboardStateManager.hasTaggingCapabilities; - - updateSavedDashboard(savedDashboard, appState, timeFilter, hasTaggingCapabilities, toJson); - - return savedDashboard.save(saveOptions).then((id: string) => { - if (id) { - // reset state only when save() was successful - // e.g. save() could be interrupted if title is duplicated and not confirmed - dashboardStateManager.lastSavedDashboardFilters = dashboardStateManager.getFilterState(); - } - - return id; - }); +interface SaveDashboardProps { + version: string; + redirectTo: DashboardRedirect; + currentState: DashboardState; + timefilter: TimefilterContract; + saveOptions: SavedDashboardSaveOpts; + toasts: NotificationsStart['toasts']; + savedDashboard: DashboardSavedObject; + savedObjectsTagging?: SavedObjectsTaggingApi; + dashboardSessionStorage: DashboardSessionStorage; } + +export const saveDashboard = async ({ + toasts, + version, + redirectTo, + timefilter, + saveOptions, + currentState, + savedDashboard, + savedObjectsTagging, + dashboardSessionStorage, +}: SaveDashboardProps): Promise<{ id?: string; redirected?: boolean; error?: any }> => { + const lastDashboardId = savedDashboard.id; + const hasTaggingCapabilities = getHasTaggingCapabilitiesGuard(savedObjectsTagging); + + const { panels, title, tags, description, timeRestore, options } = currentState; + + const savedDashboardPanels = Object.values(panels).map((panel) => + convertPanelStateToSavedDashboardPanel(panel, version) + ); + + savedDashboard.title = title; + savedDashboard.description = description; + savedDashboard.timeRestore = timeRestore; + savedDashboard.optionsJSON = JSON.stringify(options); + savedDashboard.panelsJSON = JSON.stringify(savedDashboardPanels); + + if (hasTaggingCapabilities(savedDashboard)) { + savedDashboard.setTags(tags); + } + + const { from, to } = timefilter.getTime(); + savedDashboard.timeFrom = savedDashboard.timeRestore ? convertTimeToUTCString(from) : undefined; + savedDashboard.timeTo = savedDashboard.timeRestore ? convertTimeToUTCString(to) : undefined; + + const timeRestoreObj: RefreshInterval = _.pick(timefilter.getRefreshInterval(), [ + 'display', + 'pause', + 'section', + 'value', + ]) as RefreshInterval; + savedDashboard.refreshInterval = savedDashboard.timeRestore ? timeRestoreObj : undefined; + + // only save unpinned filters + const unpinnedFilters = savedDashboard + .getFilters() + .filter((filter) => !esFilters.isFilterPinned(filter)); + savedDashboard.searchSource.setField('filter', unpinnedFilters); + + try { + const newId = await savedDashboard.save(saveOptions); + if (newId) { + toasts.addSuccess({ + title: dashboardSaveToastStrings.getSuccessString(currentState.title), + 'data-test-subj': 'saveDashboardSuccess', + }); + + /** + * If the dashboard id has been changed, redirect to the new ID to keep the url param in sync. + */ + if (newId !== lastDashboardId) { + dashboardSessionStorage.clearState(lastDashboardId); + redirectTo({ + id: newId, + editMode: true, + useReplace: true, + destination: 'dashboard', + }); + return { redirected: true, id: newId }; + } + } + return { id: newId }; + } catch (error) { + toasts.addDanger({ + title: dashboardSaveToastStrings.getFailureString(currentState.title, error.message), + 'data-test-subj': 'saveDashboardFailure', + }); + return { error }; + } +}; diff --git a/src/plugins/dashboard/public/application/lib/session_restoration.test.ts b/src/plugins/dashboard/public/application/lib/session_restoration.test.ts index a6740d8647825c..c8366387471452 100644 --- a/src/plugins/dashboard/public/application/lib/session_restoration.test.ts +++ b/src/plugins/dashboard/public/application/lib/session_restoration.test.ts @@ -6,23 +6,24 @@ * Side Public License, v 1. */ -import { dataPluginMock } from '../../../../data/public/mocks'; -import { createSessionRestorationDataProvider } from './session_restoration'; -import { getAppStateDefaults } from './get_app_state_defaults'; import { getSavedDashboardMock } from '../test_helpers'; -import { SavedObjectTagDecoratorTypeGuard } from '../../../../saved_objects_tagging_oss/public'; -import { ViewMode } from '../../services/embeddable'; +import { dataPluginMock } from '../../../../data/public/mocks'; +import { createSessionRestorationDataProvider, savedObjectToDashboardState } from '.'; describe('createSessionRestorationDataProvider', () => { const mockDataPlugin = dataPluginMock.createStartContract(); + const version = '8.0.0'; const searchSessionInfoProvider = createSessionRestorationDataProvider({ + kibanaVersion: version, data: mockDataPlugin, getAppState: () => - getAppStateDefaults( - ViewMode.VIEW, - getSavedDashboardMock(), - ((() => false) as unknown) as SavedObjectTagDecoratorTypeGuard - ), + savedObjectToDashboardState({ + version, + hideWriteControls: false, + usageCollection: undefined, + savedObjectsTagging: undefined, + savedDashboard: getSavedDashboardMock(), + }), getDashboardTitle: () => 'Dashboard', getDashboardId: () => 'Id', }); diff --git a/src/plugins/dashboard/public/application/lib/session_restoration.ts b/src/plugins/dashboard/public/application/lib/session_restoration.ts deleted file mode 100644 index 231119eef8d2c1..00000000000000 --- a/src/plugins/dashboard/public/application/lib/session_restoration.ts +++ /dev/null @@ -1,63 +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 { DASHBOARD_APP_URL_GENERATOR, DashboardUrlGeneratorState } from '../../url_generator'; -import { DataPublicPluginStart } from '../../services/data'; -import { DashboardAppState } from '../../types'; - -export function createSessionRestorationDataProvider(deps: { - data: DataPublicPluginStart; - getAppState: () => DashboardAppState; - getDashboardTitle: () => string; - getDashboardId: () => string; -}) { - return { - getName: async () => deps.getDashboardTitle(), - getUrlGeneratorData: async () => { - return { - urlGeneratorId: DASHBOARD_APP_URL_GENERATOR, - initialState: getUrlGeneratorState({ ...deps, shouldRestoreSearchSession: false }), - restoreState: getUrlGeneratorState({ ...deps, shouldRestoreSearchSession: true }), - }; - }, - }; -} - -function getUrlGeneratorState({ - data, - getAppState, - getDashboardId, - shouldRestoreSearchSession, -}: { - data: DataPublicPluginStart; - getAppState: () => DashboardAppState; - getDashboardId: () => string; - shouldRestoreSearchSession: boolean; -}): DashboardUrlGeneratorState { - const appState = getAppState(); - return { - dashboardId: getDashboardId(), - timeRange: shouldRestoreSearchSession - ? data.query.timefilter.timefilter.getAbsoluteTime() - : data.query.timefilter.timefilter.getTime(), - filters: data.query.filterManager.getFilters(), - query: data.query.queryString.formatQuery(appState.query), - savedQuery: appState.savedQuery, - useHash: false, - preserveSavedFilters: false, - viewMode: appState.viewMode, - panels: getDashboardId() ? undefined : appState.panels, - searchSessionId: shouldRestoreSearchSession ? data.search.session.getSessionId() : undefined, - refreshInterval: shouldRestoreSearchSession - ? { - pause: true, // force pause refresh interval when restoring a session - value: 0, - } - : undefined, - }; -} diff --git a/src/plugins/dashboard/public/application/lib/sync_dashboard_container_input.ts b/src/plugins/dashboard/public/application/lib/sync_dashboard_container_input.ts new file mode 100644 index 00000000000000..21010158dc46d8 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/sync_dashboard_container_input.ts @@ -0,0 +1,201 @@ +/* + * Copyright 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 _ from 'lodash'; +import { Subscription } from 'rxjs'; +import { debounceTime, tap } from 'rxjs/operators'; + +import { DashboardContainer } from '../embeddable'; +import { esFilters, Filter, Query } from '../../services/data'; +import { DashboardConstants, DashboardSavedObject } from '../..'; +import { setExpandedPanelId, setFullScreenMode, setPanels, setQuery } from '../state'; +import { diffDashboardContainerInput } from './diff_dashboard_state'; +import { replaceUrlHashQuery } from '../../../../kibana_utils/public'; +import { DashboardBuildContext, DashboardContainerInput } from '../../types'; +import { + getSearchSessionIdFromURL, + getSessionURLObservable, + stateToDashboardContainerInput, +} from '.'; + +type SyncDashboardContainerCommon = DashboardBuildContext & { + dashboardContainer: DashboardContainer; + savedDashboard: DashboardSavedObject; +}; + +type ApplyStateChangesToContainerProps = SyncDashboardContainerCommon & { + force: boolean; +}; + +type ApplyContainerChangesToStateProps = SyncDashboardContainerCommon & { + applyFilters: (query: Query, filters: Filter[]) => void; +}; + +type SyncDashboardContainerProps = SyncDashboardContainerCommon & ApplyContainerChangesToStateProps; + +/** + * Sets up two way binding between dashboard container and redux state. + */ +export const syncDashboardContainerInput = ( + syncDashboardContainerProps: SyncDashboardContainerProps +) => { + const { + history, + dashboardContainer, + $onDashboardStateChange, + $triggerDashboardRefresh, + } = syncDashboardContainerProps; + const subscriptions = new Subscription(); + subscriptions.add( + dashboardContainer + .getInput$() + .subscribe(() => applyContainerChangesToState(syncDashboardContainerProps)) + ); + subscriptions.add($onDashboardStateChange.subscribe(() => $triggerDashboardRefresh.next())); + subscriptions.add( + getSessionURLObservable(history).subscribe(() => { + $triggerDashboardRefresh.next({ force: true }); + }) + ); + + let forceRefresh: boolean = false; + subscriptions.add( + $triggerDashboardRefresh + .pipe( + tap((trigger) => { + forceRefresh = forceRefresh || (trigger?.force ?? false); + }), + debounceTime(DashboardConstants.CHANGE_APPLY_DEBOUNCE) + ) + .subscribe(() => { + applyStateChangesToContainer({ ...syncDashboardContainerProps, force: forceRefresh }); + forceRefresh = false; + }) + ); + + return () => subscriptions.unsubscribe(); +}; + +export const applyContainerChangesToState = ({ + query, + applyFilters, + dashboardContainer, + getLatestDashboardState, + dispatchDashboardStateChange, +}: ApplyContainerChangesToStateProps) => { + const input = dashboardContainer.getInput(); + const latestState = getLatestDashboardState(); + if (Object.keys(latestState).length === 0) { + return; + } + const { filterManager } = query; + if ( + !esFilters.compareFilters( + input.filters, + filterManager.getFilters(), + esFilters.COMPARE_ALL_OPTIONS + ) + ) { + // Add filters modifies the object passed to it, hence the clone deep. + filterManager.addFilters(_.cloneDeep(input.filters)); + applyFilters(latestState.query, input.filters); + } + + if (!_.isEqual(input.panels, latestState.panels)) { + dispatchDashboardStateChange(setPanels(input.panels)); + } + + if (!_.isEqual(input.query, latestState.query)) { + dispatchDashboardStateChange(setQuery(input.query)); + } + + if (!_.isEqual(input.expandedPanelId, latestState.expandedPanelId)) { + dispatchDashboardStateChange(setExpandedPanelId(input.expandedPanelId)); + } + dispatchDashboardStateChange(setFullScreenMode(input.isFullScreenMode)); +}; + +export const applyStateChangesToContainer = ({ + force, + search, + history, + savedDashboard, + dashboardContainer, + kbnUrlStateStorage, + query: queryService, + isEmbeddedExternally, + dashboardCapabilities, + getLatestDashboardState, +}: ApplyStateChangesToContainerProps) => { + const latestState = getLatestDashboardState(); + if (Object.keys(latestState).length === 0) { + return; + } + const currentDashboardStateAsInput = stateToDashboardContainerInput({ + dashboardState: latestState, + isEmbeddedExternally, + dashboardCapabilities, + query: queryService, + savedDashboard, + }); + const differences = diffDashboardContainerInput( + dashboardContainer.getInput(), + currentDashboardStateAsInput + ); + if (force) { + differences.lastReloadRequestTime = Date.now(); + } + + if (Object.keys(differences).length !== 0) { + const shouldRefetch = Object.keys(differences).some( + (changeKey) => !noRefetchKeys.includes(changeKey as keyof DashboardContainerInput) + ); + + const newSearchSessionId: string | undefined = (() => { + // do not update session id if this is irrelevant state change to prevent excessive searches + if (!shouldRefetch) return; + + const sessionApi = search.session; + let searchSessionIdFromURL = getSearchSessionIdFromURL(history); + if (searchSessionIdFromURL) { + if (sessionApi.isRestore() && sessionApi.isCurrentSession(searchSessionIdFromURL)) { + // navigating away from a restored session + kbnUrlStateStorage.kbnUrlControls.updateAsync((nextUrl) => { + if (nextUrl.includes(DashboardConstants.SEARCH_SESSION_ID)) { + return replaceUrlHashQuery(nextUrl, (query) => { + delete query[DashboardConstants.SEARCH_SESSION_ID]; + return query; + }); + } + return nextUrl; + }); + searchSessionIdFromURL = undefined; + } else { + sessionApi.restore(searchSessionIdFromURL); + } + } + + return searchSessionIdFromURL ?? sessionApi.start(); + })(); + + dashboardContainer.updateInput({ + ...differences, + ...(newSearchSessionId && { searchSessionId: newSearchSessionId }), + }); + } +}; + +const noRefetchKeys: Readonly> = [ + 'title', + 'viewMode', + 'useMargins', + 'description', + 'expandedPanelId', + 'isFullScreenMode', + 'isEmbeddedExternally', +] as const; diff --git a/src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts b/src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts new file mode 100644 index 00000000000000..2cfd7da6145ee8 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts @@ -0,0 +1,157 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 _ from 'lodash'; +import { merge } from 'rxjs'; +import { debounceTime, finalize, map, switchMap, tap } from 'rxjs/operators'; + +import { setQuery } from '../state'; +import { DashboardBuildContext, DashboardState } from '../../types'; +import { DashboardSavedObject } from '../../saved_dashboards'; +import { setFiltersAndQuery } from '../state/dashboard_state_slice'; +import { + syncQueryStateWithUrl, + connectToQueryState, + Filter, + Query, + waitUntilNextSessionCompletes$, + QueryState, +} from '../../services/data'; +import { cleanFiltersForSerialize } from '.'; + +type SyncDashboardFilterStateProps = DashboardBuildContext & { + initialDashboardState: DashboardState; + savedDashboard: DashboardSavedObject; +}; + +/** + * Applies initial state to the query service, and the saved dashboard search source, then + * Sets up syncing and subscriptions between the filter state from the Data plugin + * and the dashboard Redux store. + */ +export const syncDashboardFilterState = ({ + search, + savedDashboard, + kbnUrlStateStorage, + query: queryService, + initialDashboardState, + $checkForUnsavedChanges, + $onDashboardStateChange, + $triggerDashboardRefresh, + dispatchDashboardStateChange, +}: SyncDashboardFilterStateProps) => { + const { filterManager, queryString, timefilter } = queryService; + const { timefilter: timefilterService } = timefilter; + + // apply initial filters to the query service and to the saved dashboard + filterManager.setAppFilters(_.cloneDeep(initialDashboardState.filters)); + savedDashboard.searchSource.setField('filter', initialDashboardState.filters); + + // apply initial query to the query service and to the saved dashboard + queryString.setQuery(initialDashboardState.query); + savedDashboard.searchSource.setField('query', initialDashboardState.query); + + /** + * If a global time range is not set explicitly and the time range was saved with the dashboard, apply + * initial time range and refresh interval to the query service. + */ + if (initialDashboardState.timeRestore) { + const initialGlobalQueryState = kbnUrlStateStorage.get('_g'); + if (!initialGlobalQueryState?.time) { + if (savedDashboard.timeFrom && savedDashboard.timeTo) { + timefilterService.setTime({ + from: savedDashboard.timeFrom, + to: savedDashboard.timeTo, + }); + } + } + if (!initialGlobalQueryState?.refreshInterval) { + if (savedDashboard.refreshInterval) { + timefilterService.setRefreshInterval(savedDashboard.refreshInterval); + } + } + } + + // this callback will be used any time new filters and query need to be applied. + const applyFilters = (query: Query, filters: Filter[]) => { + savedDashboard.searchSource.setField('query', query); + savedDashboard.searchSource.setField('filter', filters); + dispatchDashboardStateChange(setQuery(query)); + }; + + // starts syncing `_g` portion of url with query services + const { stop: stopSyncingQueryServiceStateWithUrl } = syncQueryStateWithUrl( + queryService, + kbnUrlStateStorage + ); + + // starts syncing app filters between dashboard state and filterManager + const intermediateFilterState: { filters: Filter[]; query: Query } = { + query: initialDashboardState.query ?? queryString.getDefaultQuery(), + filters: initialDashboardState.filters ?? [], + }; + const stopSyncingAppFilters = connectToQueryState( + queryService, + { + get: () => intermediateFilterState, + set: ({ filters, query }) => { + intermediateFilterState.filters = cleanFiltersForSerialize(filters ?? []) || []; + intermediateFilterState.query = query || queryString.getDefaultQuery(); + dispatchDashboardStateChange(setFiltersAndQuery(intermediateFilterState)); + }, + state$: $onDashboardStateChange.pipe( + map((appState) => ({ + filters: appState.filters, + query: appState.query, + })) + ), + }, + { + query: true, + filters: true, + } + ); + + // apply filters when the filter manager changes + const filterManagerSubscription = merge(filterManager.getUpdates$(), queryString.getUpdates$()) + .pipe(debounceTime(100)) + .subscribe(() => applyFilters(queryString.getQuery(), filterManager.getFilters())); + + const timeRefreshSubscription = merge( + ...[timefilterService.getRefreshIntervalUpdate$(), timefilterService.getTimeUpdate$()] + ).subscribe(() => { + $triggerDashboardRefresh.next(); + + // manually check for unsaved changes here because the time range is not stored on the dashboardState, + // but it could trigger the unsaved changes badge. + $checkForUnsavedChanges.next(); + }); + + const forceRefreshSubscription = timefilterService + .getAutoRefreshFetch$() + .pipe( + tap(() => { + $triggerDashboardRefresh.next({ force: true }); + }), + switchMap((done) => + // best way on a dashboard to estimate that panels are updated is to rely on search session service state + waitUntilNextSessionCompletes$(search.session).pipe(finalize(done)) + ) + ) + .subscribe(); + + const stopSyncingDashboardFilterState = () => { + filterManagerSubscription.unsubscribe(); + forceRefreshSubscription.unsubscribe(); + timeRefreshSubscription.unsubscribe(); + stopSyncingQueryServiceStateWithUrl(); + stopSyncingAppFilters(); + }; + + return { applyFilters, stopSyncingDashboardFilterState }; +}; diff --git a/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts b/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts new file mode 100644 index 00000000000000..b2873febee0d88 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts @@ -0,0 +1,86 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { uniqBy } from 'lodash'; +import deepEqual from 'fast-deep-equal'; +import { merge, Observable, pipe } from 'rxjs'; +import { distinctUntilChanged, switchMap, startWith, filter, mapTo, map } from 'rxjs/operators'; + +import { DashboardContainer } from '..'; +import { isErrorEmbeddable } from '../../services/embeddable'; +import { IndexPattern, IndexPatternsContract } from '../../services/data'; + +interface SyncDashboardIndexPatternsProps { + dashboardContainer: DashboardContainer; + indexPatterns: IndexPatternsContract; + onUpdateIndexPatterns: (newIndexPatterns: IndexPattern[]) => void; +} + +export const syncDashboardIndexPatterns = ({ + dashboardContainer, + indexPatterns, + onUpdateIndexPatterns, +}: SyncDashboardIndexPatternsProps) => { + const updateIndexPatternsOperator = pipe( + filter((container: DashboardContainer) => !!container && !isErrorEmbeddable(container)), + map((container: DashboardContainer): IndexPattern[] => { + let panelIndexPatterns: IndexPattern[] = []; + Object.values(container.getChildIds()).forEach((id) => { + const embeddableInstance = container.getChild(id); + if (isErrorEmbeddable(embeddableInstance)) return; + const embeddableIndexPatterns = (embeddableInstance.getOutput() as any).indexPatterns; + if (!embeddableIndexPatterns) return; + panelIndexPatterns.push(...embeddableIndexPatterns); + }); + panelIndexPatterns = uniqBy(panelIndexPatterns, 'id'); + return panelIndexPatterns; + }), + distinctUntilChanged((a, b) => + deepEqual( + a.map((ip) => ip && ip.id), + b.map((ip) => ip && ip.id) + ) + ), + // using switchMap for previous task cancellation + switchMap((panelIndexPatterns: IndexPattern[]) => { + return new Observable((observer) => { + if (panelIndexPatterns && panelIndexPatterns.length > 0) { + if (observer.closed) return; + onUpdateIndexPatterns(panelIndexPatterns); + observer.complete(); + } else { + indexPatterns.getDefault().then((defaultIndexPattern) => { + if (observer.closed) return; + onUpdateIndexPatterns([defaultIndexPattern as IndexPattern]); + observer.complete(); + }); + } + }); + }) + ); + + return merge( + // output of dashboard container itself + dashboardContainer.getOutput$(), + // plus output of dashboard container children, + // children may change, so make sure we subscribe/unsubscribe with switchMap + dashboardContainer.getOutput$().pipe( + map(() => dashboardContainer!.getChildIds()), + distinctUntilChanged(deepEqual), + switchMap((newChildIds: string[]) => + merge(...newChildIds.map((childId) => dashboardContainer!.getChild(childId).getOutput$())) + ) + ) + ) + .pipe( + mapTo(dashboardContainer), + startWith(dashboardContainer), // to trigger initial index pattern update + updateIndexPatternsOperator + ) + .subscribe(); +}; diff --git a/src/plugins/dashboard/public/application/lib/update_saved_dashboard.ts b/src/plugins/dashboard/public/application/lib/update_saved_dashboard.ts deleted file mode 100644 index 286414ed30eacf..00000000000000 --- a/src/plugins/dashboard/public/application/lib/update_saved_dashboard.ts +++ /dev/null @@ -1,52 +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 _ from 'lodash'; -import type { SavedObjectTagDecoratorTypeGuard } from '../../services/saved_objects_tagging_oss'; -import { RefreshInterval, TimefilterContract, esFilters } from '../../services/data'; -import { FilterUtils } from './filter_utils'; -import { DashboardSavedObject } from '../../saved_dashboards'; -import { DashboardAppState } from '../../types'; - -export function updateSavedDashboard( - savedDashboard: DashboardSavedObject, - appState: DashboardAppState, - timeFilter: TimefilterContract, - hasTaggingCapabilities: SavedObjectTagDecoratorTypeGuard, - toJson: (object: T) => string -) { - savedDashboard.title = appState.title; - savedDashboard.description = appState.description; - savedDashboard.timeRestore = appState.timeRestore; - savedDashboard.panelsJSON = toJson(appState.panels); - savedDashboard.optionsJSON = toJson(appState.options); - - if (hasTaggingCapabilities(savedDashboard)) { - savedDashboard.setTags(appState.tags); - } - - savedDashboard.timeFrom = savedDashboard.timeRestore - ? FilterUtils.convertTimeToUTCString(timeFilter.getTime().from) - : undefined; - savedDashboard.timeTo = savedDashboard.timeRestore - ? FilterUtils.convertTimeToUTCString(timeFilter.getTime().to) - : undefined; - const timeRestoreObj: RefreshInterval = _.pick(timeFilter.getRefreshInterval(), [ - 'display', - 'pause', - 'section', - 'value', - ]) as RefreshInterval; - savedDashboard.refreshInterval = savedDashboard.timeRestore ? timeRestoreObj : undefined; - - // save only unpinned filters - const unpinnedFilters = savedDashboard - .getFilters() - .filter((filter) => !esFilters.isFilterPinned(filter)); - savedDashboard.searchSource.setField('filter', unpinnedFilters); -} diff --git a/src/plugins/dashboard/public/application/listing/confirm_overlays.tsx b/src/plugins/dashboard/public/application/listing/confirm_overlays.tsx index 726d647abe2128..e3f7b32ef82230 100644 --- a/src/plugins/dashboard/public/application/listing/confirm_overlays.tsx +++ b/src/plugins/dashboard/public/application/listing/confirm_overlays.tsx @@ -19,13 +19,10 @@ import { EUI_MODAL_CANCEL_BUTTON, } from '@elastic/eui'; import React from 'react'; + import { OverlayStart } from '../../../../../core/public'; -import { - createConfirmStrings, - discardConfirmStrings, - leaveEditModeConfirmStrings, -} from '../../dashboard_strings'; import { toMountPoint } from '../../services/kibana_react'; +import { createConfirmStrings, discardConfirmStrings } from '../../dashboard_strings'; export type DiscardOrKeepSelection = 'cancel' | 'discard' | 'keep'; @@ -44,76 +41,6 @@ export const confirmDiscardUnsavedChanges = (overlays: OverlayStart, discardCall } }); -export const confirmDiscardOrKeepUnsavedChanges = ( - overlays: OverlayStart -): Promise => { - const titleId = 'confirmDiscardOrKeepTitle'; - const descriptionId = 'confirmDiscardOrKeepDescription'; - - return new Promise((resolve) => { - const session = overlays.openModal( - toMountPoint( - - session.close()}> -
- - -

{leaveEditModeConfirmStrings.getLeaveEditModeTitle()}

-
-
- - - -

{leaveEditModeConfirmStrings.getLeaveEditModeSubtitle()}

-
-
- - - session.close()} - > - {leaveEditModeConfirmStrings.getLeaveEditModeCancelButtonText()} - - { - session.close(); - resolve('discard'); - }} - > - {leaveEditModeConfirmStrings.getLeaveEditModeDiscardButtonText()} - - { - session.close(); - resolve('keep'); - }} - > - {leaveEditModeConfirmStrings.getLeaveEditModeKeepChangesText()} - - -
-
-
- ), - { - 'data-test-subj': 'dashboardDiscardConfirmModal', - maxWidth: 550, - } - ); - }); -}; - export const confirmCreateWithUnsaved = ( overlays: OverlayStart, startBlankCallback: () => void, diff --git a/src/plugins/dashboard/public/application/listing/dashboard_listing.test.tsx b/src/plugins/dashboard/public/application/listing/dashboard_listing.test.tsx index febb03d58d9341..7602b2ed68b62d 100644 --- a/src/plugins/dashboard/public/application/listing/dashboard_listing.test.tsx +++ b/src/plugins/dashboard/public/application/listing/dashboard_listing.test.tsx @@ -6,80 +6,16 @@ * Side Public License, v 1. */ +import React from 'react'; import { mount } from 'enzyme'; -import { - IUiSettingsClient, - PluginInitializerContext, - ScopedHistory, - SimpleSavedObject, -} from '../../../../../core/public'; +import { I18nProvider } from '@kbn/i18n/react'; -import { SavedObjectLoader, SavedObjectLoaderFindOptions } from '../../services/saved_objects'; -import { IndexPatternsContract, SavedQueryService } from '../../services/data'; -import { NavigationPublicPluginStart } from '../../services/navigation'; +import { DashboardAppServices } from '../../types'; +import { SimpleSavedObject } from '../../../../../core/public'; import { KibanaContextProvider } from '../../services/kibana_react'; import { createKbnUrlStateStorage } from '../../services/kibana_utils'; - -import { savedObjectsPluginMock } from '../../../../saved_objects/public/mocks'; import { DashboardListing, DashboardListingProps } from './dashboard_listing'; -import { embeddablePluginMock } from '../../../../embeddable/public/mocks'; -import { visualizationsPluginMock } from '../../../../visualizations/public/mocks'; -import { DashboardAppServices, DashboardAppCapabilities } from '../types'; -import { dataPluginMock } from '../../../../data/public/mocks'; -import { chromeServiceMock, coreMock } from '../../../../../core/public/mocks'; -import { I18nProvider } from '@kbn/i18n/react'; -import React from 'react'; -import { UrlForwardingStart } from '../../../../url_forwarding/public'; -import { DashboardPanelStorage } from '../lib'; - -function makeDefaultServices(): DashboardAppServices { - const core = coreMock.createStart(); - const savedDashboards = {} as SavedObjectLoader; - savedDashboards.find = (search: string, sizeOrOptions: number | SavedObjectLoaderFindOptions) => { - const size = typeof sizeOrOptions === 'number' ? sizeOrOptions : sizeOrOptions.size ?? 10; - const hits = []; - for (let i = 0; i < size; i++) { - hits.push({ - id: `dashboard${i}`, - title: `dashboard${i} - ${search} - title`, - description: `dashboard${i} desc`, - }); - } - return Promise.resolve({ - total: size, - hits, - }); - }; - const dashboardPanelStorage = ({ - getDashboardIdsWithUnsavedChanges: jest - .fn() - .mockResolvedValue(['dashboardUnsavedOne', 'dashboardUnsavedTwo']), - } as unknown) as DashboardPanelStorage; - - return { - savedObjects: savedObjectsPluginMock.createStartContract(), - embeddable: embeddablePluginMock.createInstance().doStart(), - dashboardCapabilities: {} as DashboardAppCapabilities, - initializerContext: {} as PluginInitializerContext, - chrome: chromeServiceMock.createStartContract(), - navigation: {} as NavigationPublicPluginStart, - savedObjectsClient: core.savedObjects.client, - data: dataPluginMock.createStartContract(), - indexPatterns: {} as IndexPatternsContract, - scopedHistory: () => ({} as ScopedHistory), - savedQueryService: {} as SavedQueryService, - setHeaderActionMenu: (mountPoint) => {}, - urlForwarding: {} as UrlForwardingStart, - uiSettings: {} as IUiSettingsClient, - restorePreviousUrl: () => {}, - onAppLeave: (handler) => {}, - allowByValueEmbeddables: true, - dashboardPanelStorage, - savedDashboards, - core, - visualizations: visualizationsPluginMock.createStartContract(), - }; -} +import { makeDefaultServices } from '../test_helpers'; function makeDefaultProps(): DashboardListingProps { return { diff --git a/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx b/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx index e2c11d614d7970..eaa47465660026 100644 --- a/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx +++ b/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx @@ -10,7 +10,7 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { EuiLink, EuiButton, EuiEmptyPrompt } from '@elastic/eui'; import React, { Fragment, useCallback, useEffect, useMemo, useState } from 'react'; import { attemptLoadDashboardByTitle } from '../lib'; -import { DashboardAppServices, DashboardRedirect } from '../types'; +import { DashboardAppServices, DashboardRedirect } from '../../types'; import { getDashboardBreadcrumb, dashboardListingTable } from '../../dashboard_strings'; import { ApplicationStart, SavedObjectsFindOptionsReference } from '../../../../../core/public'; import { syncQueryStateWithUrl } from '../../services/data'; @@ -43,13 +43,13 @@ export const DashboardListing = ({ savedObjectsClient, savedObjectsTagging, dashboardCapabilities, - dashboardPanelStorage, + dashboardSessionStorage, chrome: { setBreadcrumbs }, }, } = useKibana(); const [unsavedDashboardIds, setUnsavedDashboardIds] = useState( - dashboardPanelStorage.getDashboardIdsWithUnsavedChanges() + dashboardSessionStorage.getDashboardIdsWithUnsavedChanges() ); // Set breadcrumbs useEffect @@ -104,19 +104,19 @@ export const DashboardListing = ({ ); const createItem = useCallback(() => { - if (!dashboardPanelStorage.dashboardHasUnsavedEdits()) { + if (!dashboardSessionStorage.dashboardHasUnsavedEdits()) { redirectTo({ destination: 'dashboard' }); } else { confirmCreateWithUnsaved( core.overlays, () => { - dashboardPanelStorage.clearPanels(); + dashboardSessionStorage.clearState(); redirectTo({ destination: 'dashboard' }); }, () => redirectTo({ destination: 'dashboard' }) ); } - }, [dashboardPanelStorage, redirectTo, core.overlays]); + }, [dashboardSessionStorage, redirectTo, core.overlays]); const emptyPrompt = useMemo( () => getNoItemsMessage(hideWriteControls, core.application, createItem), @@ -145,11 +145,11 @@ export const DashboardListing = ({ const deleteItems = useCallback( (dashboards: Array<{ id: string }>) => { - dashboards.map((d) => dashboardPanelStorage.clearPanels(d.id)); - setUnsavedDashboardIds(dashboardPanelStorage.getDashboardIdsWithUnsavedChanges()); + dashboards.map((d) => dashboardSessionStorage.clearState(d.id)); + setUnsavedDashboardIds(dashboardSessionStorage.getDashboardIdsWithUnsavedChanges()); return savedDashboards.delete(dashboards.map((d) => d.id)); }, - [savedDashboards, dashboardPanelStorage] + [savedDashboards, dashboardSessionStorage] ); const editItem = useCallback( @@ -196,7 +196,7 @@ export const DashboardListing = ({ redirectTo={redirectTo} unsavedDashboardIds={unsavedDashboardIds} refreshUnsavedDashboards={() => - setUnsavedDashboardIds(dashboardPanelStorage.getDashboardIdsWithUnsavedChanges()) + setUnsavedDashboardIds(dashboardSessionStorage.getDashboardIdsWithUnsavedChanges()) } /> diff --git a/src/plugins/dashboard/public/application/listing/dashboard_no_match.tsx b/src/plugins/dashboard/public/application/listing/dashboard_no_match.tsx index a649bf37dfae9d..03f7b0e162229c 100644 --- a/src/plugins/dashboard/public/application/listing/dashboard_no_match.tsx +++ b/src/plugins/dashboard/public/application/listing/dashboard_no_match.tsx @@ -6,14 +6,14 @@ * Side Public License, v 1. */ -import React, { useEffect } from 'react'; import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n/react'; +import React, { useEffect } from 'react'; import { EuiCallOut } from '@elastic/eui'; - +import { FormattedMessage } from '@kbn/i18n/react'; import { RouteComponentProps } from 'react-router-dom'; + import { useKibana, toMountPoint } from '../../services/kibana_react'; -import { DashboardAppServices } from '../types'; +import { DashboardAppServices } from '../../types'; import { DashboardConstants } from '../..'; let bannerId: string | undefined; diff --git a/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.test.tsx b/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.test.tsx index 13688b4061be93..8f53c16749fe67 100644 --- a/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.test.tsx +++ b/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.test.tsx @@ -11,14 +11,14 @@ import { findTestSubject } from '@elastic/eui/lib/test'; import { waitFor } from '@testing-library/react'; import { mount } from 'enzyme'; import React from 'react'; + import { DashboardSavedObject } from '../..'; -import { coreMock } from '../../../../../core/public/mocks'; -import { KibanaContextProvider } from '../../services/kibana_react'; +import { DashboardAppServices } from '../../types'; import { SavedObjectLoader } from '../../services/saved_objects'; -import { DashboardPanelStorage } from '../lib'; -import { DASHBOARD_PANELS_UNSAVED_ID } from '../lib/dashboard_panel_storage'; -import { DashboardAppServices } from '../types'; +import { KibanaContextProvider } from '../../services/kibana_react'; +import { DASHBOARD_PANELS_UNSAVED_ID } from '../lib/dashboard_session_storage'; import { DashboardUnsavedListing, DashboardUnsavedListingProps } from './dashboard_unsaved_listing'; +import { makeDefaultServices } from '../test_helpers'; const mockedDashboards: { [key: string]: DashboardSavedObject } = { dashboardUnsavedOne: { @@ -35,20 +35,16 @@ const mockedDashboards: { [key: string]: DashboardSavedObject } = { } as DashboardSavedObject, }; -function makeDefaultServices(): DashboardAppServices { - const core = coreMock.createStart(); - core.overlays.openConfirm = jest.fn().mockResolvedValue(true); +function makeServices(): DashboardAppServices { + const services = makeDefaultServices(); const savedDashboards = {} as SavedObjectLoader; savedDashboards.get = jest .fn() .mockImplementation((id: string) => Promise.resolve(mockedDashboards[id])); - const dashboardPanelStorage = {} as DashboardPanelStorage; - dashboardPanelStorage.clearPanels = jest.fn(); - return ({ - dashboardPanelStorage, + return { + ...services, savedDashboards, - core, - } as unknown) as DashboardAppServices; + }; } const makeDefaultProps = (): DashboardUnsavedListingProps => ({ @@ -64,7 +60,7 @@ function mountWith({ services?: DashboardAppServices; props?: DashboardUnsavedListingProps; }) { - const services = incomingServices ?? makeDefaultServices(); + const services = incomingServices ?? makeServices(); const props = incomingProps ?? makeDefaultProps(); const wrappingComponent: React.FC<{ children: React.ReactNode; @@ -140,14 +136,14 @@ describe('Unsaved listing', () => { waitFor(() => { component.update(); expect(services.core.overlays.openConfirm).toHaveBeenCalled(); - expect(services.dashboardPanelStorage.clearPanels).toHaveBeenCalledWith( + expect(services.dashboardSessionStorage.clearState).toHaveBeenCalledWith( 'dashboardUnsavedOne' ); }); }); it('removes unsaved changes from any dashboard which errors on fetch', async () => { - const services = makeDefaultServices(); + const services = makeServices(); const props = makeDefaultProps(); services.savedDashboards.get = jest.fn().mockImplementation((id: string) => { if (id === 'failCase1' || id === 'failCase2') { @@ -166,12 +162,12 @@ describe('Unsaved listing', () => { const { component } = mountWith({ services, props }); waitFor(() => { component.update(); - expect(services.dashboardPanelStorage.clearPanels).toHaveBeenCalledWith('failCase1'); - expect(services.dashboardPanelStorage.clearPanels).toHaveBeenCalledWith('failCase2'); + expect(services.dashboardSessionStorage.clearState).toHaveBeenCalledWith('failCase1'); + expect(services.dashboardSessionStorage.clearState).toHaveBeenCalledWith('failCase2'); // clearing panels from dashboard with errors should cause getDashboardIdsWithUnsavedChanges to be called again. expect( - services.dashboardPanelStorage.getDashboardIdsWithUnsavedChanges + services.dashboardSessionStorage.getDashboardIdsWithUnsavedChanges ).toHaveBeenCalledTimes(2); }); }); diff --git a/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.tsx b/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.tsx index 66e8b2348490a1..acff60d9bac3d8 100644 --- a/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.tsx +++ b/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.tsx @@ -19,8 +19,8 @@ import React, { useCallback, useEffect, useState } from 'react'; import { DashboardSavedObject } from '../..'; import { dashboardUnsavedListingStrings, getNewDashboardTitle } from '../../dashboard_strings'; import { useKibana } from '../../services/kibana_react'; -import { DASHBOARD_PANELS_UNSAVED_ID } from '../lib/dashboard_panel_storage'; -import { DashboardAppServices, DashboardRedirect } from '../types'; +import { DASHBOARD_PANELS_UNSAVED_ID } from '../lib/dashboard_session_storage'; +import { DashboardAppServices, DashboardRedirect } from '../../types'; import { confirmDiscardUnsavedChanges } from './confirm_overlays'; const DashboardUnsavedItem = ({ @@ -115,7 +115,7 @@ export const DashboardUnsavedListing = ({ }: DashboardUnsavedListingProps) => { const { services: { - dashboardPanelStorage, + dashboardSessionStorage, savedDashboards, core: { overlays }, }, @@ -133,11 +133,11 @@ export const DashboardUnsavedListing = ({ const onDiscard = useCallback( (id?: string) => { confirmDiscardUnsavedChanges(overlays, () => { - dashboardPanelStorage.clearPanels(id); + dashboardSessionStorage.clearState(id); refreshUnsavedDashboards(); }); }, - [overlays, refreshUnsavedDashboards, dashboardPanelStorage] + [overlays, refreshUnsavedDashboards, dashboardSessionStorage] ); useEffect(() => { @@ -161,7 +161,7 @@ export const DashboardUnsavedListing = ({ const newItems = dashboards.reduce((map, dashboard) => { if (typeof dashboard === 'string') { hasError = true; - dashboardPanelStorage.clearPanels(dashboard); + dashboardSessionStorage.clearState(dashboard); return map; } return { @@ -178,7 +178,7 @@ export const DashboardUnsavedListing = ({ return () => { canceled = true; }; - }, [savedDashboards, dashboardPanelStorage, refreshUnsavedDashboards, unsavedDashboardIds]); + }, [savedDashboards, dashboardSessionStorage, refreshUnsavedDashboards, unsavedDashboardIds]); return unsavedDashboardIds.length === 0 ? null : ( <> diff --git a/src/plugins/dashboard/public/application/state/dashboard_state_hooks.ts b/src/plugins/dashboard/public/application/state/dashboard_state_hooks.ts new file mode 100644 index 00000000000000..abc346d4bbaa34 --- /dev/null +++ b/src/plugins/dashboard/public/application/state/dashboard_state_hooks.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'; +import type { DashboardRootState, DashboardDispatch } from './dashboard_state_store'; + +export const useDashboardDispatch = () => useDispatch(); +export const useDashboardSelector: TypedUseSelectorHook = useSelector; diff --git a/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts b/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts new file mode 100644 index 00000000000000..1acf806ae2f0d7 --- /dev/null +++ b/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts @@ -0,0 +1,112 @@ +/* + * Copyright 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 { createSlice, PayloadAction } from '@reduxjs/toolkit'; + +import { Filter, Query } from '../../services/data'; +import { ViewMode } from '../../services/embeddable'; +import { DashboardOptions, DashboardPanelMap, DashboardState } from '../../types'; + +export const dashboardStateSlice = createSlice({ + name: 'dashboardState', + initialState: {} as DashboardState, + reducers: { + setDashboardState: (state, action: PayloadAction) => { + return action.payload; + }, + updateState: (state, action: PayloadAction>) => { + state = { ...state, ...action.payload }; + }, + setDashboardOptions: (state, action: PayloadAction) => { + state.options = action.payload; + }, + setStateFromSaveModal: ( + state, + action: PayloadAction<{ + title: string; + description: string; + tags?: string[]; + timeRestore: boolean; + }> + ) => { + state.title = action.payload.title; + state.description = action.payload.description; + state.timeRestore = action.payload.timeRestore; + if (action.payload.tags) { + state.tags = action.payload.tags; + } + }, + setUseMargins: (state, action: PayloadAction) => { + state.options.useMargins = action.payload; + }, + setSyncColors: (state, action: PayloadAction) => { + state.options.syncColors = action.payload; + }, + setHidePanelTitles: (state, action: PayloadAction) => { + state.options.hidePanelTitles = action.payload; + }, + setPanels: (state, action: PayloadAction) => { + state.panels = action.payload; + }, + setExpandedPanelId: (state, action: PayloadAction) => { + state.expandedPanelId = action.payload; + }, + setFullScreenMode: (state, action: PayloadAction) => { + state.fullScreenMode = action.payload; + }, + setSavedQueryId: (state, action: PayloadAction) => { + state.savedQuery = action.payload; + }, + setTimeRestore: (state, action: PayloadAction) => { + state.timeRestore = action.payload; + }, + setDescription: (state, action: PayloadAction) => { + state.description = action.payload; + }, + setViewMode: (state, action: PayloadAction) => { + state.viewMode = action.payload; + }, + setFiltersAndQuery: (state, action: PayloadAction<{ filters: Filter[]; query: Query }>) => { + state.filters = action.payload.filters; + state.query = action.payload.query; + }, + setFilters: (state, action: PayloadAction) => { + state.filters = action.payload; + }, + setTags: (state, action: PayloadAction) => { + state.tags = action.payload; + }, + setTitle: (state, action: PayloadAction) => { + state.description = action.payload; + }, + setQuery: (state, action: PayloadAction) => { + state.query = action.payload; + }, + }, +}); + +export const { + setStateFromSaveModal, + setDashboardOptions, + setExpandedPanelId, + setHidePanelTitles, + setFiltersAndQuery, + setDashboardState, + setFullScreenMode, + setSavedQueryId, + setDescription, + setTimeRestore, + setSyncColors, + setUseMargins, + setViewMode, + setFilters, + setPanels, + setTitle, + setQuery, + setTags, +} = dashboardStateSlice.actions; diff --git a/src/plugins/dashboard/public/application/state/dashboard_state_store.ts b/src/plugins/dashboard/public/application/state/dashboard_state_store.ts new file mode 100644 index 00000000000000..76bc2c2fb1c773 --- /dev/null +++ b/src/plugins/dashboard/public/application/state/dashboard_state_store.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 { configureStore } from '@reduxjs/toolkit'; +import { dashboardStateSlice } from './dashboard_state_slice'; + +export const dashboardStateStore = configureStore({ + reducer: { dashboardStateReducer: dashboardStateSlice.reducer }, +}); + +export type DashboardRootState = ReturnType; +export type DashboardDispatch = typeof dashboardStateStore.dispatch; diff --git a/src/plugins/dashboard/public/application/state/index.ts b/src/plugins/dashboard/public/application/state/index.ts new file mode 100644 index 00000000000000..d394876173160d --- /dev/null +++ b/src/plugins/dashboard/public/application/state/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './dashboard_state_slice'; + +export { dashboardStateStore } from './dashboard_state_store'; +export { useDashboardDispatch, useDashboardSelector } from './dashboard_state_hooks'; diff --git a/src/plugins/dashboard/public/application/test_helpers/get_sample_dashboard_input.ts b/src/plugins/dashboard/public/application/test_helpers/get_sample_dashboard_input.ts index fb160568fa4f4d..46be5b3b16d849 100644 --- a/src/plugins/dashboard/public/application/test_helpers/get_sample_dashboard_input.ts +++ b/src/plugins/dashboard/public/application/test_helpers/get_sample_dashboard_input.ts @@ -6,8 +6,9 @@ * Side Public License, v 1. */ +import { DashboardContainerInput } from '../..'; +import { DashboardPanelState } from '../embeddable'; import { ViewMode, EmbeddableInput } from '../../services/embeddable'; -import { DashboardContainerInput, DashboardPanelState } from '../embeddable'; export function getSampleDashboardInput( overrides?: Partial diff --git a/src/plugins/dashboard/public/application/test_helpers/index.ts b/src/plugins/dashboard/public/application/test_helpers/index.ts index d782fb67d039b6..d26eadec8f1c9c 100644 --- a/src/plugins/dashboard/public/application/test_helpers/index.ts +++ b/src/plugins/dashboard/public/application/test_helpers/index.ts @@ -8,3 +8,4 @@ export { getSampleDashboardInput, getSampleDashboardPanel } from './get_sample_dashboard_input'; export { getSavedDashboardMock } from './get_saved_dashboard_mock'; +export { makeDefaultServices } from './make_default_services'; diff --git a/src/plugins/dashboard/public/application/test_helpers/make_default_services.ts b/src/plugins/dashboard/public/application/test_helpers/make_default_services.ts new file mode 100644 index 00000000000000..41da74dbba778a --- /dev/null +++ b/src/plugins/dashboard/public/application/test_helpers/make_default_services.ts @@ -0,0 +1,97 @@ +/* + * Copyright 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 { DashboardSessionStorage } from '../lib'; +import { dataPluginMock } from '../../../../data/public/mocks'; +import { getSavedDashboardMock } from './get_saved_dashboard_mock'; +import { UrlForwardingStart } from '../../../../url_forwarding/public'; +import { NavigationPublicPluginStart } from '../../services/navigation'; +import { DashboardAppServices, DashboardAppCapabilities } from '../../types'; +import { embeddablePluginMock } from '../../../../embeddable/public/mocks'; +import { IndexPatternsContract, SavedQueryService } from '../../services/data'; +import { savedObjectsPluginMock } from '../../../../saved_objects/public/mocks'; +import { visualizationsPluginMock } from '../../../../visualizations/public/mocks'; +import { PluginInitializerContext, ScopedHistory } from '../../../../../core/public'; +import { SavedObjectLoader, SavedObjectLoaderFindOptions } from '../../services/saved_objects'; +import { + chromeServiceMock, + coreMock, + uiSettingsServiceMock, +} from '../../../../../core/public/mocks'; + +export function makeDefaultServices(): DashboardAppServices { + const core = coreMock.createStart(); + core.overlays.openConfirm = jest.fn().mockResolvedValue(true); + + const savedDashboards = {} as SavedObjectLoader; + savedDashboards.find = (search: string, sizeOrOptions: number | SavedObjectLoaderFindOptions) => { + const size = typeof sizeOrOptions === 'number' ? sizeOrOptions : sizeOrOptions.size ?? 10; + const hits = []; + for (let i = 0; i < size; i++) { + hits.push({ + id: `dashboard${i}`, + title: `dashboard${i} - ${search} - title`, + description: `dashboard${i} desc`, + }); + } + return Promise.resolve({ + total: size, + hits, + }); + }; + savedDashboards.get = jest + .fn() + .mockImplementation((id?: string) => Promise.resolve(getSavedDashboardMock({ id }))); + + const dashboardSessionStorage = ({ + getDashboardIdsWithUnsavedChanges: jest + .fn() + .mockResolvedValue(['dashboardUnsavedOne', 'dashboardUnsavedTwo']), + getState: jest.fn().mockReturnValue(undefined), + setState: jest.fn(), + } as unknown) as DashboardSessionStorage; + dashboardSessionStorage.clearState = jest.fn(); + + const defaultCapabilities: DashboardAppCapabilities = { + show: true, + createNew: true, + saveQuery: true, + createShortUrl: true, + hideWriteControls: false, + storeSearchSession: true, + mapsCapabilities: { save: true }, + visualizeCapabilities: { save: true }, + }; + const initializerContext = { + env: { packageInfo: { version: '8.0.0' } }, + } as PluginInitializerContext; + + return { + visualizations: visualizationsPluginMock.createStartContract(), + savedObjects: savedObjectsPluginMock.createStartContract(), + embeddable: embeddablePluginMock.createInstance().doStart(), + uiSettings: uiSettingsServiceMock.createStartContract(), + chrome: chromeServiceMock.createStartContract(), + navigation: {} as NavigationPublicPluginStart, + savedObjectsClient: core.savedObjects.client, + dashboardCapabilities: defaultCapabilities, + data: dataPluginMock.createStartContract(), + indexPatterns: {} as IndexPatternsContract, + savedQueryService: {} as SavedQueryService, + scopedHistory: () => ({} as ScopedHistory), + setHeaderActionMenu: (mountPoint) => {}, + urlForwarding: {} as UrlForwardingStart, + allowByValueEmbeddables: true, + restorePreviousUrl: () => {}, + onAppLeave: (handler) => {}, + dashboardSessionStorage, + initializerContext, + savedDashboards, + core, + }; +} diff --git a/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx b/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx index e1a62fe980f552..1cfa39d5e0e79b 100644 --- a/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx +++ b/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx @@ -7,92 +7,94 @@ */ import { METRIC_TYPE } from '@kbn/analytics'; +import { Required } from '@kbn/utility-types'; import { EuiHorizontalRule } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import angular from 'angular'; +import UseUnmount from 'react-use/lib/useUnmount'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import UseUnmount from 'react-use/lib/useUnmount'; +import { saveDashboard } from '../lib'; +import { TopNavIds } from './top_nav_ids'; +import { EditorMenu } from './editor_menu'; import { UI_SETTINGS } from '../../../common'; +import { SavedQuery } from '../../services/data'; +import { DashboardSaveModal } from './save_modal'; +import { showCloneModal } from './show_clone_modal'; +import { ShowShareModal } from './show_share_modal'; +import { getTopNavConfig } from './get_top_nav_config'; +import { OverlayRef } from '../../../../../core/public'; +import { useKibana } from '../../services/kibana_react'; +import { showOptionsPopover } from './show_options_popover'; +import { DashboardConstants } from '../../dashboard_constants'; +import { TopNavMenuProps } from '../../../../navigation/public'; +import { confirmDiscardUnsavedChanges } from '../listing/confirm_overlays'; import { BaseVisType, VisTypeAlias } from '../../../../visualizations/public'; +import { DashboardAppState, DashboardSaveOptions, NavAction } from '../../types'; +import { isErrorEmbeddable, openAddPanelFlyout, ViewMode } from '../../services/embeddable'; +import { DashboardAppServices, DashboardEmbedSettings, DashboardRedirect } from '../../types'; +import { getSavedObjectFinder, SaveResult, showSaveModal } from '../../services/saved_objects'; +import { getCreateVisualizationButtonTitle, unsavedChangesBadge } from '../../dashboard_strings'; +import { + setFullScreenMode, + setHidePanelTitles, + setSavedQueryId, + setStateFromSaveModal, + setSyncColors, + setUseMargins, + setViewMode, + useDashboardDispatch, + useDashboardSelector, +} from '../state'; + import { AddFromLibraryButton, + LazyLabsFlyout, PrimaryActionButton, QuickButtonGroup, - SolutionToolbar, QuickButtonProps, + SolutionToolbar, + withSuspense, } from '../../../../presentation_util/public'; -import { useKibana } from '../../services/kibana_react'; -import { IndexPattern, SavedQuery, TimefilterContract } from '../../services/data'; -import { isErrorEmbeddable, openAddPanelFlyout, ViewMode } from '../../services/embeddable'; -import { - getSavedObjectFinder, - SavedObjectSaveOpts, - SaveResult, - showSaveModal, -} from '../../services/saved_objects'; -import { LazyLabsFlyout, withSuspense } from '../../../../presentation_util/public'; - -import { NavAction } from '../../types'; -import { DashboardSavedObject } from '../..'; -import { DashboardStateManager } from '../dashboard_state_manager'; -import { saveDashboard } from '../lib'; -import { - DashboardAppServices, - DashboardEmbedSettings, - DashboardRedirect, - DashboardSaveOptions, -} from '../types'; -import { getTopNavConfig } from './get_top_nav_config'; -import { DashboardSaveModal } from './save_modal'; -import { showCloneModal } from './show_clone_modal'; -import { showOptionsPopover } from './show_options_popover'; -import { TopNavIds } from './top_nav_ids'; -import { ShowShareModal } from './show_share_modal'; -import { confirmDiscardOrKeepUnsavedChanges } from '../listing/confirm_overlays'; -import { OverlayRef } from '../../../../../core/public'; -import { DashboardConstants } from '../../dashboard_constants'; -import { getNewDashboardTitle, unsavedChangesBadge } from '../../dashboard_strings'; -import { DASHBOARD_PANELS_UNSAVED_ID } from '../lib/dashboard_panel_storage'; -import { DashboardContainer } from '..'; -import { EditorMenu } from './editor_menu'; export interface DashboardTopNavState { chromeIsVisible: boolean; addPanelOverlay?: OverlayRef; savedQuery?: SavedQuery; + isSaveInProgress?: boolean; } +type CompleteDashboardAppState = Required< + DashboardAppState, + | 'getLatestDashboardState' + | 'dashboardContainer' + | 'savedDashboard' + | 'indexPatterns' + | 'applyFilters' +>; + +export const isCompleteDashboardAppState = ( + state: DashboardAppState +): state is CompleteDashboardAppState => { + return ( + Boolean(state.getLatestDashboardState) && + Boolean(state.dashboardContainer) && + Boolean(state.savedDashboard) && + Boolean(state.indexPatterns) && + Boolean(state.applyFilters) + ); +}; + export interface DashboardTopNavProps { - onQuerySubmit: (_payload: unknown, isUpdate: boolean | undefined) => void; - dashboardStateManager: DashboardStateManager; - dashboardContainer: DashboardContainer; + dashboardAppState: CompleteDashboardAppState; embedSettings?: DashboardEmbedSettings; - savedDashboard: DashboardSavedObject; - timefilter: TimefilterContract; - indexPatterns: IndexPattern[]; redirectTo: DashboardRedirect; - unsavedChanges: boolean; - clearUnsavedChanges: () => void; - lastDashboardId?: string; - viewMode: ViewMode; } -const Flyout = withSuspense(LazyLabsFlyout, null); +const LabsFlyout = withSuspense(LazyLabsFlyout, null); export function DashboardTopNav({ - dashboardStateManager, - clearUnsavedChanges, - dashboardContainer, - lastDashboardId, - unsavedChanges, - savedDashboard, - onQuerySubmit, + dashboardAppState, embedSettings, - indexPatterns, redirectTo, - timefilter, - viewMode, }: DashboardTopNavProps) { const { core, @@ -102,17 +104,24 @@ export function DashboardTopNav({ embeddable, navigation, uiSettings, - setHeaderActionMenu, + visualizations, + usageCollection, + initializerContext, savedObjectsTagging, + setHeaderActionMenu, dashboardCapabilities, - dashboardPanelStorage, + dashboardSessionStorage, allowByValueEmbeddables, - visualizations, - usageCollection, } = useKibana().services; + const { version: kibanaVersion } = initializerContext.env.packageInfo; + const timefilter = data.query.timefilter.timefilter; + const toasts = core.notifications.toasts; + + const dispatchDashboardStateChange = useDashboardDispatch(); + const dashboardState = useDashboardSelector((state) => state.dashboardStateReducer); + const [mounted, setMounted] = useState(true); const [state, setState] = useState({ chromeIsVisible: false }); - const [isSaveInProgress, setIsSaveInProgress] = useState(false); const [isLabsShown, setIsLabsShown] = useState(false); const lensAlias = visualizations.getAliases().find(({ name }) => name === 'lens'); @@ -130,25 +139,25 @@ export function DashboardTopNav({ const visibleSubscription = chrome.getIsVisible$().subscribe((chromeIsVisible) => { setState((s) => ({ ...s, chromeIsVisible })); }); - const { id, title, getFullEditPath } = savedDashboard; - if (id || allowByValueEmbeddables) { + const { id, title, getFullEditPath } = dashboardAppState.savedDashboard; + if (id && title) { chrome.recentlyAccessed.add( - getFullEditPath(dashboardStateManager.getIsEditMode()), - title || getNewDashboardTitle(), - id || DASHBOARD_PANELS_UNSAVED_ID + getFullEditPath(dashboardState.viewMode === ViewMode.EDIT), + title, + id ); } return () => { visibleSubscription.unsubscribe(); }; - }, [chrome, allowByValueEmbeddables, dashboardStateManager, savedDashboard]); + }, [chrome, allowByValueEmbeddables, dashboardState.viewMode, dashboardAppState.savedDashboard]); const addFromLibrary = useCallback(() => { - if (!isErrorEmbeddable(dashboardContainer)) { + if (!isErrorEmbeddable(dashboardAppState.dashboardContainer)) { setState((s) => ({ ...s, addPanelOverlay: openAddPanelFlyout({ - embeddable: dashboardContainer, + embeddable: dashboardAppState.dashboardContainer, getAllFactories: embeddable.getEmbeddableFactories, getFactory: embeddable.getEmbeddableFactory, notifications: core.notifications, @@ -158,9 +167,9 @@ export function DashboardTopNav({ })); } }, [ + dashboardAppState.dashboardContainer, embeddable.getEmbeddableFactories, embeddable.getEmbeddableFactory, - dashboardContainer, core.notifications, core.savedObjects, core.overlays, @@ -209,291 +218,220 @@ export function DashboardTopNav({ const onChangeViewMode = useCallback( (newMode: ViewMode) => { clearAddPanel(); - const isPageRefresh = newMode === dashboardStateManager.getViewMode(); - const isLeavingEditMode = !isPageRefresh && newMode === ViewMode.VIEW; - const willLoseChanges = isLeavingEditMode && dashboardStateManager.getIsDirty(timefilter); - - function switchViewMode() { - dashboardStateManager.switchViewMode(newMode); - - if (savedDashboard?.id && allowByValueEmbeddables) { - const { getFullEditPath, title, id } = savedDashboard; - chrome.recentlyAccessed.add(getFullEditPath(newMode === ViewMode.EDIT), title, id); - } - } + const willLoseChanges = newMode === ViewMode.VIEW && dashboardAppState.hasUnsavedChanges; if (!willLoseChanges) { - switchViewMode(); + dispatchDashboardStateChange(setViewMode(newMode)); return; } - function discardChanges() { - dashboardStateManager.resetState(); - dashboardStateManager.clearUnsavedPanels(); - - // We need to do a hard reset of the timepicker. appState will not reload like - // it does on 'open' because it's been saved to the url and the getAppState.previouslyStored() check on - // reload will cause it not to sync. - if (dashboardStateManager.getIsTimeSavedWithDashboard()) { - dashboardStateManager.syncTimefilterWithDashboardTime(timefilter); - dashboardStateManager.syncTimefilterWithDashboardRefreshInterval(timefilter); - } - dashboardStateManager.switchViewMode(ViewMode.VIEW); - } - confirmDiscardOrKeepUnsavedChanges(core.overlays).then((selection) => { - if (selection === 'discard') { - discardChanges(); - } - if (selection !== 'cancel') { - switchViewMode(); - } - }); - }, - [ - timefilter, - core.overlays, - clearAddPanel, - savedDashboard, - dashboardStateManager, - allowByValueEmbeddables, - chrome.recentlyAccessed, - ] - ); - - /** - * Saves the dashboard. - * - * @param {object} [saveOptions={}] - * @property {boolean} [saveOptions.confirmOverwrite=false] - If true, attempts to create the source so it - * can confirm an overwrite if a document with the id already exists. - * @property {boolean} [saveOptions.isTitleDuplicateConfirmed=false] - If true, save allowed with duplicate title - * @property {func} [saveOptions.onTitleDuplicate] - function called if duplicate title exists. - * When not provided, confirm modal will be displayed asking user to confirm or cancel save. - * @return {Promise} - * @resolved {String} - The id of the doc - */ - const save = useCallback( - async (saveOptions: SavedObjectSaveOpts) => { - setIsSaveInProgress(true); - return saveDashboard(angular.toJson, timefilter, dashboardStateManager, saveOptions) - .then(function (id) { - if (id) { - core.notifications.toasts.addSuccess({ - title: i18n.translate('dashboard.dashboardWasSavedSuccessMessage', { - defaultMessage: `Dashboard '{dashTitle}' was saved`, - values: { dashTitle: dashboardStateManager.savedDashboard.title }, - }), - 'data-test-subj': 'saveDashboardSuccess', - }); - - dashboardPanelStorage.clearPanels(lastDashboardId); - if (id !== lastDashboardId) { - redirectTo({ - id, - // editMode: true, - destination: 'dashboard', - useReplace: true, - }); - } else { - dashboardStateManager.resetState(); - chrome.docTitle.change(dashboardStateManager.savedDashboard.lastSavedTitle); - } - } - setIsSaveInProgress(false); - return { id }; - }) - .catch((error) => { - core.notifications?.toasts.addDanger({ - title: i18n.translate('dashboard.dashboardWasNotSavedDangerMessage', { - defaultMessage: `Dashboard '{dashTitle}' was not saved. Error: {errorMessage}`, - values: { - dashTitle: dashboardStateManager.savedDashboard.title, - errorMessage: error.message, - }, - }), - 'data-test-subj': 'saveDashboardFailure', - }); - return { error }; - }); + confirmDiscardUnsavedChanges(core.overlays, () => + dashboardAppState.resetToLastSavedState?.() + ); }, - [ - core.notifications.toasts, - dashboardStateManager, - dashboardPanelStorage, - lastDashboardId, - chrome.docTitle, - redirectTo, - timefilter, - ] + [clearAddPanel, core.overlays, dashboardAppState, dispatchDashboardStateChange] ); - const runSave = useCallback(async () => { - const currentTitle = dashboardStateManager.getTitle(); - const currentDescription = dashboardStateManager.getDescription(); - const currentTimeRestore = dashboardStateManager.getTimeRestore(); - - let currentTags: string[] = []; - if (savedObjectsTagging) { - const dashboard = dashboardStateManager.savedDashboard; - if (savedObjectsTagging.ui.hasTagDecoration(dashboard)) { - currentTags = dashboard.getTags(); - } - } - - const onSave = ({ + const runSaveAs = useCallback(async () => { + const currentState = dashboardAppState.getLatestDashboardState(); + const onSave = async ({ + newTags, newTitle, newDescription, newCopyOnSave, newTimeRestore, onTitleDuplicate, isTitleDuplicateConfirmed, - newTags, }: DashboardSaveOptions): Promise => { - dashboardStateManager.setTitle(newTitle); - dashboardStateManager.setDescription(newDescription); - dashboardStateManager.savedDashboard.copyOnSave = newCopyOnSave; - dashboardStateManager.setTimeRestore(newTimeRestore); - if (savedObjectsTagging && newTags) { - dashboardStateManager.setTags(newTags); - } - const saveOptions = { confirmOverwrite: false, isTitleDuplicateConfirmed, onTitleDuplicate, }; + const stateFromSaveModal = { + title: newTitle, + description: newDescription, + timeRestore: newTimeRestore, + tags: [] as string[], + }; + if (savedObjectsTagging && newTags) { + stateFromSaveModal.tags = newTags; + } - return save(saveOptions).then((response: SaveResult) => { - // If the save wasn't successful, put the original values back. - if (!(response as { id: string }).id) { - dashboardStateManager.setTitle(currentTitle); - dashboardStateManager.setDescription(currentDescription); - dashboardStateManager.setTimeRestore(currentTimeRestore); - if (savedObjectsTagging) { - dashboardStateManager.setTags(currentTags); - } - } - return response; + dashboardAppState.savedDashboard.copyOnSave = newCopyOnSave; + const saveResult = await saveDashboard({ + toasts, + timefilter, + redirectTo, + saveOptions, + savedObjectsTagging, + version: kibanaVersion, + dashboardSessionStorage, + savedDashboard: dashboardAppState.savedDashboard, + currentState: { ...currentState, ...stateFromSaveModal }, }); + if (saveResult.id && !saveResult.redirected) { + dispatchDashboardStateChange(setStateFromSaveModal(stateFromSaveModal)); + dashboardAppState.updateLastSavedState?.(); + chrome.docTitle.change(stateFromSaveModal.title); + } + return saveResult.id ? { id: saveResult.id } : { error: saveResult.error }; }; + const lastDashboardId = dashboardAppState.savedDashboard.id; + const currentTags = savedObjectsTagging?.ui.hasTagDecoration(dashboardAppState.savedDashboard) + ? dashboardAppState.savedDashboard.getTags() + : []; const dashboardSaveModal = ( {}} - title={currentTitle} - description={currentDescription} tags={currentTags} + title={currentState.title} + timeRestore={currentState.timeRestore} + description={currentState.description} savedObjectsTagging={savedObjectsTagging} - timeRestore={currentTimeRestore} showCopyOnSave={lastDashboardId ? true : false} /> ); clearAddPanel(); showSaveModal(dashboardSaveModal, core.i18n.Context); }, [ - save, - clearAddPanel, - lastDashboardId, - core.i18n.Context, + dispatchDashboardStateChange, + dashboardSessionStorage, savedObjectsTagging, - dashboardStateManager, + dashboardAppState, + core.i18n.Context, + chrome.docTitle, + clearAddPanel, + kibanaVersion, + timefilter, + redirectTo, + toasts, ]); const runQuickSave = useCallback(async () => { - const currentTitle = dashboardStateManager.getTitle(); - const currentDescription = dashboardStateManager.getDescription(); - const currentTimeRestore = dashboardStateManager.getTimeRestore(); - - let currentTags: string[] = []; - if (savedObjectsTagging) { - const dashboard = dashboardStateManager.savedDashboard; - if (savedObjectsTagging.ui.hasTagDecoration(dashboard)) { - currentTags = dashboard.getTags(); - } - } - - setIsSaveInProgress(true); - save({}).then((response: SaveResult) => { - // If the save wasn't successful, put the original values back. - if (!(response as { id: string }).id) { - dashboardStateManager.setTitle(currentTitle); - dashboardStateManager.setDescription(currentDescription); - dashboardStateManager.setTimeRestore(currentTimeRestore); - if (savedObjectsTagging) { - dashboardStateManager.setTags(currentTags); - } - } else { - clearUnsavedChanges(); - } - setIsSaveInProgress(false); - return response; + setState((s) => ({ ...s, isSaveInProgress: true })); + const currentState = dashboardAppState.getLatestDashboardState(); + const saveResult = await saveDashboard({ + toasts, + timefilter, + redirectTo, + currentState, + saveOptions: {}, + savedObjectsTagging, + version: kibanaVersion, + dashboardSessionStorage, + savedDashboard: dashboardAppState.savedDashboard, }); - }, [save, savedObjectsTagging, dashboardStateManager, clearUnsavedChanges]); + if (saveResult.id && !saveResult.redirected) { + dashboardAppState.updateLastSavedState?.(); + } + // turn off save in progress after the next change check. This prevents the save button from flashing + setTimeout(() => { + if (!mounted) return; + setState((s) => ({ ...s, isSaveInProgress: false })); + }, DashboardConstants.CHANGE_CHECK_DEBOUNCE); + }, [ + dashboardSessionStorage, + savedObjectsTagging, + dashboardAppState, + kibanaVersion, + timefilter, + redirectTo, + mounted, + toasts, + ]); const runClone = useCallback(() => { - const currentTitle = dashboardStateManager.getTitle(); + const currentState = dashboardAppState.getLatestDashboardState(); const onClone = async ( newTitle: string, isTitleDuplicateConfirmed: boolean, onTitleDuplicate: () => void ) => { - dashboardStateManager.savedDashboard.copyOnSave = true; - dashboardStateManager.setTitle(newTitle); + dashboardAppState.savedDashboard.copyOnSave = true; const saveOptions = { confirmOverwrite: false, isTitleDuplicateConfirmed, onTitleDuplicate, }; - return save(saveOptions).then((response: { id?: string } | { error: Error }) => { - // If the save wasn't successful, put the original title back. - if ((response as { error: Error }).error) { - dashboardStateManager.setTitle(currentTitle); - } - return response; + const saveResult = await saveDashboard({ + toasts, + timefilter, + redirectTo, + saveOptions, + savedObjectsTagging, + version: kibanaVersion, + dashboardSessionStorage, + savedDashboard: dashboardAppState.savedDashboard, + currentState: { ...currentState, title: newTitle }, }); + return saveResult.id ? { id: saveResult.id } : { error: saveResult.error }; }; + showCloneModal(onClone, currentState.title); + }, [ + dashboardSessionStorage, + savedObjectsTagging, + dashboardAppState, + kibanaVersion, + redirectTo, + timefilter, + toasts, + ]); - showCloneModal(onClone, currentTitle); - }, [dashboardStateManager, save]); + const showOptions = useCallback( + (anchorElement: HTMLElement) => { + const currentState = dashboardAppState.getLatestDashboardState(); + showOptionsPopover({ + anchorElement, + useMargins: currentState.options.useMargins, + onUseMarginsChange: (isChecked: boolean) => { + dispatchDashboardStateChange(setUseMargins(isChecked)); + }, + syncColors: Boolean(currentState.options.syncColors), + onSyncColorsChange: (isChecked: boolean) => { + dispatchDashboardStateChange(setSyncColors(isChecked)); + }, + hidePanelTitles: currentState.options.hidePanelTitles, + onHidePanelTitlesChange: (isChecked: boolean) => { + dispatchDashboardStateChange(setHidePanelTitles(isChecked)); + }, + }); + }, + [dashboardAppState, dispatchDashboardStateChange] + ); + + const showShare = useCallback( + (anchorElement: HTMLElement) => { + if (!share) return; + const currentState = dashboardAppState.getLatestDashboardState(); + ShowShareModal({ + share, + kibanaVersion, + anchorElement, + dashboardCapabilities, + currentDashboardState: currentState, + savedDashboard: dashboardAppState.savedDashboard, + isDirty: Boolean(dashboardAppState.hasUnsavedChanges), + }); + }, + [dashboardAppState, dashboardCapabilities, share, kibanaVersion] + ); const dashboardTopNavActions = useMemo(() => { const actions = { - [TopNavIds.FULL_SCREEN]: () => { - dashboardStateManager.setFullScreenMode(true); - }, + [TopNavIds.FULL_SCREEN]: () => dispatchDashboardStateChange(setFullScreenMode(true)), [TopNavIds.EXIT_EDIT_MODE]: () => onChangeViewMode(ViewMode.VIEW), [TopNavIds.ENTER_EDIT_MODE]: () => onChangeViewMode(ViewMode.EDIT), - [TopNavIds.SAVE]: runSave, [TopNavIds.QUICK_SAVE]: runQuickSave, + [TopNavIds.OPTIONS]: showOptions, + [TopNavIds.SAVE]: runSaveAs, [TopNavIds.CLONE]: runClone, - [TopNavIds.OPTIONS]: (anchorElement) => { - showOptionsPopover({ - anchorElement, - useMargins: dashboardStateManager.getUseMargins(), - onUseMarginsChange: (isChecked: boolean) => { - dashboardStateManager.setUseMargins(isChecked); - }, - syncColors: dashboardStateManager.getSyncColors(), - onSyncColorsChange: (isChecked: boolean) => { - dashboardStateManager.setSyncColors(isChecked); - }, - hidePanelTitles: dashboardStateManager.getHidePanelTitles(), - onHidePanelTitlesChange: (isChecked: boolean) => { - dashboardStateManager.setHidePanelTitles(isChecked); - }, - }); - }, } as { [key: string]: NavAction }; + if (share) { - actions[TopNavIds.SHARE] = (anchorElement) => - ShowShareModal({ - share, - anchorElement, - savedDashboard, - dashboardStateManager, - dashboardCapabilities, - }); + actions[TopNavIds.SHARE] = showShare; } if (isLabsEnabled) { @@ -503,13 +441,13 @@ export function DashboardTopNav({ } return actions; }, [ - dashboardCapabilities, - dashboardStateManager, + dispatchDashboardStateChange, onChangeViewMode, - savedDashboard, - runClone, - runSave, runQuickSave, + showOptions, + runSaveAs, + showShare, + runClone, share, isLabsEnabled, isLabsShown, @@ -517,43 +455,49 @@ export function DashboardTopNav({ UseUnmount(() => { clearAddPanel(); + setMounted(false); }); - const getNavBarProps = () => { + const getNavBarProps = (): TopNavMenuProps => { + const { hasUnsavedChanges, savedDashboard } = dashboardAppState; const shouldShowNavBarComponent = (forceShow: boolean): boolean => - (forceShow || state.chromeIsVisible) && !dashboardStateManager.getFullScreenMode(); + (forceShow || state.chromeIsVisible) && !dashboardState.fullScreenMode; const shouldShowFilterBar = (forceHide: boolean): boolean => !forceHide && - (data.query.filterManager.getFilters().length > 0 || - !dashboardStateManager.getFullScreenMode()); + (data.query.filterManager.getFilters().length > 0 || !dashboardState.fullScreenMode); - const isFullScreenMode = dashboardStateManager.getFullScreenMode(); - const screenTitle = dashboardStateManager.getTitle(); + const isFullScreenMode = dashboardState.fullScreenMode; const showTopNavMenu = shouldShowNavBarComponent(Boolean(embedSettings?.forceShowTopNavMenu)); const showQueryInput = shouldShowNavBarComponent(Boolean(embedSettings?.forceShowQueryInput)); const showDatePicker = shouldShowNavBarComponent(Boolean(embedSettings?.forceShowDatePicker)); - const showQueryBar = showQueryInput || showDatePicker; const showFilterBar = shouldShowFilterBar(Boolean(embedSettings?.forceHideFilterBar)); + const showQueryBar = showQueryInput || showDatePicker; const showSearchBar = showQueryBar || showFilterBar; + const screenTitle = dashboardState.title; + + const topNav = getTopNavConfig( + dashboardAppState.getLatestDashboardState().viewMode, + dashboardTopNavActions, + { + hideWriteControls: dashboardCapabilities.hideWriteControls, + isDirty: Boolean(dashboardAppState.hasUnsavedChanges), + isSaveInProgress: state.isSaveInProgress, + isNewDashboard: !savedDashboard.id, + isLabsEnabled, + } + ); - const topNav = getTopNavConfig(viewMode, dashboardTopNavActions, { - hideWriteControls: dashboardCapabilities.hideWriteControls, - isNewDashboard: !savedDashboard.id, - isDirty: dashboardStateManager.getIsDirty(timefilter), - isSaveInProgress, - isLabsEnabled, - }); - - const badges = unsavedChanges - ? [ - { - 'data-test-subj': 'dashboardUnsavedChangesBadge', - badgeText: unsavedChangesBadge.getUnsavedChangedBadgeText(), - color: 'secondary', - }, - ] - : undefined; + const badges = + hasUnsavedChanges && dashboardState.viewMode === ViewMode.EDIT + ? [ + { + 'data-test-subj': 'dashboardUnsavedChangesBadge', + badgeText: unsavedChangesBadge.getUnsavedChangedBadgeText(), + color: 'secondary', + }, + ] + : undefined; return { badges, @@ -561,36 +505,25 @@ export function DashboardTopNav({ config: showTopNavMenu ? topNav : undefined, className: isFullScreenMode ? 'kbnTopNavMenu-isFullScreen' : undefined, screenTitle, - showTopNavMenu, showSearchBar, showQueryBar, showQueryInput, showDatePicker, showFilterBar, setMenuMountPoint: embedSettings ? undefined : setHeaderActionMenu, - indexPatterns, + indexPatterns: dashboardAppState.indexPatterns, showSaveQuery: dashboardCapabilities.saveQuery, useDefaultBehaviors: true, - onQuerySubmit, - onSavedQueryUpdated: (savedQuery: SavedQuery) => { - const allFilters = data.query.filterManager.getFilters(); - data.query.filterManager.setFilters(allFilters); - dashboardStateManager.applyFilters(savedQuery.attributes.query, allFilters); - if (savedQuery.attributes.timefilter) { - timefilter.setTime({ - from: savedQuery.attributes.timefilter.from, - to: savedQuery.attributes.timefilter.to, - }); - if (savedQuery.attributes.timefilter.refreshInterval) { - timefilter.setRefreshInterval(savedQuery.attributes.timefilter.refreshInterval); - } + savedQuery: state.savedQuery, + savedQueryId: dashboardState.savedQuery, + onQuerySubmit: (_payload, isUpdate) => { + if (isUpdate === false) { + dashboardAppState.$triggerDashboardRefresh.next({ force: true }); } - setState((s) => ({ ...s, savedQuery })); }, - savedQuery: state.savedQuery, - savedQueryId: dashboardStateManager.getSavedQueryId(), - onSavedQueryIdChange: (newId: string | undefined) => - dashboardStateManager.setSavedQueryId(newId), + onSavedQueryIdChange: (newId: string | undefined) => { + dispatchDashboardStateChange(setSavedQueryId(newId)); + }, }; }; @@ -636,9 +569,9 @@ export function DashboardTopNav({ <> {isLabsEnabled && isLabsShown ? ( - setIsLabsShown(false)} /> + setIsLabsShown(false)} /> ) : null} - {viewMode !== ViewMode.VIEW ? ( + {dashboardState.viewMode !== ViewMode.VIEW ? ( <> @@ -646,9 +579,7 @@ export function DashboardTopNav({ primaryActionButton: ( , ], }} diff --git a/src/plugins/dashboard/public/application/top_nav/editor_menu.tsx b/src/plugins/dashboard/public/application/top_nav/editor_menu.tsx index 5205f5b294c4fc..90cf0fcd571a15 100644 --- a/src/plugins/dashboard/public/application/top_nav/editor_menu.tsx +++ b/src/plugins/dashboard/public/application/top_nav/editor_menu.tsx @@ -18,7 +18,7 @@ import { BaseVisType, VisGroups, VisTypeAlias } from '../../../../visualizations import { SolutionToolbarPopover } from '../../../../presentation_util/public'; import { EmbeddableFactoryDefinition, EmbeddableInput } from '../../services/embeddable'; import { useKibana } from '../../services/kibana_react'; -import { DashboardAppServices } from '../types'; +import { DashboardAppServices } from '../../types'; import { DashboardContainer } from '..'; import { DashboardConstants } from '../../dashboard_constants'; import { dashboardReplacePanelAction } from '../../dashboard_strings'; diff --git a/src/plugins/dashboard/public/application/top_nav/save_modal.tsx b/src/plugins/dashboard/public/application/top_nav/save_modal.tsx index 5b1fbe7374dac6..79ac3917fb9680 100644 --- a/src/plugins/dashboard/public/application/top_nav/save_modal.tsx +++ b/src/plugins/dashboard/public/application/top_nav/save_modal.tsx @@ -12,7 +12,7 @@ import { EuiFormRow, EuiTextArea, EuiSwitch } from '@elastic/eui'; import type { SavedObjectsTaggingApi } from '../../services/saved_objects_tagging_oss'; import { SavedObjectSaveModal } from '../../services/saved_objects'; -import { DashboardSaveOptions } from '../types'; +import { DashboardSaveOptions } from '../../types'; interface Props { onSave: ({ diff --git a/src/plugins/dashboard/public/application/top_nav/show_share_modal.tsx b/src/plugins/dashboard/public/application/top_nav/show_share_modal.tsx index a96b1ebd4f1ff0..239d2bf72b9c11 100644 --- a/src/plugins/dashboard/public/application/top_nav/show_share_modal.tsx +++ b/src/plugins/dashboard/public/application/top_nav/show_share_modal.tsx @@ -14,18 +14,20 @@ import { DashboardSavedObject } from '../..'; import { setStateToKbnUrl, unhashUrl } from '../../services/kibana_utils'; import { SharePluginStart } from '../../services/share'; import { dashboardUrlParams } from '../dashboard_router'; -import { DashboardStateManager } from '../dashboard_state_manager'; import { shareModalStrings } from '../../dashboard_strings'; -import { DashboardAppCapabilities } from '../types'; +import { DashboardAppCapabilities, DashboardState } from '../../types'; +import { stateToRawDashboardState } from '../lib/convert_dashboard_state'; const showFilterBarId = 'showFilterBar'; interface ShowShareModalProps { + isDirty: boolean; + kibanaVersion: string; share: SharePluginStart; anchorElement: HTMLElement; savedDashboard: DashboardSavedObject; + currentDashboardState: DashboardState; dashboardCapabilities: DashboardAppCapabilities; - dashboardStateManager: DashboardStateManager; } export const showPublicUrlSwitch = (anonymousUserCapabilities: Capabilities) => { @@ -38,10 +40,12 @@ export const showPublicUrlSwitch = (anonymousUserCapabilities: Capabilities) => export function ShowShareModal({ share, + isDirty, + kibanaVersion, anchorElement, savedDashboard, dashboardCapabilities, - dashboardStateManager, + currentDashboardState, }: ShowShareModalProps) { const EmbedUrlParamExtension = ({ setParamValue, @@ -101,12 +105,13 @@ export function ShowShareModal({ }; share.toggleShareContextMenu({ + isDirty, anchorElement, allowEmbed: true, allowShortUrl: dashboardCapabilities.createShortUrl, shareableUrl: setStateToKbnUrl( '_a', - dashboardStateManager.getAppState(), + stateToRawDashboardState({ state: currentDashboardState, version: kibanaVersion }), { useHash: false, storeInHashQuery: true }, unhashUrl(window.location.href) ), @@ -115,7 +120,6 @@ export function ShowShareModal({ sharingData: { title: savedDashboard.title, }, - isDirty: dashboardStateManager.getIsDirty(), embedUrlParamExtensions: [ { paramName: 'embed', diff --git a/src/plugins/dashboard/public/application/types.ts b/src/plugins/dashboard/public/application/types.ts deleted file mode 100644 index aae8a1f6eca540..00000000000000 --- a/src/plugins/dashboard/public/application/types.ts +++ /dev/null @@ -1,88 +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 { - AppMountParameters, - CoreStart, - SavedObjectsClientContract, - ScopedHistory, - ChromeStart, - IUiSettingsClient, - PluginInitializerContext, -} from 'kibana/public'; - -import { SharePluginStart } from '../services/share'; -import { EmbeddableStart } from '../services/embeddable'; -import { UsageCollectionSetup } from '../services/usage_collection'; -import { NavigationPublicPluginStart } from '../services/navigation'; -import { SavedObjectsTaggingApi } from '../services/saved_objects_tagging_oss'; -import { DataPublicPluginStart, IndexPatternsContract } from '../services/data'; -import { SavedObjectLoader, SavedObjectsStart } from '../services/saved_objects'; -import { DashboardPanelStorage } from './lib'; -import { UrlForwardingStart } from '../../../url_forwarding/public'; -import { VisualizationsStart } from '../../../visualizations/public'; - -export type DashboardRedirect = (props: RedirectToProps) => void; -export type RedirectToProps = - | { destination: 'dashboard'; id?: string; useReplace?: boolean; editMode?: boolean } - | { destination: 'listing'; filter?: string; useReplace?: boolean }; - -export interface DashboardEmbedSettings { - forceShowTopNavMenu?: boolean; - forceShowQueryInput?: boolean; - forceShowDatePicker?: boolean; - forceHideFilterBar?: boolean; -} - -export interface DashboardSaveOptions { - newTitle: string; - newTags?: string[]; - newDescription: string; - newCopyOnSave: boolean; - newTimeRestore: boolean; - onTitleDuplicate: () => void; - isTitleDuplicateConfirmed: boolean; -} - -export interface DashboardAppCapabilities { - visualizeCapabilities: { save: boolean }; - mapsCapabilities: { save: boolean }; - hideWriteControls: boolean; - createShortUrl: boolean; - saveQuery: boolean; - createNew: boolean; - show: boolean; - storeSearchSession: boolean; -} - -export interface DashboardAppServices { - core: CoreStart; - chrome: ChromeStart; - share?: SharePluginStart; - embeddable: EmbeddableStart; - data: DataPublicPluginStart; - uiSettings: IUiSettingsClient; - restorePreviousUrl: () => void; - savedObjects: SavedObjectsStart; - allowByValueEmbeddables: boolean; - urlForwarding: UrlForwardingStart; - savedDashboards: SavedObjectLoader; - scopedHistory: () => ScopedHistory; - indexPatterns: IndexPatternsContract; - usageCollection?: UsageCollectionSetup; - navigation: NavigationPublicPluginStart; - dashboardPanelStorage: DashboardPanelStorage; - dashboardCapabilities: DashboardAppCapabilities; - initializerContext: PluginInitializerContext; - onAppLeave: AppMountParameters['onAppLeave']; - savedObjectsTagging?: SavedObjectsTaggingApi; - savedObjectsClient: SavedObjectsClientContract; - setHeaderActionMenu: AppMountParameters['setHeaderActionMenu']; - savedQueryService: DataPublicPluginStart['query']['savedQueries']; - visualizations: VisualizationsStart; -} diff --git a/src/plugins/dashboard/public/dashboard_constants.ts b/src/plugins/dashboard/public/dashboard_constants.ts index 16cb74209dd79e..7d5123ac27cb68 100644 --- a/src/plugins/dashboard/public/dashboard_constants.ts +++ b/src/plugins/dashboard/public/dashboard_constants.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -const DASHBOARD_STATE_STORAGE_KEY = '_a'; +export const DASHBOARD_STATE_STORAGE_KEY = '_a'; export const DashboardConstants = { LANDING_PAGE_PATH: '/list', @@ -17,6 +17,8 @@ export const DashboardConstants = { DASHBOARDS_ID: 'dashboards', DASHBOARD_ID: 'dashboard', SEARCH_SESSION_ID: 'searchSessionId', + CHANGE_CHECK_DEBOUNCE: 100, + CHANGE_APPLY_DEBOUNCE: 50, }; export function createDashboardEditUrl(id?: string, editMode?: boolean) { diff --git a/src/plugins/dashboard/public/dashboard_strings.ts b/src/plugins/dashboard/public/dashboard_strings.ts index 531ff815312cfe..ef158a149c3770 100644 --- a/src/plugins/dashboard/public/dashboard_strings.ts +++ b/src/plugins/dashboard/public/dashboard_strings.ts @@ -215,6 +215,22 @@ export const dashboardReadonlyBadge = { }), }; +export const dashboardSaveToastStrings = { + getSuccessString: (dashTitle: string) => + i18n.translate('dashboard.dashboardWasSavedSuccessMessage', { + defaultMessage: `Dashboard '{dashTitle}' was saved`, + values: { dashTitle }, + }), + getFailureString: (dashTitle: string, errorMessage: string) => + i18n.translate('dashboard.dashboardWasNotSavedDangerMessage', { + defaultMessage: `Dashboard '{dashTitle}' was not saved. Error: {errorMessage}`, + values: { + dashTitle, + errorMessage, + }, + }), +}; + /* Modals */ @@ -359,17 +375,9 @@ export const emptyScreenStrings = { i18n.translate('dashboard.fillDashboardTitle', { defaultMessage: 'This dashboard is empty. Let\u2019s fill it up!', }), - getHowToStartWorkingOnNewDashboardDescription1: () => - i18n.translate('dashboard.howToStartWorkingOnNewDashboardDescription1', { - defaultMessage: 'Click', - }), - getHowToStartWorkingOnNewDashboardDescription2: () => - i18n.translate('dashboard.howToStartWorkingOnNewDashboardDescription2', { - defaultMessage: 'in the menu bar above to start adding panels.', - }), - getHowToStartWorkingOnNewDashboardEditLinkText: () => - i18n.translate('dashboard.howToStartWorkingOnNewDashboardEditLinkText', { - defaultMessage: 'Edit', + getHowToStartWorkingOnNewDashboardDescription: () => + i18n.translate('dashboard.howToStartWorkingOnNewDashboardDescription', { + defaultMessage: 'Click edit in the menu bar above to start adding panels.', }), getHowToStartWorkingOnNewDashboardEditLinkAriaLabel: () => i18n.translate('dashboard.howToStartWorkingOnNewDashboardEditLinkAriaLabel', { @@ -442,3 +450,8 @@ export const dashboardUnsavedListingStrings = { defaultMessage: 'Discard changes', }), }; + +export const getCreateVisualizationButtonTitle = () => + i18n.translate('dashboard.solutionToolbar.addPanelButtonLabel', { + defaultMessage: 'Create visualization', + }); diff --git a/src/plugins/dashboard/public/index.ts b/src/plugins/dashboard/public/index.ts index 1acd1995b7290a..c584b44286e075 100644 --- a/src/plugins/dashboard/public/index.ts +++ b/src/plugins/dashboard/public/index.ts @@ -11,7 +11,6 @@ import { DashboardPlugin } from './plugin'; export { DashboardContainer, - DashboardContainerInput, DashboardContainerFactoryDefinition, DASHBOARD_CONTAINER_TYPE, } from './application'; @@ -29,7 +28,7 @@ export { DashboardUrlGeneratorState, } from './url_generator'; export { DashboardSavedObject } from './saved_dashboards'; -export { SavedDashboardPanel } from './types'; +export { SavedDashboardPanel, DashboardContainerInput } from './types'; export function plugin(initializerContext: PluginInitializerContext) { return new DashboardPlugin(initializerContext); diff --git a/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts b/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts index 1c9125f8a064e4..7c056e04c1cd63 100644 --- a/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts +++ b/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts @@ -14,6 +14,7 @@ import { createDashboardEditUrl } from '../dashboard_constants'; import { extractReferences, injectReferences } from '../../common/saved_dashboard_references'; import { SavedObjectAttributes, SavedObjectReference } from '../../../../core/types'; +import { DashboardOptions } from '../types'; export interface DashboardSavedObject extends SavedObject { id?: string; @@ -97,9 +98,10 @@ export function createSavedDashboardClass( panelsJSON: '[]', optionsJSON: JSON.stringify({ // for BWC reasons we can't default dashboards that already exist without this setting to true. - useMargins: !id, + useMargins: true, + syncColors: false, hidePanelTitles: false, - }), + } as DashboardOptions), version: 1, timeRestore: false, timeTo: undefined, diff --git a/src/plugins/dashboard/public/types.ts b/src/plugins/dashboard/public/types.ts index 9285944bfe5fe7..89c9adb5721426 100644 --- a/src/plugins/dashboard/public/types.ts +++ b/src/plugins/dashboard/public/types.ts @@ -6,109 +6,195 @@ * Side Public License, v 1. */ -import { SavedObject as SavedObjectType, SavedObjectAttributes } from 'src/core/public'; -import { Query, Filter } from './services/data'; -import { ViewMode } from './services/embeddable'; +import { + AppMountParameters, + CoreStart, + SavedObjectsClientContract, + ScopedHistory, + ChromeStart, + IUiSettingsClient, + PluginInitializerContext, +} from 'kibana/public'; -import { SavedDashboardPanel } from '../common/types'; -export { SavedDashboardPanel }; +import { History } from 'history'; +import { AnyAction, Dispatch } from 'redux'; +import { BehaviorSubject, Subject } from 'rxjs'; +import { Query, Filter, IndexPattern, RefreshInterval, TimeRange } from './services/data'; +import { ContainerInput, EmbeddableInput, ViewMode } from './services/embeddable'; +import { SharePluginStart } from './services/share'; +import { EmbeddableStart } from './services/embeddable'; +import { DashboardSessionStorage } from './application/lib'; +import { UrlForwardingStart } from '../../url_forwarding/public'; +import { UsageCollectionSetup } from './services/usage_collection'; +import { NavigationPublicPluginStart } from './services/navigation'; +import { DashboardPanelState, SavedDashboardPanel } from '../common/types'; +import { SavedObjectsTaggingApi } from './services/saved_objects_tagging_oss'; +import { DataPublicPluginStart, IndexPatternsContract } from './services/data'; +import { SavedObjectLoader, SavedObjectsStart } from './services/saved_objects'; +import { IKbnUrlStateStorage } from './services/kibana_utils'; +import { DashboardContainer, DashboardSavedObject } from '.'; +import { VisualizationsStart } from '../../visualizations/public'; -// TODO: Replace Saved object interfaces by the ones Core will provide when it is ready. -export type SavedObjectAttribute = - | string - | number - | boolean - | null - | undefined - | SavedObjectAttributes - | SavedObjectAttributes[]; - -export interface SimpleSavedObject { - attributes: T; - _version?: SavedObjectType['version']; - id: SavedObjectType['id']; - type: SavedObjectType['type']; - migrationVersion: SavedObjectType['migrationVersion']; - error: SavedObjectType['error']; - references: SavedObjectType['references']; - get(key: string): any; - set(key: string, value: any): T; - has(key: string): boolean; - save(): Promise>; - delete(): void; -} +export { SavedDashboardPanel }; -interface FieldSubType { - multi?: { parent: string }; - nested?: { path: string }; +export type NavAction = (anchorElement?: any) => void; +export interface SavedDashboardPanelMap { + [key: string]: SavedDashboardPanel; } -export interface Field { - name: string; - type: string; - // 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. - esTypes?: string[]; - aggregatable: boolean; - filterable: boolean; - searchable: boolean; - subType?: FieldSubType; +export interface DashboardPanelMap { + [key: string]: DashboardPanelState; } -export type NavAction = (anchorElement?: any) => void; - -export interface DashboardAppState { - panels: SavedDashboardPanel[]; - fullScreenMode: boolean; +/** + * DashboardState contains all pieces of tracked state for an individual dashboard + */ +export interface DashboardState { + query: Query; title: string; - description: string; tags: string[]; - timeRestore: boolean; - options: { - hidePanelTitles: boolean; - useMargins: boolean; - syncColors?: boolean; - }; - query: Query | string; filters: Filter[]; viewMode: ViewMode; - expandedPanelId?: string; + description: string; savedQuery?: string; + timeRestore: boolean; + fullScreenMode: boolean; + expandedPanelId?: string; + options: DashboardOptions; + panels: DashboardPanelMap; } -export type DashboardAppStateDefaults = DashboardAppState & { +/** + * RawDashboardState is the dashboard state as directly loaded from the panelJSON + */ +export type RawDashboardState = Omit & { panels: SavedDashboardPanel[] }; + +export interface DashboardContainerInput extends ContainerInput { + dashboardCapabilities?: DashboardAppCapabilities; + refreshConfig?: RefreshInterval; + isEmbeddedExternally?: boolean; + isFullScreenMode: boolean; + expandedPanelId?: string; + timeRange: TimeRange; description?: string; -}; + useMargins: boolean; + syncColors?: boolean; + viewMode: ViewMode; + filters: Filter[]; + title: string; + query: Query; + panels: { + [panelId: string]: DashboardPanelState; + }; +} /** - * Panels are not added to the URL + * DashboardAppState contains all the tools the dashboard application uses to track, + * update, and view its state. */ -export type DashboardAppStateInUrl = Omit & { - panels?: SavedDashboardPanel[]; +export interface DashboardAppState { + hasUnsavedChanges?: boolean; + indexPatterns?: IndexPattern[]; + updateLastSavedState?: () => void; + resetToLastSavedState?: () => void; + savedDashboard?: DashboardSavedObject; + dashboardContainer?: DashboardContainer; + getLatestDashboardState?: () => DashboardState; + $triggerDashboardRefresh: Subject<{ force?: boolean }>; + $onDashboardStateChange: BehaviorSubject; + applyFilters?: (query: Query, filters: Filter[]) => void; +} + +/** + * The shared services and tools used to build a dashboard from a saved object ID. + */ +export type DashboardBuildContext = Pick< + DashboardAppServices, + | 'embeddable' + | 'indexPatterns' + | 'savedDashboards' + | 'usageCollection' + | 'initializerContext' + | 'savedObjectsTagging' + | 'dashboardCapabilities' +> & { + query: DashboardAppServices['data']['query']; + search: DashboardAppServices['data']['search']; + notifications: DashboardAppServices['core']['notifications']; + + history: History; + kibanaVersion: string; + isEmbeddedExternally: boolean; + kbnUrlStateStorage: IKbnUrlStateStorage; + $checkForUnsavedChanges: Subject; + getLatestDashboardState: () => DashboardState; + dispatchDashboardStateChange: Dispatch; + $triggerDashboardRefresh: Subject<{ force?: boolean }>; + $onDashboardStateChange: BehaviorSubject; }; -export interface DashboardAppStateTransitions { - set: ( - state: DashboardAppState - ) => ( - prop: T, - value: DashboardAppState[T] - ) => DashboardAppState; - setOption: ( - state: DashboardAppState - ) => ( - prop: T, - value: DashboardAppState['options'][T] - ) => DashboardAppState; +export interface DashboardOptions { + hidePanelTitles: boolean; + useMargins: boolean; + syncColors: boolean; } -export interface SavedDashboardPanelMap { - [key: string]: SavedDashboardPanel; +export type DashboardRedirect = (props: RedirectToProps) => void; +export type RedirectToProps = + | { destination: 'dashboard'; id?: string; useReplace?: boolean; editMode?: boolean } + | { destination: 'listing'; filter?: string; useReplace?: boolean }; + +export interface DashboardEmbedSettings { + forceHideFilterBar?: boolean; + forceShowTopNavMenu?: boolean; + forceShowQueryInput?: boolean; + forceShowDatePicker?: boolean; +} + +export interface DashboardSaveOptions { + newTitle: string; + newTags?: string[]; + newDescription: string; + newCopyOnSave: boolean; + newTimeRestore: boolean; + onTitleDuplicate: () => void; + isTitleDuplicateConfirmed: boolean; +} + +export interface DashboardAppCapabilities { + show: boolean; + createNew: boolean; + saveQuery: boolean; + createShortUrl: boolean; + hideWriteControls: boolean; + storeSearchSession: boolean; + mapsCapabilities: { save: boolean }; + visualizeCapabilities: { save: boolean }; } -export interface StagedFilter { - field: string; - value: string; - operator: string; - index: string; +export interface DashboardAppServices { + core: CoreStart; + chrome: ChromeStart; + share?: SharePluginStart; + embeddable: EmbeddableStart; + data: DataPublicPluginStart; + uiSettings: IUiSettingsClient; + restorePreviousUrl: () => void; + savedObjects: SavedObjectsStart; + allowByValueEmbeddables: boolean; + urlForwarding: UrlForwardingStart; + savedDashboards: SavedObjectLoader; + scopedHistory: () => ScopedHistory; + visualizations: VisualizationsStart; + indexPatterns: IndexPatternsContract; + usageCollection?: UsageCollectionSetup; + navigation: NavigationPublicPluginStart; + dashboardCapabilities: DashboardAppCapabilities; + initializerContext: PluginInitializerContext; + onAppLeave: AppMountParameters['onAppLeave']; + savedObjectsTagging?: SavedObjectsTaggingApi; + savedObjectsClient: SavedObjectsClientContract; + dashboardSessionStorage: DashboardSessionStorage; + setHeaderActionMenu: AppMountParameters['setHeaderActionMenu']; + savedQueryService: DataPublicPluginStart['query']['savedQueries']; } 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 2a7f2458a27de8..85562435e68d02 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 fb8426655583ee..a082b93c0a79a1 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/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 6b1d01e5ba1429..681aba41a609c0 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 48342a9e02a2bd..73f015ca5517c3 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 565dd6d9269488..0fb7a46c2cf73d 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 c897cdbce2309a..0c3a9901f8c8ca 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 0fcdea1a878ebc..07aa8967b905e4 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 6f8a8d38a4a286..8593a0b0ed0fa3 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 4ac47efaea3476..75c1c091e07561 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 = { export const createSearchSourceMock = (fields?: SearchSourceFields) => new SearchSource(fields, { getConfig: uiSettingsServiceMock.createStartContract().get, - search: jest.fn(), + search: jest + .fn() + .mockReturnValue( + of({ rawResponse: { hits: { hits: [], total: 0 } }, isPartial: false, isRunning: false }) + ), onResponse: jest.fn().mockImplementation((req, res) => res), }); diff --git a/src/plugins/data/common/search/search_source/search_source.ts b/src/plugins/data/common/search/search_source/search_source.ts index 7633382bb87631..19e80c7a487dcb 100644 --- a/src/plugins/data/common/search/search_source/search_source.ts +++ b/src/plugins/data/common/search/search_source/search_source.ts @@ -699,7 +699,7 @@ export class SearchSource { searchRequest.body = searchRequest.body || {}; const { body, index, query, filters, highlightAll } = searchRequest; searchRequest.indexType = this.getIndexType(index); - const metaFields = getConfig(UI_SETTINGS.META_FIELDS); + const metaFields = getConfig(UI_SETTINGS.META_FIELDS) ?? []; // get some special field types from the index pattern const { docvalueFields, scriptFields, storedFields, runtimeFields } = index diff --git a/src/plugins/data/common/search/search_source/types.ts b/src/plugins/data/common/search/search_source/types.ts index 507fda0dc9e474..40e92f45af1436 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/public/autocomplete/providers/kql_query_suggestion/field.test.ts b/src/plugins/data/public/autocomplete/providers/kql_query_suggestion/field.test.ts index f1eced06a33ea1..84ed4315ee16f7 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 9f5c2ef5fad3df..67534577d99fcf 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/query/query_string/query_string_manager.mock.ts b/src/plugins/data/public/query/query_string/query_string_manager.mock.ts index 0038ba0e87e06d..976d3ce13e7de7 100644 --- a/src/plugins/data/public/query/query_string/query_string_manager.mock.ts +++ b/src/plugins/data/public/query/query_string/query_string_manager.mock.ts @@ -7,12 +7,13 @@ */ import { QueryStringContract } from '.'; +import { Observable } from 'rxjs'; const createSetupContractMock = () => { const queryStringManagerMock: jest.Mocked = { getQuery: jest.fn(), setQuery: jest.fn(), - getUpdates$: jest.fn(), + getUpdates$: jest.fn(() => new Observable()), getDefaultQuery: jest.fn(), formatQuery: jest.fn(), clearQuery: jest.fn(), diff --git a/src/plugins/data/public/query/timefilter/timefilter_service.mock.ts b/src/plugins/data/public/query/timefilter/timefilter_service.mock.ts index c22f62f45a709f..f1f02a010e98c6 100644 --- a/src/plugins/data/public/query/timefilter/timefilter_service.mock.ts +++ b/src/plugins/data/public/query/timefilter/timefilter_service.mock.ts @@ -21,7 +21,7 @@ const createSetupContractMock = () => { getTimeUpdate$: jest.fn(), getRefreshIntervalUpdate$: jest.fn(), getAutoRefreshFetch$: jest.fn(() => new Observable<() => void>()), - getFetch$: jest.fn(), + getFetch$: jest.fn(() => new Observable<() => void>()), getTime: jest.fn(), setTime: jest.fn(), setRefreshInterval: jest.fn(), 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 f07f078ea03a3f..833573786594b2 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 445293fe47ea35..13c5d0c242ed00 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 dfbc912453d6e0..fe66d4b6e99370 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 c34a47dc1c6dd6..83e4abf55d5256 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 b2568a5a43611b..8fa14f8cbbd427 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 c4c1ffa3cf9f91..6db9254b815280 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 9bff590b54f1c1..d2d8cb82cf646e 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 d0767334626229..7049903f84e8c2 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 00000000000000..faf6d87b6d10bf --- /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 00000000000000..58b8529d7cf5af --- /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 00000000000000..6bc2bf396c0b44 --- /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 00000000000000..a5e92fa5a36ecb --- /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 00000000000000..3f3aae46c43882 --- /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 c1509b9b848bef..1c88550c154c56 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 d916423c4fc69c..79ee1ffa1ab970 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 0c238adf831bd9..4a7db9517c688b 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 6ae8612cceb1e9..303f83582f737e 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 0e3acedfe12f67..91de0fca3674c9 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 216318339622f0..56b26a7ebe02cc 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 ab6162f756ea89..d6af00ada80fa6 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 f57ba274881033..783bd8d2fcd0e1 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/__mocks__/index_pattern.ts b/src/plugins/discover/public/__mocks__/index_pattern.ts index 4fbeac80b09723..67aac96889424f 100644 --- a/src/plugins/discover/public/__mocks__/index_pattern.ts +++ b/src/plugins/discover/public/__mocks__/index_pattern.ts @@ -65,6 +65,10 @@ fields.getByName = (name: string) => { return fields.find((field) => field.name === name); }; +fields.getAll = () => { + return fields; +}; + const indexPattern = ({ id: 'the-index-pattern-id', title: 'the-index-pattern-title', diff --git a/src/plugins/discover/public/__mocks__/index_pattern_with_timefield.ts b/src/plugins/discover/public/__mocks__/index_pattern_with_timefield.ts index ad84518af9de3a..f1c3c537dd5e18 100644 --- a/src/plugins/discover/public/__mocks__/index_pattern_with_timefield.ts +++ b/src/plugins/discover/public/__mocks__/index_pattern_with_timefield.ts @@ -56,6 +56,9 @@ const fields = [ fields.getByName = (name: string) => { return fields.find((field) => field.name === name); }; +fields.getAll = () => { + return fields; +}; const indexPattern = ({ id: 'index-pattern-with-timefield-id', @@ -72,5 +75,8 @@ const indexPattern = ({ indexPattern.flattenHit = indexPatterns.flattenHitWrapper(indexPattern, indexPattern.metaFields); indexPattern.isTimeBased = () => !!indexPattern.timeFieldName; +indexPattern.formatField = (hit: Record, fieldName: string) => { + return fieldName === '_source' ? hit._source : indexPattern.flattenHit(hit)[fieldName]; +}; export const indexPatternWithTimefieldMock = indexPattern; diff --git a/src/plugins/discover/public/__mocks__/saved_search.ts b/src/plugins/discover/public/__mocks__/saved_search.ts index 8f07391571987c..6f48c56b0810e4 100644 --- a/src/plugins/discover/public/__mocks__/saved_search.ts +++ b/src/plugins/discover/public/__mocks__/saved_search.ts @@ -7,6 +7,8 @@ */ import { SavedSearch } from '../saved_searches'; +import { createSearchSourceMock } from '../../../data/public/mocks'; +import { indexPatternMock } from './index_pattern'; export const savedSearchMock = ({ id: 'the-saved-search-id', @@ -27,4 +29,5 @@ export const savedSearchMock = ({ ], migrationVersion: { search: '7.5.0' }, error: undefined, + searchSource: createSearchSourceMock({ index: indexPatternMock }), } as unknown) as SavedSearch; diff --git a/src/plugins/discover/public/__mocks__/search_session.ts b/src/plugins/discover/public/__mocks__/search_session.ts new file mode 100644 index 00000000000000..a9037217a303ae --- /dev/null +++ b/src/plugins/discover/public/__mocks__/search_session.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { createMemoryHistory } from 'history'; +import { dataPluginMock } from '../../../data/public/mocks'; +import { DataPublicPluginStart } from '../../../data/public'; +import { DiscoverSearchSessionManager } from '../application/apps/main/services/discover_search_session'; + +export function createSearchSessionMock() { + const history = createMemoryHistory(); + const session = dataPluginMock.createStartContract().search.session as jest.Mocked< + DataPublicPluginStart['search']['session'] + >; + const searchSessionManager = new DiscoverSearchSessionManager({ + history, + session, + }); + return { + history, + session, + searchSessionManager, + }; +} diff --git a/src/plugins/discover/public/__mocks__/services.ts b/src/plugins/discover/public/__mocks__/services.ts new file mode 100644 index 00000000000000..8a047625303d2a --- /dev/null +++ b/src/plugins/discover/public/__mocks__/services.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 { DiscoverServices } from '../build_services'; +import { dataPluginMock } from '../../../data/public/mocks'; +import { chromeServiceMock, coreMock, docLinksServiceMock } from '../../../../core/public/mocks'; +import { DEFAULT_COLUMNS_SETTING } from '../../common'; +import { savedSearchMock } from './saved_search'; +import { UI_SETTINGS } from '../../../data/common'; +import { TopNavMenu } from '../../../navigation/public'; +const dataPlugin = dataPluginMock.createStartContract(); + +export const discoverServiceMock = ({ + core: coreMock.createStart(), + chrome: chromeServiceMock.createStartContract(), + history: () => ({ + location: { + search: '', + }, + }), + data: dataPlugin, + docLinks: docLinksServiceMock.createStartContract(), + capabilities: { + visualize: { + show: true, + }, + discover: { + save: false, + }, + advancedSettings: { + save: true, + }, + }, + filterManager: dataPlugin.query.filterManager, + uiSettings: { + get: (key: string) => { + if (key === 'fields:popularLimit') { + return 5; + } else if (key === DEFAULT_COLUMNS_SETTING) { + return []; + } else if (key === UI_SETTINGS.META_FIELDS) { + return []; + } + }, + }, + indexPatternFieldEditor: { + openEditor: jest.fn(), + userPermissions: { + editIndexPattern: jest.fn(), + }, + }, + getSavedSearchById: (id?: string) => Promise.resolve(savedSearchMock), + navigation: { + ui: { TopNavMenu }, + }, + metadata: { + branch: 'test', + }, +} as unknown) as DiscoverServices; diff --git a/src/plugins/discover/public/application/angular/create_discover_directive.ts b/src/plugins/discover/public/application/angular/create_discover_directive.ts new file mode 100644 index 00000000000000..ae0d978322bcd0 --- /dev/null +++ b/src/plugins/discover/public/application/angular/create_discover_directive.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 { DiscoverMainApp } from '../apps/main'; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export function createDiscoverDirective(reactDirective: any) { + return reactDirective(DiscoverMainApp, [ + ['indexPattern', { watchDepth: 'reference' }], + ['opts', { watchDepth: 'reference' }], + ]); +} diff --git a/src/plugins/discover/public/application/components/create_discover_grid_directive.tsx b/src/plugins/discover/public/application/angular/create_discover_grid_directive.tsx similarity index 95% rename from src/plugins/discover/public/application/components/create_discover_grid_directive.tsx rename to src/plugins/discover/public/application/angular/create_discover_grid_directive.tsx index 39a9df89260238..1fc8edcb4d0659 100644 --- a/src/plugins/discover/public/application/components/create_discover_grid_directive.tsx +++ b/src/plugins/discover/public/application/angular/create_discover_grid_directive.tsx @@ -7,7 +7,7 @@ */ import React, { useState } from 'react'; import { I18nProvider } from '@kbn/i18n/react'; -import { DiscoverGrid, DiscoverGridProps } from './discover_grid/discover_grid'; +import { DiscoverGrid, DiscoverGridProps } from '../components/discover_grid/discover_grid'; import { getServices } from '../../kibana_services'; import { ElasticSearchHit } from '../doc_views/doc_views_types'; diff --git a/src/plugins/discover/public/application/angular/directives/debounce/debounce.js b/src/plugins/discover/public/application/angular/directives/debounce/debounce.js deleted file mode 100644 index bca1a9c785fd68..00000000000000 --- a/src/plugins/discover/public/application/angular/directives/debounce/debounce.js +++ /dev/null @@ -1,57 +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 _ from 'lodash'; -// Debounce service, angularized version of lodash debounce -// borrowed heavily from https://github.com/shahata/angular-debounce - -export function createDebounceProviderTimeout($timeout) { - return function (func, wait, options) { - let timeout; - let args; - let self; - let result; - options = _.defaults(options || {}, { - leading: false, - trailing: true, - invokeApply: true, - }); - - function debounce() { - self = this; - args = arguments; - - const later = function () { - timeout = null; - if (!options.leading || options.trailing) { - result = func.apply(self, args); - } - }; - - const callNow = options.leading && !timeout; - - if (timeout) { - $timeout.cancel(timeout); - } - timeout = $timeout(later, wait, options.invokeApply); - - if (callNow) { - result = func.apply(self, args); - } - - return result; - } - - debounce.cancel = function () { - $timeout.cancel(timeout); - timeout = null; - }; - - return debounce; - }; -} diff --git a/src/plugins/discover/public/application/angular/directives/debounce/debounce.test.ts b/src/plugins/discover/public/application/angular/directives/debounce/debounce.test.ts deleted file mode 100644 index 0c033fd066eabe..00000000000000 --- a/src/plugins/discover/public/application/angular/directives/debounce/debounce.test.ts +++ /dev/null @@ -1,127 +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 sinon, { SinonSpy } from 'sinon'; -import angular, { auto, ITimeoutService } from 'angular'; -import 'angular-mocks'; -import 'angular-sanitize'; -import 'angular-route'; - -// @ts-expect-error -import { createDebounceProviderTimeout } from './debounce'; -import { coreMock } from '../../../../../../../core/public/mocks'; -import { initializeInnerAngularModule } from '../../../../get_inner_angular'; -import { navigationPluginMock } from '../../../../../../navigation/public/mocks'; -import { dataPluginMock } from '../../../../../../data/public/mocks'; -import { initAngularBootstrap } from '../../../../../../kibana_legacy/public'; - -describe('debounce service', function () { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let debounce: (fn: () => void, timeout: number, options?: any) => any; - let $timeout: ITimeoutService; - let spy: SinonSpy; - - beforeEach(() => { - spy = sinon.spy(); - - initAngularBootstrap(); - - initializeInnerAngularModule( - 'app/discover', - coreMock.createStart(), - navigationPluginMock.createStartContract(), - dataPluginMock.createStartContract() - ); - - angular.mock.module('app/discover'); - - angular.mock.inject(($injector: auto.IInjectorService, _$timeout_: ITimeoutService) => { - $timeout = _$timeout_; - - debounce = createDebounceProviderTimeout($timeout); - }); - }); - - it('should have a cancel method', function () { - const bouncer = debounce(() => {}, 100); - - expect(bouncer).toHaveProperty('cancel'); - }); - - describe('delayed execution', function () { - const sandbox = sinon.createSandbox(); - - beforeEach(() => sandbox.useFakeTimers()); - afterEach(() => sandbox.restore()); - - it('should delay execution', function () { - const bouncer = debounce(spy, 100); - - bouncer(); - sinon.assert.notCalled(spy); - $timeout.flush(); - sinon.assert.calledOnce(spy); - - spy.resetHistory(); - }); - - it('should fire on leading edge', function () { - const bouncer = debounce(spy, 100, { leading: true }); - - bouncer(); - sinon.assert.calledOnce(spy); - $timeout.flush(); - sinon.assert.calledTwice(spy); - - spy.resetHistory(); - }); - - it('should only fire on leading edge', function () { - const bouncer = debounce(spy, 100, { leading: true, trailing: false }); - - bouncer(); - sinon.assert.calledOnce(spy); - $timeout.flush(); - sinon.assert.calledOnce(spy); - - spy.resetHistory(); - }); - - it('should reset delayed execution', function () { - const cancelSpy = sinon.spy($timeout, 'cancel'); - const bouncer = debounce(spy, 100); - - bouncer(); - sandbox.clock.tick(1); - - bouncer(); - sinon.assert.notCalled(spy); - $timeout.flush(); - sinon.assert.calledOnce(spy); - sinon.assert.calledOnce(cancelSpy); - - spy.resetHistory(); - cancelSpy.resetHistory(); - }); - }); - - describe('cancel', function () { - it('should cancel the $timeout', function () { - const cancelSpy = sinon.spy($timeout, 'cancel'); - const bouncer = debounce(spy, 100); - - bouncer(); - bouncer.cancel(); - sinon.assert.calledOnce(cancelSpy); - // throws if pending timeouts - $timeout.verifyNoPendingTasks(); - - cancelSpy.resetHistory(); - }); - }); -}); diff --git a/src/plugins/discover/public/application/angular/directives/debounce/index.js b/src/plugins/discover/public/application/angular/directives/debounce/index.js deleted file mode 100644 index 774876af70d4c6..00000000000000 --- a/src/plugins/discover/public/application/angular/directives/debounce/index.js +++ /dev/null @@ -1,9 +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. - */ - -export { createDebounceProviderTimeout } from './debounce'; diff --git a/src/plugins/discover/public/application/angular/directives/index.ts b/src/plugins/discover/public/application/angular/directives/index.ts deleted file mode 100644 index 4478d8bb319793..00000000000000 --- a/src/plugins/discover/public/application/angular/directives/index.ts +++ /dev/null @@ -1,10 +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. - */ - -export { DiscoverUninitialized } from './uninitialized'; -export { DiscoverHistogram } from './histogram'; diff --git a/src/plugins/discover/public/application/angular/discover.js b/src/plugins/discover/public/application/angular/discover.js index c66ca19c967437..aa1344a67fbec9 100644 --- a/src/plugins/discover/public/application/angular/discover.js +++ b/src/plugins/discover/public/application/angular/discover.js @@ -6,47 +6,17 @@ * Side Public License, v 1. */ -import _ from 'lodash'; -import { merge, Subject, Subscription } from 'rxjs'; -import { debounceTime, tap, filter } from 'rxjs/operators'; import { i18n } from '@kbn/i18n'; -import { createSearchSessionRestorationDataProvider, getState, splitState } from './discover_state'; -import { RequestAdapter } from '../../../../inspector/public'; -import { - connectToQueryState, - esFilters, - indexPatterns as indexPatternsUtils, - noSearchSessionStorageCapabilityMessage, - syncQueryStateWithUrl, -} from '../../../../data/public'; -import { getSortArray } from './doc_table'; +import { getState } from '../apps/main/services/discover_state'; import indexTemplateLegacy from './discover_legacy.html'; -import { discoverResponseHandler } from './response_handler'; import { getAngularModule, - getHeaderActionMenuMounter, getServices, getUrlTracker, redirectWhenMissing, - subscribeWithScope, - tabifyAggResponse, } from '../../kibana_services'; import { getRootBreadcrumbs, getSavedSearchBreadcrumbs } from '../helpers/breadcrumbs'; -import { getStateDefaults } from '../helpers/get_state_defaults'; -import { getResultState } from '../helpers/get_result_state'; -import { validateTimeRange } from '../helpers/validate_time_range'; -import { addFatalError } from '../../../../kibana_legacy/public'; -import { - SAMPLE_SIZE_SETTING, - SEARCH_FIELDS_FROM_SOURCE, - SEARCH_ON_PAGE_LOAD_SETTING, -} from '../../../common'; -import { loadIndexPattern, resolveIndexPattern } from '../helpers/resolve_index_pattern'; -import { updateSearchSource } from '../helpers/update_search_source'; -import { calcFieldCounts } from '../helpers/calc_field_counts'; -import { DiscoverSearchSessionManager } from './discover_search_session'; -import { applyAggsToSearchSource, getDimensions } from '../components/histogram'; -import { fetchStatuses } from '../components/constants'; +import { loadIndexPattern, resolveIndexPattern } from '../apps/main/utils/resolve_index_pattern'; const services = getServices(); @@ -56,8 +26,6 @@ const { chrome, data, history: getHistory, - filterManager, - timefilter, toastNotifications, uiSettings: config, } = getServices(); @@ -147,390 +115,29 @@ app.directive('discoverApp', function () { }); function discoverController($route, $scope) { - const { isDefault: isDefaultType } = indexPatternsUtils; - const subscriptions = new Subscription(); - const refetch$ = new Subject(); - - let isChangingIndexPattern = false; const savedSearch = $route.current.locals.savedObjects.savedSearch; - const persistentSearchSource = savedSearch.searchSource; $scope.indexPattern = resolveIndexPattern( $route.current.locals.savedObjects.ip, - persistentSearchSource, + savedSearch.searchSource, toastNotifications ); - $scope.useNewFieldsApi = !config.get(SEARCH_FIELDS_FROM_SOURCE); - - //used for functional testing - $scope.fetchCounter = 0; - - const getTimeField = () => { - return isDefaultType($scope.indexPattern) ? $scope.indexPattern.timeFieldName : undefined; - }; const history = getHistory(); - const searchSessionManager = new DiscoverSearchSessionManager({ - history, - session: data.search.session, - }); - - const stateContainer = getState({ - getStateDefaults: () => - getStateDefaults({ - config, - data, - indexPattern: $scope.indexPattern, - savedSearch, - searchSource: persistentSearchSource, - }), - storeInSessionStorage: config.get('state:storeInSessionStorage'), - history, - toasts: core.notifications.toasts, - uiSettings: config, - }); - - const { - appStateContainer, - startSync: startStateSync, - stopSync: stopStateSync, - setAppState, - replaceUrlAppState, - kbnUrlStateStorage, - getPreviousAppState, - } = stateContainer; - - if (appStateContainer.getState().index !== $scope.indexPattern.id) { - //used index pattern is different than the given by url/state which is invalid - setAppState({ index: $scope.indexPattern.id }); - } - $scope.state = { ...appStateContainer.getState() }; - - // syncs `_g` portion of url with query services - const { stop: stopSyncingGlobalStateWithUrl } = syncQueryStateWithUrl( - data.query, - kbnUrlStateStorage - ); - - // sync initial app filters from state to filterManager - filterManager.setAppFilters(_.cloneDeep(appStateContainer.getState().filters)); - data.query.queryString.setQuery(appStateContainer.getState().query); - - const stopSyncingQueryAppStateWithStateContainer = connectToQueryState( - data.query, - appStateContainer, - { - filters: esFilters.FilterStateStore.APP_STATE, - query: true, - } - ); - const showUnmappedFields = $scope.useNewFieldsApi; - const updateSearchSourceHelper = () => { - const { indexPattern, useNewFieldsApi } = $scope; - const { columns, sort } = $scope.state; - updateSearchSource({ - persistentSearchSource, - volatileSearchSource: $scope.volatileSearchSource, - indexPattern, - services, - sort, - columns, - useNewFieldsApi, - showUnmappedFields, - }); - }; - - const appStateUnsubscribe = appStateContainer.subscribe(async (newState) => { - const { state: newStatePartial } = splitState(newState); - const { state: oldStatePartial } = splitState(getPreviousAppState()); - - if (!_.isEqual(newStatePartial, oldStatePartial)) { - $scope.$evalAsync(async () => { - // NOTE: this is also called when navigating from discover app to context app - if (newStatePartial.index && oldStatePartial.index !== newStatePartial.index) { - //in case of index pattern switch the route has currently to be reloaded, legacy - isChangingIndexPattern = true; - $route.reload(); - return; - } - - $scope.state = { ...newState }; - - // detect changes that should trigger fetching of new data - const changes = ['interval', 'sort'].filter( - (prop) => !_.isEqual(newStatePartial[prop], oldStatePartial[prop]) - ); - - if (oldStatePartial.hideChart && !newStatePartial.hideChart) { - // in case the histogram is hidden, no data is requested - // so when changing this state data needs to be fetched - changes.push(true); - } - - if (changes.length) { - refetch$.next(); - } - }); - } - }); - - // this listener is waiting for such a path http://localhost:5601/app/discover#/ - // which could be set through pressing "New" button in top nav or go to "Discover" plugin from the sidebar - // to reload the page in a right way - const unlistenHistoryBasePath = history.listen(({ pathname, search, hash }) => { - if (!search && !hash && pathname === '/') { - $route.reload(); - } - }); - - data.search.session.enableStorage( - createSearchSessionRestorationDataProvider({ - appStateContainer, - data, - getSavedSearch: () => savedSearch, - }), - { - isDisabled: () => - capabilities.discover.storeSearchSession - ? { disabled: false } - : { - disabled: true, - reasonText: noSearchSessionStorageCapabilityMessage, - }, - } - ); $scope.opts = { - // number of records to fetch, then paginate through - sampleSize: config.get(SAMPLE_SIZE_SETTING), - timefield: getTimeField(), - savedSearch: savedSearch, + savedSearch, + history, services, indexPatternList: $route.current.locals.savedObjects.ip.list, - config: config, - setHeaderActionMenu: getHeaderActionMenuMounter(), - filterManager, - setAppState, - data, - stateContainer, - searchSessionManager, - refetch$, - }; - - const inspectorAdapters = ($scope.opts.inspectorAdapters = { - requests: new RequestAdapter(), - }); - - const shouldSearchOnPageLoad = () => { - // A saved search is created on every page load, so we check the ID to see if we're loading a - // previously saved search or if it is just transient - return ( - config.get(SEARCH_ON_PAGE_LOAD_SETTING) || - savedSearch.id !== undefined || - timefilter.getRefreshInterval().pause === false || - searchSessionManager.hasSearchSessionIdInURL() - ); + navigateTo: (path) => { + $scope.$evalAsync(() => { + history.push(path); + }); + }, }; - $scope.fetchStatus = fetchStatuses.UNINITIALIZED; - $scope.resultState = shouldSearchOnPageLoad() ? 'loading' : 'uninitialized'; - - let abortController; $scope.$on('$destroy', () => { - if (abortController) abortController.abort(); savedSearch.destroy(); - subscriptions.unsubscribe(); - if (!isChangingIndexPattern) { - // HACK: - // do not clear session when changing index pattern due to how state management around it is setup - // it will be cleared by searchSessionManager on controller reload instead - data.search.session.clear(); - } - appStateUnsubscribe(); - stopStateSync(); - stopSyncingGlobalStateWithUrl(); - stopSyncingQueryAppStateWithStateContainer(); - unlistenHistoryBasePath(); - }); - - $scope.opts.getFieldCounts = async () => { - // the field counts aren't set until we have the data back, - // so we wait for the fetch to be done before proceeding - if ($scope.fetchStatus === fetchStatuses.COMPLETE) { - return $scope.fieldCounts; - } - - return await new Promise((resolve) => { - const unwatch = $scope.$watch('fetchStatus', (newValue) => { - if (newValue === fetchStatuses.COMPLETE) { - unwatch(); - resolve($scope.fieldCounts); - } - }); - }); - }; - $scope.opts.navigateTo = (path) => { - $scope.$evalAsync(() => { - history.push(path); - }); - }; - - persistentSearchSource.setField('index', $scope.indexPattern); - - // searchSource which applies time range - const volatileSearchSource = savedSearch.searchSource.create(); - - if (isDefaultType($scope.indexPattern)) { - volatileSearchSource.setField('filter', () => { - return timefilter.createFilter($scope.indexPattern); - }); - } - - volatileSearchSource.setParent(persistentSearchSource); - $scope.volatileSearchSource = volatileSearchSource; - $scope.state.index = $scope.indexPattern.id; - $scope.state.sort = getSortArray($scope.state.sort, $scope.indexPattern); - - $scope.opts.fetch = $scope.fetch = async function () { - $scope.fetchCounter++; - $scope.fetchError = undefined; - if (!validateTimeRange(timefilter.getTime(), toastNotifications)) { - $scope.resultState = 'none'; - } - - // Abort any in-progress requests before fetching again - if (abortController) abortController.abort(); - abortController = new AbortController(); - - const searchSessionId = searchSessionManager.getNextSearchSessionId(); - updateSearchSourceHelper(); - - $scope.opts.chartAggConfigs = applyAggsToSearchSource( - getTimeField() && !$scope.state.hideChart, - volatileSearchSource, - $scope.state.interval, - $scope.indexPattern, - data - ); - - $scope.fetchStatus = fetchStatuses.LOADING; - $scope.resultState = getResultState($scope.fetchStatus, $scope.rows); - - inspectorAdapters.requests.reset(); - return $scope.volatileSearchSource - .fetch$({ - abortSignal: abortController.signal, - sessionId: searchSessionId, - inspector: { - adapter: inspectorAdapters.requests, - title: i18n.translate('discover.inspectorRequestDataTitle', { - defaultMessage: 'data', - }), - description: i18n.translate('discover.inspectorRequestDescription', { - defaultMessage: 'This request queries Elasticsearch to fetch the data for the search.', - }), - }, - }) - .toPromise() - .then(({ rawResponse }) => onResults(rawResponse)) - .catch((error) => { - // If the request was aborted then no need to surface this error in the UI - if (error instanceof Error && error.name === 'AbortError') return; - - $scope.fetchStatus = fetchStatuses.NO_RESULTS; - $scope.fetchError = error; - data.search.showError(error); - }) - .finally(() => { - $scope.resultState = getResultState($scope.fetchStatus, $scope.rows); - $scope.$apply(); - }); - }; - - function onResults(resp) { - if (getTimeField() && !$scope.state.hideChart) { - const tabifiedData = tabifyAggResponse($scope.opts.chartAggConfigs, resp); - $scope.volatileSearchSource.rawResponse = resp; - const dimensions = getDimensions($scope.opts.chartAggConfigs, data); - if (dimensions) { - $scope.histogramData = discoverResponseHandler(tabifiedData, dimensions); - } - } - - $scope.hits = resp.hits.total; - $scope.rows = resp.hits.hits; - - $scope.fieldCounts = calcFieldCounts( - $scope.fieldCounts || {}, - resp.hits.hits, - $scope.indexPattern - ); - $scope.fetchStatus = fetchStatuses.COMPLETE; - } - - $scope.refreshAppState = async () => { - $scope.hits = []; - $scope.rows = []; - $scope.fieldCounts = {}; - await refetch$.next(); - }; - - $scope.resetQuery = function () { - history.push( - $route.current.params.id ? `/view/${encodeURIComponent($route.current.params.id)}` : '/' - ); - $route.reload(); - }; - - $scope.newQuery = function () { - history.push('/'); - }; - - $scope.unmappedFieldsConfig = { - showUnmappedFields, - }; - - // handler emitted by `timefilter.getAutoRefreshFetch$()` - // to notify when data completed loading and to start a new autorefresh loop - let autoRefreshDoneCb; - const fetch$ = merge( - refetch$, - filterManager.getFetches$(), - timefilter.getFetch$(), - timefilter.getAutoRefreshFetch$().pipe( - tap((done) => { - autoRefreshDoneCb = done; - }), - filter(() => $scope.fetchStatus !== fetchStatuses.LOADING) - ), - data.query.queryString.getUpdates$(), - searchSessionManager.newSearchSessionIdFromURL$ - ).pipe(debounceTime(100)); - - subscriptions.add( - subscribeWithScope( - $scope, - fetch$, - { - next: async () => { - try { - await $scope.fetch(); - } finally { - // if there is a saved `autoRefreshDoneCb`, notify auto refresh service that - // the last fetch is completed so it starts the next auto refresh loop if needed - autoRefreshDoneCb?.(); - autoRefreshDoneCb = undefined; - } - }, - }, - (error) => addFatalError(core.fatalErrors, error) - ) - ); - - // Propagate current app state to url, then start syncing and fetching - replaceUrlAppState().then(() => { - startStateSync(); - if (shouldSearchOnPageLoad()) { - refetch$.next(); - } + data.search.session.clear(); }); } diff --git a/src/plugins/discover/public/application/angular/discover_datagrid.html b/src/plugins/discover/public/application/angular/discover_datagrid.html index 42218568a838db..fa1181fd0d6cd6 100644 --- a/src/plugins/discover/public/application/angular/discover_datagrid.html +++ b/src/plugins/discover/public/application/angular/discover_datagrid.html @@ -1,31 +1,11 @@ diff --git a/src/plugins/discover/public/application/angular/discover_legacy.html b/src/plugins/discover/public/application/angular/discover_legacy.html index fa3656d1529d28..025a4490faf1f2 100644 --- a/src/plugins/discover/public/application/angular/discover_legacy.html +++ b/src/plugins/discover/public/application/angular/discover_legacy.html @@ -1,22 +1,7 @@ + > - \ No newline at end of file + diff --git a/src/plugins/discover/public/application/angular/doc_table/actions/columns.test.ts b/src/plugins/discover/public/application/angular/doc_table/actions/columns.test.ts index 43044d08f6ac06..e1aa96f4625de5 100644 --- a/src/plugins/discover/public/application/angular/doc_table/actions/columns.test.ts +++ b/src/plugins/discover/public/application/angular/doc_table/actions/columns.test.ts @@ -11,7 +11,7 @@ import { configMock } from '../../../../__mocks__/config'; import { indexPatternMock } from '../../../../__mocks__/index_pattern'; import { indexPatternsMock } from '../../../../__mocks__/index_patterns'; import { Capabilities } from '../../../../../../../core/types'; -import { AppState } from '../../discover_state'; +import { AppState } from '../../../apps/main/services/discover_state'; function getStateColumnAction(state: {}, setAppState: (state: Partial) => void) { return getStateColumnActions({ diff --git a/src/plugins/discover/public/application/angular/doc_table/actions/columns.ts b/src/plugins/discover/public/application/angular/doc_table/actions/columns.ts index 0907844aa1c54d..9ef5d45947afb0 100644 --- a/src/plugins/discover/public/application/angular/doc_table/actions/columns.ts +++ b/src/plugins/discover/public/application/angular/doc_table/actions/columns.ts @@ -11,7 +11,7 @@ import { IndexPattern, IndexPatternsContract } from '../../../../kibana_services import { AppState as DiscoverState, GetStateReturn as DiscoverGetStateReturn, -} from '../../discover_state'; +} from '../../../apps/main/services/discover_state'; import { AppState as ContextState, GetStateReturn as ContextGetStateReturn, diff --git a/src/plugins/discover/public/application/angular/doc_table/components/row_headers.test.js b/src/plugins/discover/public/application/angular/doc_table/components/row_headers.test.js index 270f366bddbf24..a087ac86971838 100644 --- a/src/plugins/discover/public/application/angular/doc_table/components/row_headers.test.js +++ b/src/plugins/discover/public/application/angular/doc_table/components/row_headers.test.js @@ -19,7 +19,7 @@ import { setScopedHistory, setServices, setDocViewsRegistry } from '../../../../ import { coreMock } from '../../../../../../../core/public/mocks'; import { dataPluginMock } from '../../../../../../data/public/mocks'; import { navigationPluginMock } from '../../../../../../navigation/public/mocks'; -import { getInnerAngularModule } from '../../../../get_inner_angular'; +import { getInnerAngularModule } from '../../get_inner_angular'; import { createBrowserHistory } from 'history'; const fakeRowVals = { 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 b8e8bf1fe7d6ce..681418c1bd7cfe 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 @@ -13,17 +13,17 @@ import type { estypes } from '@elastic/elasticsearch'; import { EuiButtonEmpty } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { getServices, IIndexPattern } from '../../../kibana_services'; -import { IndexPatternField } from '../../../../../data/common/index_patterns'; -import { SkipBottomButton } from '../../components/skip_bottom_button'; +import { IndexPatternField } from '../../../../../data/common'; +import { SkipBottomButton } from '../../apps/main/components/skip_bottom_button'; export interface DocTableLegacyProps { columns: string[]; searchDescription?: string; searchTitle?: string; onFilter: (field: IndexPatternField | string, value: string, type: '+' | '-') => void; - rows: estypes.Hit[]; + rows: estypes.SearchHit[]; indexPattern: IIndexPattern; - minimumVisibleRows: number; + minimumVisibleRows?: number; onAddColumn?: (column: string) => void; onBackToTop: () => void; onSort?: (sort: string[][]) => void; @@ -119,11 +119,9 @@ export function DocTableLegacy(renderProps: DocTableLegacyProps) { }, [setMinimumVisibleRows, renderProps.rows]); useEffect(() => { - if (minimumVisibleRows > 50) { - setMinimumVisibleRows(50); - } + setMinimumVisibleRows(50); setRows(renderProps.rows); - }, [renderProps.rows, minimumVisibleRows, setMinimumVisibleRows]); + }, [renderProps.rows, setMinimumVisibleRows]); useEffect(() => { if (ref && ref.current && !scope.current) { @@ -133,7 +131,7 @@ export function DocTableLegacy(renderProps: DocTableLegacyProps) { }); } else if (scope && scope.current) { scope.current.renderProps = { ...renderProps, rows, minimumVisibleRows }; - scope.current.$apply(); + scope.current.$applyAsync(); } }, [renderProps, minimumVisibleRows, rows]); diff --git a/src/plugins/discover/public/application/angular/doc_table/doc_table.test.js b/src/plugins/discover/public/application/angular/doc_table/doc_table.test.js index 1765bae07eed72..1db35ddf18089e 100644 --- a/src/plugins/discover/public/application/angular/doc_table/doc_table.test.js +++ b/src/plugins/discover/public/application/angular/doc_table/doc_table.test.js @@ -18,7 +18,7 @@ import { coreMock } from '../../../../../../core/public/mocks'; import { dataPluginMock } from '../../../../../data/public/mocks'; import { navigationPluginMock } from '../../../../../navigation/public/mocks'; import { setScopedHistory, setServices } from '../../../kibana_services'; -import { getInnerAngularModule } from '../../../get_inner_angular'; +import { getInnerAngularModule } from '../get_inner_angular'; let $parentScope; diff --git a/src/plugins/discover/public/get_inner_angular.ts b/src/plugins/discover/public/application/angular/get_inner_angular.ts similarity index 78% rename from src/plugins/discover/public/get_inner_angular.ts rename to src/plugins/discover/public/application/angular/get_inner_angular.ts index c36312a87ce9ad..26d64d5adc8a33 100644 --- a/src/plugins/discover/public/get_inner_angular.ts +++ b/src/plugins/discover/public/application/angular/get_inner_angular.ts @@ -9,29 +9,29 @@ // inner angular imports // these are necessary to bootstrap the local angular. // They can stay even after NP cutover -import './application/index.scss'; +import '../index.scss'; import angular from 'angular'; // required for `ngSanitize` angular module import 'angular-sanitize'; import { EuiIcon } from '@elastic/eui'; import { i18nDirective, i18nFilter, I18nProvider } from '@kbn/i18n/angular'; import { CoreStart, PluginInitializerContext } from 'kibana/public'; -import { DataPublicPluginStart } from '../../data/public'; -import { Storage } from '../../kibana_utils/public'; -import { NavigationPublicPluginStart as NavigationStart } from '../../navigation/public'; -import { createDocTableDirective } from './application/angular/doc_table'; -import { createTableHeaderDirective } from './application/angular/doc_table/components/table_header'; +import { DataPublicPluginStart } from '../../../../data/public'; +import { Storage } from '../../../../kibana_utils/public'; +import { NavigationPublicPluginStart as NavigationStart } from '../../../../navigation/public'; +import { createDocTableDirective } from './doc_table'; +import { createTableHeaderDirective } from './doc_table/components/table_header'; import { createToolBarPagerButtonsDirective, createToolBarPagerTextDirective, -} from './application/angular/doc_table/components/pager'; -import { createContextAppLegacy } from './application/components/context_app/context_app_legacy_directive'; -import { createTableRowDirective } from './application/angular/doc_table/components/table_row'; -import { createPagerFactory } from './application/angular/doc_table/lib/pager/pager_factory'; -import { createInfiniteScrollDirective } from './application/angular/doc_table/infinite_scroll'; -import { createDocViewerDirective } from './application/angular/doc_viewer'; -import { createDiscoverGridDirective } from './application/components/create_discover_grid_directive'; -import { createRenderCompleteDirective } from './application/angular/directives/render_complete'; +} from './doc_table/components/pager'; +import { createContextAppLegacy } from '../components/context_app/context_app_legacy_directive'; +import { createTableRowDirective } from './doc_table/components/table_row'; +import { createPagerFactory } from './doc_table/lib/pager/pager_factory'; +import { createInfiniteScrollDirective } from './doc_table/infinite_scroll'; +import { createDocViewerDirective } from './doc_viewer'; +import { createDiscoverGridDirective } from './create_discover_grid_directive'; +import { createRenderCompleteDirective } from './directives/render_complete'; import { initAngularBootstrap, configureAppAngularModule, @@ -39,10 +39,10 @@ import { PromiseServiceCreator, registerListenEventListener, watchMultiDecorator, -} from '../../kibana_legacy/public'; -import { DiscoverStartPlugins } from './plugin'; -import { getScopedHistory } from './kibana_services'; -import { createDiscoverDirective } from './application/components/create_discover_directive'; +} from '../../../../kibana_legacy/public'; +import { DiscoverStartPlugins } from '../../plugin'; +import { getScopedHistory } from '../../kibana_services'; +import { createDiscoverDirective } from './create_discover_directive'; /** * returns the main inner angular module, it contains all the parts of Angular Discover diff --git a/src/plugins/discover/public/application/angular/helpers/index.ts b/src/plugins/discover/public/application/angular/helpers/index.ts index 1dd194436cdfb0..3d2c0b1c63b332 100644 --- a/src/plugins/discover/public/application/angular/helpers/index.ts +++ b/src/plugins/discover/public/application/angular/helpers/index.ts @@ -6,6 +6,5 @@ * Side Public License, v 1. */ -export { buildPointSeriesData } from './point_series'; export { formatRow, formatTopLevelObject } from './row_formatter'; export { handleSourceColumnState } from './state_helpers'; diff --git a/src/plugins/discover/public/application/angular/index.ts b/src/plugins/discover/public/application/angular/index.ts index b45357439a1eeb..e75add7910b745 100644 --- a/src/plugins/discover/public/application/angular/index.ts +++ b/src/plugins/discover/public/application/angular/index.ts @@ -16,4 +16,3 @@ import './doc'; import './context'; import './doc_viewer'; import './redirect'; -import './directives'; diff --git a/src/plugins/discover/public/application/angular/response_handler.js b/src/plugins/discover/public/application/angular/response_handler.js deleted file mode 100644 index 301fd98f1e34c2..00000000000000 --- a/src/plugins/discover/public/application/angular/response_handler.js +++ /dev/null @@ -1,109 +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 { getServices } from '../../kibana_services'; -import { buildPointSeriesData } from './helpers'; - -function tableResponseHandler(table, dimensions) { - const converted = { tables: [] }; - const split = dimensions.splitColumn || dimensions.splitRow; - - if (split) { - converted.direction = dimensions.splitRow ? 'row' : 'column'; - const splitColumnIndex = split[0].accessor; - const splitColumnFormatter = getServices().data.fieldFormats.deserialize(split[0].format); - const splitColumn = table.columns[splitColumnIndex]; - const splitMap = {}; - let splitIndex = 0; - - table.rows.forEach((row, rowIndex) => { - const splitValue = row[splitColumn.id]; - - if (!splitMap.hasOwnProperty(splitValue)) { - splitMap[splitValue] = splitIndex++; - const tableGroup = { - $parent: converted, - title: `${splitColumnFormatter.convert(splitValue)}: ${splitColumn.name}`, - name: splitColumn.name, - key: splitValue, - column: splitColumnIndex, - row: rowIndex, - table, - tables: [], - }; - tableGroup.tables.push({ - $parent: tableGroup, - columns: table.columns, - rows: [], - }); - - converted.tables.push(tableGroup); - } - - const tableIndex = splitMap[splitValue]; - converted.tables[tableIndex].tables[0].rows.push(row); - }); - } else { - converted.tables.push({ - columns: table.columns, - rows: table.rows, - }); - } - - return converted; -} - -function convertTableGroup(tableGroup, convertTable) { - const tables = tableGroup.tables; - - if (!tables.length) return; - - const firstChild = tables[0]; - if (firstChild.columns) { - const chart = convertTable(firstChild); - // if chart is within a split, assign group title to its label - if (tableGroup.$parent) { - chart.label = tableGroup.title; - } - return chart; - } - - const out = {}; - let outList; - - tables.forEach(function (table) { - if (!outList) { - const direction = tableGroup.direction === 'row' ? 'rows' : 'columns'; - outList = out[direction] = []; - } - - let output; - if ((output = convertTableGroup(table, convertTable))) { - outList.push(output); - } - }); - - return out; -} - -export const discoverResponseHandler = (response, dimensions) => { - const tableGroup = tableResponseHandler(response, dimensions); - - let converted = convertTableGroup(tableGroup, (table) => { - return buildPointSeriesData(table, dimensions); - }); - if (!converted) { - // mimic a row of tables that doesn't have any tables - // https://github.com/elastic/kibana/blob/7bfb68cd24ed42b1b257682f93c50cd8d73e2520/src/kibana/components/vislib/components/zero_injection/inject_zeros.js#L32 - converted = { rows: [] }; - } - - converted.hits = response.rows.length; - - return converted; -}; diff --git a/src/plugins/discover/public/application/apps/main/components/chart/discover_chart.tsx b/src/plugins/discover/public/application/apps/main/components/chart/discover_chart.tsx new file mode 100644 index 00000000000000..210313aac53662 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/components/chart/discover_chart.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, { useCallback } from 'react'; +import moment from 'moment'; +import { EuiFlexGroup, EuiFlexItem, EuiButtonEmpty, EuiSpacer } from '@elastic/eui'; +import { IUiSettingsClient } from 'kibana/public'; +import { i18n } from '@kbn/i18n'; +import { HitsCounter } from '../hits_counter'; +import { DataPublicPluginStart, IndexPattern, search } from '../../../../../../../data/public'; +import { TimechartHeader } from '../timechart_header'; +import { SavedSearch } from '../../../../../saved_searches'; +import { AppState, GetStateReturn } from '../../services/discover_state'; +import { TimechartBucketInterval } from '../timechart_header/timechart_header'; +import { Chart as IChart } from './point_series'; +import { DiscoverHistogram } from './histogram'; + +const TimechartHeaderMemoized = React.memo(TimechartHeader); +const DiscoverHistogramMemoized = React.memo(DiscoverHistogram); +export function DiscoverChart({ + config, + data, + bucketInterval, + chartData, + hits, + isLegacy, + resetQuery, + savedSearch, + state, + stateContainer, + timefield, +}: { + config: IUiSettingsClient; + data: DataPublicPluginStart; + bucketInterval?: TimechartBucketInterval; + chartData?: IChart; + hits?: number; + indexPattern: IndexPattern; + isLegacy: boolean; + resetQuery: () => void; + savedSearch: SavedSearch; + state: AppState; + stateContainer: GetStateReturn; + timefield?: string; +}) { + const toggleHideChart = useCallback(() => { + stateContainer.setAppState({ hideChart: !state.hideChart }); + }, [state, stateContainer]); + + const onChangeInterval = useCallback( + (interval: string) => { + if (interval) { + stateContainer.setAppState({ interval }); + } + }, + [stateContainer] + ); + + const timefilterUpdateHandler = useCallback( + (ranges: { from: number; to: number }) => { + data.query.timefilter.timefilter.setTime({ + from: moment(ranges.from).toISOString(), + to: moment(ranges.to).toISOString(), + mode: 'absolute', + }); + }, + [data] + ); + + return ( + + + + + + + {!state.hideChart && ( + + + + )} + {timefield && ( + + { + toggleHideChart(); + }} + data-test-subj="discoverChartToggle" + > + {!state.hideChart + ? i18n.translate('discover.hideChart', { + defaultMessage: 'Hide chart', + }) + : i18n.translate('discover.showChart', { + defaultMessage: 'Show chart', + })} + + + )} + + + {!state.hideChart && chartData && ( + +
+
+ +
+
+ +
+ )} +
+ ); +} diff --git a/src/plugins/discover/public/application/angular/directives/histogram.tsx b/src/plugins/discover/public/application/apps/main/components/chart/histogram.tsx similarity index 97% rename from src/plugins/discover/public/application/angular/directives/histogram.tsx rename to src/plugins/discover/public/application/apps/main/components/chart/histogram.tsx index 616a0692dbba42..92b212d5739b52 100644 --- a/src/plugins/discover/public/application/angular/directives/histogram.tsx +++ b/src/plugins/discover/public/application/apps/main/components/chart/histogram.tsx @@ -27,14 +27,14 @@ import { import { IUiSettingsClient } from 'kibana/public'; import { EuiChartThemeType } from '@elastic/eui/dist/eui_charts_theme'; import { Subscription, combineLatest } from 'rxjs'; -import { getServices } from '../../../kibana_services'; -import { Chart as IChart } from '../helpers/point_series'; +import { getServices } from '../../../../../kibana_services'; +import { Chart as IChart } from './point_series'; import { CurrentTime, Endzones, getAdjustedInterval, renderEndzoneTooltip, -} from '../../../../../charts/public'; +} from '../../../../../../../charts/public'; export interface DiscoverHistogramProps { chartData: IChart; diff --git a/src/plugins/discover/public/application/apps/main/components/chart/index.ts b/src/plugins/discover/public/application/apps/main/components/chart/index.ts new file mode 100644 index 00000000000000..d5d5a85d1d0f2c --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/components/chart/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 { DiscoverChart } from './discover_chart'; diff --git a/src/plugins/discover/public/application/angular/helpers/point_series.ts b/src/plugins/discover/public/application/apps/main/components/chart/point_series.ts similarity index 90% rename from src/plugins/discover/public/application/angular/helpers/point_series.ts rename to src/plugins/discover/public/application/apps/main/components/chart/point_series.ts index dae70d9b8e55ba..1245b712e6fd7b 100644 --- a/src/plugins/discover/public/application/angular/helpers/point_series.ts +++ b/src/plugins/discover/public/application/apps/main/components/chart/point_series.ts @@ -9,8 +9,7 @@ import { uniq } from 'lodash'; import { Duration, Moment } from 'moment'; import { Unit } from '@elastic/datemath'; - -import { SerializedFieldFormat } from '../../../../../expressions/common/types'; +import { SerializedFieldFormat } from '../../../../../../../expressions/common'; export interface Column { id: string; @@ -26,20 +25,23 @@ export interface Table { rows: Row[]; } +export interface HistogramParamsBounds { + min: Moment; + max: Moment; +} + interface HistogramParams { date: true; interval: Duration; intervalESValue: number; intervalESUnit: Unit; format: string; - bounds: { - min: Moment; - max: Moment; - }; + bounds: HistogramParamsBounds; } export interface Dimension { accessor: 0 | 1; format: SerializedFieldFormat<{ pattern: string }>; + label: string; } export interface Dimensions { @@ -68,7 +70,7 @@ export interface Chart { ordered: Ordered; } -export const buildPointSeriesData = (table: Table, dimensions: Dimensions) => { +export const buildPointSeriesData = (table: Table, dimensions: Dimensions): Chart => { const { x, y } = dimensions; const xAccessor = table.columns[x.accessor].id; const yAccessor = table.columns[y.accessor].id; diff --git a/src/plugins/discover/public/application/components/hits_counter/hits_counter.scss b/src/plugins/discover/public/application/apps/main/components/hits_counter/hits_counter.scss similarity index 100% rename from src/plugins/discover/public/application/components/hits_counter/hits_counter.scss rename to src/plugins/discover/public/application/apps/main/components/hits_counter/hits_counter.scss diff --git a/src/plugins/discover/public/application/components/hits_counter/hits_counter.test.tsx b/src/plugins/discover/public/application/apps/main/components/hits_counter/hits_counter.test.tsx similarity index 100% rename from src/plugins/discover/public/application/components/hits_counter/hits_counter.test.tsx rename to src/plugins/discover/public/application/apps/main/components/hits_counter/hits_counter.test.tsx diff --git a/src/plugins/discover/public/application/components/hits_counter/hits_counter.tsx b/src/plugins/discover/public/application/apps/main/components/hits_counter/hits_counter.tsx similarity index 94% rename from src/plugins/discover/public/application/components/hits_counter/hits_counter.tsx rename to src/plugins/discover/public/application/apps/main/components/hits_counter/hits_counter.tsx index 6ce6129f56b5e9..0850a8ff03d967 100644 --- a/src/plugins/discover/public/application/components/hits_counter/hits_counter.tsx +++ b/src/plugins/discover/public/application/apps/main/components/hits_counter/hits_counter.tsx @@ -12,13 +12,13 @@ import React from 'react'; import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; import { FormattedMessage, I18nProvider } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; -import { formatNumWithCommas } from '../../helpers'; +import { formatNumWithCommas } from '../../../../helpers'; export interface HitsCounterProps { /** * the number of query hits */ - hits: number; + hits?: number; /** * displays the reset button */ @@ -30,6 +30,9 @@ export interface HitsCounterProps { } export function HitsCounter({ hits, showResetButton, onResetQuery }: HitsCounterProps) { + if (typeof hits === 'undefined') { + return null; + } return ( rect { + fill-opacity: .5; + stroke-width: 1; + } +} + +.dscHistogram { + display: flex; + height: $euiSize * 12.5; + padding: $euiSizeS; +} + +// new slimmer layout for data grid +.dscHistogramGrid { + display: flex; + height: $euiSize * 8; + padding: $euiSizeS $euiSizeS 0 $euiSizeS; +} + +.dscTable { + // SASSTODO: add a monospace modifier to the doc-table component + .kbnDocTable__row { + font-family: $euiCodeFontFamily; + font-size: $euiFontSizeXS; + } +} + +.dscTable__footer { + background-color: $euiColorLightShade; + padding: $euiSizeXS $euiSizeS; + text-align: center; +} diff --git a/src/plugins/discover/public/application/apps/main/components/layout/discover_layout.test.tsx b/src/plugins/discover/public/application/apps/main/components/layout/discover_layout.test.tsx new file mode 100644 index 00000000000000..2fd394d98281b7 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/components/layout/discover_layout.test.tsx @@ -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 React from 'react'; +import { Subject, BehaviorSubject } from 'rxjs'; +import { mountWithIntl } from '@kbn/test/jest'; +import { setHeaderActionMenuMounter } from '../../../../../kibana_services'; +import { DiscoverLayout } from './discover_layout'; +import { esHits } from '../../../../../__mocks__/es_hits'; +import { indexPatternMock } from '../../../../../__mocks__/index_pattern'; +import { savedSearchMock } from '../../../../../__mocks__/saved_search'; +import { createSearchSourceMock } from '../../../../../../../data/common/search/search_source/mocks'; +import { IndexPattern, IndexPatternAttributes } from '../../../../../../../data/common'; +import { SavedObject } from '../../../../../../../../core/types'; +import { indexPatternWithTimefieldMock } from '../../../../../__mocks__/index_pattern_with_timefield'; +import { DiscoverSearchSessionManager } from '../../services/discover_search_session'; +import { GetStateReturn } from '../../services/discover_state'; +import { DiscoverLayoutProps } from './types'; +import { SavedSearchDataSubject } from '../../services/use_saved_search'; +import { discoverServiceMock } from '../../../../../__mocks__/services'; +import { FetchStatus } from '../../../../types'; + +setHeaderActionMenuMounter(jest.fn()); + +function getProps(indexPattern: IndexPattern): DiscoverLayoutProps { + const searchSourceMock = createSearchSourceMock({}); + const services = discoverServiceMock; + services.data.query.timefilter.timefilter.getTime = () => { + return { from: '2020-05-14T11:05:13.590', to: '2020-05-14T11:20:13.590' }; + }; + + const indexPatternList = ([indexPattern].map((ip) => { + return { ...ip, ...{ attributes: { title: ip.title } } }; + }) as unknown) as Array>; + + const savedSearch$ = new BehaviorSubject({ + state: FetchStatus.COMPLETE, + rows: esHits, + fetchCounter: 1, + fieldCounts: {}, + hits: Number(esHits.length), + }) as SavedSearchDataSubject; + + return { + indexPattern, + indexPatternList, + navigateTo: jest.fn(), + resetQuery: jest.fn(), + savedSearch: savedSearchMock, + savedSearchData$: savedSearch$, + savedSearchRefetch$: new Subject(), + searchSessionManager: {} as DiscoverSearchSessionManager, + searchSource: searchSourceMock, + services, + state: { columns: [] }, + stateContainer: {} as GetStateReturn, + }; +} + +describe('Discover component', () => { + test('selected index pattern without time field displays no chart toggle', () => { + const component = mountWithIntl(); + expect(component.find('[data-test-subj="discoverChartToggle"]').exists()).toBeFalsy(); + }); + test('selected index pattern with time field displays chart toggle', () => { + const component = mountWithIntl( + + ); + expect(component.find('[data-test-subj="discoverChartToggle"]').exists()).toBeTruthy(); + }); +}); 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 new file mode 100644 index 00000000000000..0430614d413b6b --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/components/layout/discover_layout.tsx @@ -0,0 +1,461 @@ +/* + * Copyright 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 './discover_layout.scss'; +import React, { useState, useRef, useMemo, useCallback, useEffect } from 'react'; +import { + EuiSpacer, + EuiButtonIcon, + EuiFlexGroup, + EuiFlexItem, + EuiHideFor, + EuiHorizontalRule, + EuiPage, + EuiPageBody, + EuiPageContent, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { METRIC_TYPE } from '@kbn/analytics'; +import { FormattedMessage, I18nProvider } from '@kbn/i18n/react'; +import classNames from 'classnames'; +import { DiscoverNoResults } from '../no_results'; +import { LoadingSpinner } from '../loading_spinner/loading_spinner'; +import { DocTableLegacy } from '../../../../angular/doc_table/create_doc_table_react'; +import { + esFilters, + IndexPatternField, + indexPatterns as indexPatternsUtils, +} from '../../../../../../../data/public'; +import { DiscoverSidebarResponsive } from '../sidebar'; +import { DiscoverLayoutProps } from './types'; +import { SortPairArr } from '../../../../angular/doc_table/lib/get_sort'; +import { + DOC_HIDE_TIME_COLUMN_SETTING, + DOC_TABLE_LEGACY, + MODIFY_COLUMNS_ON_SWITCH, + SAMPLE_SIZE_SETTING, + SEARCH_FIELDS_FROM_SOURCE, + SORT_DEFAULT_ORDER_SETTING, +} from '../../../../../../common'; +import { popularizeField } from '../../../../helpers/popularize_field'; +import { DocViewFilterFn } from '../../../../doc_views/doc_views_types'; +import { DiscoverGrid } from '../../../../components/discover_grid/discover_grid'; +import { DiscoverTopNav } from '../top_nav/discover_topnav'; +import { ElasticSearchHit } from '../../../../doc_views/doc_views_types'; +import { DiscoverChart } from '../chart'; +import { getResultState } from '../../utils/get_result_state'; +import { InspectorSession } from '../../../../../../../inspector/public'; +import { DiscoverUninitialized } from '../uninitialized/uninitialized'; +import { SavedSearchDataMessage } from '../../services/use_saved_search'; +import { useDataGridColumns } from '../../../../helpers/use_data_grid_columns'; +import { getSwitchIndexPatternAppState } from '../../utils/get_switch_index_pattern_app_state'; +import { FetchStatus } from '../../../../types'; + +const DocTableLegacyMemoized = React.memo(DocTableLegacy); +const SidebarMemoized = React.memo(DiscoverSidebarResponsive); +const DataGridMemoized = React.memo(DiscoverGrid); +const TopNavMemoized = React.memo(DiscoverTopNav); +const DiscoverChartMemoized = React.memo(DiscoverChart); + +interface DiscoverLayoutFetchState extends SavedSearchDataMessage { + state: FetchStatus; + fetchCounter: number; + fieldCounts: Record; + rows: ElasticSearchHit[]; +} + +export function DiscoverLayout({ + indexPattern, + indexPatternList, + navigateTo, + savedSearchRefetch$, + resetQuery, + savedSearchData$, + savedSearch, + searchSessionManager, + searchSource, + services, + state, + stateContainer, +}: DiscoverLayoutProps) { + const { + trackUiMetric, + capabilities, + indexPatterns, + data, + uiSettings: config, + filterManager, + } = services; + + const sampleSize = useMemo(() => config.get(SAMPLE_SIZE_SETTING), [config]); + const [expandedDoc, setExpandedDoc] = useState(undefined); + const [inspectorSession, setInspectorSession] = useState(undefined); + const scrollableDesktop = useRef(null); + const collapseIcon = useRef(null); + + const [fetchState, setFetchState] = useState({ + state: savedSearchData$.getValue().state, + fetchCounter: 0, + fieldCounts: {}, + rows: [], + }); + const { state: fetchStatus, fetchCounter, inspectorAdapters, rows } = fetchState; + + useEffect(() => { + const subscription = savedSearchData$.subscribe((next) => { + if ( + (next.state && next.state !== fetchState.state) || + (next.fetchCounter && next.fetchCounter !== fetchState.fetchCounter) || + (next.rows && next.rows !== fetchState.rows) || + (next.chartData && next.chartData !== fetchState.chartData) + ) { + setFetchState({ ...fetchState, ...next }); + } + }); + return () => { + subscription.unsubscribe(); + }; + }, [savedSearchData$, fetchState]); + + const isMobile = () => { + // collapse icon isn't displayed in mobile view, use it to detect which view is displayed + return collapseIcon && !collapseIcon.current; + }; + const timeField = useMemo(() => { + return indexPatternsUtils.isDefault(indexPattern) ? indexPattern.timeFieldName : undefined; + }, [indexPattern]); + + const [isSidebarClosed, setIsSidebarClosed] = useState(false); + const isLegacy = useMemo(() => services.uiSettings.get(DOC_TABLE_LEGACY), [services]); + const useNewFieldsApi = useMemo(() => !services.uiSettings.get(SEARCH_FIELDS_FROM_SOURCE), [ + services, + ]); + + const unmappedFieldsConfig = useMemo( + () => ({ + showUnmappedFields: useNewFieldsApi, + }), + [useNewFieldsApi] + ); + + const resultState = useMemo(() => getResultState(fetchStatus, rows!), [fetchStatus, rows]); + + const updateQuery = useCallback( + (_payload, isUpdate?: boolean) => { + if (isUpdate === false) { + searchSessionManager.removeSearchSessionIdFromURL({ replace: false }); + savedSearchRefetch$.next(); + } + }, + [savedSearchRefetch$, searchSessionManager] + ); + + const { columns, onAddColumn, onRemoveColumn, onMoveColumn, onSetColumns } = useDataGridColumns({ + capabilities, + config, + indexPattern, + indexPatterns, + setAppState: stateContainer.setAppState, + state, + useNewFieldsApi, + }); + + const onOpenInspector = useCallback(() => { + // prevent overlapping + if (inspectorAdapters) { + setExpandedDoc(undefined); + const session = services.inspector.open(inspectorAdapters, { + title: savedSearch.title, + }); + setInspectorSession(session); + } + }, [setExpandedDoc, inspectorAdapters, savedSearch, services.inspector]); + + useEffect(() => { + return () => { + if (inspectorSession) { + // Close the inspector if this scope is destroyed (e.g. because the user navigates away). + inspectorSession.close(); + } + }; + }, [inspectorSession]); + + const onSort = useCallback( + (sort: string[][]) => { + stateContainer.setAppState({ sort }); + }, + [stateContainer] + ); + + const onAddFilter = useCallback( + (field: IndexPatternField | string, values: string, operation: '+' | '-') => { + const fieldName = typeof field === 'string' ? field : field.name; + popularizeField(indexPattern, fieldName, indexPatterns); + const newFilters = esFilters.generateFilters( + filterManager, + field, + values, + operation, + String(indexPattern.id) + ); + if (trackUiMetric) { + trackUiMetric(METRIC_TYPE.CLICK, 'filter_added'); + } + return filterManager.addFilters(newFilters); + }, + [filterManager, indexPattern, indexPatterns, trackUiMetric] + ); + /** + * Legacy function, remove once legacy grid is removed + */ + const onBackToTop = useCallback(() => { + if (scrollableDesktop && scrollableDesktop.current) { + scrollableDesktop.current.focus(); + } + // Only the desktop one needs to target a specific container + if (!isMobile() && scrollableDesktop.current) { + scrollableDesktop.current.scrollTo(0, 0); + } else if (window) { + window.scrollTo(0, 0); + } + }, [scrollableDesktop]); + + const onResize = useCallback( + (colSettings: { columnId: string; width: number }) => { + const grid = { ...state.grid } || {}; + const newColumns = { ...grid.columns } || {}; + newColumns[colSettings.columnId] = { + width: colSettings.width, + }; + const newGrid = { ...grid, columns: newColumns }; + stateContainer.setAppState({ grid: newGrid }); + }, + [stateContainer, state] + ); + + const onEditRuntimeField = useCallback(() => { + savedSearchRefetch$.next('reset'); + }, [savedSearchRefetch$]); + + const contentCentered = resultState === 'uninitialized'; + const showTimeCol = useMemo( + () => !config.get(DOC_HIDE_TIME_COLUMN_SETTING, false) && !!indexPattern.timeFieldName, + [config, indexPattern.timeFieldName] + ); + + const onChangeIndexPattern = useCallback( + async (id: string) => { + const nextIndexPattern = await indexPatterns.get(id); + if (nextIndexPattern && indexPattern) { + /** + * Without resetting the fetch state, e.g. a time column would be displayed when switching + * from a index pattern without to a index pattern with time filter for a brief moment + * That's because appState is updated before savedSearchData$ + * The following line of code catches this, but should be improved + */ + savedSearchData$.next({ rows: [], state: FetchStatus.LOADING, fieldCounts: {} }); + + const nextAppState = getSwitchIndexPatternAppState( + indexPattern, + nextIndexPattern, + state.columns || [], + (state.sort || []) as SortPairArr[], + config.get(MODIFY_COLUMNS_ON_SWITCH), + config.get(SORT_DEFAULT_ORDER_SETTING) + ); + stateContainer.setAppState(nextAppState); + } + }, + [ + config, + indexPattern, + indexPatterns, + savedSearchData$, + state.columns, + state.sort, + stateContainer, + ] + ); + + return ( + + + + +

+ {savedSearch.title} +

+ + + + + + +
+ + setIsSidebarClosed(!isSidebarClosed)} + data-test-subj="collapseSideBarButton" + aria-controls="discover-sidebar" + aria-expanded={isSidebarClosed ? 'false' : 'true'} + aria-label={i18n.translate('discover.toggleSidebarAriaLabel', { + defaultMessage: 'Toggle sidebar', + })} + buttonRef={collapseIcon} + /> +
+
+
+ + + {resultState === 'none' && ( + + )} + {resultState === 'uninitialized' && ( + savedSearchRefetch$.next()} /> + )} + {resultState === 'loading' && } + {resultState === 'ready' && ( + + + + + + + +
+

+ +

+ {isLegacy && rows && rows.length && ( + + )} + {!isLegacy && rows && rows.length && ( +
+ +
+ )} +
+
+
+ )} +
+
+
+
+
+
+ ); +} diff --git a/src/plugins/discover/public/application/apps/main/components/layout/index.ts b/src/plugins/discover/public/application/apps/main/components/layout/index.ts new file mode 100644 index 00000000000000..592e893cf8ba84 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/components/layout/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 { DiscoverLayout } from './discover_layout'; diff --git a/src/plugins/discover/public/application/apps/main/components/layout/types.ts b/src/plugins/discover/public/application/apps/main/components/layout/types.ts new file mode 100644 index 00000000000000..d8d6338fbe41a3 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/components/layout/types.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { + IndexPattern, + IndexPatternAttributes, + SavedObject, +} from '../../../../../../../data/common'; +import { ISearchSource } from '../../../../../../../data/public'; +import { DiscoverSearchSessionManager } from '../../services/discover_search_session'; +import { AppState, GetStateReturn } from '../../services/discover_state'; +import { SavedSearchRefetchSubject, SavedSearchDataSubject } from '../../services/use_saved_search'; +import { DiscoverServices } from '../../../../../build_services'; +import { SavedSearch } from '../../../../../saved_searches'; + +export interface DiscoverLayoutProps { + indexPattern: IndexPattern; + indexPatternList: Array>; + resetQuery: () => void; + navigateTo: (url: string) => void; + savedSearch: SavedSearch; + savedSearchData$: SavedSearchDataSubject; + savedSearchRefetch$: SavedSearchRefetchSubject; + searchSessionManager: DiscoverSearchSessionManager; + searchSource: ISearchSource; + services: DiscoverServices; + state: AppState; + stateContainer: GetStateReturn; +} diff --git a/src/plugins/discover/public/application/components/loading_spinner/loading_spinner.scss b/src/plugins/discover/public/application/apps/main/components/loading_spinner/loading_spinner.scss similarity index 100% rename from src/plugins/discover/public/application/components/loading_spinner/loading_spinner.scss rename to src/plugins/discover/public/application/apps/main/components/loading_spinner/loading_spinner.scss diff --git a/src/plugins/discover/public/application/components/loading_spinner/loading_spinner.test.tsx b/src/plugins/discover/public/application/apps/main/components/loading_spinner/loading_spinner.test.tsx similarity index 100% rename from src/plugins/discover/public/application/components/loading_spinner/loading_spinner.test.tsx rename to src/plugins/discover/public/application/apps/main/components/loading_spinner/loading_spinner.test.tsx diff --git a/src/plugins/discover/public/application/components/loading_spinner/loading_spinner.tsx b/src/plugins/discover/public/application/apps/main/components/loading_spinner/loading_spinner.tsx similarity index 100% rename from src/plugins/discover/public/application/components/loading_spinner/loading_spinner.tsx rename to src/plugins/discover/public/application/apps/main/components/loading_spinner/loading_spinner.tsx diff --git a/src/plugins/discover/public/application/components/no_results/_no_results.scss b/src/plugins/discover/public/application/apps/main/components/no_results/_no_results.scss similarity index 100% rename from src/plugins/discover/public/application/components/no_results/_no_results.scss rename to src/plugins/discover/public/application/apps/main/components/no_results/_no_results.scss diff --git a/src/plugins/discover/public/application/components/no_results/index.ts b/src/plugins/discover/public/application/apps/main/components/no_results/index.ts similarity index 100% rename from src/plugins/discover/public/application/components/no_results/index.ts rename to src/plugins/discover/public/application/apps/main/components/no_results/index.ts diff --git a/src/plugins/discover/public/application/components/no_results/no_results.test.tsx b/src/plugins/discover/public/application/apps/main/components/no_results/no_results.test.tsx similarity index 98% rename from src/plugins/discover/public/application/components/no_results/no_results.test.tsx rename to src/plugins/discover/public/application/apps/main/components/no_results/no_results.test.tsx index 9a115fb5a66b62..e7af82cf9504c7 100644 --- a/src/plugins/discover/public/application/components/no_results/no_results.test.tsx +++ b/src/plugins/discover/public/application/apps/main/components/no_results/no_results.test.tsx @@ -12,7 +12,7 @@ import { findTestSubject } from '@elastic/eui/lib/test'; import { DiscoverNoResults, DiscoverNoResultsProps } from './no_results'; -jest.mock('../../../kibana_services', () => { +jest.mock('../../../../../kibana_services', () => { return { getServices: () => ({ docLinks: { diff --git a/src/plugins/discover/public/application/components/no_results/no_results.tsx b/src/plugins/discover/public/application/apps/main/components/no_results/no_results.tsx similarity index 94% rename from src/plugins/discover/public/application/components/no_results/no_results.tsx rename to src/plugins/discover/public/application/apps/main/components/no_results/no_results.tsx index c23de80ec99373..07deb45d1fda24 100644 --- a/src/plugins/discover/public/application/components/no_results/no_results.tsx +++ b/src/plugins/discover/public/application/apps/main/components/no_results/no_results.tsx @@ -9,8 +9,8 @@ import React, { Fragment } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiButton, EuiCallOut, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { getServices } from '../../../kibana_services'; -import { DataPublicPluginStart } from '../../../../../data/public'; +import { getServices } from '../../../../../kibana_services'; +import { DataPublicPluginStart } from '../../../../../../../data/public'; import { getLuceneQueryMessage, getTimeFieldMessage } from './no_results_helper'; import './_no_results.scss'; diff --git a/src/plugins/discover/public/application/components/no_results/no_results_helper.tsx b/src/plugins/discover/public/application/apps/main/components/no_results/no_results_helper.tsx similarity index 100% rename from src/plugins/discover/public/application/components/no_results/no_results_helper.tsx rename to src/plugins/discover/public/application/apps/main/components/no_results/no_results_helper.tsx diff --git a/src/plugins/discover/public/application/components/sidebar/__snapshots__/discover_field_details_footer.test.tsx.snap b/src/plugins/discover/public/application/apps/main/components/sidebar/__snapshots__/discover_field_details_footer.test.tsx.snap similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/__snapshots__/discover_field_details_footer.test.tsx.snap rename to src/plugins/discover/public/application/apps/main/components/sidebar/__snapshots__/discover_field_details_footer.test.tsx.snap diff --git a/src/plugins/discover/public/application/components/sidebar/__snapshots__/discover_index_pattern.test.tsx.snap b/src/plugins/discover/public/application/apps/main/components/sidebar/__snapshots__/discover_index_pattern.test.tsx.snap similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/__snapshots__/discover_index_pattern.test.tsx.snap rename to src/plugins/discover/public/application/apps/main/components/sidebar/__snapshots__/discover_index_pattern.test.tsx.snap diff --git a/src/plugins/discover/public/application/components/sidebar/__snapshots__/discover_index_pattern_management.test.tsx.snap b/src/plugins/discover/public/application/apps/main/components/sidebar/__snapshots__/discover_index_pattern_management.test.tsx.snap similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/__snapshots__/discover_index_pattern_management.test.tsx.snap rename to src/plugins/discover/public/application/apps/main/components/sidebar/__snapshots__/discover_index_pattern_management.test.tsx.snap diff --git a/src/plugins/discover/public/application/components/sidebar/change_indexpattern.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/change_indexpattern.tsx similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/change_indexpattern.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/change_indexpattern.tsx diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field.scss b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field.scss similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/discover_field.scss rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_field.scss diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field.test.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field.test.tsx similarity index 91% rename from src/plugins/discover/public/application/components/sidebar/discover_field.test.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_field.test.tsx index 2041a8dfdc6379..82e37dd2b427cb 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_field.test.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field.test.tsx @@ -8,15 +8,16 @@ import React from 'react'; import { findTestSubject } from '@elastic/eui/lib/test'; -// @ts-expect-error -import stubbedLogstashFields from '../../../__fixtures__/logstash_fields'; import { mountWithIntl } from '@kbn/test/jest'; + +// @ts-expect-error +import stubbedLogstashFields from '../../../../../__fixtures__/logstash_fields'; import { DiscoverField } from './discover_field'; -import { coreMock } from '../../../../../../core/public/mocks'; -import { IndexPatternField } from '../../../../../data/public'; -import { getStubIndexPattern } from '../../../../../data/public/test_utils'; +import { coreMock } from '../../../../../../../../core/public/mocks'; +import { IndexPatternField } from '../../../../../../../data/public'; +import { getStubIndexPattern } from '../../../../../../../data/public/test_utils'; -jest.mock('../../../kibana_services', () => ({ +jest.mock('../../../../../kibana_services', () => ({ getServices: () => ({ history: () => ({ location: { diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field.tsx similarity index 99% rename from src/plugins/discover/public/application/components/sidebar/discover_field.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_field.tsx index a53809cfa2c7ef..e60dabd1d8d8c7 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_field.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field.tsx @@ -23,9 +23,9 @@ import { i18n } from '@kbn/i18n'; import { UiCounterMetricType } from '@kbn/analytics'; import classNames from 'classnames'; import { DiscoverFieldDetails } from './discover_field_details'; -import { FieldIcon, FieldButton } from '../../../../../kibana_react/public'; +import { FieldIcon, FieldButton } from '../../../../../../../kibana_react/public'; import { FieldDetails } from './types'; -import { IndexPatternField, IndexPattern } from '../../../../../data/public'; +import { IndexPatternField, IndexPattern } from '../../../../../../../data/public'; import { getFieldTypeName } from './lib/get_field_type_name'; import { DiscoverFieldDetailsFooter } from './discover_field_details_footer'; diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field_bucket.scss b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_bucket.scss similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/discover_field_bucket.scss rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_bucket.scss diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field_bucket.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_bucket.tsx similarity index 98% rename from src/plugins/discover/public/application/components/sidebar/discover_field_bucket.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_bucket.tsx index e433c3419e24af..7dab8cecf28a96 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_field_bucket.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_bucket.tsx @@ -11,7 +11,7 @@ import { EuiText, EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@e import { i18n } from '@kbn/i18n'; import { StringFieldProgressBar } from './string_progress_bar'; import { Bucket } from './types'; -import { IndexPatternField } from '../../../../../data/public'; +import { IndexPatternField } from '../../../../../../../data/public'; import './discover_field_bucket.scss'; interface Props { diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field_details.scss b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details.scss similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/discover_field_details.scss rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details.scss diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field_details.test.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details.test.tsx similarity index 88% rename from src/plugins/discover/public/application/components/sidebar/discover_field_details.test.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details.test.tsx index f82154af33d1ea..a798abb60b833a 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_field_details.test.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details.test.tsx @@ -8,13 +8,13 @@ import React from 'react'; import { findTestSubject } from '@elastic/eui/lib/test'; -// @ts-expect-error -import stubbedLogstashFields from '../../../__fixtures__/logstash_fields'; import { mountWithIntl } from '@kbn/test/jest'; +// @ts-expect-error +import stubbedLogstashFields from '../../../../../__fixtures__/logstash_fields'; import { DiscoverFieldDetails } from './discover_field_details'; -import { coreMock } from '../../../../../../core/public/mocks'; -import { IndexPatternField } from '../../../../../data/public'; -import { getStubIndexPattern } from '../../../../../data/public/test_utils'; +import { coreMock } from '../../../../../../../../core/public/mocks'; +import { IndexPatternField } from '../../../../../../../data/public'; +import { getStubIndexPattern } from '../../../../../../../data/public/test_utils'; const indexPattern = getStubIndexPattern( 'logstash-*', diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field_details.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details.tsx similarity index 99% rename from src/plugins/discover/public/application/components/sidebar/discover_field_details.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details.tsx index e2ffb79551aab2..d7008ba3e310f3 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_field_details.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details.tsx @@ -18,7 +18,7 @@ import { getVisualizeHref, } from './lib/visualize_trigger_utils'; import { Bucket, FieldDetails } from './types'; -import { IndexPatternField, IndexPattern } from '../../../../../data/public'; +import { IndexPatternField, IndexPattern } from '../../../../../../../data/public'; import './discover_field_details.scss'; import { DiscoverFieldDetailsFooter } from './discover_field_details_footer'; diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field_details_footer.test.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details_footer.test.tsx similarity index 87% rename from src/plugins/discover/public/application/components/sidebar/discover_field_details_footer.test.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details_footer.test.tsx index 73e906cb62f5fc..aa93b2a6637362 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_field_details_footer.test.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details_footer.test.tsx @@ -8,12 +8,12 @@ import React from 'react'; import { findTestSubject } from '@elastic/eui/lib/test'; -// @ts-expect-error -import stubbedLogstashFields from '../../../__fixtures__/logstash_fields'; import { mountWithIntl } from '@kbn/test/jest'; -import { coreMock } from '../../../../../../core/public/mocks'; -import { IndexPatternField } from '../../../../../data/public'; -import { getStubIndexPattern } from '../../../../../data/public/test_utils'; +// @ts-expect-error +import stubbedLogstashFields from '../../../../../__fixtures__/logstash_fields'; +import { coreMock } from '../../../../../../../../core/public/mocks'; +import { IndexPatternField } from '../../../../../../../data/public'; +import { getStubIndexPattern } from '../../../../../../../data/public/test_utils'; import { DiscoverFieldDetailsFooter } from './discover_field_details_footer'; const indexPattern = getStubIndexPattern( diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field_details_footer.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details_footer.tsx similarity index 91% rename from src/plugins/discover/public/application/components/sidebar/discover_field_details_footer.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details_footer.tsx index bea302087938ab..148dfc67c3e416 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_field_details_footer.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_details_footer.tsx @@ -9,8 +9,8 @@ import React from 'react'; import { EuiLink, EuiPopoverFooter, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import { IndexPatternField } from '../../../../../data/common/index_patterns/fields'; -import { IndexPattern } from '../../../../../data/common/index_patterns/index_patterns'; +import { IndexPatternField } from '../../../../../../../data/common/index_patterns/fields'; +import { IndexPattern } from '../../../../../../../data/common/index_patterns/index_patterns'; import { FieldDetails } from './types'; interface DiscoverFieldDetailsFooterProps { diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field_search.scss b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_search.scss similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/discover_field_search.scss rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_search.scss diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field_search.test.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_search.test.tsx similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/discover_field_search.test.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_search.test.tsx diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field_search.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_search.tsx similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/discover_field_search.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_search.tsx diff --git a/src/plugins/discover/public/application/components/sidebar/discover_index_pattern.test.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern.test.tsx similarity index 89% rename from src/plugins/discover/public/application/components/sidebar/discover_index_pattern.test.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern.test.tsx index f6d577de564ade..45d6faa9606e10 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_index_pattern.test.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern.test.tsx @@ -15,8 +15,7 @@ import { SavedObject } from 'kibana/server'; import { DiscoverIndexPattern, DiscoverIndexPatternProps } from './discover_index_pattern'; import { EuiSelectable } from '@elastic/eui'; import { IndexPattern, IndexPatternAttributes } from 'src/plugins/data/public'; -import { configMock } from '../../../__mocks__/config'; -import { indexPatternsMock } from '../../../__mocks__/index_patterns'; +import { indexPatternsMock } from '../../../../../__mocks__/index_patterns'; const indexPattern = { id: 'the-index-pattern-id-first', @@ -38,13 +37,11 @@ const indexPattern2 = { } as SavedObject; const defaultProps = { - config: configMock, indexPatternList: [indexPattern1, indexPattern2], selectedIndexPattern: indexPattern, - state: {}, - setAppState: jest.fn(), useNewFieldsApi: true, indexPatterns: indexPatternsMock, + onChangeIndexPattern: jest.fn(), }; function getIndexPatternPickerList(instance: ShallowWrapper) { @@ -72,7 +69,7 @@ describe('DiscoverIndexPattern', () => { const props = ({ indexPatternList: null, selectedIndexPattern: null, - setIndexPattern: jest.fn(), + onChangeIndexPattern: jest.fn(), } as unknown) as DiscoverIndexPatternProps; expect(shallow()).toMatchSnapshot(`""`); @@ -92,10 +89,6 @@ describe('DiscoverIndexPattern', () => { await act(async () => { selectIndexPatternPickerOption(instance, 'test2 title'); }); - expect(defaultProps.setAppState).toHaveBeenCalledWith({ - index: 'the-index-pattern-id', - columns: [], - sort: [], - }); + expect(defaultProps.onChangeIndexPattern).toHaveBeenCalledWith('the-index-pattern-id'); }); }); diff --git a/src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern.tsx new file mode 100644 index 00000000000000..356c86dded97a9 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern.tsx @@ -0,0 +1,77 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useState, useEffect } from 'react'; +import { I18nProvider } from '@kbn/i18n/react'; +import { SavedObject } from 'kibana/public'; +import { IndexPattern, IndexPatternAttributes } from 'src/plugins/data/public'; + +import { IndexPatternRef } from './types'; +import { ChangeIndexPattern } from './change_indexpattern'; +export interface DiscoverIndexPatternProps { + /** + * list of available index patterns, if length > 1, component offers a "change" link + */ + indexPatternList: Array>; + /** + * Callback function when changing an index pattern + */ + onChangeIndexPattern: (id: string) => void; + /** + * currently selected index pattern, due to angular issues it's undefined at first rendering + */ + selectedIndexPattern: IndexPattern; +} + +/** + * Component allows you to select an index pattern in discovers side bar + */ +export function DiscoverIndexPattern({ + indexPatternList, + onChangeIndexPattern, + selectedIndexPattern, +}: DiscoverIndexPatternProps) { + const options: IndexPatternRef[] = (indexPatternList || []).map((entity) => ({ + id: entity.id, + title: entity.attributes!.title, + })); + const { id: selectedId, title: selectedTitle } = selectedIndexPattern || {}; + + const [selected, setSelected] = useState({ + id: selectedId, + title: selectedTitle || '', + }); + useEffect(() => { + const { id, title } = selectedIndexPattern; + setSelected({ id, title }); + }, [selectedIndexPattern]); + if (!selectedId) { + return null; + } + + return ( + + { + const indexPattern = options.find((pattern) => pattern.id === id); + if (indexPattern) { + onChangeIndexPattern(id); + setSelected(indexPattern); + } + }} + /> + + ); +} diff --git a/src/plugins/discover/public/application/components/sidebar/discover_index_pattern_management.test.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern_management.test.tsx similarity index 90% rename from src/plugins/discover/public/application/components/sidebar/discover_index_pattern_management.test.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern_management.test.tsx index 6f9ff63d69782f..d81ecb79a42211 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_index_pattern_management.test.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern_management.test.tsx @@ -6,16 +6,16 @@ * Side Public License, v 1. */ -import { getStubIndexPattern } from '../../../../../data/public/index_patterns/index_pattern.stub'; -import { coreMock } from '../../../../../../core/public/mocks'; -import { DiscoverServices } from '../../../build_services'; -// @ts-expect-error -import stubbedLogstashFields from '../../../__fixtures__/logstash_fields'; -import { mountWithIntl } from '@kbn/test/jest'; import React from 'react'; -import { DiscoverIndexPatternManagement } from './discover_index_pattern_management'; +import { mountWithIntl } from '@kbn/test/jest'; import { EuiContextMenuPanel, EuiPopover, EuiContextMenuItem } from '@elastic/eui'; import { findTestSubject } from '@kbn/test/jest'; +import { getStubIndexPattern } from '../../../../../../../data/public/index_patterns/index_pattern.stub'; +import { coreMock } from '../../../../../../../../core/public/mocks'; +import { DiscoverServices } from '../../../../../build_services'; +// @ts-expect-error +import stubbedLogstashFields from '../../../../../__fixtures__/logstash_fields'; +import { DiscoverIndexPatternManagement } from './discover_index_pattern_management'; const mockServices = ({ history: () => ({ diff --git a/src/plugins/discover/public/application/components/sidebar/discover_index_pattern_management.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern_management.tsx similarity index 95% rename from src/plugins/discover/public/application/components/sidebar/discover_index_pattern_management.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern_management.tsx index 9a9dfd579b96d5..125172f47b7c42 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_index_pattern_management.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern_management.tsx @@ -9,8 +9,8 @@ import React, { useState } from 'react'; import { EuiButtonIcon, EuiContextMenuItem, EuiContextMenuPanel, EuiPopover } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { DiscoverServices } from '../../../build_services'; -import { IndexPattern } from '../../../../../data/common/index_patterns/index_patterns'; +import { DiscoverServices } from '../../../../../build_services'; +import { IndexPattern } from '../../../../../../../data/common/index_patterns/index_patterns'; export interface DiscoverIndexPatternManagementProps { /** diff --git a/src/plugins/discover/public/application/components/sidebar/discover_sidebar.scss b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar.scss similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/discover_sidebar.scss rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar.scss diff --git a/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar.test.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar.test.tsx new file mode 100644 index 00000000000000..304ab05516f92a --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar.test.tsx @@ -0,0 +1,108 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { each, cloneDeep } from 'lodash'; +import { ReactWrapper } from 'enzyme'; +import { findTestSubject } from '@elastic/eui/lib/test'; +// @ts-expect-error +import realHits from '../../../../../__fixtures__/real_hits.js'; +// @ts-expect-error +import stubbedLogstashFields from '../../../../../__fixtures__/logstash_fields'; +import { mountWithIntl } from '@kbn/test/jest'; +import React from 'react'; +import { DiscoverSidebarProps } from './discover_sidebar'; +import { coreMock } from '../../../../../../../../core/public/mocks'; +import { IndexPatternAttributes } from '../../../../../../../data/common'; +import { getStubIndexPattern } from '../../../../../../../data/public/test_utils'; +import { SavedObject } from '../../../../../../../../core/types'; +import { getDefaultFieldFilter } from './lib/field_filter'; +import { DiscoverSidebar } from './discover_sidebar'; +import { ElasticSearchHit } from '../../../../doc_views/doc_views_types'; +import { discoverServiceMock as mockDiscoverServices } from '../../../../../__mocks__/services'; + +jest.mock('../../../../../kibana_services', () => ({ + getServices: () => mockDiscoverServices, +})); + +jest.mock('./lib/get_index_pattern_field_list', () => ({ + getIndexPatternFieldList: jest.fn((indexPattern) => indexPattern.fields), +})); + +function getCompProps(): DiscoverSidebarProps { + const indexPattern = getStubIndexPattern( + 'logstash-*', + (cfg: unknown) => cfg, + 'time', + stubbedLogstashFields(), + coreMock.createSetup() + ); + + // @ts-expect-error _.each() is passing additional args to flattenHit + const hits = (each(cloneDeep(realHits), indexPattern.flattenHit) as Array< + Record + >) as ElasticSearchHit[]; + + const indexPatternList = [ + { id: '0', attributes: { title: 'b' } } as SavedObject, + { id: '1', attributes: { title: 'a' } } as SavedObject, + { id: '2', attributes: { title: 'c' } } as SavedObject, + ]; + + const fieldCounts: Record = {}; + + for (const hit of hits) { + for (const key of Object.keys(indexPattern.flattenHit(hit))) { + fieldCounts[key] = (fieldCounts[key] || 0) + 1; + } + } + return { + columns: ['extension'], + fieldCounts, + hits, + indexPatternList, + onChangeIndexPattern: jest.fn(), + onAddFilter: jest.fn(), + onAddField: jest.fn(), + onRemoveField: jest.fn(), + selectedIndexPattern: indexPattern, + services: mockDiscoverServices, + state: {}, + trackUiMetric: jest.fn(), + fieldFilter: getDefaultFieldFilter(), + setFieldFilter: jest.fn(), + onEditRuntimeField: jest.fn(), + editField: jest.fn(), + }; +} + +describe('discover sidebar', function () { + let props: DiscoverSidebarProps; + let comp: ReactWrapper; + + beforeAll(() => { + props = getCompProps(); + comp = mountWithIntl(); + }); + + it('should have Selected Fields and Available Fields with Popular Fields sections', function () { + const popular = findTestSubject(comp, 'fieldList-popular'); + const selected = findTestSubject(comp, 'fieldList-selected'); + const unpopular = findTestSubject(comp, 'fieldList-unpopular'); + expect(popular.children().length).toBe(1); + expect(unpopular.children().length).toBe(7); + expect(selected.children().length).toBe(1); + }); + it('should allow selecting fields', function () { + findTestSubject(comp, 'fieldToggle-bytes').simulate('click'); + expect(props.onAddField).toHaveBeenCalledWith('bytes'); + }); + it('should allow deselecting fields', function () { + findTestSubject(comp, 'fieldToggle-extension').simulate('click'); + expect(props.onRemoveField).toHaveBeenCalledWith('extension'); + }); +}); diff --git a/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar.tsx similarity index 97% rename from src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar.tsx index aaaf72f7706305..0bebec61657b4a 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar.tsx @@ -27,9 +27,9 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { DiscoverField } from './discover_field'; import { DiscoverIndexPattern } from './discover_index_pattern'; import { DiscoverFieldSearch } from './discover_field_search'; -import { FIELDS_LIMIT_SETTING } from '../../../../common'; +import { FIELDS_LIMIT_SETTING } from '../../../../../../common'; import { groupFields } from './lib/group_fields'; -import { IndexPatternField } from '../../../../../data/public'; +import { IndexPatternField } from '../../../../../../../data/public'; import { getDetails } from './lib/get_details'; import { FieldFilterState, getDefaultFieldFilter, setFieldFilterProp } from './lib/field_filter'; import { getIndexPatternFieldList } from './lib/get_index_pattern_field_list'; @@ -68,30 +68,28 @@ export interface DiscoverSidebarProps extends DiscoverSidebarResponsiveProps { export function DiscoverSidebar({ alwaysShowActionButtons = false, columns, - config, fieldCounts, fieldFilter, hits, indexPatternList, - indexPatterns, onAddField, onAddFilter, onRemoveField, selectedIndexPattern, services, - setAppState, setFieldFilter, - state, trackUiMetric, useNewFieldsApi = false, useFlyout = false, unmappedFieldsConfig, onEditRuntimeField, + onChangeIndexPattern, setFieldEditorRef, closeFlyout, editField, }: DiscoverSidebarProps) { const [fields, setFields] = useState(null); + const { indexPatternFieldEditor } = services; const indexPatternFieldEditPermission = indexPatternFieldEditor?.userPermissions.editIndexPattern(); const canEditIndexPatternField = !!indexPatternFieldEditPermission && useNewFieldsApi; @@ -282,12 +280,9 @@ export function DiscoverSidebar({ o.attributes.title)} - indexPatterns={indexPatterns} - state={state} - setAppState={setAppState} + onChangeIndexPattern={onChangeIndexPattern} /> @@ -323,12 +318,9 @@ export function DiscoverSidebar({ o.attributes.title)} - indexPatterns={indexPatterns} - state={state} - setAppState={setAppState} + onChangeIndexPattern={onChangeIndexPattern} /> diff --git a/src/plugins/discover/public/application/components/sidebar/discover_sidebar_responsive.test.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.test.tsx similarity index 84% rename from src/plugins/discover/public/application/components/sidebar/discover_sidebar_responsive.test.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.test.tsx index caa0e436f40910..2ad75806173eb0 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_sidebar_responsive.test.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.test.tsx @@ -10,23 +10,21 @@ import { each, cloneDeep } from 'lodash'; import { ReactWrapper } from 'enzyme'; import { findTestSubject } from '@elastic/eui/lib/test'; // @ts-expect-error -import realHits from '../../../__fixtures__/real_hits.js'; +import realHits from '../../../../../__fixtures__/real_hits.js'; // @ts-expect-error -import stubbedLogstashFields from '../../../__fixtures__/logstash_fields'; +import stubbedLogstashFields from '../../../../../__fixtures__/logstash_fields'; import { mountWithIntl } from '@kbn/test/jest'; import React from 'react'; -import { coreMock } from '../../../../../../core/public/mocks'; -import { IndexPatternAttributes } from '../../../../../data/common'; -import { getStubIndexPattern } from '../../../../../data/public/test_utils'; -import { SavedObject } from '../../../../../../core/types'; +import { coreMock } from '../../../../../../../../core/public/mocks'; +import { IndexPatternAttributes } from '../../../../../../../data/common'; +import { getStubIndexPattern } from '../../../../../../../data/public/test_utils'; +import { SavedObject } from '../../../../../../../../core/types'; import { DiscoverSidebarResponsive, DiscoverSidebarResponsiveProps, } from './discover_sidebar_responsive'; -import { DiscoverServices } from '../../../build_services'; -import { ElasticSearchHit } from '../../doc_views/doc_views_types'; -import { configMock } from '../../../__mocks__/config'; -import { indexPatternsMock } from '../../../__mocks__/index_patterns'; +import { DiscoverServices } from '../../../../../build_services'; +import { ElasticSearchHit } from '../../../../doc_views/doc_views_types'; import { DiscoverSidebar } from './discover_sidebar'; const mockServices = ({ @@ -52,7 +50,7 @@ const mockServices = ({ }, } as unknown) as DiscoverServices; -jest.mock('../../../kibana_services', () => ({ +jest.mock('../../../../../kibana_services', () => ({ getServices: () => mockServices, })); @@ -89,17 +87,15 @@ function getCompProps(): DiscoverSidebarResponsiveProps { } return { columns: ['extension'], - config: configMock, fieldCounts, hits, indexPatternList, - indexPatterns: indexPatternsMock, + onChangeIndexPattern: jest.fn(), onAddFilter: jest.fn(), onAddField: jest.fn(), onRemoveField: jest.fn(), selectedIndexPattern: indexPattern, services: mockServices, - setAppState: jest.fn(), state: {}, trackUiMetric: jest.fn(), onEditRuntimeField: jest.fn(), diff --git a/src/plugins/discover/public/application/components/sidebar/discover_sidebar_responsive.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.tsx similarity index 91% rename from src/plugins/discover/public/application/components/sidebar/discover_sidebar_responsive.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.tsx index 6b8918e2d99656..cc33601f77728f 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_sidebar_responsive.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.tsx @@ -11,7 +11,6 @@ import { sortBy } from 'lodash'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { UiCounterMetricType } from '@kbn/analytics'; -import { IUiSettingsClient } from 'kibana/public'; import { EuiTitle, EuiHideFor, @@ -28,14 +27,14 @@ import { EuiFlexItem, } from '@elastic/eui'; import { DiscoverIndexPattern } from './discover_index_pattern'; -import { IndexPatternAttributes, IndexPatternsContract } from '../../../../../data/common'; -import { SavedObject } from '../../../../../../core/types'; -import { IndexPatternField, IndexPattern } from '../../../../../data/public'; +import { IndexPatternAttributes } from '../../../../../../../data/common'; +import { SavedObject } from '../../../../../../../../core/types'; +import { IndexPatternField, IndexPattern } from '../../../../../../../data/public'; import { getDefaultFieldFilter } from './lib/field_filter'; import { DiscoverSidebar } from './discover_sidebar'; -import { DiscoverServices } from '../../../build_services'; -import { ElasticSearchHit } from '../../doc_views/doc_views_types'; -import { AppState } from '../../angular/discover_state'; +import { DiscoverServices } from '../../../../../build_services'; +import { ElasticSearchHit } from '../../../../doc_views/doc_views_types'; +import { AppState } from '../../services/discover_state'; import { DiscoverIndexPatternManagement } from './discover_index_pattern_management'; export interface DiscoverSidebarResponsiveProps { @@ -47,10 +46,6 @@ export interface DiscoverSidebarResponsiveProps { * the selected columns displayed in the doc table in discover */ columns: string[]; - /** - * Client of uiSettings - */ - config: IUiSettingsClient; /** * a statistics of the distribution of fields in the given hits */ @@ -63,10 +58,6 @@ export interface DiscoverSidebarResponsiveProps { * List of available index patterns */ indexPatternList: Array>; - /** - * Index patterns service - */ - indexPatterns: IndexPatternsContract; /** * Has been toggled closed */ @@ -79,6 +70,10 @@ export interface DiscoverSidebarResponsiveProps { * Callback function when adding a filter from sidebar */ onAddFilter: (field: IndexPatternField | string, value: string, type: '+' | '-') => void; + /** + * Callback function when changing an index pattern + */ + onChangeIndexPattern: (id: string) => void; /** * Callback function when removing a field * @param fieldName @@ -92,10 +87,6 @@ export interface DiscoverSidebarResponsiveProps { * Discover plugin services; */ services: DiscoverServices; - /** - * Function to set the current state - */ - setAppState: (state: Partial) => void; /** * Discover App state */ @@ -114,7 +105,6 @@ export interface DiscoverSidebarResponsiveProps { * Read from the Fields API */ useNewFieldsApi?: boolean; - /** * an object containing properties for proper handling of unmapped fields */ @@ -215,12 +205,9 @@ export function DiscoverSidebarResponsive(props: DiscoverSidebarResponsiveProps) o.attributes.title)} - indexPatterns={props.indexPatterns} - state={props.state} - setAppState={props.setAppState} /> diff --git a/src/plugins/discover/public/application/components/sidebar/index.ts b/src/plugins/discover/public/application/apps/main/components/sidebar/index.ts similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/index.ts rename to src/plugins/discover/public/application/apps/main/components/sidebar/index.ts diff --git a/src/plugins/discover/public/application/components/sidebar/lib/field_calculator.js b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_calculator.js similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/lib/field_calculator.js rename to src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_calculator.js diff --git a/src/plugins/discover/public/application/components/sidebar/lib/field_calculator.test.ts b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_calculator.test.ts similarity index 94% rename from src/plugins/discover/public/application/components/sidebar/lib/field_calculator.test.ts rename to src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_calculator.test.ts index 2cdd99774c2a8a..501f18116dc6f7 100644 --- a/src/plugins/discover/public/application/components/sidebar/lib/field_calculator.test.ts +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_calculator.test.ts @@ -10,12 +10,12 @@ import _ from 'lodash'; // @ts-expect-error -import realHits from '../../../../__fixtures__/real_hits.js'; +import realHits from '../../../../../../__fixtures__/real_hits.js'; // @ts-expect-error -import stubbedLogstashFields from '../../../../__fixtures__/logstash_fields'; -import { coreMock } from '../../../../../../../core/public/mocks'; -import { IndexPattern } from '../../../../../../data/public'; -import { getStubIndexPattern } from '../../../../../../data/public/test_utils'; +import stubbedLogstashFields from '../../../../../../__fixtures__/logstash_fields'; +import { coreMock } from '../../../../../../../../../core/public/mocks'; +import { IndexPattern } from '../../../../../../../../data/public'; +import { getStubIndexPattern } from '../../../../../../../../data/public/test_utils'; // @ts-expect-error import { fieldCalculator } from './field_calculator'; diff --git a/src/plugins/discover/public/application/components/sidebar/lib/field_filter.test.ts b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_filter.test.ts similarity index 97% rename from src/plugins/discover/public/application/components/sidebar/lib/field_filter.test.ts rename to src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_filter.test.ts index 04217c07f66381..8d7c543157ead7 100644 --- a/src/plugins/discover/public/application/components/sidebar/lib/field_filter.test.ts +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_filter.test.ts @@ -7,7 +7,7 @@ */ import { getDefaultFieldFilter, setFieldFilterProp, isFieldFiltered } from './field_filter'; -import { IndexPatternField } from '../../../../../../data/public'; +import { IndexPatternField } from '../../../../../../../../data/public'; describe('field_filter', function () { it('getDefaultFieldFilter should return default filter state', function () { diff --git a/src/plugins/discover/public/application/components/sidebar/lib/field_filter.ts b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_filter.ts similarity index 96% rename from src/plugins/discover/public/application/components/sidebar/lib/field_filter.ts rename to src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_filter.ts index 8c7e48f173031d..25a8309d3d9634 100644 --- a/src/plugins/discover/public/application/components/sidebar/lib/field_filter.ts +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_filter.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { IndexPatternField } from '../../../../../../data/public'; +import { IndexPatternField } from '../../../../../../../../data/public'; export interface FieldFilterState { missing: boolean; diff --git a/src/plugins/discover/public/application/components/sidebar/lib/get_details.ts b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/get_details.ts similarity index 91% rename from src/plugins/discover/public/application/components/sidebar/lib/get_details.ts rename to src/plugins/discover/public/application/apps/main/components/sidebar/lib/get_details.ts index 1e35717d249f8b..ab991f2cfb6563 100644 --- a/src/plugins/discover/public/application/components/sidebar/lib/get_details.ts +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/get_details.ts @@ -8,8 +8,8 @@ // @ts-expect-error import { fieldCalculator } from './field_calculator'; -import { IndexPattern, IndexPatternField } from '../../../../../../data/public'; -import { ElasticSearchHit } from '../../../doc_views/doc_views_types'; +import { IndexPattern, IndexPatternField } from '../../../../../../../../data/public'; +import { ElasticSearchHit } from '../../../../../doc_views/doc_views_types'; export function getDetails( field: IndexPatternField, diff --git a/src/plugins/discover/public/application/components/sidebar/lib/get_field_type_name.ts b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/get_field_type_name.ts similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/lib/get_field_type_name.ts rename to src/plugins/discover/public/application/apps/main/components/sidebar/lib/get_field_type_name.ts diff --git a/src/plugins/discover/public/application/components/sidebar/lib/get_index_pattern_field_list.ts b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/get_index_pattern_field_list.ts similarity index 95% rename from src/plugins/discover/public/application/components/sidebar/lib/get_index_pattern_field_list.ts rename to src/plugins/discover/public/application/apps/main/components/sidebar/lib/get_index_pattern_field_list.ts index 1586c2b26eefe0..8f2e18c64a5ebf 100644 --- a/src/plugins/discover/public/application/components/sidebar/lib/get_index_pattern_field_list.ts +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/get_index_pattern_field_list.ts @@ -8,7 +8,7 @@ import { difference } from 'lodash'; import { IndexPattern, IndexPatternField } from 'src/plugins/data/public'; -import { isNestedFieldParent } from '../../../helpers/nested_fields'; +import { isNestedFieldParent } from '../../../utils/nested_fields'; export function getIndexPatternFieldList( indexPattern?: IndexPattern, diff --git a/src/plugins/discover/public/application/components/sidebar/lib/get_warnings.ts b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/get_warnings.ts similarity index 92% rename from src/plugins/discover/public/application/components/sidebar/lib/get_warnings.ts rename to src/plugins/discover/public/application/apps/main/components/sidebar/lib/get_warnings.ts index 05634973fae8c5..60ce5351e2cd3a 100644 --- a/src/plugins/discover/public/application/components/sidebar/lib/get_warnings.ts +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/get_warnings.ts @@ -7,7 +7,7 @@ */ import { i18n } from '@kbn/i18n'; -import { IndexPatternField } from '../../../../../../data/public'; +import { IndexPatternField } from '../../../../../../../../data/public'; export function getWarnings(field: IndexPatternField) { let warnings = []; diff --git a/src/plugins/discover/public/application/components/sidebar/lib/group_fields.test.ts b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/group_fields.test.ts similarity index 98% rename from src/plugins/discover/public/application/components/sidebar/lib/group_fields.test.ts rename to src/plugins/discover/public/application/apps/main/components/sidebar/lib/group_fields.test.ts index e8eb07784cf9fc..58697206356214 100644 --- a/src/plugins/discover/public/application/components/sidebar/lib/group_fields.test.ts +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/group_fields.test.ts @@ -8,7 +8,7 @@ import { groupFields } from './group_fields'; import { getDefaultFieldFilter } from './field_filter'; -import { IndexPatternField } from '../../../../../../data/common/index_patterns/fields'; +import { IndexPatternField } from '../../../../../../../../data/common/index_patterns/fields'; const fields = [ { diff --git a/src/plugins/discover/public/application/components/sidebar/lib/group_fields.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/group_fields.tsx similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/lib/group_fields.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/lib/group_fields.tsx diff --git a/src/plugins/discover/public/application/components/sidebar/lib/visualize_trigger_utils.ts b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/visualize_trigger_utils.ts similarity index 95% rename from src/plugins/discover/public/application/components/sidebar/lib/visualize_trigger_utils.ts rename to src/plugins/discover/public/application/apps/main/components/sidebar/lib/visualize_trigger_utils.ts index 1a6cc38a4259bd..2fabaa0ddd1003 100644 --- a/src/plugins/discover/public/application/components/sidebar/lib/visualize_trigger_utils.ts +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/visualize_trigger_utils.ts @@ -11,9 +11,9 @@ import { VISUALIZE_GEO_FIELD_TRIGGER, visualizeFieldTrigger, visualizeGeoFieldTrigger, -} from '../../../../../../ui_actions/public'; -import { getUiActions } from '../../../../kibana_services'; -import { IndexPatternField, KBN_FIELD_TYPES } from '../../../../../../data/public'; +} from '../../../../../../../../ui_actions/public'; +import { getUiActions } from '../../../../../../kibana_services'; +import { IndexPatternField, KBN_FIELD_TYPES } from '../../../../../../../../data/public'; function getTriggerConstant(type: string) { return type === KBN_FIELD_TYPES.GEO_POINT || type === KBN_FIELD_TYPES.GEO_SHAPE diff --git a/src/plugins/discover/public/application/components/sidebar/string_progress_bar.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/string_progress_bar.tsx similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/string_progress_bar.tsx rename to src/plugins/discover/public/application/apps/main/components/sidebar/string_progress_bar.tsx diff --git a/src/plugins/discover/public/application/components/sidebar/types.ts b/src/plugins/discover/public/application/apps/main/components/sidebar/types.ts similarity index 100% rename from src/plugins/discover/public/application/components/sidebar/types.ts rename to src/plugins/discover/public/application/apps/main/components/sidebar/types.ts diff --git a/src/plugins/discover/public/application/components/skip_bottom_button/index.ts b/src/plugins/discover/public/application/apps/main/components/skip_bottom_button/index.ts similarity index 100% rename from src/plugins/discover/public/application/components/skip_bottom_button/index.ts rename to src/plugins/discover/public/application/apps/main/components/skip_bottom_button/index.ts diff --git a/src/plugins/discover/public/application/components/skip_bottom_button/skip_bottom_button.test.tsx b/src/plugins/discover/public/application/apps/main/components/skip_bottom_button/skip_bottom_button.test.tsx similarity index 100% rename from src/plugins/discover/public/application/components/skip_bottom_button/skip_bottom_button.test.tsx rename to src/plugins/discover/public/application/apps/main/components/skip_bottom_button/skip_bottom_button.test.tsx diff --git a/src/plugins/discover/public/application/components/skip_bottom_button/skip_bottom_button.tsx b/src/plugins/discover/public/application/apps/main/components/skip_bottom_button/skip_bottom_button.tsx similarity index 100% rename from src/plugins/discover/public/application/components/skip_bottom_button/skip_bottom_button.tsx rename to src/plugins/discover/public/application/apps/main/components/skip_bottom_button/skip_bottom_button.tsx diff --git a/src/plugins/discover/public/application/components/timechart_header/index.ts b/src/plugins/discover/public/application/apps/main/components/timechart_header/index.ts similarity index 100% rename from src/plugins/discover/public/application/components/timechart_header/index.ts rename to src/plugins/discover/public/application/apps/main/components/timechart_header/index.ts diff --git a/src/plugins/discover/public/application/components/timechart_header/timechart_header.scss b/src/plugins/discover/public/application/apps/main/components/timechart_header/timechart_header.scss similarity index 100% rename from src/plugins/discover/public/application/components/timechart_header/timechart_header.scss rename to src/plugins/discover/public/application/apps/main/components/timechart_header/timechart_header.scss diff --git a/src/plugins/discover/public/application/components/timechart_header/timechart_header.test.tsx b/src/plugins/discover/public/application/apps/main/components/timechart_header/timechart_header.test.tsx similarity index 97% rename from src/plugins/discover/public/application/components/timechart_header/timechart_header.test.tsx rename to src/plugins/discover/public/application/apps/main/components/timechart_header/timechart_header.test.tsx index 0da1fdd92d2cce..a68dc9a3b3756c 100644 --- a/src/plugins/discover/public/application/components/timechart_header/timechart_header.test.tsx +++ b/src/plugins/discover/public/application/apps/main/components/timechart_header/timechart_header.test.tsx @@ -12,7 +12,7 @@ import { ReactWrapper } from 'enzyme'; import { TimechartHeader, TimechartHeaderProps } from './timechart_header'; import { EuiIconTip } from '@elastic/eui'; import { findTestSubject } from '@elastic/eui/lib/test'; -import { DataPublicPluginStart } from '../../../../../data/public'; +import { DataPublicPluginStart } from '../../../../../../../data/public'; describe('timechart header', function () { let props: TimechartHeaderProps; diff --git a/src/plugins/discover/public/application/components/timechart_header/timechart_header.tsx b/src/plugins/discover/public/application/apps/main/components/timechart_header/timechart_header.tsx similarity index 95% rename from src/plugins/discover/public/application/components/timechart_header/timechart_header.tsx rename to src/plugins/discover/public/application/apps/main/components/timechart_header/timechart_header.tsx index a2fc17e05a203e..ec94679ece6759 100644 --- a/src/plugins/discover/public/application/components/timechart_header/timechart_header.tsx +++ b/src/plugins/discover/public/application/apps/main/components/timechart_header/timechart_header.tsx @@ -18,8 +18,14 @@ import { import moment from 'moment'; import { i18n } from '@kbn/i18n'; import dateMath from '@elastic/datemath'; -import { DataPublicPluginStart } from '../../../../../data/public'; import './timechart_header.scss'; +import { DataPublicPluginStart } from '../../../../../../../data/public'; + +export interface TimechartBucketInterval { + scaled?: boolean; + description?: string; + scale?: number; +} export interface TimechartHeaderProps { /** @@ -29,11 +35,7 @@ export interface TimechartHeaderProps { /** * Interval for the buckets of the recent request */ - bucketInterval?: { - scaled?: boolean; - description?: string; - scale?: number; - }; + bucketInterval?: TimechartBucketInterval; data: DataPublicPluginStart; /** * Interval Options diff --git a/src/plugins/discover/public/application/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap b/src/plugins/discover/public/application/apps/main/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap similarity index 100% rename from src/plugins/discover/public/application/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap rename to src/plugins/discover/public/application/apps/main/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap diff --git a/src/plugins/discover/public/application/apps/main/components/top_nav/discover_topnav.test.tsx b/src/plugins/discover/public/application/apps/main/components/top_nav/discover_topnav.test.tsx new file mode 100644 index 00000000000000..687532cd94f083 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/components/top_nav/discover_topnav.test.tsx @@ -0,0 +1,53 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { shallowWithIntl } from '@kbn/test/jest'; +import { indexPatternMock } from '../../../../../__mocks__/index_pattern'; +import { savedSearchMock } from '../../../../../__mocks__/saved_search'; +import { DiscoverTopNav, DiscoverTopNavProps } from './discover_topnav'; +import { TopNavMenuData } from '../../../../../../../navigation/public'; +import { ISearchSource, Query } from '../../../../../../../data/common'; +import { GetStateReturn } from '../../services/discover_state'; +import { setHeaderActionMenuMounter } from '../../../../../kibana_services'; +import { discoverServiceMock } from '../../../../../__mocks__/services'; + +setHeaderActionMenuMounter(jest.fn()); + +function getProps(savePermissions = true): DiscoverTopNavProps { + discoverServiceMock.capabilities.discover!.save = savePermissions; + + return { + stateContainer: {} as GetStateReturn, + indexPattern: indexPatternMock, + savedSearch: savedSearchMock, + navigateTo: jest.fn(), + services: discoverServiceMock, + query: {} as Query, + savedQuery: '', + updateQuery: jest.fn(), + onOpenInspector: jest.fn(), + searchSource: {} as ISearchSource, + }; +} + +describe('Discover topnav component', () => { + test('generated config of TopNavMenu config is correct when discover save permissions are assigned', () => { + const props = getProps(true); + const component = shallowWithIntl(); + const topMenuConfig = component.props().config.map((obj: TopNavMenuData) => obj.id); + expect(topMenuConfig).toEqual(['options', 'new', 'save', 'open', 'share', 'inspect']); + }); + + test('generated config of TopNavMenu config is correct when no discover save permissions are assigned', () => { + const props = getProps(false); + const component = shallowWithIntl(); + const topMenuConfig = component.props().config.map((obj: TopNavMenuData) => obj.id); + expect(topMenuConfig).toEqual(['options', 'new', 'open', 'share', 'inspect']); + }); +}); diff --git a/src/plugins/discover/public/application/apps/main/components/top_nav/discover_topnav.tsx b/src/plugins/discover/public/application/apps/main/components/top_nav/discover_topnav.tsx new file mode 100644 index 00000000000000..9afda734010845 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/components/top_nav/discover_topnav.tsx @@ -0,0 +1,88 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import React, { useMemo } from 'react'; +import { DiscoverLayoutProps } from '../layout/types'; +import { getTopNavLinks } from './get_top_nav_links'; +import { Query, TimeRange } from '../../../../../../../data/common/query'; +import { getHeaderActionMenuMounter } from '../../../../../kibana_services'; +import { GetStateReturn } from '../../services/discover_state'; + +export type DiscoverTopNavProps = Pick< + DiscoverLayoutProps, + 'indexPattern' | 'navigateTo' | 'savedSearch' | 'services' | 'searchSource' +> & { + onOpenInspector: () => void; + query?: Query; + savedQuery?: string; + updateQuery: (payload: { dateRange: TimeRange; query?: Query }, isUpdate?: boolean) => void; + stateContainer: GetStateReturn; +}; + +export const DiscoverTopNav = ({ + indexPattern, + onOpenInspector, + query, + savedQuery, + stateContainer, + updateQuery, + searchSource, + navigateTo, + savedSearch, + services, +}: DiscoverTopNavProps) => { + const showDatePicker = useMemo(() => indexPattern.isTimeBased(), [indexPattern]); + const { TopNavMenu } = services.navigation.ui; + const topNavMenu = useMemo( + () => + getTopNavLinks({ + indexPattern, + navigateTo, + savedSearch, + services, + state: stateContainer, + onOpenInspector, + searchSource, + }), + [indexPattern, navigateTo, onOpenInspector, searchSource, stateContainer, savedSearch, services] + ); + + const updateSavedQueryId = (newSavedQueryId: string | undefined) => { + const { appStateContainer, setAppState } = stateContainer; + if (newSavedQueryId) { + setAppState({ savedQuery: newSavedQueryId }); + } else { + // remove savedQueryId from state + const newState = { + ...appStateContainer.getState(), + }; + delete newState.savedQuery; + appStateContainer.set(newState); + } + }; + const setMenuMountPoint = useMemo(() => { + return getHeaderActionMenuMounter(); + }, []); + + return ( + + ); +}; diff --git a/src/plugins/discover/public/application/components/top_nav/get_top_nav_links.test.ts b/src/plugins/discover/public/application/apps/main/components/top_nav/get_top_nav_links.test.ts similarity index 87% rename from src/plugins/discover/public/application/components/top_nav/get_top_nav_links.test.ts rename to src/plugins/discover/public/application/apps/main/components/top_nav/get_top_nav_links.test.ts index 2c50ce61c8afb7..6a6fb8a44a5cfe 100644 --- a/src/plugins/discover/public/application/components/top_nav/get_top_nav_links.test.ts +++ b/src/plugins/discover/public/application/apps/main/components/top_nav/get_top_nav_links.test.ts @@ -8,10 +8,10 @@ import { ISearchSource } from 'src/plugins/data/public'; import { getTopNavLinks } from './get_top_nav_links'; -import { indexPatternMock } from '../../../__mocks__/index_pattern'; -import { savedSearchMock } from '../../../__mocks__/saved_search'; -import { DiscoverServices } from '../../../build_services'; -import { GetStateReturn } from '../../angular/discover_state'; +import { indexPatternMock } from '../../../../../__mocks__/index_pattern'; +import { savedSearchMock } from '../../../../../__mocks__/saved_search'; +import { DiscoverServices } from '../../../../../build_services'; +import { GetStateReturn } from '../../services/discover_state'; const services = ({ capabilities: { @@ -28,7 +28,6 @@ const state = ({} as unknown) as GetStateReturn; test('getTopNavLinks result', () => { const topNavLinks = getTopNavLinks({ - getFieldCounts: jest.fn(), indexPattern: indexPatternMock, navigateTo: jest.fn(), onOpenInspector: jest.fn(), diff --git a/src/plugins/discover/public/application/components/top_nav/get_top_nav_links.ts b/src/plugins/discover/public/application/apps/main/components/top_nav/get_top_nav_links.ts similarity index 90% rename from src/plugins/discover/public/application/components/top_nav/get_top_nav_links.ts rename to src/plugins/discover/public/application/apps/main/components/top_nav/get_top_nav_links.ts index 38bc831225c682..f19b30cda5f8a3 100644 --- a/src/plugins/discover/public/application/components/top_nav/get_top_nav_links.ts +++ b/src/plugins/discover/public/application/apps/main/components/top_nav/get_top_nav_links.ts @@ -9,20 +9,19 @@ import { i18n } from '@kbn/i18n'; import moment from 'moment'; import { showOpenSearchPanel } from './show_open_search_panel'; -import { getSharingData, showPublicUrlSwitch } from '../../helpers/get_sharing_data'; -import { unhashUrl } from '../../../../../kibana_utils/public'; -import { DiscoverServices } from '../../../build_services'; -import { SavedSearch } from '../../../saved_searches'; +import { getSharingData, showPublicUrlSwitch } from '../../utils/get_sharing_data'; +import { unhashUrl } from '../../../../../../../kibana_utils/public'; +import { DiscoverServices } from '../../../../../build_services'; +import { SavedSearch } from '../../../../../saved_searches'; import { onSaveSearch } from './on_save_search'; -import { GetStateReturn } from '../../angular/discover_state'; -import { IndexPattern, ISearchSource } from '../../../kibana_services'; +import { GetStateReturn } from '../../services/discover_state'; +import { IndexPattern, ISearchSource } from '../../../../../kibana_services'; import { openOptionsPopover } from './open_options_popover'; /** * Helper function to build the top nav links */ export const getTopNavLinks = ({ - getFieldCounts, indexPattern, navigateTo, savedSearch, @@ -31,7 +30,6 @@ export const getTopNavLinks = ({ onOpenInspector, searchSource, }: { - getFieldCounts: () => Promise>; indexPattern: IndexPattern; navigateTo: (url: string) => void; savedSearch: SavedSearch; diff --git a/src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.test.tsx b/src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.test.tsx new file mode 100644 index 00000000000000..e5f44a0fbf2149 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.test.tsx @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { showSaveModal } from '../../../../../../../saved_objects/public'; +jest.mock('../../../../../../../saved_objects/public'); + +import { onSaveSearch } from './on_save_search'; +import { indexPatternMock } from '../../../../../__mocks__/index_pattern'; +import { savedSearchMock } from '../../../../../__mocks__/saved_search'; +import { DiscoverServices } from '../../../../../build_services'; +import { GetStateReturn } from '../../services/discover_state'; +import { i18nServiceMock } from '../../../../../../../../core/public/mocks'; + +test('onSaveSearch', async () => { + const serviceMock = ({ + core: { + i18n: i18nServiceMock.create(), + }, + } as unknown) as DiscoverServices; + const stateMock = ({} as unknown) as GetStateReturn; + + await onSaveSearch({ + indexPattern: indexPatternMock, + navigateTo: jest.fn(), + savedSearch: savedSearchMock, + services: serviceMock, + state: stateMock, + }); + + expect(showSaveModal).toHaveBeenCalled(); +}); diff --git a/src/plugins/discover/public/application/components/top_nav/on_save_search.tsx b/src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.tsx similarity index 89% rename from src/plugins/discover/public/application/components/top_nav/on_save_search.tsx rename to src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.tsx index a0271acec22cfb..f4b969e977254b 100644 --- a/src/plugins/discover/public/application/components/top_nav/on_save_search.tsx +++ b/src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.tsx @@ -8,13 +8,13 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { SavedObjectSaveModal, showSaveModal } from '../../../../../saved_objects/public'; -import { SavedSearch } from '../../../saved_searches'; -import { IndexPattern } from '../../../../../data/common/index_patterns/index_patterns'; -import { DiscoverServices } from '../../../build_services'; -import { GetStateReturn } from '../../angular/discover_state'; -import { setBreadcrumbsTitle } from '../../helpers/breadcrumbs'; -import { persistSavedSearch } from '../../helpers/persist_saved_search'; +import { SavedObjectSaveModal, showSaveModal } from '../../../../../../../saved_objects/public'; +import { SavedSearch } from '../../../../../saved_searches'; +import { IndexPattern } from '../../../../../../../data/common/index_patterns/index_patterns'; +import { DiscoverServices } from '../../../../../build_services'; +import { GetStateReturn } from '../../services/discover_state'; +import { setBreadcrumbsTitle } from '../../../../helpers/breadcrumbs'; +import { persistSavedSearch } from '../../utils/persist_saved_search'; async function saveDataSource({ indexPattern, diff --git a/src/plugins/discover/public/application/components/top_nav/open_options_popover.scss b/src/plugins/discover/public/application/apps/main/components/top_nav/open_options_popover.scss similarity index 100% rename from src/plugins/discover/public/application/components/top_nav/open_options_popover.scss rename to src/plugins/discover/public/application/apps/main/components/top_nav/open_options_popover.scss diff --git a/src/plugins/discover/public/application/components/top_nav/open_options_popover.test.tsx b/src/plugins/discover/public/application/apps/main/components/top_nav/open_options_popover.test.tsx similarity index 93% rename from src/plugins/discover/public/application/components/top_nav/open_options_popover.test.tsx rename to src/plugins/discover/public/application/apps/main/components/top_nav/open_options_popover.test.tsx index 5b3d1656d77e74..28e57aed7b6605 100644 --- a/src/plugins/discover/public/application/components/top_nav/open_options_popover.test.tsx +++ b/src/plugins/discover/public/application/apps/main/components/top_nav/open_options_popover.test.tsx @@ -9,9 +9,9 @@ import React from 'react'; import { mountWithIntl } from '@kbn/test/jest'; import { findTestSubject } from '@elastic/eui/lib/test'; -import { getServices } from '../../../kibana_services'; +import { getServices } from '../../../../../kibana_services'; -jest.mock('../../../kibana_services', () => { +jest.mock('../../../../../kibana_services', () => { const mockUiSettings = new Map(); return { getServices: () => ({ diff --git a/src/plugins/discover/public/application/components/top_nav/open_options_popover.tsx b/src/plugins/discover/public/application/apps/main/components/top_nav/open_options_popover.tsx similarity index 77% rename from src/plugins/discover/public/application/components/top_nav/open_options_popover.tsx rename to src/plugins/discover/public/application/apps/main/components/top_nav/open_options_popover.tsx index 280144d400216a..6e90c702c2bfde 100644 --- a/src/plugins/discover/public/application/components/top_nav/open_options_popover.tsx +++ b/src/plugins/discover/public/application/apps/main/components/top_nav/open_options_popover.tsx @@ -11,11 +11,21 @@ import ReactDOM from 'react-dom'; import { I18nStart } from 'kibana/public'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { EuiSpacer, EuiButton, EuiText, EuiWrappingPopover, EuiCode } from '@elastic/eui'; -import { getServices } from '../../../kibana_services'; +import { + EuiSpacer, + EuiButton, + EuiText, + EuiWrappingPopover, + EuiCode, + EuiHorizontalRule, + EuiButtonEmpty, + EuiTextAlign, +} from '@elastic/eui'; import './open_options_popover.scss'; -import { DOC_TABLE_LEGACY } from '../../../../common'; +import { DOC_TABLE_LEGACY } from '../../../../../../common'; +import { getServices } from '../../../../../kibana_services'; +const container = document.createElement('div'); let isOpen = false; interface OptionsPopoverProps { @@ -77,11 +87,29 @@ export function OptionsPopover(props: OptionsPopoverProps) { defaultMessage: 'Get started', })} + + + + {i18n.translate('discover.openOptionsPopover.gotToAllSettings', { + defaultMessage: 'All Discover options', + })} + + ); } +function onClose() { + ReactDOM.unmountComponentAtNode(container); + document.body.removeChild(container); + isOpen = false; +} + export function openOptionsPopover({ I18nContext, anchorElement, @@ -90,17 +118,11 @@ export function openOptionsPopover({ anchorElement: HTMLElement; }) { if (isOpen) { + onClose(); return; } isOpen = true; - const container = document.createElement('div'); - const onClose = () => { - ReactDOM.unmountComponentAtNode(container); - document.body.removeChild(container); - isOpen = false; - }; - document.body.appendChild(container); const element = ( diff --git a/src/plugins/discover/public/application/components/top_nav/open_search_panel.test.tsx b/src/plugins/discover/public/application/apps/main/components/top_nav/open_search_panel.test.tsx similarity index 93% rename from src/plugins/discover/public/application/components/top_nav/open_search_panel.test.tsx rename to src/plugins/discover/public/application/apps/main/components/top_nav/open_search_panel.test.tsx index 856d8c5f712362..b34abab728eb19 100644 --- a/src/plugins/discover/public/application/components/top_nav/open_search_panel.test.tsx +++ b/src/plugins/discover/public/application/apps/main/components/top_nav/open_search_panel.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -jest.mock('../../../kibana_services', () => { +jest.mock('../../../../../kibana_services', () => { return { getServices: () => ({ core: { uiSettings: {}, savedObjects: {} }, diff --git a/src/plugins/discover/public/application/components/top_nav/open_search_panel.tsx b/src/plugins/discover/public/application/apps/main/components/top_nav/open_search_panel.tsx similarity index 95% rename from src/plugins/discover/public/application/components/top_nav/open_search_panel.tsx rename to src/plugins/discover/public/application/apps/main/components/top_nav/open_search_panel.tsx index f6881d1856566a..e63f010a8dffc1 100644 --- a/src/plugins/discover/public/application/components/top_nav/open_search_panel.tsx +++ b/src/plugins/discover/public/application/apps/main/components/top_nav/open_search_panel.tsx @@ -20,8 +20,8 @@ import { EuiFlyoutBody, EuiTitle, } from '@elastic/eui'; -import { SavedObjectFinderUi } from '../../../../../saved_objects/public'; -import { getServices } from '../../../kibana_services'; +import { SavedObjectFinderUi } from '../../../../../../../saved_objects/public'; +import { getServices } from '../../../../../kibana_services'; const SEARCH_OBJECT_TYPE = 'search'; diff --git a/src/plugins/discover/public/application/components/top_nav/show_open_search_panel.tsx b/src/plugins/discover/public/application/apps/main/components/top_nav/show_open_search_panel.tsx similarity index 100% rename from src/plugins/discover/public/application/components/top_nav/show_open_search_panel.tsx rename to src/plugins/discover/public/application/apps/main/components/top_nav/show_open_search_panel.tsx diff --git a/src/plugins/discover/public/application/angular/directives/uninitialized.tsx b/src/plugins/discover/public/application/apps/main/components/uninitialized/uninitialized.tsx similarity index 100% rename from src/plugins/discover/public/application/angular/directives/uninitialized.tsx rename to src/plugins/discover/public/application/apps/main/components/uninitialized/uninitialized.tsx diff --git a/src/plugins/discover/public/application/apps/main/discover_main_app.test.tsx b/src/plugins/discover/public/application/apps/main/discover_main_app.test.tsx new file mode 100644 index 00000000000000..0caa5f3f527c67 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/discover_main_app.test.tsx @@ -0,0 +1,46 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import React from 'react'; +import { mountWithIntl } from '@kbn/test/jest'; +import { indexPatternMock } from '../../../__mocks__/index_pattern'; +import { DiscoverMainApp } from './discover_main_app'; +import { discoverServiceMock } from '../../../__mocks__/services'; +import { savedSearchMock } from '../../../__mocks__/saved_search'; +import { createSearchSessionMock } from '../../../__mocks__/search_session'; +import { SavedObject } from '../../../../../../core/types'; +import { IndexPatternAttributes } from '../../../../../data/common'; +import { setHeaderActionMenuMounter } from '../../../kibana_services'; +import { findTestSubject } from '@elastic/eui/lib/test'; + +setHeaderActionMenuMounter(jest.fn()); + +describe('DiscoverMainApp', () => { + test('renders', () => { + const { history } = createSearchSessionMock(); + const indexPatternList = ([indexPatternMock].map((ip) => { + return { ...ip, ...{ attributes: { title: ip.title } } }; + }) as unknown) as Array>; + + const component = mountWithIntl( + + ); + + expect(findTestSubject(component, 'indexPattern-switch-link').text()).toBe( + indexPatternMock.title + ); + }); +}); diff --git a/src/plugins/discover/public/application/apps/main/discover_main_app.tsx b/src/plugins/discover/public/application/apps/main/discover_main_app.tsx new file mode 100644 index 00000000000000..5cc7147b49ff98 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/discover_main_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, { useMemo, useCallback, useEffect } from 'react'; +import { History } from 'history'; +import { DiscoverLayout } from './components/layout'; +import { SEARCH_FIELDS_FROM_SOURCE } from '../../../../common'; +import { useSavedSearch as useSavedSearchData } from './services/use_saved_search'; +import { setBreadcrumbsTitle } from '../../helpers/breadcrumbs'; +import { addHelpMenuToAppChrome } from '../../components/help_menu/help_menu_util'; +import { useDiscoverState } from './services/use_discover_state'; +import { useSearchSession } from './services/use_search_session'; +import { useUrl } from './services/use_url'; +import { IndexPattern, IndexPatternAttributes, SavedObject } from '../../../../../data/common'; +import { DiscoverServices } from '../../../build_services'; +import { SavedSearch } from '../../../saved_searches'; + +const DiscoverLayoutMemoized = React.memo(DiscoverLayout); + +export interface DiscoverMainProps { + /** + * Current IndexPattern + */ + indexPattern: IndexPattern; + + opts: { + /** + * Use angular router for navigation + */ + navigateTo: () => void; + /** + * Instance of browser history + */ + history: History; + /** + * List of available index patterns + */ + indexPatternList: Array>; + /** + * Kibana core services used by discover + */ + services: DiscoverServices; + /** + * Current instance of SavedSearch + */ + savedSearch: SavedSearch; + }; +} + +export function DiscoverMainApp(props: DiscoverMainProps) { + const { services, history, navigateTo, indexPatternList } = props.opts; + const { chrome, docLinks, uiSettings: config, data } = services; + + const useNewFieldsApi = useMemo(() => !config.get(SEARCH_FIELDS_FROM_SOURCE), [config]); + + /** + * State related logic + */ + const { + stateContainer, + state, + indexPattern, + searchSource, + savedSearch, + resetSavedSearch, + } = useDiscoverState({ + services, + history, + initialIndexPattern: props.indexPattern, + initialSavedSearch: props.opts.savedSearch, + }); + + /** + * Url / Routing logic + */ + useUrl({ history, resetSavedSearch }); + + /** + * Search session logic + */ + const searchSessionManager = useSearchSession({ services, history, stateContainer, savedSearch }); + + /** + * Data fetching logic + */ + const { data$, refetch$ } = useSavedSearchData({ + indexPattern, + savedSearch, + searchSessionManager, + searchSource, + services, + state, + stateContainer, + useNewFieldsApi, + }); + + /** + * SavedSearch depended initializing + */ + useEffect(() => { + const pageTitleSuffix = savedSearch.id && savedSearch.title ? `: ${savedSearch.title}` : ''; + chrome.docTitle.change(`Discover${pageTitleSuffix}`); + setBreadcrumbsTitle(savedSearch, chrome); + return () => { + data.search.session.clear(); + }; + }, [savedSearch, chrome, docLinks, refetch$, stateContainer, data, config]); + + /** + * Initializing syncing with state and help menu + */ + useEffect(() => { + addHelpMenuToAppChrome(chrome, docLinks); + stateContainer.replaceUrlAppState({}).then(() => { + stateContainer.startSync(); + }); + + return () => stateContainer.stopSync(); + }, [stateContainer, chrome, docLinks]); + + const resetQuery = useCallback(() => { + resetSavedSearch(savedSearch.id); + }, [resetSavedSearch, savedSearch]); + + return ( + + ); +} diff --git a/src/plugins/discover/public/application/apps/main/index.ts b/src/plugins/discover/public/application/apps/main/index.ts new file mode 100644 index 00000000000000..af30b0c9534346 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/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 { DiscoverMainApp } from './discover_main_app'; diff --git a/src/plugins/discover/public/application/angular/discover_search_session.test.ts b/src/plugins/discover/public/application/apps/main/services/discover_search_session.test.ts similarity index 83% rename from src/plugins/discover/public/application/angular/discover_search_session.test.ts rename to src/plugins/discover/public/application/apps/main/services/discover_search_session.test.ts index 8e6fb11acb9633..97c6ada3636d5d 100644 --- a/src/plugins/discover/public/application/angular/discover_search_session.test.ts +++ b/src/plugins/discover/public/application/apps/main/services/discover_search_session.test.ts @@ -6,20 +6,10 @@ * Side Public License, v 1. */ -import { DiscoverSearchSessionManager } from './discover_search_session'; -import { createMemoryHistory } from 'history'; -import { dataPluginMock } from '../../../../data/public/mocks'; -import { DataPublicPluginStart } from '../../../../data/public'; +import { createSearchSessionMock } from '../../../../__mocks__/search_session'; describe('DiscoverSearchSessionManager', () => { - const history = createMemoryHistory(); - const session = dataPluginMock.createStartContract().search.session as jest.Mocked< - DataPublicPluginStart['search']['session'] - >; - const searchSessionManager = new DiscoverSearchSessionManager({ - history, - session, - }); + const { history, session, searchSessionManager } = createSearchSessionMock(); beforeEach(() => { history.push('/'); diff --git a/src/plugins/discover/public/application/angular/discover_search_session.ts b/src/plugins/discover/public/application/apps/main/services/discover_search_session.ts similarity index 93% rename from src/plugins/discover/public/application/angular/discover_search_session.ts rename to src/plugins/discover/public/application/apps/main/services/discover_search_session.ts index a3cdfa42c40dd2..81ab578229d198 100644 --- a/src/plugins/discover/public/application/angular/discover_search_session.ts +++ b/src/plugins/discover/public/application/apps/main/services/discover_search_session.ts @@ -8,13 +8,13 @@ import { History } from 'history'; import { filter } from 'rxjs/operators'; -import { DataPublicPluginStart } from '../../../../data/public'; +import { DataPublicPluginStart } from '../../../../../../data/public'; import { createQueryParamObservable, getQueryParams, removeQueryParam, -} from '../../../../kibana_utils/public'; -import { SEARCH_SESSION_ID_QUERY_PARAM } from '../../url_generator'; +} from '../../../../../../kibana_utils/public'; +import { SEARCH_SESSION_ID_QUERY_PARAM } from '../../../../url_generator'; export interface DiscoverSearchSessionManagerDeps { history: History; diff --git a/src/plugins/discover/public/application/angular/discover_state.test.ts b/src/plugins/discover/public/application/apps/main/services/discover_state.test.ts similarity index 97% rename from src/plugins/discover/public/application/angular/discover_state.test.ts rename to src/plugins/discover/public/application/apps/main/services/discover_state.test.ts index ddb4e874ccc64b..11f6954af97b0e 100644 --- a/src/plugins/discover/public/application/angular/discover_state.test.ts +++ b/src/plugins/discover/public/application/apps/main/services/discover_state.test.ts @@ -13,9 +13,9 @@ import { createSearchSessionRestorationDataProvider, } from './discover_state'; import { createBrowserHistory, History } from 'history'; -import { dataPluginMock } from '../../../../data/public/mocks'; -import { SavedSearch } from '../../saved_searches'; -import { SEARCH_FIELDS_FROM_SOURCE } from '../../../common'; +import { dataPluginMock } from '../../../../../../data/public/mocks'; +import { SavedSearch } from '../../../../saved_searches'; +import { SEARCH_FIELDS_FROM_SOURCE } from '../../../../../common'; let history: History; let state: GetStateReturn; diff --git a/src/plugins/discover/public/application/angular/discover_state.ts b/src/plugins/discover/public/application/apps/main/services/discover_state.ts similarity index 95% rename from src/plugins/discover/public/application/angular/discover_state.ts rename to src/plugins/discover/public/application/apps/main/services/discover_state.ts index f71e3ac651f532..e90e62da16ba99 100644 --- a/src/plugins/discover/public/application/angular/discover_state.ts +++ b/src/plugins/discover/public/application/apps/main/services/discover_state.ts @@ -18,19 +18,19 @@ import { StateContainer, syncState, withNotifyOnErrors, -} from '../../../../kibana_utils/public'; +} from '../../../../../../kibana_utils/public'; import { DataPublicPluginStart, esFilters, Filter, Query, SearchSessionInfoProvider, -} from '../../../../data/public'; -import { migrateLegacyQuery } from '../helpers/migrate_legacy_query'; -import { DiscoverGridSettings } from '../components/discover_grid/types'; -import { DISCOVER_APP_URL_GENERATOR, DiscoverUrlGeneratorState } from '../../url_generator'; -import { SavedSearch } from '../../saved_searches'; -import { handleSourceColumnState } from './helpers'; +} from '../../../../../../data/public'; +import { migrateLegacyQuery } from '../../../helpers/migrate_legacy_query'; +import { DiscoverGridSettings } from '../../../components/discover_grid/types'; +import { DISCOVER_APP_URL_GENERATOR, DiscoverUrlGeneratorState } from '../../../../url_generator'; +import { SavedSearch } from '../../../../saved_searches'; +import { handleSourceColumnState } from '../../../angular/helpers'; export interface AppState { /** diff --git a/src/plugins/discover/public/application/apps/main/services/use_discover_state.test.ts b/src/plugins/discover/public/application/apps/main/services/use_discover_state.test.ts new file mode 100644 index 00000000000000..051a2d2dcd9cc7 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/services/use_discover_state.test.ts @@ -0,0 +1,82 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { renderHook, act } from '@testing-library/react-hooks'; +import { createSearchSessionMock } from '../../../../__mocks__/search_session'; +import { discoverServiceMock } from '../../../../__mocks__/services'; +import { savedSearchMock } from '../../../../__mocks__/saved_search'; +import { useDiscoverState } from './use_discover_state'; +import { indexPatternMock } from '../../../../__mocks__/index_pattern'; +import { SearchSource } from '../../../../../../data/common'; + +describe('test useDiscoverState', () => { + test('return is valid', async () => { + const { history } = createSearchSessionMock(); + + const { result } = renderHook(() => { + return useDiscoverState({ + services: discoverServiceMock, + history, + initialIndexPattern: indexPatternMock, + initialSavedSearch: savedSearchMock, + }); + }); + expect(result.current.state.index).toBe(indexPatternMock.id); + expect(result.current.stateContainer).toBeInstanceOf(Object); + expect(result.current.setState).toBeInstanceOf(Function); + expect(result.current.savedSearch.id).toBe(savedSearchMock.id); + expect(result.current.searchSource).toBeInstanceOf(SearchSource); + }); + + test('setState', async () => { + const { history } = createSearchSessionMock(); + + const { result } = renderHook(() => { + return useDiscoverState({ + services: discoverServiceMock, + history, + initialIndexPattern: indexPatternMock, + initialSavedSearch: savedSearchMock, + }); + }); + await act(async () => { + result.current.setState({ columns: ['123'] }); + }); + expect(result.current.state.columns).toEqual(['123']); + }); + + test('resetSavedSearch', async () => { + const { history } = createSearchSessionMock(); + + const { result, waitForValueToChange } = renderHook(() => { + return useDiscoverState({ + services: discoverServiceMock, + history, + initialIndexPattern: indexPatternMock, + initialSavedSearch: savedSearchMock, + }); + }); + + await act(async () => { + result.current.stateContainer.startSync(); + }); + + const initialColumns = result.current.state.columns; + await act(async () => { + result.current.setState({ columns: ['123'] }); + }); + expect(result.current.state.columns).toEqual(['123']); + + result.current.resetSavedSearch('the-saved-search-id'); + await waitForValueToChange(() => { + return result.current.state; + }); + + expect(result.current.state.columns).toEqual(initialColumns); + }); +}); diff --git a/src/plugins/discover/public/application/apps/main/services/use_discover_state.ts b/src/plugins/discover/public/application/apps/main/services/use_discover_state.ts new file mode 100644 index 00000000000000..a3546d54cd4932 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/services/use_discover_state.ts @@ -0,0 +1,155 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { useMemo, useEffect, useState, useCallback } from 'react'; +import { cloneDeep } from 'lodash'; +import { History } from 'history'; +import { getState } from './discover_state'; +import { getStateDefaults } from '../utils/get_state_defaults'; +import { + esFilters, + connectToQueryState, + syncQueryStateWithUrl, + IndexPattern, +} from '../../../../../../data/public'; +import { DiscoverServices } from '../../../../build_services'; +import { SavedSearch } from '../../../../saved_searches'; +import { loadIndexPattern } from '../utils/resolve_index_pattern'; + +export function useDiscoverState({ + services, + history, + initialIndexPattern, + initialSavedSearch, +}: { + services: DiscoverServices; + initialSavedSearch: SavedSearch; + history: History; + initialIndexPattern: IndexPattern; +}) { + const { uiSettings: config, data, filterManager } = services; + const [indexPattern, setIndexPattern] = useState(initialIndexPattern); + const [savedSearch, setSavedSearch] = useState(initialSavedSearch); + + const searchSource = useMemo(() => { + savedSearch.searchSource.setField('index', indexPattern); + return savedSearch.searchSource.createChild(); + }, [savedSearch.searchSource, indexPattern]); + + const stateContainer = useMemo( + () => + getState({ + getStateDefaults: () => + getStateDefaults({ + config, + data, + savedSearch, + }), + storeInSessionStorage: config.get('state:storeInSessionStorage'), + history, + toasts: services.core.notifications.toasts, + uiSettings: config, + }), + [config, data, history, savedSearch, services.core.notifications.toasts] + ); + + const { appStateContainer, getPreviousAppState } = stateContainer; + + const [state, setState] = useState(appStateContainer.getState()); + + useEffect(() => { + if (stateContainer.appStateContainer.getState().index !== indexPattern.id) { + // used index pattern is different than the given by url/state which is invalid + stateContainer.setAppState({ index: indexPattern.id }); + } + // sync initial app filters from state to filterManager + const filters = appStateContainer.getState().filters; + if (filters) { + filterManager.setAppFilters(cloneDeep(filters)); + } + const query = appStateContainer.getState().query; + if (query) { + data.query.queryString.setQuery(query); + } + + const stopSyncingQueryAppStateWithStateContainer = connectToQueryState( + data.query, + appStateContainer, + { + filters: esFilters.FilterStateStore.APP_STATE, + query: true, + } + ); + + // syncs `_g` portion of url with query services + const { stop: stopSyncingGlobalStateWithUrl } = syncQueryStateWithUrl( + data.query, + stateContainer.kbnUrlStateStorage + ); + return () => { + stopSyncingQueryAppStateWithStateContainer(); + stopSyncingGlobalStateWithUrl(); + }; + }, [ + appStateContainer, + config, + data.query, + data.search.session, + getPreviousAppState, + indexPattern.id, + filterManager, + services.indexPatterns, + stateContainer, + ]); + + useEffect(() => { + const unsubscribe = stateContainer.appStateContainer.subscribe(async (nextState) => { + // NOTE: this is also called when navigating from discover app to context app + if (nextState.index && state.index !== nextState.index) { + const nextIndexPattern = await loadIndexPattern( + nextState.index, + services.indexPatterns, + config + ); + + if (nextIndexPattern) { + setIndexPattern(nextIndexPattern.loaded); + } + } + setState(nextState); + }); + return () => unsubscribe(); + }, [config, services.indexPatterns, state.index, stateContainer.appStateContainer, setState]); + + const resetSavedSearch = useCallback( + async (id?: string) => { + const newSavedSearch = await services.getSavedSearchById(id); + newSavedSearch.searchSource.setField('index', indexPattern); + const newAppState = getStateDefaults({ + config, + data, + savedSearch: newSavedSearch, + }); + await stateContainer.replaceUrlAppState(newAppState); + setState(newAppState); + if (savedSearch.id !== newSavedSearch.id) { + setSavedSearch(newSavedSearch); + } + }, + [services, indexPattern, config, data, stateContainer, savedSearch.id] + ); + + return { + state, + setState, + stateContainer, + indexPattern, + searchSource, + savedSearch, + resetSavedSearch, + }; +} diff --git a/src/plugins/discover/public/application/apps/main/services/use_saved_search.test.ts b/src/plugins/discover/public/application/apps/main/services/use_saved_search.test.ts new file mode 100644 index 00000000000000..5976c8fea5ea4f --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/services/use_saved_search.test.ts @@ -0,0 +1,91 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { Subject } from 'rxjs'; +import { renderHook } from '@testing-library/react-hooks'; +import { createSearchSessionMock } from '../../../../__mocks__/search_session'; +import { discoverServiceMock } from '../../../../__mocks__/services'; +import { savedSearchMock } from '../../../../__mocks__/saved_search'; +import { indexPatternMock } from '../../../../__mocks__/index_pattern'; +import { useSavedSearch } from './use_saved_search'; +import { AppState, getState } from './discover_state'; +import { uiSettingsMock } from '../../../../__mocks__/ui_settings'; +import { useDiscoverState } from './use_discover_state'; + +describe('test useSavedSearch', () => { + test('useSavedSearch return is valid', async () => { + const { history, searchSessionManager } = createSearchSessionMock(); + const stateContainer = getState({ + getStateDefaults: () => ({ index: 'the-index-pattern-id' }), + history, + uiSettings: uiSettingsMock, + }); + + const { result } = renderHook(() => { + return useSavedSearch({ + indexPattern: indexPatternMock, + savedSearch: savedSearchMock, + searchSessionManager, + searchSource: savedSearchMock.searchSource.createCopy(), + services: discoverServiceMock, + state: {} as AppState, + stateContainer, + useNewFieldsApi: true, + }); + }); + + expect(result.current.refetch$).toBeInstanceOf(Subject); + expect(result.current.data$.value).toMatchInlineSnapshot(` + Object { + "state": "loading", + } + `); + }); + test('refetch$ triggers a search', async () => { + const { history, searchSessionManager } = createSearchSessionMock(); + const stateContainer = getState({ + getStateDefaults: () => ({ index: 'the-index-pattern-id' }), + history, + uiSettings: uiSettingsMock, + }); + + discoverServiceMock.data.query.timefilter.timefilter.getTime = jest.fn(() => { + return { from: '2021-05-01T20:00:00Z', to: '2021-05-02T20:00:00Z' }; + }); + + const { result: resultState } = renderHook(() => { + return useDiscoverState({ + services: discoverServiceMock, + history, + initialIndexPattern: indexPatternMock, + initialSavedSearch: savedSearchMock, + }); + }); + + const { result, waitForValueToChange } = renderHook(() => { + return useSavedSearch({ + indexPattern: indexPatternMock, + savedSearch: savedSearchMock, + searchSessionManager, + searchSource: resultState.current.searchSource, + services: discoverServiceMock, + state: {} as AppState, + stateContainer, + useNewFieldsApi: true, + }); + }); + + result.current.refetch$.next(); + + await waitForValueToChange(() => { + return result.current.data$.value.state === 'complete'; + }); + + expect(result.current.data$.value.hits).toBe(0); + expect(result.current.data$.value.rows).toEqual([]); + }); +}); diff --git a/src/plugins/discover/public/application/apps/main/services/use_saved_search.ts b/src/plugins/discover/public/application/apps/main/services/use_saved_search.ts new file mode 100644 index 00000000000000..2b0d9517248694 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/services/use_saved_search.ts @@ -0,0 +1,337 @@ +/* + * Copyright 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 { useEffect, useRef, useCallback, useMemo } from 'react'; +import { i18n } from '@kbn/i18n'; +import { merge, Subject, BehaviorSubject } from 'rxjs'; +import { debounceTime, tap, filter } from 'rxjs/operators'; +import { isEqual } from 'lodash'; +import { DiscoverServices } from '../../../../build_services'; +import { DiscoverSearchSessionManager } from './discover_search_session'; +import { + IndexPattern, + isCompleteResponse, + SearchSource, + tabifyAggResponse, +} from '../../../../../../data/common'; +import { SavedSearch } from '../../../../saved_searches'; +import { AppState, GetStateReturn } from './discover_state'; +import { ElasticSearchHit } from '../../../doc_views/doc_views_types'; +import { RequestAdapter } from '../../../../../../inspector/public'; +import { AutoRefreshDoneFn, search } from '../../../../../../data/public'; +import { calcFieldCounts } from '../utils/calc_field_counts'; +import { SEARCH_ON_PAGE_LOAD_SETTING } from '../../../../../common'; +import { validateTimeRange } from '../utils/validate_time_range'; +import { updateSearchSource } from '../utils/update_search_source'; +import { SortOrder } from '../../../../saved_searches/types'; +import { getDimensions, getChartAggConfigs } from '../utils'; +import { buildPointSeriesData, Chart } from '../components/chart/point_series'; +import { TimechartBucketInterval } from '../components/timechart_header/timechart_header'; +import { useSingleton } from '../utils/use_singleton'; +import { FetchStatus } from '../../../types'; + +export type SavedSearchDataSubject = BehaviorSubject; +export type SavedSearchRefetchSubject = Subject; + +export interface UseSavedSearch { + refetch$: SavedSearchRefetchSubject; + data$: SavedSearchDataSubject; +} + +export type SavedSearchRefetchMsg = 'reset' | undefined; + +export interface SavedSearchDataMessage { + bucketInterval?: TimechartBucketInterval; + chartData?: Chart; + fetchCounter?: number; + fetchError?: Error; + fieldCounts?: Record; + hits?: number; + inspectorAdapters?: { requests: RequestAdapter }; + rows?: ElasticSearchHit[]; + state: FetchStatus; +} + +/** + * This hook return 2 observables, refetch$ allows to trigger data fetching, data$ to subscribe + * to the data fetching + * @param indexPattern + * @param savedSearch + * @param searchSessionManager + * @param searchSource + * @param services + * @param state + * @param stateContainer + * @param useNewFieldsApi + */ +export const useSavedSearch = ({ + indexPattern, + savedSearch, + searchSessionManager, + searchSource, + services, + state, + stateContainer, + useNewFieldsApi, +}: { + indexPattern: IndexPattern; + savedSearch: SavedSearch; + searchSessionManager: DiscoverSearchSessionManager; + searchSource: SearchSource; + services: DiscoverServices; + state: AppState; + stateContainer: GetStateReturn; + useNewFieldsApi: boolean; +}): UseSavedSearch => { + const { data, filterManager, uiSettings } = services; + const timefilter = data.query.timefilter.timefilter; + + const initFetchState: FetchStatus = useMemo(() => { + // A saved search is created on every page load, so we check the ID to see if we're loading a + // previously saved search or if it is just transient + const shouldSearchOnPageLoad = + uiSettings.get(SEARCH_ON_PAGE_LOAD_SETTING) || + savedSearch.id !== undefined || + timefilter.getRefreshInterval().pause === false || + searchSessionManager.hasSearchSessionIdInURL(); + return shouldSearchOnPageLoad ? FetchStatus.LOADING : FetchStatus.UNINITIALIZED; + }, [uiSettings, savedSearch.id, searchSessionManager, timefilter]); + + /** + * The observable the UI (aka React component) subscribes to get notified about + * the changes in the data fetching process (high level: fetching started, data was received) + */ + const data$: SavedSearchDataSubject = useSingleton( + () => + new BehaviorSubject({ + state: initFetchState, + }) + ); + /** + * The observable to trigger data fetching in UI + * By refetch$.next('reset') rows and fieldcounts are reset to allow e.g. editing of runtime fields + * to be processed correctly + */ + const refetch$ = useSingleton(() => new Subject()); + + /** + * Values that shouldn't trigger re-rendering when changed + */ + const refs = useRef<{ + abortController?: AbortController; + /** + * used to compare a new state against an old one, to evaluate if data needs to be fetched + */ + appState: AppState; + /** + * handler emitted by `timefilter.getAutoRefreshFetch$()` + * to notify when data completed loading and to start a new autorefresh loop + */ + autoRefreshDoneCb?: AutoRefreshDoneFn; + fetchCounter: number; + /** + * needed to right auto refresh behavior, a new auto refresh shouldnt be triggered when + * loading is still ongoing + */ + fetchStatus: FetchStatus; + /** + * needed for merging new with old field counts, high likely legacy, but kept this behavior + * because not 100% sure in this case + */ + fieldCounts: Record; + }>({ + appState: state, + fetchCounter: 0, + fieldCounts: {}, + fetchStatus: initFetchState, + }); + + const fetchAll = useCallback( + (reset = false) => { + if (!validateTimeRange(timefilter.getTime(), services.toastNotifications)) { + return Promise.reject(); + } + const inspectorAdapters = { requests: new RequestAdapter() }; + + if (refs.current.abortController) refs.current.abortController.abort(); + refs.current.abortController = new AbortController(); + const sessionId = searchSessionManager.getNextSearchSessionId(); + + // Let the UI know, data fetching started + const loadingMessage: SavedSearchDataMessage = { + state: FetchStatus.LOADING, + fetchCounter: ++refs.current.fetchCounter, + }; + + if (reset) { + // when runtime field was added, changed, deleted, index pattern was switched + loadingMessage.rows = []; + loadingMessage.fieldCounts = {}; + loadingMessage.chartData = undefined; + loadingMessage.bucketInterval = undefined; + } + data$.next(loadingMessage); + refs.current.fetchStatus = loadingMessage.state; + + const { sort } = stateContainer.appStateContainer.getState(); + updateSearchSource(searchSource, false, { + indexPattern, + services, + sort: sort as SortOrder[], + useNewFieldsApi, + }); + const chartAggConfigs = + indexPattern.timeFieldName && !state.hideChart && state.interval + ? getChartAggConfigs(searchSource, state.interval, data) + : undefined; + + if (!chartAggConfigs) { + searchSource.removeField('aggs'); + } else { + searchSource.setField('aggs', chartAggConfigs.toDsl()); + } + + const searchSourceFetch$ = searchSource.fetch$({ + abortSignal: refs.current.abortController.signal, + sessionId, + inspector: { + adapter: inspectorAdapters.requests, + title: i18n.translate('discover.inspectorRequestDataTitle', { + defaultMessage: 'data', + }), + description: i18n.translate('discover.inspectorRequestDescriptionDocument', { + defaultMessage: 'This request queries Elasticsearch to fetch the data for the search.', + }), + }, + }); + + searchSourceFetch$.pipe(filter((res) => isCompleteResponse(res))).subscribe( + (res) => { + const documents = res.rawResponse.hits.hits; + + const message: SavedSearchDataMessage = { + state: FetchStatus.COMPLETE, + rows: documents, + inspectorAdapters, + fieldCounts: calcFieldCounts( + reset ? {} : refs.current.fieldCounts, + documents, + indexPattern + ), + hits: res.rawResponse.hits.total as number, + }; + + if (chartAggConfigs) { + const bucketAggConfig = chartAggConfigs!.aggs[1]; + const tabifiedData = tabifyAggResponse(chartAggConfigs, res.rawResponse); + const dimensions = getDimensions(chartAggConfigs, data); + if (dimensions) { + if (bucketAggConfig && search.aggs.isDateHistogramBucketAggConfig(bucketAggConfig)) { + message.bucketInterval = bucketAggConfig.buckets?.getInterval(); + } + message.chartData = buildPointSeriesData(tabifiedData, dimensions); + } + } + refs.current.fieldCounts = message.fieldCounts!; + refs.current.fetchStatus = message.state; + data$.next(message); + }, + (error) => { + if (error instanceof Error && error.name === 'AbortError') return; + data.search.showError(error); + refs.current.fetchStatus = FetchStatus.ERROR; + data$.next({ + state: FetchStatus.ERROR, + inspectorAdapters, + fetchError: error, + }); + }, + () => { + refs.current.autoRefreshDoneCb?.(); + refs.current.autoRefreshDoneCb = undefined; + } + ); + }, + [ + timefilter, + services, + stateContainer.appStateContainer, + searchSource, + indexPattern, + useNewFieldsApi, + state.hideChart, + state.interval, + data, + searchSessionManager, + data$, + ] + ); + + /** + * This part takes care of triggering the data fetching by creating and subscribing + * to an observable of various possible changes in state + */ + useEffect(() => { + const fetch$ = merge( + refetch$, + filterManager.getFetches$(), + timefilter.getFetch$(), + timefilter.getAutoRefreshFetch$().pipe( + tap((done) => { + refs.current.autoRefreshDoneCb = done; + }), + filter(() => refs.current.fetchStatus !== FetchStatus.LOADING) + ), + data.query.queryString.getUpdates$(), + searchSessionManager.newSearchSessionIdFromURL$.pipe(filter((sessionId) => !!sessionId)) + ).pipe(debounceTime(100)); + + const subscription = fetch$.subscribe((val) => { + fetchAll(val === 'reset'); + }); + + return () => { + subscription.unsubscribe(); + }; + }, [ + data.query.queryString, + filterManager, + refetch$, + searchSessionManager.newSearchSessionIdFromURL$, + timefilter, + fetchAll, + ]); + + /** + * Track state changes that should trigger a fetch + */ + useEffect(() => { + const prevAppState = refs.current.appState; + + // chart was hidden, now it should be displayed, so data is needed + const chartDisplayChanged = state.hideChart !== prevAppState.hideChart && !state.hideChart; + const chartIntervalChanged = state.interval !== prevAppState.interval; + const docTableSortChanged = !isEqual(state.sort, prevAppState.sort); + const indexPatternChanged = !isEqual(state.index, prevAppState.index); + + refs.current.appState = state; + if (chartDisplayChanged || chartIntervalChanged || docTableSortChanged || indexPatternChanged) { + refetch$.next(indexPatternChanged ? 'reset' : undefined); + } + }, [refetch$, state.interval, state.sort, state]); + + useEffect(() => { + if (initFetchState === FetchStatus.LOADING) { + refetch$.next(); + } + }, [initFetchState, refetch$]); + + return { + refetch$, + data$, + }; +}; diff --git a/src/plugins/discover/public/application/apps/main/services/use_search_session.test.ts b/src/plugins/discover/public/application/apps/main/services/use_search_session.test.ts new file mode 100644 index 00000000000000..8aa6e0764d8ec7 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/services/use_search_session.test.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { useSearchSession } from './use_search_session'; +import { renderHook } from '@testing-library/react-hooks'; +import { createSearchSessionMock } from '../../../../__mocks__/search_session'; +import { discoverServiceMock } from '../../../../__mocks__/services'; +import { savedSearchMock } from '../../../../__mocks__/saved_search'; +import { getState } from './discover_state'; +import { uiSettingsMock } from '../../../../__mocks__/ui_settings'; + +describe('test useSearchSession', () => { + test('getting the next session id', async () => { + const { history } = createSearchSessionMock(); + const stateContainer = getState({ + getStateDefaults: () => ({ index: 'test' }), + history, + uiSettings: uiSettingsMock, + }); + + const nextId = 'id'; + discoverServiceMock.data.search.session.start = jest.fn(() => nextId); + + const { result } = renderHook(() => { + return useSearchSession({ + services: discoverServiceMock, + history, + stateContainer, + savedSearch: savedSearchMock, + }); + }); + expect(result.current.getNextSearchSessionId()).toBe('id'); + }); +}); diff --git a/src/plugins/discover/public/application/apps/main/services/use_search_session.ts b/src/plugins/discover/public/application/apps/main/services/use_search_session.ts new file mode 100644 index 00000000000000..e37e8f6f338394 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/services/use_search_session.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 { useMemo, useEffect } from 'react'; +import { History } from 'history'; +import { DiscoverSearchSessionManager } from './discover_search_session'; +import { createSearchSessionRestorationDataProvider, GetStateReturn } from './discover_state'; +import { noSearchSessionStorageCapabilityMessage } from '../../../../../../data/public'; +import { DiscoverServices } from '../../../../build_services'; +import { SavedSearch } from '../../../../saved_searches'; + +export function useSearchSession({ + services, + history, + stateContainer, + savedSearch, +}: { + services: DiscoverServices; + stateContainer: GetStateReturn; + history: History; + savedSearch: SavedSearch; +}) { + const { data, capabilities } = services; + /** + * Search session logic + */ + const searchSessionManager = useMemo( + () => + new DiscoverSearchSessionManager({ + history, + session: data.search.session, + }), + [data.search.session, history] + ); + + useEffect(() => { + data.search.session.enableStorage( + createSearchSessionRestorationDataProvider({ + appStateContainer: stateContainer.appStateContainer, + data, + getSavedSearch: () => savedSearch, + }), + { + isDisabled: () => + capabilities.discover.storeSearchSession + ? { disabled: false } + : { + disabled: true, + reasonText: noSearchSessionStorageCapabilityMessage, + }, + } + ); + }, [ + capabilities.discover.storeSearchSession, + data, + savedSearch, + stateContainer.appStateContainer, + ]); + + return searchSessionManager; +} diff --git a/src/plugins/discover/public/application/apps/main/services/use_url.test.ts b/src/plugins/discover/public/application/apps/main/services/use_url.test.ts new file mode 100644 index 00000000000000..740ca2bd140d78 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/services/use_url.test.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { renderHook } from '@testing-library/react-hooks'; +import { createSearchSessionMock } from '../../../../__mocks__/search_session'; +import { useUrl } from './use_url'; + +describe('test useUrl', () => { + test('resetSavedSearch is triggered once path it changed to /', () => { + const { history } = createSearchSessionMock(); + history.push('/view'); + const props = { + history, + resetSavedSearch: jest.fn(), + }; + renderHook(() => useUrl(props)); + history.push('/new'); + expect(props.resetSavedSearch).toHaveBeenCalledTimes(0); + + history.push('/'); + expect(props.resetSavedSearch).toHaveBeenCalledTimes(1); + }); +}); diff --git a/src/plugins/discover/public/application/apps/main/services/use_url.ts b/src/plugins/discover/public/application/apps/main/services/use_url.ts new file mode 100644 index 00000000000000..bc5554c35b36f7 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/services/use_url.ts @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { useEffect } from 'react'; +import { History } from 'history'; +export function useUrl({ + history, + resetSavedSearch, +}: { + history: History; + resetSavedSearch: (val?: string) => void; +}) { + /** + * Url / Routing logic + */ + useEffect(() => { + // this listener is waiting for such a path http://localhost:5601/app/discover#/ + // which could be set through pressing "New" button in top nav or go to "Discover" plugin from the sidebar + // to reload the page in a right way + const unlistenHistoryBasePath = history.listen(({ pathname, search, hash }) => { + if (!search && !hash && pathname === '/') { + resetSavedSearch(); + } + }); + return () => unlistenHistoryBasePath(); + }, [history, resetSavedSearch]); +} diff --git a/src/plugins/discover/public/application/helpers/calc_field_counts.test.ts b/src/plugins/discover/public/application/apps/main/utils/calc_field_counts.test.ts similarity index 83% rename from src/plugins/discover/public/application/helpers/calc_field_counts.test.ts rename to src/plugins/discover/public/application/apps/main/utils/calc_field_counts.test.ts index cf12b336c5b580..bdea6611d3b7eb 100644 --- a/src/plugins/discover/public/application/helpers/calc_field_counts.test.ts +++ b/src/plugins/discover/public/application/apps/main/utils/calc_field_counts.test.ts @@ -7,14 +7,15 @@ */ import { calcFieldCounts } from './calc_field_counts'; -import { indexPatternMock } from '../../__mocks__/index_pattern'; +import { indexPatternMock } from '../../../../__mocks__/index_pattern'; +import { ElasticSearchHit } from '../../../doc_views/doc_views_types'; describe('calcFieldCounts', () => { test('returns valid field count data', async () => { - const rows = [ + const rows = ([ { _id: 1, _source: { message: 'test1', bytes: 20 } }, { _id: 2, _source: { name: 'test2', extension: 'jpg' } }, - ]; + ] as unknown) as ElasticSearchHit[]; const result = calcFieldCounts({}, rows, indexPatternMock); expect(result).toMatchInlineSnapshot(` Object { @@ -28,10 +29,10 @@ describe('calcFieldCounts', () => { `); }); test('updates field count data', async () => { - const rows = [ + const rows = ([ { _id: 1, _source: { message: 'test1', bytes: 20 } }, { _id: 2, _source: { name: 'test2', extension: 'jpg' } }, - ]; + ] as unknown) as ElasticSearchHit[]; const result = calcFieldCounts({ message: 2 }, rows, indexPatternMock); expect(result).toMatchInlineSnapshot(` Object { diff --git a/src/plugins/discover/public/application/helpers/calc_field_counts.ts b/src/plugins/discover/public/application/apps/main/utils/calc_field_counts.ts similarity index 84% rename from src/plugins/discover/public/application/helpers/calc_field_counts.ts rename to src/plugins/discover/public/application/apps/main/utils/calc_field_counts.ts index edeaa0b9bce52f..43c9a57a70f221 100644 --- a/src/plugins/discover/public/application/helpers/calc_field_counts.ts +++ b/src/plugins/discover/public/application/apps/main/utils/calc_field_counts.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import { IndexPattern } from '../../kibana_services'; +import { IndexPattern } from '../../../../kibana_services'; +import { ElasticSearchHit } from '../../../doc_views/doc_views_types'; /** * This function is recording stats of the available fields, for usage in sidebar and sharing @@ -14,7 +15,7 @@ import { IndexPattern } from '../../kibana_services'; */ export function calcFieldCounts( counts = {} as Record, - rows: Array>, + rows: ElasticSearchHit[], indexPattern: IndexPattern ) { for (const hit of rows) { diff --git a/src/plugins/discover/public/application/apps/main/utils/get_chart_agg_config.test.ts b/src/plugins/discover/public/application/apps/main/utils/get_chart_agg_config.test.ts new file mode 100644 index 00000000000000..19820508746508 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/utils/get_chart_agg_config.test.ts @@ -0,0 +1,59 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { indexPatternWithTimefieldMock } from '../../../../__mocks__/index_pattern_with_timefield'; +import { SearchSource } from '../../../../../../data/public'; +import { dataPluginMock } from '../../../../../../data/public/mocks'; +import { getChartAggConfigs } from './get_chart_agg_configs'; + +describe('getChartAggConfigs', () => { + test('is working', () => { + const indexPattern = indexPatternWithTimefieldMock; + const setField = jest.fn(); + const searchSource = ({ + setField, + getField: (name: string) => { + if (name === 'index') { + return indexPattern; + } + }, + removeField: jest.fn(), + } as unknown) as SearchSource; + + const dataMock = dataPluginMock.createStartContract(); + + const aggsConfig = getChartAggConfigs(searchSource, 'auto', dataMock); + + expect(aggsConfig!.aggs).toMatchInlineSnapshot(` + Array [ + Object { + "enabled": true, + "id": "1", + "params": Object {}, + "schema": "metric", + "type": "count", + }, + Object { + "enabled": true, + "id": "2", + "params": Object { + "drop_partials": false, + "extended_bounds": Object {}, + "field": "timestamp", + "interval": "auto", + "min_doc_count": 1, + "scaleMetricValues": false, + "useNormalizedEsInterval": true, + "used_interval": "0ms", + }, + "schema": "segment", + "type": "date_histogram", + }, + ] + `); + }); +}); diff --git a/src/plugins/discover/public/application/apps/main/utils/get_chart_agg_configs.ts b/src/plugins/discover/public/application/apps/main/utils/get_chart_agg_configs.ts new file mode 100644 index 00000000000000..2665254027fd91 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/utils/get_chart_agg_configs.ts @@ -0,0 +1,37 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { SearchSource } from '../../../../../../data/common'; +import { DataPublicPluginStart } from '../../../../../../data/public'; + +/** + * Helper function to apply or remove aggregations to a given search source used for gaining data + * for Discover's histogram vis + */ +export function getChartAggConfigs( + searchSource: SearchSource, + histogramInterval: string, + data: DataPublicPluginStart +) { + const indexPattern = searchSource.getField('index')!; + const visStateAggs = [ + { + type: 'count', + schema: 'metric', + }, + { + type: 'date_histogram', + schema: 'segment', + params: { + field: indexPattern.timeFieldName!, + interval: histogramInterval, + timeRange: data.query.timefilter.timefilter.getTime(), + }, + }, + ]; + return data.search.aggs.createAggConfigs(indexPattern, visStateAggs); +} diff --git a/src/plugins/discover/public/application/apps/main/utils/get_dimensions.test.ts b/src/plugins/discover/public/application/apps/main/utils/get_dimensions.test.ts new file mode 100644 index 00000000000000..443fc634ba5430 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/utils/get_dimensions.test.ts @@ -0,0 +1,70 @@ +/* + * Copyright 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 { dataPluginMock } from '../../../../../../data/public/mocks'; + +import { getDimensions } from './get_dimensions'; +import { indexPatternWithTimefieldMock } from '../../../../__mocks__/index_pattern_with_timefield'; +import { SearchSource, calculateBounds } from '../../../../../../data/common'; +import { getChartAggConfigs } from './get_chart_agg_configs'; + +test('getDimensions', () => { + const indexPattern = indexPatternWithTimefieldMock; + const setField = jest.fn(); + const searchSource = ({ + setField, + removeField: jest.fn(), + getField: (name: string) => { + if (name === 'index') { + return indexPattern; + } + }, + } as unknown) as SearchSource; + + const dataMock = dataPluginMock.createStartContract(); + dataMock.query.timefilter.timefilter.getTime = () => { + return { from: '1991-03-29T08:04:00.694Z', to: '2021-03-29T07:04:00.695Z' }; + }; + dataMock.query.timefilter.timefilter.calculateBounds = (timeRange) => { + return calculateBounds(timeRange); + }; + + const aggsConfig = getChartAggConfigs(searchSource, 'auto', dataMock); + const actual = getDimensions(aggsConfig!, dataMock); + expect(actual).toMatchInlineSnapshot(` + Object { + "x": Object { + "accessor": 0, + "format": Object { + "id": "date", + "params": Object { + "pattern": "HH:mm:ss.SSS", + }, + }, + "label": "timestamp per 0 milliseconds", + "params": Object { + "bounds": Object { + "max": "2021-03-29T07:04:00.695Z", + "min": "1991-03-29T08:04:00.694Z", + }, + "date": true, + "format": "HH:mm:ss.SSS", + "interval": "P0D", + "intervalESUnit": "ms", + "intervalESValue": 0, + }, + }, + "y": Object { + "accessor": 1, + "format": Object { + "id": "number", + }, + "label": "Count", + }, + } + `); +}); diff --git a/src/plugins/discover/public/application/apps/main/utils/get_dimensions.ts b/src/plugins/discover/public/application/apps/main/utils/get_dimensions.ts new file mode 100644 index 00000000000000..40b378f1c16983 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/utils/get_dimensions.ts @@ -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 moment from 'moment'; +import dateMath from '@elastic/datemath'; +import { IAggConfigs } from '../../../../../../data/common'; +import { DataPublicPluginStart, search } from '../../../../../../data/public'; +import { Dimensions, HistogramParamsBounds } from '../components/chart/point_series'; + +export function getDimensions( + aggs: IAggConfigs, + data: DataPublicPluginStart +): Dimensions | undefined { + const [metric, agg] = aggs.aggs; + const { from, to } = data.query.timefilter.timefilter.getTime(); + agg.params.timeRange = { + from: dateMath.parse(from), + to: dateMath.parse(to, { roundUp: true }), + }; + const bounds = agg.params.timeRange + ? (data.query.timefilter.timefilter.calculateBounds( + agg.params.timeRange + ) as HistogramParamsBounds) + : null; + const buckets = search.aggs.isDateHistogramBucketAggConfig(agg) ? agg.buckets : undefined; + + if (!buckets || !bounds) { + return; + } + + const { esUnit, esValue } = buckets.getInterval(); + return { + x: { + accessor: 0, + label: agg.makeLabel(), + format: agg.toSerializedFieldFormat(), + params: { + date: true, + interval: moment.duration(esValue, esUnit), + intervalESValue: esValue, + intervalESUnit: esUnit, + format: buckets.getScaledDateFormat(), + bounds, + }, + }, + y: { + accessor: 1, + format: metric.toSerializedFieldFormat(), + label: metric.makeLabel(), + }, + }; +} diff --git a/src/plugins/discover/public/application/apps/main/utils/get_result_state.test.ts b/src/plugins/discover/public/application/apps/main/utils/get_result_state.test.ts new file mode 100644 index 00000000000000..512bc4240352c7 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/utils/get_result_state.test.ts @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { getResultState, resultStatuses } from './get_result_state'; +import { ElasticSearchHit } from '../../../doc_views/doc_views_types'; +import { FetchStatus } from '../../../types'; + +describe('getResultState', () => { + test('fetching uninitialized', () => { + const actual = getResultState(FetchStatus.UNINITIALIZED, []); + expect(actual).toBe(resultStatuses.UNINITIALIZED); + }); + + test('fetching complete with no records', () => { + const actual = getResultState(FetchStatus.COMPLETE, []); + expect(actual).toBe(resultStatuses.NO_RESULTS); + }); + + test('fetching ongoing aka loading', () => { + const actual = getResultState(FetchStatus.LOADING, []); + expect(actual).toBe(resultStatuses.LOADING); + }); + + test('fetching ready', () => { + const record = ({ _id: 123 } as unknown) as ElasticSearchHit; + const actual = getResultState(FetchStatus.COMPLETE, [record]); + expect(actual).toBe(resultStatuses.READY); + }); + + test('re-fetching after already data is available', () => { + const record = ({ _id: 123 } as unknown) as ElasticSearchHit; + const actual = getResultState(FetchStatus.LOADING, [record]); + expect(actual).toBe(resultStatuses.READY); + }); + + test('after a fetch error when data was successfully fetched before ', () => { + const record = ({ _id: 123 } as unknown) as ElasticSearchHit; + const actual = getResultState(FetchStatus.ERROR, [record]); + expect(actual).toBe(resultStatuses.READY); + }); +}); diff --git a/src/plugins/discover/public/application/apps/main/utils/get_result_state.ts b/src/plugins/discover/public/application/apps/main/utils/get_result_state.ts new file mode 100644 index 00000000000000..80d25566ea5784 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/utils/get_result_state.ts @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { ElasticSearchHit } from '../../../doc_views/doc_views_types'; +import { FetchStatus } from '../../../types'; + +export const resultStatuses = { + UNINITIALIZED: 'uninitialized', + LOADING: 'loading', // initial data load + READY: 'ready', // results came back + NO_RESULTS: 'none', // no results came back +}; + +/** + * Returns the current state of the result, depends on fetchStatus and the given fetched rows + * Determines what is displayed in Discover main view (loading view, data view, empty data view, ...) + */ +export function getResultState(fetchStatus: FetchStatus, rows: ElasticSearchHit[]) { + if (fetchStatus === FetchStatus.UNINITIALIZED) { + return resultStatuses.UNINITIALIZED; + } + + const rowsEmpty = !Array.isArray(rows) || rows.length === 0; + if (rowsEmpty && fetchStatus === FetchStatus.LOADING) return resultStatuses.LOADING; + else if (!rowsEmpty) return resultStatuses.READY; + else return resultStatuses.NO_RESULTS; +} diff --git a/src/plugins/discover/public/application/helpers/get_sharing_data.test.ts b/src/plugins/discover/public/application/apps/main/utils/get_sharing_data.test.ts similarity index 96% rename from src/plugins/discover/public/application/helpers/get_sharing_data.test.ts rename to src/plugins/discover/public/application/apps/main/utils/get_sharing_data.test.ts index 6a51c085ebbc98..ffad3d955c1a3c 100644 --- a/src/plugins/discover/public/application/helpers/get_sharing_data.test.ts +++ b/src/plugins/discover/public/application/apps/main/utils/get_sharing_data.test.ts @@ -8,9 +8,9 @@ import { Capabilities, IUiSettingsClient } from 'kibana/public'; import { IndexPattern } from 'src/plugins/data/public'; -import { createSearchSourceMock } from '../../../../data/common/search/search_source/mocks'; -import { DOC_HIDE_TIME_COLUMN_SETTING, SORT_DEFAULT_ORDER_SETTING } from '../../../common'; -import { indexPatternMock } from '../../__mocks__/index_pattern'; +import { createSearchSourceMock } from '../../../../../../data/common/search/search_source/mocks'; +import { DOC_HIDE_TIME_COLUMN_SETTING, SORT_DEFAULT_ORDER_SETTING } from '../../../../../common'; +import { indexPatternMock } from '../../../../__mocks__/index_pattern'; import { getSharingData, showPublicUrlSwitch } from './get_sharing_data'; describe('getSharingData', () => { diff --git a/src/plugins/discover/public/application/helpers/get_sharing_data.ts b/src/plugins/discover/public/application/apps/main/utils/get_sharing_data.ts similarity index 87% rename from src/plugins/discover/public/application/helpers/get_sharing_data.ts rename to src/plugins/discover/public/application/apps/main/utils/get_sharing_data.ts index 47be4b80371522..00473956c57e3a 100644 --- a/src/plugins/discover/public/application/helpers/get_sharing_data.ts +++ b/src/plugins/discover/public/application/apps/main/utils/get_sharing_data.ts @@ -7,11 +7,11 @@ */ import type { Capabilities, IUiSettingsClient } from 'kibana/public'; -import { ISearchSource } from '../../../../data/common'; -import { DOC_HIDE_TIME_COLUMN_SETTING, SORT_DEFAULT_ORDER_SETTING } from '../../../common'; -import type { SavedSearch, SortOrder } from '../../saved_searches/types'; -import { AppState } from '../angular/discover_state'; -import { getSortForSearchSource } from '../angular/doc_table'; +import { ISearchSource } from '../../../../../../data/common'; +import { DOC_HIDE_TIME_COLUMN_SETTING, SORT_DEFAULT_ORDER_SETTING } from '../../../../../common'; +import type { SavedSearch, SortOrder } from '../../../../saved_searches/types'; +import { AppState } from '../services/discover_state'; +import { getSortForSearchSource } from '../../../angular/doc_table'; /** * Preparing data to share the current state as link or CSV/Report diff --git a/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.test.ts b/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.test.ts new file mode 100644 index 00000000000000..17f1802a47327a --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.test.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 { getStateDefaults } from './get_state_defaults'; +import { createSearchSourceMock, dataPluginMock } from '../../../../../../data/public/mocks'; +import { uiSettingsMock } from '../../../../__mocks__/ui_settings'; +import { indexPatternWithTimefieldMock } from '../../../../__mocks__/index_pattern_with_timefield'; +import { savedSearchMock } from '../../../../__mocks__/saved_search'; +import { indexPatternMock } from '../../../../__mocks__/index_pattern'; + +describe('getStateDefaults', () => { + test('index pattern with timefield', () => { + savedSearchMock.searchSource = createSearchSourceMock({ index: indexPatternWithTimefieldMock }); + const actual = getStateDefaults({ + config: uiSettingsMock, + data: dataPluginMock.createStartContract(), + savedSearch: savedSearchMock, + }); + expect(actual).toMatchInlineSnapshot(` + Object { + "columns": Array [ + "default_column", + ], + "filters": undefined, + "index": "index-pattern-with-timefield-id", + "interval": "auto", + "query": undefined, + "sort": Array [ + Array [ + "timestamp", + "desc", + ], + ], + } + `); + }); + + test('index pattern without timefield', () => { + savedSearchMock.searchSource = createSearchSourceMock({ index: indexPatternMock }); + + const actual = getStateDefaults({ + config: uiSettingsMock, + data: dataPluginMock.createStartContract(), + savedSearch: savedSearchMock, + }); + expect(actual).toMatchInlineSnapshot(` + Object { + "columns": Array [ + "default_column", + ], + "filters": undefined, + "index": "the-index-pattern-id", + "interval": "auto", + "query": undefined, + "sort": Array [], + } + `); + }); +}); diff --git a/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.ts b/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.ts new file mode 100644 index 00000000000000..426272fa8ce1cf --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.ts @@ -0,0 +1,59 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { cloneDeep } from 'lodash'; +import { IUiSettingsClient } from 'kibana/public'; +import { DEFAULT_COLUMNS_SETTING, SORT_DEFAULT_ORDER_SETTING } from '../../../../../common'; +import { getSortArray } from '../../../angular/doc_table'; +import { getDefaultSort } from '../../../angular/doc_table/lib/get_default_sort'; +import { SavedSearch } from '../../../../saved_searches'; +import { DataPublicPluginStart } from '../../../../../../data/public'; + +import { AppState } from '../services/discover_state'; + +function getDefaultColumns(savedSearch: SavedSearch, config: IUiSettingsClient) { + if (savedSearch.columns && savedSearch.columns.length > 0) { + return [...savedSearch.columns]; + } + return [...config.get(DEFAULT_COLUMNS_SETTING)]; +} + +export function getStateDefaults({ + config, + data, + savedSearch, +}: { + config: IUiSettingsClient; + data: DataPublicPluginStart; + savedSearch: SavedSearch; +}) { + const searchSource = savedSearch.searchSource; + const indexPattern = savedSearch.searchSource.getField('index'); + const query = searchSource.getField('query') || data.query.queryString.getDefaultQuery(); + const sort = getSortArray(savedSearch.sort, indexPattern!); + const columns = getDefaultColumns(savedSearch, config); + + const defaultState = { + query, + sort: !sort.length + ? getDefaultSort(indexPattern, config.get(SORT_DEFAULT_ORDER_SETTING, 'desc')) + : sort, + columns, + index: indexPattern!.id, + interval: 'auto', + filters: cloneDeep(searchSource.getOwnField('filter')), + } as AppState; + if (savedSearch.grid) { + defaultState.grid = savedSearch.grid; + } + if (savedSearch.hideChart) { + defaultState.hideChart = savedSearch.hideChart; + } + + return defaultState; +} diff --git a/src/plugins/discover/public/application/helpers/get_switch_index_pattern_app_state.test.ts b/src/plugins/discover/public/application/apps/main/utils/get_switch_index_pattern_app_state.test.ts similarity index 98% rename from src/plugins/discover/public/application/helpers/get_switch_index_pattern_app_state.test.ts rename to src/plugins/discover/public/application/apps/main/utils/get_switch_index_pattern_app_state.test.ts index 31addd807b78dc..9f9071ed403ced 100644 --- a/src/plugins/discover/public/application/helpers/get_switch_index_pattern_app_state.test.ts +++ b/src/plugins/discover/public/application/apps/main/utils/get_switch_index_pattern_app_state.test.ts @@ -7,7 +7,7 @@ */ import { getSwitchIndexPatternAppState } from './get_switch_index_pattern_app_state'; -import { IndexPattern } from '../../../../data/common/index_patterns'; +import { IndexPattern } from '../../../../../../data/common/index_patterns'; /** * Helper function returning an index pattern diff --git a/src/plugins/discover/public/application/helpers/get_switch_index_pattern_app_state.ts b/src/plugins/discover/public/application/apps/main/utils/get_switch_index_pattern_app_state.ts similarity index 90% rename from src/plugins/discover/public/application/helpers/get_switch_index_pattern_app_state.ts rename to src/plugins/discover/public/application/apps/main/utils/get_switch_index_pattern_app_state.ts index 9756fc8fd448ba..f7154b26c7ed62 100644 --- a/src/plugins/discover/public/application/helpers/get_switch_index_pattern_app_state.ts +++ b/src/plugins/discover/public/application/apps/main/utils/get_switch_index_pattern_app_state.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ -import { getSortArray } from '../angular/doc_table'; -import { SortPairArr } from '../angular/doc_table/lib/get_sort'; -import { IndexPattern } from '../../kibana_services'; +import { getSortArray } from '../../../angular/doc_table'; +import { SortPairArr } from '../../../angular/doc_table/lib/get_sort'; +import { IndexPattern } from '../../../../kibana_services'; /** * Helper function to remove or adapt the currently selected columns/sort to be valid with the next diff --git a/src/plugins/discover/public/application/apps/main/utils/index.ts b/src/plugins/discover/public/application/apps/main/utils/index.ts new file mode 100644 index 00000000000000..a79dea526ec557 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/utils/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { getChartAggConfigs } from './get_chart_agg_configs'; +export { getDimensions } from './get_dimensions'; diff --git a/src/plugins/discover/public/application/helpers/nested_fields.ts b/src/plugins/discover/public/application/apps/main/utils/nested_fields.ts similarity index 100% rename from src/plugins/discover/public/application/helpers/nested_fields.ts rename to src/plugins/discover/public/application/apps/main/utils/nested_fields.ts diff --git a/src/plugins/discover/public/application/helpers/persist_saved_search.ts b/src/plugins/discover/public/application/apps/main/utils/persist_saved_search.ts similarity index 75% rename from src/plugins/discover/public/application/helpers/persist_saved_search.ts rename to src/plugins/discover/public/application/apps/main/utils/persist_saved_search.ts index f44d4650da56a2..a5e1e2bb6c2ea6 100644 --- a/src/plugins/discover/public/application/helpers/persist_saved_search.ts +++ b/src/plugins/discover/public/application/apps/main/utils/persist_saved_search.ts @@ -7,12 +7,12 @@ */ import { updateSearchSource } from './update_search_source'; -import { IndexPattern } from '../../../../data/public'; -import { SavedSearch } from '../../saved_searches'; -import { AppState } from '../angular/discover_state'; -import { SortOrder } from '../../saved_searches/types'; -import { SavedObjectSaveOpts } from '../../../../saved_objects/public'; -import { DiscoverServices } from '../../build_services'; +import { IndexPattern } from '../../../../../../data/public'; +import { SavedSearch } from '../../../../saved_searches'; +import { AppState } from '../services/discover_state'; +import { SortOrder } from '../../../../saved_searches/types'; +import { SavedObjectSaveOpts } from '../../../../../../saved_objects/public'; +import { DiscoverServices } from '../../../../build_services'; /** * Helper function to update and persist the given savedSearch @@ -35,12 +35,10 @@ export async function persistSavedSearch( state: AppState; } ) { - updateSearchSource({ - persistentSearchSource: savedSearch.searchSource, + updateSearchSource(savedSearch.searchSource, true, { indexPattern, services, sort: state.sort as SortOrder[], - columns: state.columns || [], useNewFieldsApi: false, }); diff --git a/src/plugins/discover/public/application/helpers/resolve_index_pattern.test.ts b/src/plugins/discover/public/application/apps/main/utils/resolve_index_pattern.test.ts similarity index 89% rename from src/plugins/discover/public/application/helpers/resolve_index_pattern.test.ts rename to src/plugins/discover/public/application/apps/main/utils/resolve_index_pattern.test.ts index 50ff068086b0ac..9ebbeafd28e10e 100644 --- a/src/plugins/discover/public/application/helpers/resolve_index_pattern.test.ts +++ b/src/plugins/discover/public/application/apps/main/utils/resolve_index_pattern.test.ts @@ -11,9 +11,9 @@ import { getFallbackIndexPatternId, IndexPatternSavedObject, } from './resolve_index_pattern'; -import { indexPatternsMock } from '../../__mocks__/index_patterns'; -import { indexPatternMock } from '../../__mocks__/index_pattern'; -import { configMock } from '../../__mocks__/config'; +import { indexPatternsMock } from '../../../../__mocks__/index_patterns'; +import { indexPatternMock } from '../../../../__mocks__/index_pattern'; +import { configMock } from '../../../../__mocks__/config'; describe('Resolve index pattern tests', () => { test('returns valid data for an existing index pattern', async () => { diff --git a/src/plugins/discover/public/application/helpers/resolve_index_pattern.ts b/src/plugins/discover/public/application/apps/main/utils/resolve_index_pattern.ts similarity index 95% rename from src/plugins/discover/public/application/helpers/resolve_index_pattern.ts rename to src/plugins/discover/public/application/apps/main/utils/resolve_index_pattern.ts index 3e22917f3f482f..a5149ea2b3dd7b 100644 --- a/src/plugins/discover/public/application/helpers/resolve_index_pattern.ts +++ b/src/plugins/discover/public/application/apps/main/utils/resolve_index_pattern.ts @@ -8,8 +8,8 @@ import { i18n } from '@kbn/i18n'; import { IUiSettingsClient, SavedObject, ToastsStart } from 'kibana/public'; -import { IndexPattern } from '../../kibana_services'; -import { IndexPatternsService, SearchSource } from '../../../../data/common'; +import { IndexPattern } from '../../../../kibana_services'; +import { IndexPatternsContract, SearchSource } from '../../../../../../data/common'; export type IndexPatternSavedObject = SavedObject & { title: string }; @@ -77,7 +77,7 @@ export function getIndexPatternId( */ export async function loadIndexPattern( id: string, - indexPatterns: IndexPatternsService, + indexPatterns: IndexPatternsContract, config: IUiSettingsClient ): Promise { const indexPatternList = ((await indexPatterns.getCache()) as unknown) as IndexPatternSavedObject[]; diff --git a/src/plugins/discover/public/application/apps/main/utils/update_search_source.test.ts b/src/plugins/discover/public/application/apps/main/utils/update_search_source.test.ts new file mode 100644 index 00000000000000..9deabf96732b1e --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/utils/update_search_source.test.ts @@ -0,0 +1,141 @@ +/* + * Copyright 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 { updateSearchSource } from './update_search_source'; +import { createSearchSourceMock } from '../../../../../../data/common/search/search_source/mocks'; +import { indexPatternMock } from '../../../../__mocks__/index_pattern'; +import { IUiSettingsClient } from 'kibana/public'; +import { DiscoverServices } from '../../../../build_services'; +import { dataPluginMock } from '../../../../../../data/public/mocks'; +import { SAMPLE_SIZE_SETTING } from '../../../../../common'; +import { SortOrder } from '../../../../saved_searches/types'; + +describe('updateSearchSource', () => { + test('updates a given search source', async () => { + const persistentSearchSourceMock = createSearchSourceMock({}); + const volatileSearchSourceMock = createSearchSourceMock({}); + volatileSearchSourceMock.setParent(persistentSearchSourceMock); + const sampleSize = 250; + updateSearchSource(volatileSearchSourceMock, false, { + indexPattern: indexPatternMock, + services: ({ + data: dataPluginMock.createStartContract(), + timefilter: { + createFilter: jest.fn(), + }, + uiSettings: ({ + get: (key: string) => { + if (key === SAMPLE_SIZE_SETTING) { + return sampleSize; + } + return false; + }, + } as unknown) as IUiSettingsClient, + } as unknown) as DiscoverServices, + sort: [] as SortOrder[], + useNewFieldsApi: false, + }); + expect(persistentSearchSourceMock.getField('index')).toEqual(indexPatternMock); + expect(volatileSearchSourceMock.getField('size')).toEqual(sampleSize); + expect(volatileSearchSourceMock.getField('fields')).toBe(undefined); + }); + + test('updates a given search source with the usage of the new fields api', async () => { + const persistentSearchSourceMock = createSearchSourceMock({}); + const volatileSearchSourceMock = createSearchSourceMock({}); + volatileSearchSourceMock.setParent(persistentSearchSourceMock); + const sampleSize = 250; + updateSearchSource(volatileSearchSourceMock, false, { + indexPattern: indexPatternMock, + services: ({ + data: dataPluginMock.createStartContract(), + timefilter: { + createFilter: jest.fn(), + }, + uiSettings: ({ + get: (key: string) => { + if (key === SAMPLE_SIZE_SETTING) { + return sampleSize; + } + return false; + }, + } as unknown) as IUiSettingsClient, + } as unknown) as DiscoverServices, + sort: [] as SortOrder[], + useNewFieldsApi: true, + }); + expect(persistentSearchSourceMock.getField('index')).toEqual(indexPatternMock); + expect(volatileSearchSourceMock.getField('size')).toEqual(sampleSize); + expect(volatileSearchSourceMock.getField('fields')).toEqual([ + { field: '*', include_unmapped: 'true' }, + ]); + expect(volatileSearchSourceMock.getField('fieldsFromSource')).toBe(undefined); + }); + + test('updates a given search source when showUnmappedFields option is set to true', async () => { + const persistentSearchSourceMock = createSearchSourceMock({}); + const volatileSearchSourceMock = createSearchSourceMock({}); + volatileSearchSourceMock.setParent(persistentSearchSourceMock); + const sampleSize = 250; + updateSearchSource(volatileSearchSourceMock, false, { + indexPattern: indexPatternMock, + services: ({ + data: dataPluginMock.createStartContract(), + timefilter: { + createFilter: jest.fn(), + }, + uiSettings: ({ + get: (key: string) => { + if (key === SAMPLE_SIZE_SETTING) { + return sampleSize; + } + return false; + }, + } as unknown) as IUiSettingsClient, + } as unknown) as DiscoverServices, + sort: [] as SortOrder[], + useNewFieldsApi: true, + }); + expect(persistentSearchSourceMock.getField('index')).toEqual(indexPatternMock); + expect(volatileSearchSourceMock.getField('size')).toEqual(sampleSize); + expect(volatileSearchSourceMock.getField('fields')).toEqual([ + { field: '*', include_unmapped: 'true' }, + ]); + expect(volatileSearchSourceMock.getField('fieldsFromSource')).toBe(undefined); + }); + + test('does not explicitly request fieldsFromSource when not using fields API', async () => { + const persistentSearchSourceMock = createSearchSourceMock({}); + const volatileSearchSourceMock = createSearchSourceMock({}); + volatileSearchSourceMock.setParent(persistentSearchSourceMock); + const sampleSize = 250; + updateSearchSource(volatileSearchSourceMock, false, { + indexPattern: indexPatternMock, + services: ({ + data: dataPluginMock.createStartContract(), + timefilter: { + createFilter: jest.fn(), + }, + uiSettings: ({ + get: (key: string) => { + if (key === SAMPLE_SIZE_SETTING) { + return sampleSize; + } + return false; + }, + } as unknown) as IUiSettingsClient, + } as unknown) as DiscoverServices, + sort: [] as SortOrder[], + useNewFieldsApi: false, + }); + expect(persistentSearchSourceMock.getField('index')).toEqual(indexPatternMock); + expect(volatileSearchSourceMock.getField('size')).toEqual(sampleSize); + expect(volatileSearchSourceMock.getField('fields')).toEqual(undefined); + expect(volatileSearchSourceMock.getField('fieldsFromSource')).toBe(undefined); + }); +}); diff --git a/src/plugins/discover/public/application/apps/main/utils/update_search_source.ts b/src/plugins/discover/public/application/apps/main/utils/update_search_source.ts new file mode 100644 index 00000000000000..c72e207102e814 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/utils/update_search_source.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 { getSortForSearchSource } from '../../../angular/doc_table'; +import { SAMPLE_SIZE_SETTING, SORT_DEFAULT_ORDER_SETTING } from '../../../../../common'; +import { IndexPattern, ISearchSource } from '../../../../../../data/common'; +import { SortOrder } from '../../../../saved_searches/types'; +import { DiscoverServices } from '../../../../build_services'; +import { indexPatterns as indexPatternsUtils } from '../../../../../../data/public'; + +/** + * Helper function to update the given searchSource before fetching/sharing/persisting + */ +export function updateSearchSource( + searchSource: ISearchSource, + persist = true, + { + indexPattern, + services, + sort, + useNewFieldsApi, + }: { + indexPattern: IndexPattern; + services: DiscoverServices; + sort: SortOrder[]; + useNewFieldsApi: boolean; + } +) { + const { uiSettings, data } = services; + const usedSort = getSortForSearchSource( + sort, + indexPattern, + uiSettings.get(SORT_DEFAULT_ORDER_SETTING) + ); + const usedSearchSource = persist ? searchSource : searchSource.getParent()!; + + usedSearchSource + .setField('index', indexPattern) + .setField('query', data.query.queryString.getQuery() || null) + .setField('filter', data.query.filterManager.getFilters()); + + if (!persist) { + searchSource + .setField('trackTotalHits', true) + .setField('size', uiSettings.get(SAMPLE_SIZE_SETTING)) + .setField('sort', usedSort) + .setField('highlightAll', true) + .setField('version', true) + // Even when searching rollups, we want to use the default strategy so that we get back a + // document-like response. + .setPreferredSearchStrategyId('default'); + + // this is not the default index pattern, it determines that it's not of type rollup + if (indexPatternsUtils.isDefault(indexPattern)) { + searchSource.setField('filter', data.query.timefilter.timefilter.createFilter(indexPattern)); + } + + if (useNewFieldsApi) { + searchSource.removeField('fieldsFromSource'); + const fields: Record = { field: '*' }; + + fields.include_unmapped = 'true'; + + searchSource.setField('fields', [fields]); + } else { + searchSource.removeField('fields'); + } + } +} diff --git a/src/plugins/discover/public/application/apps/main/utils/use_singleton.ts b/src/plugins/discover/public/application/apps/main/utils/use_singleton.ts new file mode 100644 index 00000000000000..bac195896caa3a --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/utils/use_singleton.ts @@ -0,0 +1,26 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { useRef } from 'react'; + +/** + * Allows lazy initialization of a singleton + * Context: https://reactjs.org/docs/hooks-faq.html#how-to-create-expensive-objects-lazily + * Why not using useMemo: We're using the useMemo here also kind of as a guarantee to + * only instantiate that subject once. Unfortunately useMemo explicitly does not give + * those guarantees: + * https://reactjs.org/docs/hooks-reference.html#usememo + */ +export function useSingleton(initialize: () => T): T { + const ref = useRef(null); + + if (ref.current === null) { + ref.current = initialize(); + } + + return ref.current; +} diff --git a/src/plugins/discover/public/application/helpers/validate_time_range.test.ts b/src/plugins/discover/public/application/apps/main/utils/validate_time_range.test.ts similarity index 94% rename from src/plugins/discover/public/application/helpers/validate_time_range.test.ts rename to src/plugins/discover/public/application/apps/main/utils/validate_time_range.test.ts index cd90be434aa5e0..8d9d9adc4e8dcb 100644 --- a/src/plugins/discover/public/application/helpers/validate_time_range.test.ts +++ b/src/plugins/discover/public/application/apps/main/utils/validate_time_range.test.ts @@ -7,7 +7,7 @@ */ import { validateTimeRange } from './validate_time_range'; -import { notificationServiceMock } from '../../../../../core/public/mocks'; +import { notificationServiceMock } from '../../../../../../../core/public/mocks'; describe('Discover validateTimeRange', () => { test('validates given time ranges correctly', async () => { diff --git a/src/plugins/discover/public/application/helpers/validate_time_range.ts b/src/plugins/discover/public/application/apps/main/utils/validate_time_range.ts similarity index 100% rename from src/plugins/discover/public/application/helpers/validate_time_range.ts rename to src/plugins/discover/public/application/apps/main/utils/validate_time_range.ts diff --git a/src/plugins/discover/public/application/components/constants.ts b/src/plugins/discover/public/application/components/constants.ts deleted file mode 100644 index 42845e83b7435b..00000000000000 --- a/src/plugins/discover/public/application/components/constants.ts +++ /dev/null @@ -1,14 +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. - */ - -export const fetchStatuses = { - UNINITIALIZED: 'uninitialized', - LOADING: 'loading', - COMPLETE: 'complete', - ERROR: 'error', -}; diff --git a/src/plugins/discover/public/application/components/create_discover_directive.ts b/src/plugins/discover/public/application/components/create_discover_directive.ts deleted file mode 100644 index 049c9ac177eeab..00000000000000 --- a/src/plugins/discover/public/application/components/create_discover_directive.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -import { Discover } from './discover'; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export function createDiscoverDirective(reactDirective: any) { - return reactDirective(Discover, [ - ['fetch', { watchDepth: 'reference' }], - ['fetchCounter', { watchDepth: 'reference' }], - ['fetchError', { watchDepth: 'reference' }], - ['fieldCounts', { watchDepth: 'reference' }], - ['histogramData', { watchDepth: 'reference' }], - ['hits', { watchDepth: 'reference' }], - ['indexPattern', { watchDepth: 'reference' }], - ['opts', { watchDepth: 'reference' }], - ['resetQuery', { watchDepth: 'reference' }], - ['resultState', { watchDepth: 'reference' }], - ['fetchStatus', { watchDepth: 'reference' }], - ['rows', { watchDepth: 'reference' }], - ['savedSearch', { watchDepth: 'reference' }], - ['searchSource', { watchDepth: 'reference' }], - ['showSaveQuery', { watchDepth: 'reference' }], - ['state', { watchDepth: 'reference' }], - ['topNavMenu', { watchDepth: 'reference' }], - ['updateQuery', { watchDepth: 'reference' }], - ['updateSavedQueryId', { watchDepth: 'reference' }], - ['unmappedFieldsConfig', { watchDepth: 'value' }], - ['refreshAppState', { watchDepth: 'reference' }], - ]); -} diff --git a/src/plugins/discover/public/application/components/discover.scss b/src/plugins/discover/public/application/components/discover.scss deleted file mode 100644 index 02e60700d49d81..00000000000000 --- a/src/plugins/discover/public/application/components/discover.scss +++ /dev/null @@ -1,105 +0,0 @@ -@import '../../../../../core/public/mixins'; - -discover-app { - flex-grow: 1; -} - -.dscPage { - @include euiBreakpoint('m', 'l', 'xl') { - @include kibanaFullBodyHeight(); - } - - flex-direction: column; - overflow: hidden; - padding: 0; - - .dscPageBody { - overflow: hidden; - } -} - -.dscPageBody__inner { - overflow: hidden; - height: 100%; -} - -.dscPageBody__contents { - overflow: hidden; - padding-top: $euiSizeXS / 2; // A little breathing room for the index pattern button -} - -.dscPageContent__wrapper { - padding: 0 $euiSize $euiSize 0; - overflow: hidden; // Ensures horizontal scroll of table - - @include euiBreakpoint('xs', 's') { - padding: 0 $euiSize $euiSize; - } -} - -.dscPageContent { - border: $euiBorderThin; -} - -.dscPageContent, -.dscPageContent__inner { - height: 100%; -} - -.dscPageContent--centered { - height: auto; -} - -.dscResultCount { - padding: $euiSizeS; - min-height: $euiSize * 3; - - @include euiBreakpoint('xs', 's') { - .dscResultCount__toggle { - align-items: flex-end; - } - - .dscResuntCount__title, - .dscResultCount__actions { - margin-bottom: 0 !important; - } - } -} - -.dscTimechart { - display: block; - position: relative; - - // SASSTODO: the visualizing component should have an option or a modifier - .series > rect { - fill-opacity: .5; - stroke-width: 1; - } -} - -.dscHistogram { - display: flex; - height: $euiSize * 12.5; - padding: $euiSizeS; -} - -// new slimmer layout for data grid -.dscHistogramGrid { - display: flex; - height: $euiSize * 8; - padding: $euiSizeS $euiSizeS 0 $euiSizeS; -} - -.dscTable { - // SASSTODO: add a monospace modifier to the doc-table component - .kbnDocTable__row { - font-family: $euiCodeFontFamily; - font-size: $euiFontSizeXS; - } -} - -.dscTable__footer { - background-color: $euiColorLightShade; - padding: $euiSizeXS $euiSizeS; - text-align: center; -} diff --git a/src/plugins/discover/public/application/components/discover.test.tsx b/src/plugins/discover/public/application/components/discover.test.tsx deleted file mode 100644 index d804d608704219..00000000000000 --- a/src/plugins/discover/public/application/components/discover.test.tsx +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React from 'react'; -import { shallowWithIntl } from '@kbn/test/jest'; -import { Discover } from './discover'; -import { esHits } from '../../__mocks__/es_hits'; -import { indexPatternMock } from '../../__mocks__/index_pattern'; -import { DiscoverServices } from '../../build_services'; -import { GetStateReturn } from '../angular/discover_state'; -import { savedSearchMock } from '../../__mocks__/saved_search'; -import { createSearchSourceMock } from '../../../../data/common/search/search_source/mocks'; -import { dataPluginMock } from '../../../../data/public/mocks'; -import { createFilterManagerMock } from '../../../../data/public/query/filter_manager/filter_manager.mock'; -import { uiSettingsMock as mockUiSettings } from '../../__mocks__/ui_settings'; -import { IndexPattern, IndexPatternAttributes } from '../../../../data/common/index_patterns'; -import { SavedObject } from '../../../../../core/types'; -import { navigationPluginMock } from '../../../../navigation/public/mocks'; -import { indexPatternWithTimefieldMock } from '../../__mocks__/index_pattern_with_timefield'; -import { calcFieldCounts } from '../helpers/calc_field_counts'; -import { DiscoverProps } from './types'; -import { RequestAdapter } from '../../../../inspector/common'; -import { Subject } from 'rxjs'; -import { DiscoverSearchSessionManager } from '../angular/discover_search_session'; - -const mockNavigation = navigationPluginMock.createStartContract(); - -jest.mock('../../kibana_services', () => { - return { - getServices: () => ({ - metadata: { - branch: 'test', - }, - capabilities: { - discover: { - save: true, - }, - }, - navigation: mockNavigation, - uiSettings: mockUiSettings, - }), - }; -}); - -function getProps(indexPattern: IndexPattern): DiscoverProps { - const searchSourceMock = createSearchSourceMock({}); - const services = ({ - capabilities: { - discover: { - save: true, - }, - }, - uiSettings: mockUiSettings, - } as unknown) as DiscoverServices; - - return { - fetch: jest.fn(), - fetchCounter: 0, - fetchError: undefined, - fetchStatus: 'loading', - fieldCounts: calcFieldCounts({}, esHits, indexPattern), - hits: esHits.length, - indexPattern, - minimumVisibleRows: 10, - onSkipBottomButtonClick: jest.fn(), - opts: { - config: mockUiSettings, - data: dataPluginMock.createStartContract(), - filterManager: createFilterManagerMock(), - getFieldCounts: jest.fn(), - indexPatternList: (indexPattern as unknown) as Array>, - inspectorAdapters: { requests: {} as RequestAdapter }, - navigateTo: jest.fn(), - refetch$: {} as Subject, - sampleSize: 10, - savedSearch: savedSearchMock, - searchSessionManager: {} as DiscoverSearchSessionManager, - setHeaderActionMenu: jest.fn(), - timefield: indexPattern.timeFieldName || '', - setAppState: jest.fn(), - services, - stateContainer: {} as GetStateReturn, - }, - resetQuery: jest.fn(), - resultState: 'ready', - rows: esHits, - searchSource: searchSourceMock, - state: { columns: [] }, - }; -} - -describe('Discover component', () => { - test('selected index pattern without time field displays no chart toggle', () => { - const component = shallowWithIntl(); - expect(component.find('[data-test-subj="discoverChartToggle"]').length).toBe(0); - }); - test('selected index pattern with time field displays chart toggle', () => { - const component = shallowWithIntl(); - expect(component.find('[data-test-subj="discoverChartToggle"]').length).toBe(1); - }); -}); diff --git a/src/plugins/discover/public/application/components/discover.tsx b/src/plugins/discover/public/application/components/discover.tsx deleted file mode 100644 index f962c56cc4690c..00000000000000 --- a/src/plugins/discover/public/application/components/discover.tsx +++ /dev/null @@ -1,462 +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 './discover.scss'; -import React, { useState, useRef, useMemo, useCallback, useEffect } from 'react'; -import { - EuiButtonEmpty, - EuiButtonIcon, - EuiFlexGroup, - EuiFlexItem, - EuiHideFor, - EuiHorizontalRule, - EuiPage, - EuiPageBody, - EuiPageContent, - EuiSpacer, -} from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import moment from 'moment'; -import { METRIC_TYPE } from '@kbn/analytics'; -import { FormattedMessage, I18nProvider } from '@kbn/i18n/react'; -import classNames from 'classnames'; -import { HitsCounter } from './hits_counter'; -import { TimechartHeader } from './timechart_header'; -import { DiscoverHistogram, DiscoverUninitialized } from '../angular/directives'; -import { DiscoverNoResults } from './no_results'; -import { LoadingSpinner } from './loading_spinner/loading_spinner'; -import { DocTableLegacy } from '../angular/doc_table/create_doc_table_react'; -import { esFilters, IndexPatternField, search } from '../../../../data/public'; -import { DiscoverSidebarResponsive } from './sidebar'; -import { DiscoverProps } from './types'; -import { SortPairArr } from '../angular/doc_table/lib/get_sort'; -import { - DOC_HIDE_TIME_COLUMN_SETTING, - DOC_TABLE_LEGACY, - SEARCH_FIELDS_FROM_SOURCE, -} from '../../../common'; -import { popularizeField } from '../helpers/popularize_field'; -import { DocViewFilterFn } from '../doc_views/doc_views_types'; -import { DiscoverGrid } from './discover_grid/discover_grid'; -import { DiscoverTopNav } from './discover_topnav'; -import { ElasticSearchHit } from '../doc_views/doc_views_types'; -import { setBreadcrumbsTitle } from '../helpers/breadcrumbs'; -import { addHelpMenuToAppChrome } from './help_menu/help_menu_util'; -import { InspectorSession } from '../../../../inspector/public'; -import { useDataGridColumns } from '../helpers/use_data_grid_columns'; - -const DocTableLegacyMemoized = React.memo(DocTableLegacy); -const SidebarMemoized = React.memo(DiscoverSidebarResponsive); -const DataGridMemoized = React.memo(DiscoverGrid); -const TopNavMemoized = React.memo(DiscoverTopNav); -const TimechartHeaderMemoized = React.memo(TimechartHeader); -const DiscoverHistogramMemoized = React.memo(DiscoverHistogram); - -export function Discover({ - fetch, - fetchCounter, - fetchError, - fieldCounts, - fetchStatus, - histogramData, - hits, - indexPattern, - minimumVisibleRows, - opts, - resetQuery, - resultState, - rows, - searchSource, - state, - unmappedFieldsConfig, - refreshAppState, -}: DiscoverProps) { - const [expandedDoc, setExpandedDoc] = useState(undefined); - const [inspectorSession, setInspectorSession] = useState(undefined); - const scrollableDesktop = useRef(null); - const collapseIcon = useRef(null); - const isMobile = () => { - // collapse icon isn't displayed in mobile view, use it to detect which view is displayed - return collapseIcon && !collapseIcon.current; - }; - const toggleHideChart = useCallback(() => { - const newState = { ...state, hideChart: !state.hideChart }; - opts.stateContainer.setAppState(newState); - }, [state, opts]); - const hideChart = useMemo(() => state.hideChart, [state]); - const { savedSearch, indexPatternList, config, services, data, setAppState } = opts; - const { trackUiMetric, capabilities, indexPatterns, chrome, docLinks } = services; - - const [isSidebarClosed, setIsSidebarClosed] = useState(false); - const bucketInterval = useMemo(() => { - const bucketAggConfig = opts.chartAggConfigs?.aggs[1]; - return bucketAggConfig && search.aggs.isDateHistogramBucketAggConfig(bucketAggConfig) - ? bucketAggConfig.buckets?.getInterval() - : undefined; - }, [opts.chartAggConfigs]); - - const contentCentered = resultState === 'uninitialized'; - const isLegacy = services.uiSettings.get(DOC_TABLE_LEGACY); - const useNewFieldsApi = !services.uiSettings.get(SEARCH_FIELDS_FROM_SOURCE); - const updateQuery = useCallback( - (_payload, isUpdate?: boolean) => { - if (isUpdate === false) { - opts.searchSessionManager.removeSearchSessionIdFromURL({ replace: false }); - opts.refetch$.next(); - } - }, - [opts] - ); - - const { columns, onAddColumn, onRemoveColumn, onMoveColumn, onSetColumns } = useDataGridColumns({ - capabilities, - config, - indexPattern, - indexPatterns, - setAppState, - state, - useNewFieldsApi, - }); - - useEffect(() => { - const pageTitleSuffix = savedSearch.id && savedSearch.title ? `: ${savedSearch.title}` : ''; - chrome.docTitle.change(`Discover${pageTitleSuffix}`); - - setBreadcrumbsTitle(savedSearch, chrome); - addHelpMenuToAppChrome(chrome, docLinks); - }, [savedSearch, chrome, docLinks]); - - const onOpenInspector = useCallback(() => { - // prevent overlapping - setExpandedDoc(undefined); - const session = services.inspector.open(opts.inspectorAdapters, { - title: savedSearch.title, - }); - setInspectorSession(session); - }, [setExpandedDoc, opts.inspectorAdapters, savedSearch, services.inspector]); - - useEffect(() => { - return () => { - if (inspectorSession) { - // Close the inspector if this scope is destroyed (e.g. because the user navigates away). - inspectorSession.close(); - } - }; - }, [inspectorSession]); - - const onSort = useCallback( - (sort: string[][]) => { - setAppState({ sort }); - }, - [setAppState] - ); - - const onAddFilter = useCallback( - (field: IndexPatternField | string, values: string, operation: '+' | '-') => { - const fieldName = typeof field === 'string' ? field : field.name; - popularizeField(indexPattern, fieldName, indexPatterns); - const newFilters = esFilters.generateFilters( - opts.filterManager, - field, - values, - operation, - String(indexPattern.id) - ); - if (trackUiMetric) { - trackUiMetric(METRIC_TYPE.CLICK, 'filter_added'); - } - return opts.filterManager.addFilters(newFilters); - }, - [opts, indexPattern, indexPatterns, trackUiMetric] - ); - - const onChangeInterval = useCallback( - (interval: string) => { - if (interval) { - setAppState({ interval }); - } - }, - [setAppState] - ); - - const timefilterUpdateHandler = useCallback( - (ranges: { from: number; to: number }) => { - data.query.timefilter.timefilter.setTime({ - from: moment(ranges.from).toISOString(), - to: moment(ranges.to).toISOString(), - mode: 'absolute', - }); - }, - [data] - ); - - const onBackToTop = useCallback(() => { - if (scrollableDesktop && scrollableDesktop.current) { - scrollableDesktop.current.focus(); - } - // Only the desktop one needs to target a specific container - if (!isMobile() && scrollableDesktop.current) { - scrollableDesktop.current.scrollTo(0, 0); - } else if (window) { - window.scrollTo(0, 0); - } - }, [scrollableDesktop]); - - const onResize = useCallback( - (colSettings: { columnId: string; width: number }) => { - const grid = { ...state.grid } || {}; - const newColumns = { ...grid.columns } || {}; - newColumns[colSettings.columnId] = { - width: colSettings.width, - }; - const newGrid = { ...grid, columns: newColumns }; - opts.setAppState({ grid: newGrid }); - }, - [opts, state] - ); - - const onEditRuntimeField = () => { - if (refreshAppState) { - refreshAppState(); - } - }; - - return ( - - - - -

- {savedSearch.title} -

- - - - - - -
- - setIsSidebarClosed(!isSidebarClosed)} - data-test-subj="collapseSideBarButton" - aria-controls="discover-sidebar" - aria-expanded={isSidebarClosed ? 'false' : 'true'} - aria-label={i18n.translate('discover.toggleSidebarAriaLabel', { - defaultMessage: 'Toggle sidebar', - })} - buttonRef={collapseIcon} - /> -
-
-
- - - {resultState === 'none' && ( - - )} - {resultState === 'uninitialized' && } - {resultState === 'loading' && } - {resultState === 'ready' && ( - - - - - 0 ? hits : 0} - showResetButton={!!(savedSearch && savedSearch.id)} - onResetQuery={resetQuery} - /> - - {!hideChart && ( - - - - )} - {opts.timefield && ( - - { - toggleHideChart(); - }} - data-test-subj="discoverChartToggle" - > - {!hideChart - ? i18n.translate('discover.hideChart', { - defaultMessage: 'Hide chart', - }) - : i18n.translate('discover.showChart', { - defaultMessage: 'Show chart', - })} - - - )} - - - {!hideChart && opts.timefield && ( - -
- {opts.chartAggConfigs && histogramData && rows.length !== 0 && ( -
- -
- )} -
- -
- )} - - - - -
-

- -

- {isLegacy && rows && rows.length && ( - - )} - {!isLegacy && rows && rows.length && ( -
- -
- )} -
-
-
- )} -
-
-
-
-
-
- ); -} diff --git a/src/plugins/discover/public/application/components/discover_grid/discover_grid.scss b/src/plugins/discover/public/application/components/discover_grid/discover_grid.scss index 053b405b90acb2..48b99458377ade 100644 --- a/src/plugins/discover/public/application/components/discover_grid/discover_grid.scss +++ b/src/plugins/discover/public/application/components/discover_grid/discover_grid.scss @@ -47,6 +47,9 @@ // We only truncate if the cell is not a control column. .euiDataGridHeader { + // This display property is temporary until https://github.com/elastic/eui/issues/4729 is resolved. + display: flex; + .euiDataGridHeaderCell__content { @include euiTextTruncate; overflow: hidden; diff --git a/src/plugins/discover/public/application/components/discover_topnav.test.tsx b/src/plugins/discover/public/application/components/discover_topnav.test.tsx deleted file mode 100644 index d30e5bda1abe7e..00000000000000 --- a/src/plugins/discover/public/application/components/discover_topnav.test.tsx +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React from 'react'; -import { mountWithIntl } from '@kbn/test/jest'; -import { indexPatternMock } from '../../__mocks__/index_pattern'; -import { DiscoverServices } from '../../build_services'; -import { GetStateReturn } from '../angular/discover_state'; -import { savedSearchMock } from '../../__mocks__/saved_search'; -import { dataPluginMock } from '../../../../data/public/mocks'; -import { createFilterManagerMock } from '../../../../data/public/query/filter_manager/filter_manager.mock'; -import { uiSettingsMock as mockUiSettings } from '../../__mocks__/ui_settings'; -import { IndexPatternAttributes } from '../../../../data/common/index_patterns'; -import { SavedObject } from '../../../../../core/types'; -import { DiscoverTopNav, DiscoverTopNavProps } from './discover_topnav'; -import { RequestAdapter } from '../../../../inspector/common/adapters/request'; -import { TopNavMenu } from '../../../../navigation/public'; -import { ISearchSource, Query } from '../../../../data/common'; -import { DiscoverSearchSessionManager } from '../angular/discover_search_session'; -import { Subject } from 'rxjs'; - -function getProps(): DiscoverTopNavProps { - const services = ({ - navigation: { - ui: { TopNavMenu }, - }, - capabilities: { - discover: { - save: true, - }, - advancedSettings: { - save: true, - }, - }, - uiSettings: mockUiSettings, - } as unknown) as DiscoverServices; - const indexPattern = indexPatternMock; - return { - indexPattern: indexPatternMock, - opts: { - config: mockUiSettings, - data: dataPluginMock.createStartContract(), - filterManager: createFilterManagerMock(), - getFieldCounts: jest.fn(), - indexPatternList: (indexPattern as unknown) as Array>, - inspectorAdapters: { requests: {} as RequestAdapter }, - navigateTo: jest.fn(), - refetch$: {} as Subject, - sampleSize: 10, - savedSearch: savedSearchMock, - searchSessionManager: {} as DiscoverSearchSessionManager, - services, - setAppState: jest.fn(), - setHeaderActionMenu: jest.fn(), - stateContainer: {} as GetStateReturn, - timefield: indexPattern.timeFieldName || '', - }, - query: {} as Query, - savedQuery: '', - updateQuery: jest.fn(), - onOpenInspector: jest.fn(), - searchSource: {} as ISearchSource, - }; -} - -describe('Discover topnav component', () => { - test('setHeaderActionMenu was called', () => { - const props = getProps(); - mountWithIntl(); - expect(props.opts.setHeaderActionMenu).toHaveBeenCalled(); - }); -}); diff --git a/src/plugins/discover/public/application/components/discover_topnav.tsx b/src/plugins/discover/public/application/components/discover_topnav.tsx deleted file mode 100644 index c5c0df6e6f74a1..00000000000000 --- a/src/plugins/discover/public/application/components/discover_topnav.tsx +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -import React, { useMemo } from 'react'; -import { DiscoverProps } from './types'; -import { getTopNavLinks } from './top_nav/get_top_nav_links'; -import { Query, TimeRange } from '../../../../data/common/query'; - -export type DiscoverTopNavProps = Pick & { - onOpenInspector: () => void; - query?: Query; - savedQuery?: string; - updateQuery: (payload: { dateRange: TimeRange; query?: Query }, isUpdate?: boolean) => void; -}; - -export const DiscoverTopNav = ({ - indexPattern, - opts, - onOpenInspector, - query, - savedQuery, - updateQuery, - searchSource, -}: DiscoverTopNavProps) => { - const showDatePicker = useMemo(() => indexPattern.isTimeBased(), [indexPattern]); - const { TopNavMenu } = opts.services.navigation.ui; - const topNavMenu = useMemo( - () => - getTopNavLinks({ - getFieldCounts: opts.getFieldCounts, - indexPattern, - navigateTo: opts.navigateTo, - savedSearch: opts.savedSearch, - services: opts.services, - state: opts.stateContainer, - onOpenInspector, - searchSource, - }), - [indexPattern, opts, onOpenInspector, searchSource] - ); - - const updateSavedQueryId = (newSavedQueryId: string | undefined) => { - const { appStateContainer, setAppState } = opts.stateContainer; - if (newSavedQueryId) { - setAppState({ savedQuery: newSavedQueryId }); - } else { - // remove savedQueryId from state - const newState = { - ...appStateContainer.getState(), - }; - delete newState.savedQuery; - appStateContainer.set(newState); - } - }; - return ( - - ); -}; diff --git a/src/plugins/discover/public/application/components/doc/use_es_doc_search.ts b/src/plugins/discover/public/application/components/doc/use_es_doc_search.ts index 6b8e912bbffba4..7a3320d43c8b51 100644 --- a/src/plugins/discover/public/application/components/doc/use_es_doc_search.ts +++ b/src/plugins/discover/public/application/components/doc/use_es_doc_search.ts @@ -33,7 +33,7 @@ export function buildSearchBody( useNewFieldsApi: boolean ): RequestBody | undefined { const computedFields = indexPattern.getComputedFields(); - const runtimeFields = computedFields.runtimeFields as estypes.RuntimeFields; + const runtimeFields = computedFields.runtimeFields as estypes.MappingRuntimeFields; const request: RequestBody = { body: { query: { diff --git a/src/plugins/discover/public/application/components/histogram/apply_aggs_to_search_source.test.ts b/src/plugins/discover/public/application/components/histogram/apply_aggs_to_search_source.test.ts deleted file mode 100644 index 5d2be533065e7a..00000000000000 --- a/src/plugins/discover/public/application/components/histogram/apply_aggs_to_search_source.test.ts +++ /dev/null @@ -1,89 +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 { indexPatternWithTimefieldMock } from '../../../__mocks__/index_pattern_with_timefield'; -import { SearchSource } from '../../../../../data/public'; -import { dataPluginMock } from '../../../../../data/public/mocks'; -import { applyAggsToSearchSource } from './apply_aggs_to_search_source'; - -describe('applyAggsToSearchSource', () => { - test('enabled = true', () => { - const indexPattern = indexPatternWithTimefieldMock; - const setField = jest.fn(); - const searchSource = ({ - setField, - removeField: jest.fn(), - } as unknown) as SearchSource; - - const dataMock = dataPluginMock.createStartContract(); - - const aggsConfig = applyAggsToSearchSource(true, searchSource, 'auto', indexPattern, dataMock); - - expect(aggsConfig!.aggs).toMatchInlineSnapshot(` - Array [ - Object { - "enabled": true, - "id": "1", - "params": Object {}, - "schema": "metric", - "type": "count", - }, - Object { - "enabled": true, - "id": "2", - "params": Object { - "drop_partials": false, - "extended_bounds": Object {}, - "field": "timestamp", - "interval": "auto", - "min_doc_count": 1, - "scaleMetricValues": false, - "useNormalizedEsInterval": true, - "used_interval": "0ms", - }, - "schema": "segment", - "type": "date_histogram", - }, - ] - `); - - expect(setField).toHaveBeenCalledWith('aggs', expect.any(Function)); - const dslFn = setField.mock.calls[0][1]; - expect(dslFn()).toMatchInlineSnapshot(` - Object { - "2": Object { - "date_histogram": Object { - "field": "timestamp", - "min_doc_count": 1, - "time_zone": "America/New_York", - }, - }, - } - `); - }); - - test('enabled = false', () => { - const indexPattern = indexPatternWithTimefieldMock; - const setField = jest.fn(); - const getField = jest.fn(() => { - return true; - }); - const removeField = jest.fn(); - const searchSource = ({ - getField, - setField, - removeField, - } as unknown) as SearchSource; - - const dataMock = dataPluginMock.createStartContract(); - - const aggsConfig = applyAggsToSearchSource(false, searchSource, 'auto', indexPattern, dataMock); - expect(aggsConfig).toBeFalsy(); - expect(getField).toHaveBeenCalledWith('aggs'); - expect(removeField).toHaveBeenCalledWith('aggs'); - }); -}); diff --git a/src/plugins/discover/public/application/components/histogram/apply_aggs_to_search_source.ts b/src/plugins/discover/public/application/components/histogram/apply_aggs_to_search_source.ts deleted file mode 100644 index c5fb366f81c8cd..00000000000000 --- a/src/plugins/discover/public/application/components/histogram/apply_aggs_to_search_source.ts +++ /dev/null @@ -1,50 +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 { IndexPattern, SearchSource } from '../../../../../data/common'; -import { DataPublicPluginStart } from '../../../../../data/public'; - -/** - * Helper function to apply or remove aggregations to a given search source used for gaining data - * for Discover's histogram vis - */ -export function applyAggsToSearchSource( - enabled: boolean, - searchSource: SearchSource, - histogramInterval: string, - indexPattern: IndexPattern, - data: DataPublicPluginStart -) { - if (!enabled) { - if (searchSource.getField('aggs')) { - // clean up fields in case it was set before - searchSource.removeField('aggs'); - } - return; - } - const visStateAggs = [ - { - type: 'count', - schema: 'metric', - }, - { - type: 'date_histogram', - schema: 'segment', - params: { - field: indexPattern.timeFieldName!, - interval: histogramInterval, - timeRange: data.query.timefilter.timefilter.getTime(), - }, - }, - ]; - const chartAggConfigs = data.search.aggs.createAggConfigs(indexPattern, visStateAggs); - - searchSource.setField('aggs', function () { - return chartAggConfigs.toDsl(); - }); - return chartAggConfigs; -} diff --git a/src/plugins/discover/public/application/components/histogram/get_dimensions.test.ts b/src/plugins/discover/public/application/components/histogram/get_dimensions.test.ts deleted file mode 100644 index ad7031f3319924..00000000000000 --- a/src/plugins/discover/public/application/components/histogram/get_dimensions.test.ts +++ /dev/null @@ -1,63 +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 { dataPluginMock } from '../../../../../data/public/mocks'; - -import { getDimensions } from './get_dimensions'; -import { indexPatternWithTimefieldMock } from '../../../__mocks__/index_pattern_with_timefield'; -import { SearchSource } from '../../../../../data/common/search/search_source'; -import { applyAggsToSearchSource } from './apply_aggs_to_search_source'; -import { calculateBounds } from '../../../../../data/common/query/timefilter'; - -test('getDimensions', () => { - const indexPattern = indexPatternWithTimefieldMock; - const setField = jest.fn(); - const searchSource = ({ - setField, - removeField: jest.fn(), - } as unknown) as SearchSource; - - const dataMock = dataPluginMock.createStartContract(); - dataMock.query.timefilter.timefilter.getTime = () => { - return { from: 'now-30y', to: 'now' }; - }; - dataMock.query.timefilter.timefilter.calculateBounds = (timeRange) => { - return calculateBounds(timeRange); - }; - - const aggsConfig = applyAggsToSearchSource(true, searchSource, 'auto', indexPattern, dataMock); - const actual = getDimensions(aggsConfig!, dataMock); - expect(actual).toMatchInlineSnapshot(` - Object { - "x": Object { - "accessor": 0, - "format": Object { - "id": "date", - "params": Object { - "pattern": "HH:mm:ss.SSS", - }, - }, - "label": "timestamp per 0 milliseconds", - "params": Object { - "bounds": undefined, - "date": true, - "format": "HH:mm:ss.SSS", - "interval": "P365D", - "intervalESUnit": "d", - "intervalESValue": 365, - }, - }, - "y": Object { - "accessor": 1, - "format": Object { - "id": "number", - }, - "label": "Count", - }, - } - `); -}); diff --git a/src/plugins/discover/public/application/components/histogram/get_dimensions.ts b/src/plugins/discover/public/application/components/histogram/get_dimensions.ts deleted file mode 100644 index 6743c1c8431b9b..00000000000000 --- a/src/plugins/discover/public/application/components/histogram/get_dimensions.ts +++ /dev/null @@ -1,52 +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 moment from 'moment'; -import dateMath from '@elastic/datemath'; -import { IAggConfigs, TimeRangeBounds } from '../../../../../data/common'; -import { DataPublicPluginStart, search } from '../../../../../data/public'; - -export function getDimensions(aggs: IAggConfigs, data: DataPublicPluginStart) { - const [metric, agg] = aggs.aggs; - const { from, to } = data.query.timefilter.timefilter.getTime(); - agg.params.timeRange = { - from: dateMath.parse(from), - to: dateMath.parse(to, { roundUp: true }), - }; - const bounds = agg.params.timeRange - ? data.query.timefilter.timefilter.calculateBounds(agg.params.timeRange) - : null; - const buckets = search.aggs.isDateHistogramBucketAggConfig(agg) ? agg.buckets : undefined; - - if (!buckets) { - return; - } - - buckets.setBounds(bounds as TimeRangeBounds); - - const { esUnit, esValue } = buckets.getInterval(); - return { - x: { - accessor: 0, - label: agg.makeLabel(), - format: agg.toSerializedFieldFormat(), - params: { - date: true, - interval: moment.duration(esValue, esUnit), - intervalESValue: esValue, - intervalESUnit: esUnit, - format: buckets.getScaledDateFormat(), - bounds: buckets.getBounds(), - }, - }, - y: { - accessor: 1, - format: metric.toSerializedFieldFormat(), - label: metric.makeLabel(), - }, - }; -} diff --git a/src/plugins/discover/public/application/components/histogram/index.ts b/src/plugins/discover/public/application/components/histogram/index.ts deleted file mode 100644 index 4af75de0a029d8..00000000000000 --- a/src/plugins/discover/public/application/components/histogram/index.ts +++ /dev/null @@ -1,10 +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. - */ - -export { applyAggsToSearchSource } from './apply_aggs_to_search_source'; -export { getDimensions } from './get_dimensions'; diff --git a/src/plugins/discover/public/application/components/sidebar/discover_index_pattern.tsx b/src/plugins/discover/public/application/components/sidebar/discover_index_pattern.tsx deleted file mode 100644 index 021d5a0252f7ca..00000000000000 --- a/src/plugins/discover/public/application/components/sidebar/discover_index_pattern.tsx +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React, { useState, useEffect, useCallback } from 'react'; -import { IUiSettingsClient, SavedObject } from 'kibana/public'; -import { - IndexPattern, - IndexPatternAttributes, - IndexPatternsContract, -} from 'src/plugins/data/public'; -import { I18nProvider } from '@kbn/i18n/react'; - -import { IndexPatternRef } from './types'; -import { ChangeIndexPattern } from './change_indexpattern'; -import { getSwitchIndexPatternAppState } from '../../helpers/get_switch_index_pattern_app_state'; -import { SortPairArr } from '../../angular/doc_table/lib/get_sort'; -import { MODIFY_COLUMNS_ON_SWITCH, SORT_DEFAULT_ORDER_SETTING } from '../../../../common'; -import { AppState } from '../../angular/discover_state'; -export interface DiscoverIndexPatternProps { - /** - * Client of uiSettings - */ - config: IUiSettingsClient; - /** - * list of available index patterns, if length > 1, component offers a "change" link - */ - indexPatternList: Array>; - /** - * Index patterns service - */ - indexPatterns: IndexPatternsContract; - /** - * currently selected index pattern, due to angular issues it's undefined at first rendering - */ - selectedIndexPattern: IndexPattern; - /** - * Function to set the current state - */ - setAppState: (state: Partial) => void; - /** - * Discover App state - */ - state: AppState; -} - -/** - * Component allows you to select an index pattern in discovers side bar - */ -export function DiscoverIndexPattern({ - config, - indexPatternList, - selectedIndexPattern, - indexPatterns, - state, - setAppState, -}: DiscoverIndexPatternProps) { - const options: IndexPatternRef[] = (indexPatternList || []).map((entity) => ({ - id: entity.id, - title: entity.attributes!.title, - })); - const { id: selectedId, title: selectedTitle } = selectedIndexPattern || {}; - - const setIndexPattern = useCallback( - async (id: string) => { - const nextIndexPattern = await indexPatterns.get(id); - if (nextIndexPattern && selectedIndexPattern) { - const nextAppState = getSwitchIndexPatternAppState( - selectedIndexPattern, - nextIndexPattern, - state.columns || [], - (state.sort || []) as SortPairArr[], - config.get(MODIFY_COLUMNS_ON_SWITCH), - config.get(SORT_DEFAULT_ORDER_SETTING) - ); - setAppState(nextAppState); - } - }, - [selectedIndexPattern, state, config, indexPatterns, setAppState] - ); - - const [selected, setSelected] = useState({ - id: selectedId, - title: selectedTitle || '', - }); - useEffect(() => { - const { id, title } = selectedIndexPattern; - setSelected({ id, title }); - }, [selectedIndexPattern]); - if (!selectedId) { - return null; - } - - return ( - - { - const indexPattern = options.find((pattern) => pattern.id === id); - if (indexPattern) { - setIndexPattern(id); - setSelected(indexPattern); - } - }} - /> - - ); -} diff --git a/src/plugins/discover/public/application/components/sidebar/discover_sidebar.test.tsx b/src/plugins/discover/public/application/components/sidebar/discover_sidebar.test.tsx deleted file mode 100644 index 35d93095a1da31..00000000000000 --- a/src/plugins/discover/public/application/components/sidebar/discover_sidebar.test.tsx +++ /dev/null @@ -1,141 +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 { each, cloneDeep } from 'lodash'; -import { ReactWrapper } from 'enzyme'; -import { findTestSubject } from '@elastic/eui/lib/test'; -// @ts-expect-error -import realHits from '../../../__fixtures__/real_hits.js'; -// @ts-expect-error -import stubbedLogstashFields from '../../../__fixtures__/logstash_fields'; -import { mountWithIntl } from '@kbn/test/jest'; -import React from 'react'; -import { DiscoverSidebarProps } from './discover_sidebar'; -import { coreMock } from '../../../../../../core/public/mocks'; -import { IndexPatternAttributes } from '../../../../../data/common'; -import { getStubIndexPattern } from '../../../../../data/public/test_utils'; -import { SavedObject } from '../../../../../../core/types'; -import { getDefaultFieldFilter } from './lib/field_filter'; -import { DiscoverSidebar } from './discover_sidebar'; -import { DiscoverServices } from '../../../build_services'; -import { ElasticSearchHit } from '../../doc_views/doc_views_types'; -import { configMock } from '../../../__mocks__/config'; -import { indexPatternsMock } from '../../../__mocks__/index_patterns'; - -const mockServices = ({ - history: () => ({ - location: { - search: '', - }, - }), - capabilities: { - visualize: { - show: true, - }, - discover: { - save: false, - }, - }, - uiSettings: { - get: (key: string) => { - if (key === 'fields:popularLimit') { - return 5; - } - }, - }, - indexPatternFieldEditor: { - openEditor: jest.fn(), - userPermissions: { - editIndexPattern: jest.fn(), - }, - }, -} as unknown) as DiscoverServices; - -jest.mock('../../../kibana_services', () => ({ - getServices: () => mockServices, -})); - -jest.mock('./lib/get_index_pattern_field_list', () => ({ - getIndexPatternFieldList: jest.fn((indexPattern) => indexPattern.fields), -})); - -function getCompProps(): DiscoverSidebarProps { - const indexPattern = getStubIndexPattern( - 'logstash-*', - (cfg: unknown) => cfg, - 'time', - stubbedLogstashFields(), - coreMock.createSetup() - ); - - // @ts-expect-error _.each() is passing additional args to flattenHit - const hits = (each(cloneDeep(realHits), indexPattern.flattenHit) as Array< - Record - >) as ElasticSearchHit[]; - - const indexPatternList = [ - { id: '0', attributes: { title: 'b' } } as SavedObject, - { id: '1', attributes: { title: 'a' } } as SavedObject, - { id: '2', attributes: { title: 'c' } } as SavedObject, - ]; - - const fieldCounts: Record = {}; - - for (const hit of hits) { - for (const key of Object.keys(indexPattern.flattenHit(hit))) { - fieldCounts[key] = (fieldCounts[key] || 0) + 1; - } - } - return { - config: configMock, - columns: ['extension'], - fieldCounts, - hits, - indexPatternList, - indexPatterns: indexPatternsMock, - onAddFilter: jest.fn(), - onAddField: jest.fn(), - onRemoveField: jest.fn(), - selectedIndexPattern: indexPattern, - services: mockServices, - state: {}, - trackUiMetric: jest.fn(), - fieldFilter: getDefaultFieldFilter(), - setFieldFilter: jest.fn(), - setAppState: jest.fn(), - onEditRuntimeField: jest.fn(), - editField: jest.fn(), - }; -} - -describe('discover sidebar', function () { - let props: DiscoverSidebarProps; - let comp: ReactWrapper; - - beforeAll(() => { - props = getCompProps(); - comp = mountWithIntl(); - }); - - it('should have Selected Fields and Available Fields with Popular Fields sections', function () { - const popular = findTestSubject(comp, 'fieldList-popular'); - const selected = findTestSubject(comp, 'fieldList-selected'); - const unpopular = findTestSubject(comp, 'fieldList-unpopular'); - expect(popular.children().length).toBe(1); - expect(unpopular.children().length).toBe(7); - expect(selected.children().length).toBe(1); - }); - it('should allow selecting fields', function () { - findTestSubject(comp, 'fieldToggle-bytes').simulate('click'); - expect(props.onAddField).toHaveBeenCalledWith('bytes'); - }); - it('should allow deselecting fields', function () { - findTestSubject(comp, 'fieldToggle-extension').simulate('click'); - expect(props.onRemoveField).toHaveBeenCalledWith('extension'); - }); -}); diff --git a/src/plugins/discover/public/application/components/table/table.tsx b/src/plugins/discover/public/application/components/table/table.tsx index 093b445267241b..7a100d24c386e0 100644 --- a/src/plugins/discover/public/application/components/table/table.tsx +++ b/src/plugins/discover/public/application/components/table/table.tsx @@ -10,7 +10,7 @@ import React, { useState, useEffect, useCallback } from 'react'; import { i18n } from '@kbn/i18n'; import { DocViewTableRow } from './table_row'; import { trimAngularSpan } from './table_helper'; -import { isNestedFieldParent } from '../../helpers/nested_fields'; +import { isNestedFieldParent } from '../../apps/main/utils/nested_fields'; import { DocViewRenderProps } from '../../doc_views/doc_views_types'; const COLLAPSE_LINE_LENGTH = 350; diff --git a/src/plugins/discover/public/application/components/top_nav/on_save_search.test.tsx b/src/plugins/discover/public/application/components/top_nav/on_save_search.test.tsx deleted file mode 100644 index ed79d16fd5ff1c..00000000000000 --- a/src/plugins/discover/public/application/components/top_nav/on_save_search.test.tsx +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 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 { showSaveModal } from '../../../../../saved_objects/public'; -jest.mock('../../../../../saved_objects/public'); - -import { onSaveSearch } from './on_save_search'; -import { indexPatternMock } from '../../../__mocks__/index_pattern'; -import { savedSearchMock } from '../../../__mocks__/saved_search'; -import { DiscoverServices } from '../../../build_services'; -import { GetStateReturn } from '../../angular/discover_state'; -import { i18nServiceMock } from '../../../../../../core/public/mocks'; - -test('onSaveSearch', async () => { - const serviceMock = ({ - core: { - i18n: i18nServiceMock.create(), - }, - } as unknown) as DiscoverServices; - const stateMock = ({} as unknown) as GetStateReturn; - - await onSaveSearch({ - indexPattern: indexPatternMock, - navigateTo: jest.fn(), - savedSearch: savedSearchMock, - services: serviceMock, - state: stateMock, - }); - - expect(showSaveModal).toHaveBeenCalled(); -}); diff --git a/src/plugins/discover/public/application/components/types.ts b/src/plugins/discover/public/application/components/types.ts deleted file mode 100644 index 93620bc1d6bca5..00000000000000 --- a/src/plugins/discover/public/application/components/types.ts +++ /dev/null @@ -1,172 +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 { IUiSettingsClient, MountPoint, SavedObject } from 'kibana/public'; -import { Subject } from 'rxjs'; -import { Chart } from '../angular/helpers/point_series'; -import { IndexPattern } from '../../../../data/common/index_patterns/index_patterns'; -import { ElasticSearchHit } from '../doc_views/doc_views_types'; -import { AggConfigs } from '../../../../data/common/search/aggs'; - -import { - DataPublicPluginStart, - FilterManager, - IndexPatternAttributes, - ISearchSource, -} from '../../../../data/public'; -import { SavedSearch } from '../../saved_searches'; -import { AppState, GetStateReturn } from '../angular/discover_state'; -import { RequestAdapter } from '../../../../inspector/common'; -import { DiscoverServices } from '../../build_services'; -import { DiscoverSearchSessionManager } from '../angular/discover_search_session'; - -export interface DiscoverProps { - /** - * Function to fetch documents from Elasticsearch - */ - fetch: () => void; - /** - * Counter how often data was fetched (used for testing) - */ - fetchCounter: number; - /** - * Error in case of a failing document fetch - */ - fetchError?: Error; - /** - * Statistics by fields calculated using the fetched documents - */ - fieldCounts: Record; - /** - * Current state of data fetching - */ - fetchStatus: string; - /** - * Histogram aggregation data - */ - histogramData?: Chart; - /** - * Number of documents found by recent fetch - */ - hits: number; - /** - * Current IndexPattern - */ - indexPattern: IndexPattern; - /** - * Value needed for legacy "infinite" loading functionality - * Determins how much records are rendered using the legacy table - * Increased when scrolling down - */ - minimumVisibleRows: number; - /** - * Function to scroll down the legacy table to the bottom - */ - onSkipBottomButtonClick: () => void; - opts: { - /** - * Date histogram aggregation config - */ - chartAggConfigs?: AggConfigs; - /** - * Client of uiSettings - */ - config: IUiSettingsClient; - /** - * returns field statistics based on the loaded data sample - */ - getFieldCounts: () => Promise>; - /** - * Use angular router for navigation - */ - navigateTo: () => void; - /** - * Inspect, for analyzing requests and responses - */ - inspectorAdapters: { requests: RequestAdapter }; - /** - * Data plugin - */ - data: DataPublicPluginStart; - /** - * Data plugin filter manager - */ - filterManager: FilterManager; - /** - * List of available index patterns - */ - indexPatternList: Array>; - /** - * Refetch observable - */ - refetch$: Subject; - /** - * Kibana core services used by discover - */ - services: DiscoverServices; - /** - * Helps with state management of search session - */ - searchSessionManager: DiscoverSearchSessionManager; - /** - * The number of documents that can be displayed in the table/grid - */ - sampleSize: number; - /** - * Current instance of SavedSearch - */ - savedSearch: SavedSearch; - /** - * Function to set the header menu - */ - setHeaderActionMenu: (menuMount: MountPoint | undefined) => void; - /** - * Timefield of the currently used index pattern - */ - timefield: string; - /** - * Function to set the current state - */ - setAppState: (state: Partial) => void; - /** - * State container providing globalState, appState and functions - */ - stateContainer: GetStateReturn; - }; - /** - * Function to reset the current query - */ - resetQuery: () => void; - /** - * Current state of the actual query, one of 'uninitialized', 'loading' ,'ready', 'none' - */ - resultState: string; - /** - * Array of document of the recent successful search request - */ - rows: ElasticSearchHit[]; - /** - * Instance of SearchSource, the high level search API - */ - searchSource: ISearchSource; - /** - * Current app state of URL - */ - state: AppState; - /** - * An object containing properties for unmapped fields behavior - */ - unmappedFieldsConfig?: { - /** - * determines whether to display unmapped fields - */ - showUnmappedFields: boolean; - }; - - refreshAppState?: () => void; -} diff --git a/src/plugins/discover/public/application/helpers/columns.test.ts b/src/plugins/discover/public/application/helpers/columns.test.ts index df3884ab98bcff..6b6125193b5f37 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 426059060f329b..6e77717c5cf054 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/discover/public/application/helpers/get_result_state.test.ts b/src/plugins/discover/public/application/helpers/get_result_state.test.ts deleted file mode 100644 index 98e2b854ca5abe..00000000000000 --- a/src/plugins/discover/public/application/helpers/get_result_state.test.ts +++ /dev/null @@ -1,45 +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 { getResultState, resultStatuses } from './get_result_state'; -import { fetchStatuses } from '../components/constants'; -import { ElasticSearchHit } from '../doc_views/doc_views_types'; - -describe('getResultState', () => { - test('fetching uninitialized', () => { - const actual = getResultState(fetchStatuses.UNINITIALIZED, []); - expect(actual).toBe(resultStatuses.UNINITIALIZED); - }); - - test('fetching complete with no records', () => { - const actual = getResultState(fetchStatuses.COMPLETE, []); - expect(actual).toBe(resultStatuses.NO_RESULTS); - }); - - test('fetching ongoing aka loading', () => { - const actual = getResultState(fetchStatuses.LOADING, []); - expect(actual).toBe(resultStatuses.LOADING); - }); - - test('fetching ready', () => { - const record = ({ _id: 123 } as unknown) as ElasticSearchHit; - const actual = getResultState(fetchStatuses.COMPLETE, [record]); - expect(actual).toBe(resultStatuses.READY); - }); - - test('re-fetching after already data is available', () => { - const record = ({ _id: 123 } as unknown) as ElasticSearchHit; - const actual = getResultState(fetchStatuses.LOADING, [record]); - expect(actual).toBe(resultStatuses.READY); - }); - - test('after a fetch error when data was successfully fetched before ', () => { - const record = ({ _id: 123 } as unknown) as ElasticSearchHit; - const actual = getResultState(fetchStatuses.ERROR, [record]); - expect(actual).toBe(resultStatuses.READY); - }); -}); diff --git a/src/plugins/discover/public/application/helpers/get_result_state.ts b/src/plugins/discover/public/application/helpers/get_result_state.ts deleted file mode 100644 index 6f69832f369fd1..00000000000000 --- a/src/plugins/discover/public/application/helpers/get_result_state.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 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 { ElasticSearchHit } from '../doc_views/doc_views_types'; -import { fetchStatuses } from '../components/constants'; - -export const resultStatuses = { - UNINITIALIZED: 'uninitialized', - LOADING: 'loading', // initial data load - READY: 'ready', // results came back - NO_RESULTS: 'none', // no results came back -}; - -/** - * Returns the current state of the result, depends on fetchStatus and the given fetched rows - * Determines what is displayed in Discover main view (loading view, data view, empty data view, ...) - */ -export function getResultState(fetchStatus: string, rows: ElasticSearchHit[]) { - if (fetchStatus === fetchStatuses.UNINITIALIZED) { - return resultStatuses.UNINITIALIZED; - } - - const rowsEmpty = !Array.isArray(rows) || rows.length === 0; - if (rowsEmpty && fetchStatus === fetchStatuses.LOADING) return resultStatuses.LOADING; - else if (!rowsEmpty) return resultStatuses.READY; - else return resultStatuses.NO_RESULTS; -} diff --git a/src/plugins/discover/public/application/helpers/get_state_defaults.test.ts b/src/plugins/discover/public/application/helpers/get_state_defaults.test.ts deleted file mode 100644 index 7ce5b9286c775c..00000000000000 --- a/src/plugins/discover/public/application/helpers/get_state_defaults.test.ts +++ /dev/null @@ -1,65 +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 { getStateDefaults } from './get_state_defaults'; -import { createSearchSourceMock, dataPluginMock } from '../../../../data/public/mocks'; -import { uiSettingsMock } from '../../__mocks__/ui_settings'; -import { indexPatternWithTimefieldMock } from '../../__mocks__/index_pattern_with_timefield'; -import { savedSearchMock } from '../../__mocks__/saved_search'; -import { indexPatternMock } from '../../__mocks__/index_pattern'; - -describe('getStateDefaults', () => { - test('index pattern with timefield', () => { - const actual = getStateDefaults({ - config: uiSettingsMock, - data: dataPluginMock.createStartContract(), - indexPattern: indexPatternWithTimefieldMock, - savedSearch: savedSearchMock, - searchSource: createSearchSourceMock({ index: indexPatternWithTimefieldMock }), - }); - expect(actual).toMatchInlineSnapshot(` - Object { - "columns": Array [ - "default_column", - ], - "filters": undefined, - "index": "index-pattern-with-timefield-id", - "interval": "auto", - "query": undefined, - "sort": Array [ - Array [ - "timestamp", - "desc", - ], - ], - } - `); - }); - - test('index pattern without timefield', () => { - const actual = getStateDefaults({ - config: uiSettingsMock, - data: dataPluginMock.createStartContract(), - indexPattern: indexPatternMock, - savedSearch: savedSearchMock, - searchSource: createSearchSourceMock({ index: indexPatternMock }), - }); - expect(actual).toMatchInlineSnapshot(` - Object { - "columns": Array [ - "default_column", - ], - "filters": undefined, - "index": "the-index-pattern-id", - "interval": "auto", - "query": undefined, - "sort": Array [], - } - `); - }); -}); diff --git a/src/plugins/discover/public/application/helpers/get_state_defaults.ts b/src/plugins/discover/public/application/helpers/get_state_defaults.ts deleted file mode 100644 index 3e012a1f85fd6b..00000000000000 --- a/src/plugins/discover/public/application/helpers/get_state_defaults.ts +++ /dev/null @@ -1,62 +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 { cloneDeep } from 'lodash'; -import { IUiSettingsClient } from 'kibana/public'; -import { DEFAULT_COLUMNS_SETTING, SORT_DEFAULT_ORDER_SETTING } from '../../../common'; -import { getSortArray } from '../angular/doc_table'; -import { getDefaultSort } from '../angular/doc_table/lib/get_default_sort'; -import { SavedSearch } from '../../saved_searches'; -import { SearchSource } from '../../../../data/common/search/search_source'; -import { DataPublicPluginStart, IndexPattern } from '../../../../data/public'; - -import { AppState } from '../angular/discover_state'; - -function getDefaultColumns(savedSearch: SavedSearch, config: IUiSettingsClient) { - if (savedSearch.columns && savedSearch.columns.length > 0) { - return [...savedSearch.columns]; - } - return [...config.get(DEFAULT_COLUMNS_SETTING)]; -} - -export function getStateDefaults({ - config, - data, - indexPattern, - savedSearch, - searchSource, -}: { - config: IUiSettingsClient; - data: DataPublicPluginStart; - indexPattern: IndexPattern; - savedSearch: SavedSearch; - searchSource: SearchSource; -}) { - const query = searchSource.getField('query') || data.query.queryString.getDefaultQuery(); - const sort = getSortArray(savedSearch.sort, indexPattern); - const columns = getDefaultColumns(savedSearch, config); - - const defaultState = { - query, - sort: !sort.length - ? getDefaultSort(indexPattern, config.get(SORT_DEFAULT_ORDER_SETTING, 'desc')) - : sort, - columns, - index: indexPattern.id, - interval: 'auto', - filters: cloneDeep(searchSource.getOwnField('filter')), - } as AppState; - if (savedSearch.grid) { - defaultState.grid = savedSearch.grid; - } - if (savedSearch.hideChart) { - defaultState.hideChart = savedSearch.hideChart; - } - - return defaultState; -} diff --git a/src/plugins/discover/public/application/helpers/update_search_source.test.ts b/src/plugins/discover/public/application/helpers/update_search_source.test.ts deleted file mode 100644 index d4e52c4e7d4fe8..00000000000000 --- a/src/plugins/discover/public/application/helpers/update_search_source.test.ts +++ /dev/null @@ -1,169 +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 { updateSearchSource } from './update_search_source'; -import { createSearchSourceMock } from '../../../../data/common/search/search_source/mocks'; -import { indexPatternMock } from '../../__mocks__/index_pattern'; -import { IUiSettingsClient } from 'kibana/public'; -import { DiscoverServices } from '../../build_services'; -import { dataPluginMock } from '../../../../data/public/mocks'; -import { SAMPLE_SIZE_SETTING } from '../../../common'; -import { SortOrder } from '../../saved_searches/types'; - -describe('updateSearchSource', () => { - test('updates a given search source', async () => { - const persistentSearchSourceMock = createSearchSourceMock({}); - const volatileSearchSourceMock = createSearchSourceMock({}); - const sampleSize = 250; - updateSearchSource({ - persistentSearchSource: persistentSearchSourceMock, - volatileSearchSource: volatileSearchSourceMock, - indexPattern: indexPatternMock, - services: ({ - data: dataPluginMock.createStartContract(), - uiSettings: ({ - get: (key: string) => { - if (key === SAMPLE_SIZE_SETTING) { - return sampleSize; - } - return false; - }, - } as unknown) as IUiSettingsClient, - } as unknown) as DiscoverServices, - sort: [] as SortOrder[], - columns: [], - useNewFieldsApi: false, - }); - expect(persistentSearchSourceMock.getField('index')).toEqual(indexPatternMock); - expect(volatileSearchSourceMock.getField('size')).toEqual(sampleSize); - expect(volatileSearchSourceMock.getField('fields')).toBe(undefined); - }); - - test('updates a given search source with the usage of the new fields api', async () => { - const persistentSearchSourceMock = createSearchSourceMock({}); - const volatileSearchSourceMock = createSearchSourceMock({}); - const sampleSize = 250; - updateSearchSource({ - persistentSearchSource: persistentSearchSourceMock, - volatileSearchSource: volatileSearchSourceMock, - indexPattern: indexPatternMock, - services: ({ - data: dataPluginMock.createStartContract(), - uiSettings: ({ - get: (key: string) => { - if (key === SAMPLE_SIZE_SETTING) { - return sampleSize; - } - return false; - }, - } as unknown) as IUiSettingsClient, - } as unknown) as DiscoverServices, - sort: [] as SortOrder[], - columns: [], - useNewFieldsApi: true, - }); - expect(persistentSearchSourceMock.getField('index')).toEqual(indexPatternMock); - expect(volatileSearchSourceMock.getField('size')).toEqual(sampleSize); - expect(volatileSearchSourceMock.getField('fields')).toEqual([{ field: '*' }]); - expect(volatileSearchSourceMock.getField('fieldsFromSource')).toBe(undefined); - }); - - test('requests unmapped fields when the flag is provided, using the new fields api', async () => { - const persistentSearchSourceMock = createSearchSourceMock({}); - const volatileSearchSourceMock = createSearchSourceMock({}); - const sampleSize = 250; - updateSearchSource({ - persistentSearchSource: persistentSearchSourceMock, - volatileSearchSource: volatileSearchSourceMock, - indexPattern: indexPatternMock, - services: ({ - data: dataPluginMock.createStartContract(), - uiSettings: ({ - get: (key: string) => { - if (key === SAMPLE_SIZE_SETTING) { - return sampleSize; - } - return false; - }, - } as unknown) as IUiSettingsClient, - } as unknown) as DiscoverServices, - sort: [] as SortOrder[], - columns: [], - useNewFieldsApi: true, - showUnmappedFields: true, - }); - expect(persistentSearchSourceMock.getField('index')).toEqual(indexPatternMock); - expect(volatileSearchSourceMock.getField('size')).toEqual(sampleSize); - expect(volatileSearchSourceMock.getField('fields')).toEqual([ - { field: '*', include_unmapped: 'true' }, - ]); - expect(volatileSearchSourceMock.getField('fieldsFromSource')).toBe(undefined); - }); - - test('updates a given search source when showUnmappedFields option is set to true', async () => { - const persistentSearchSourceMock = createSearchSourceMock({}); - const volatileSearchSourceMock = createSearchSourceMock({}); - const sampleSize = 250; - updateSearchSource({ - persistentSearchSource: persistentSearchSourceMock, - volatileSearchSource: volatileSearchSourceMock, - indexPattern: indexPatternMock, - services: ({ - data: dataPluginMock.createStartContract(), - uiSettings: ({ - get: (key: string) => { - if (key === SAMPLE_SIZE_SETTING) { - return sampleSize; - } - return false; - }, - } as unknown) as IUiSettingsClient, - } as unknown) as DiscoverServices, - sort: [] as SortOrder[], - columns: [], - useNewFieldsApi: true, - showUnmappedFields: true, - }); - expect(persistentSearchSourceMock.getField('index')).toEqual(indexPatternMock); - expect(volatileSearchSourceMock.getField('size')).toEqual(sampleSize); - expect(volatileSearchSourceMock.getField('fields')).toEqual([ - { field: '*', include_unmapped: 'true' }, - ]); - expect(volatileSearchSourceMock.getField('fieldsFromSource')).toBe(undefined); - }); - - test('does not explicitly request fieldsFromSource when not using fields API', async () => { - const persistentSearchSourceMock = createSearchSourceMock({}); - const volatileSearchSourceMock = createSearchSourceMock({}); - const sampleSize = 250; - updateSearchSource({ - persistentSearchSource: persistentSearchSourceMock, - volatileSearchSource: volatileSearchSourceMock, - indexPattern: indexPatternMock, - services: ({ - data: dataPluginMock.createStartContract(), - uiSettings: ({ - get: (key: string) => { - if (key === SAMPLE_SIZE_SETTING) { - return sampleSize; - } - return false; - }, - } as unknown) as IUiSettingsClient, - } as unknown) as DiscoverServices, - sort: [] as SortOrder[], - columns: [], - useNewFieldsApi: false, - showUnmappedFields: false, - }); - expect(persistentSearchSourceMock.getField('index')).toEqual(indexPatternMock); - expect(volatileSearchSourceMock.getField('size')).toEqual(sampleSize); - expect(volatileSearchSourceMock.getField('fields')).toEqual(undefined); - expect(volatileSearchSourceMock.getField('fieldsFromSource')).toBe(undefined); - }); -}); diff --git a/src/plugins/discover/public/application/helpers/update_search_source.ts b/src/plugins/discover/public/application/helpers/update_search_source.ts deleted file mode 100644 index 07529ac8cb0d68..00000000000000 --- a/src/plugins/discover/public/application/helpers/update_search_source.ts +++ /dev/null @@ -1,70 +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 { getSortForSearchSource } from '../angular/doc_table'; -import { SAMPLE_SIZE_SETTING, SORT_DEFAULT_ORDER_SETTING } from '../../../common'; -import { IndexPattern, ISearchSource } from '../../../../data/common/'; -import { SortOrder } from '../../saved_searches/types'; -import { DiscoverServices } from '../../build_services'; - -/** - * Helper function to update the given searchSource before fetching/sharing/persisting - */ -export function updateSearchSource({ - indexPattern, - services, - sort, - columns, - useNewFieldsApi, - showUnmappedFields, - persistentSearchSource, - volatileSearchSource, -}: { - indexPattern: IndexPattern; - services: DiscoverServices; - sort: SortOrder[]; - columns: string[]; - useNewFieldsApi: boolean; - showUnmappedFields?: boolean; - persistentSearchSource: ISearchSource; - volatileSearchSource?: ISearchSource; -}) { - const { uiSettings, data } = services; - const usedSort = getSortForSearchSource( - sort, - indexPattern, - uiSettings.get(SORT_DEFAULT_ORDER_SETTING) - ); - - persistentSearchSource - .setField('index', indexPattern) - .setField('query', data.query.queryString.getQuery() || null) - .setField('filter', data.query.filterManager.getFilters()); - - if (volatileSearchSource) { - volatileSearchSource - .setField('size', uiSettings.get(SAMPLE_SIZE_SETTING)) - .setField('sort', usedSort) - .setField('highlightAll', true) - .setField('version', true) - // Even when searching rollups, we want to use the default strategy so that we get back a - // document-like response. - .setPreferredSearchStrategyId('default'); - - if (useNewFieldsApi) { - volatileSearchSource.removeField('fieldsFromSource'); - const fields: Record = { field: '*' }; - if (showUnmappedFields) { - fields.include_unmapped = 'true'; - } - volatileSearchSource.setField('fields', [fields]); - } else { - volatileSearchSource.removeField('fields'); - } - } -} diff --git a/src/plugins/discover/public/application/helpers/use_data_grid_columns.ts b/src/plugins/discover/public/application/helpers/use_data_grid_columns.ts index c913b9abd1b433..418cbf6eac9cdb 100644 --- a/src/plugins/discover/public/application/helpers/use_data_grid_columns.ts +++ b/src/plugins/discover/public/application/helpers/use_data_grid_columns.ts @@ -13,7 +13,7 @@ import { IndexPattern, IndexPatternsContract } from '../../kibana_services'; import { AppState as DiscoverState, GetStateReturn as DiscoverGetStateReturn, -} from '../angular/discover_state'; +} from '../apps/main/services/discover_state'; import { AppState as ContextState, GetStateReturn as ContextGetStateReturn, diff --git a/src/plugins/discover/public/application/types.ts b/src/plugins/discover/public/application/types.ts new file mode 100644 index 00000000000000..4d7f47182e98a3 --- /dev/null +++ b/src/plugins/discover/public/application/types.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 enum FetchStatus { + UNINITIALIZED = 'uninitialized', + LOADING = 'loading', + COMPLETE = 'complete', + ERROR = 'error', +} diff --git a/src/plugins/discover/public/build_services.ts b/src/plugins/discover/public/build_services.ts index 19ee06aa517985..b42bf6a81742c6 100644 --- a/src/plugins/discover/public/build_services.ts +++ b/src/plugins/discover/public/build_services.ts @@ -56,7 +56,7 @@ export interface DiscoverServices { urlForwarding: UrlForwardingStart; timefilter: TimefilterContract; toastNotifications: ToastsStart; - getSavedSearchById: (id: string) => Promise; + getSavedSearchById: (id?: string) => Promise; getSavedSearchUrlById: (id: string) => Promise; getEmbeddableInjector: () => Promise; uiSettings: IUiSettingsClient; @@ -87,7 +87,7 @@ export async function buildServices( theme: plugins.charts.theme, filterManager: plugins.data.query.filterManager, getEmbeddableInjector, - getSavedSearchById: async (id: string) => savedObjectService.get(id), + getSavedSearchById: async (id?: string) => savedObjectService.get(id), getSavedSearchUrlById: async (id: string) => savedObjectService.urlFor(id), history: getHistory, indexPatterns: plugins.data.indexPatterns, diff --git a/src/plugins/discover/public/plugin.tsx b/src/plugins/discover/public/plugin.tsx index 3f55ab76372bc4..139b23d28a1d43 100644 --- a/src/plugins/discover/public/plugin.tsx +++ b/src/plugins/discover/public/plugin.tsx @@ -329,7 +329,7 @@ export class DiscoverPlugin return; } // this is used by application mount and tests - const { getInnerAngularModule } = await import('./get_inner_angular'); + const { getInnerAngularModule } = await import('./application/angular/get_inner_angular'); const module = getInnerAngularModule( innerAngularName, core, @@ -400,7 +400,9 @@ export class DiscoverPlugin } const { core, plugins } = await this.initializeServices(); getServices().kibanaLegacy.loadFontAwesome(); - const { getInnerAngularModuleEmbeddable } = await import('./get_inner_angular'); + const { getInnerAngularModuleEmbeddable } = await import( + './application/angular/get_inner_angular' + ); getInnerAngularModuleEmbeddable(embeddableAngularName, core, plugins); const mountpoint = document.createElement('div'); this.embeddableInjector = angular.bootstrap(mountpoint, [embeddableAngularName]); diff --git a/src/plugins/discover/public/shared/index.ts b/src/plugins/discover/public/shared/index.ts index b1e4d9d87000ec..c82ac074db1114 100644 --- a/src/plugins/discover/public/shared/index.ts +++ b/src/plugins/discover/public/shared/index.ts @@ -10,5 +10,5 @@ * Allows the getSharingData function to be lazy loadable */ export async function loadSharingDataHelpers() { - return await import('../application/helpers/get_sharing_data'); + return await import('../application/apps/main/utils/get_sharing_data'); } diff --git a/src/plugins/discover/public/url_generator.ts b/src/plugins/discover/public/url_generator.ts index 21bdbf225d6aa5..63dea20fecc0a1 100644 --- a/src/plugins/discover/public/url_generator.ts +++ b/src/plugins/discover/public/url_generator.ts @@ -6,16 +6,10 @@ * Side Public License, v 1. */ -import { - TimeRange, - Filter, - Query, - esFilters, - QueryState, - RefreshInterval, -} from '../../data/public'; +import type { UrlGeneratorsDefinition } from '../../share/public'; +import type { TimeRange, Filter, Query, QueryState, RefreshInterval } from '../../data/public'; +import { esFilters } from '../../data/public'; import { setStateToKbnUrl } from '../../kibana_utils/public'; -import { UrlGeneratorsDefinition } from '../../share/public'; export const DISCOVER_APP_URL_GENERATOR = 'DISCOVER_APP_URL_GENERATOR'; @@ -71,10 +65,12 @@ export interface DiscoverUrlGeneratorState { * Used interval of the histogram */ interval?: string; + /** * Array of the used sorting [[field,direction],...] */ sort?: string[][]; + /** * id of the used saved query */ diff --git a/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx b/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx index 3e6d28e0664698..9eb743a3911c2c 100644 --- a/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx +++ b/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { get } from 'lodash'; +import { get, omit } from 'lodash'; import { I18nStart, NotificationsStart } from 'src/core/public'; import { SavedObjectSaveModal, OnSaveProps, SaveResult } from '../../../../saved_objects/public'; import { @@ -150,12 +150,10 @@ export class AttributeService< const wrappedInput = (await this.wrapAttributes(newAttributes, true)) as RefType; // Remove unneeded attributes from the original input. - delete (input as { [ATTRIBUTE_SERVICE_KEY]?: SavedObjectAttributes })[ - ATTRIBUTE_SERVICE_KEY - ]; + const newInput = omit(input, ATTRIBUTE_SERVICE_KEY); // Combine input and wrapped input to preserve any passed in explicit Input. - resolve({ ...input, ...wrappedInput }); + resolve({ ...newInput, ...wrappedInput }); return { id: wrappedInput.savedObjectId }; } catch (error) { reject(error); 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 96f78a088fff49..bacab18d285095 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 83ac96f6c1695b..5a9f4eb8711816 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 08a5f22723628c..e6aa87172ca0b7 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 77ba2f734d3fea..7fd5170b669f7c 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 3348f5eb052eb7..5c6adc824d225e 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 f0da57a5f9b6f3..b05ddaed064cdc 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 645694371f9059..1310488c65fab8 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 438eb8a031993f..240e732752916c 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 94611705a93908..726c055d1b8c34 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 355f529fe0f759..ec5b7c74020a5a 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 3462131e50463b..6c709fb14f08d7 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 ed92172c8b91ca..e3c156927bface 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 c6b2f3c4b6b27a..aeb38c8172be02 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 1eaab2eaccc111..00000000000000 --- 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 9e571374b4784f..00000000000000 --- 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 7bf0c1eb52068a..00000000000000 --- 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/environment/index.ts b/src/plugins/index_pattern_management/public/service/environment/index.ts deleted file mode 100644 index ab5297ed0e14c0..00000000000000 --- a/src/plugins/index_pattern_management/public/service/environment/index.ts +++ /dev/null @@ -1,9 +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. - */ - -export { EnvironmentService, Environment, EnvironmentServiceSetup } from './environment'; 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 15be7f11892e49..f30ccfcb9f3ed7 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 58a138df633fd3..a61eeb99b25a57 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/app_links/redirect_app_link.tsx b/src/plugins/kibana_react/public/app_links/redirect_app_link.tsx index d9ea8be9f5cdd8..744a186a201cad 100644 --- a/src/plugins/kibana_react/public/app_links/redirect_app_link.tsx +++ b/src/plugins/kibana_react/public/app_links/redirect_app_link.tsx @@ -12,7 +12,7 @@ import useObservable from 'react-use/lib/useObservable'; import { ApplicationStart } from 'src/core/public'; import { createNavigateToUrlClickHandler } from './click_handler'; -interface RedirectCrossAppLinksProps { +interface RedirectCrossAppLinksProps extends React.HTMLAttributes { application: ApplicationStart; className?: string; 'data-test-subj'?: string; 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 e033da875080f4..1fa7d8e846c9da 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 @@ -142,6 +142,7 @@ export const applicationUsageSchema = { metrics: commonSchema, infra: commonSchema, // It's a forward app so we'll likely never report it fleet: commonSchema, + integrations: commonSchema, ingestManager: commonSchema, lens: commonSchema, maps: commonSchema, diff --git a/src/plugins/management/public/components/landing/landing.tsx b/src/plugins/management/public/components/landing/landing.tsx index 5e361cfaff87d2..4683185a5a7831 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 350e2f3de0cdf6..23d0a290837475 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 b3f978d5c6cd2e..5ec1253ba77efd 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 8e0043937303f2..72bfe609c141a5 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 5bb80adf3e8bac..9cee992a179480 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 1b40bfcca3c63f..bf1b81061f6a98 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/share/common/url_service/__tests__/locators.test.ts b/src/plugins/share/common/url_service/__tests__/locators.test.ts new file mode 100644 index 00000000000000..45d727df7de48c --- /dev/null +++ b/src/plugins/share/common/url_service/__tests__/locators.test.ts @@ -0,0 +1,165 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { of } from 'src/plugins/kibana_utils/common'; +import { testLocator, TestLocatorState, urlServiceTestSetup } from './setup'; + +describe('locators', () => { + test('can start locators service', () => { + const { + service: { locators }, + } = urlServiceTestSetup(); + + expect(typeof locators).toBe('object'); + expect(typeof locators.create).toBe('function'); + expect(typeof locators.get).toBe('function'); + }); + + test('returns "undefined" for unregistered locator', () => { + const { + service: { locators }, + } = urlServiceTestSetup(); + + expect(locators.get(testLocator.id)).toBe(undefined); + }); + + test('can register a locator', () => { + const { + service: { locators }, + } = urlServiceTestSetup(); + + locators.create(testLocator); + expect(typeof locators.get(testLocator.id)).toBe('object'); + }); + + test('getLocation() returns KibanaLocation generated by the locator', async () => { + const { + service: { locators }, + } = urlServiceTestSetup(); + + locators.create(testLocator); + + const locator = locators.get(testLocator.id); + const location = await locator?.getLocation({ + savedObjectId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', + pageNumber: 21, + showFlyout: true, + }); + + expect(location).toEqual({ + app: 'test_app', + route: '/my-object/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?page=21', + state: { isFlyoutOpen: true }, + }); + }); + + describe('.navigate()', () => { + test('throws if navigation method is not implemented', async () => { + const { + service: { locators }, + } = urlServiceTestSetup(); + const locator = locators.create(testLocator); + const [, error] = await of( + locator.navigate({ + pageNumber: 1, + savedObjectId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', + showFlyout: false, + }) + ); + + expect(error).toBeInstanceOf(Error); + expect(error.message).toBe('not implemented'); + }); + + test('navigates user when .navigate() method is called', async () => { + const { + service: { locators }, + deps, + } = urlServiceTestSetup({ + navigate: jest.fn(async () => {}), + }); + const locator = locators.create(testLocator); + const [, error] = await of( + locator.navigate({ + pageNumber: 1, + savedObjectId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', + showFlyout: false, + }) + ); + + expect(error).toBe(undefined); + expect(deps.navigate).toHaveBeenCalledTimes(1); + expect(deps.navigate).toHaveBeenCalledWith( + { + app: 'test_app', + route: '/my-object/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?page=1', + state: { + isFlyoutOpen: false, + }, + }, + { replace: false } + ); + }); + + test('can specify "replace" navigation parameter', async () => { + const { + service: { locators }, + deps, + } = urlServiceTestSetup({ + navigate: jest.fn(async () => {}), + }); + const locator = locators.create(testLocator); + + await locator.navigate( + { + pageNumber: 1, + savedObjectId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', + showFlyout: false, + }, + { + replace: false, + } + ); + + expect(deps.navigate).toHaveBeenCalledTimes(1); + expect(deps.navigate).toHaveBeenCalledWith( + { + app: 'test_app', + route: '/my-object/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?page=1', + state: { + isFlyoutOpen: false, + }, + }, + { replace: false } + ); + + await locator.navigate( + { + pageNumber: 2, + savedObjectId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', + showFlyout: false, + }, + { + replace: true, + } + ); + + expect(deps.navigate).toHaveBeenCalledTimes(2); + expect(deps.navigate).toHaveBeenCalledWith( + { + app: 'test_app', + route: '/my-object/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?page=2', + state: { + isFlyoutOpen: false, + }, + }, + { replace: true } + ); + }); + }); +}); diff --git a/src/plugins/share/common/url_service/__tests__/setup.ts b/src/plugins/share/common/url_service/__tests__/setup.ts new file mode 100644 index 00000000000000..ad13bb8d8d2160 --- /dev/null +++ b/src/plugins/share/common/url_service/__tests__/setup.ts @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { SerializableState } from 'src/plugins/kibana_utils/common'; +import { LocatorDefinition } from '../locators'; +import { UrlService, UrlServiceDependencies } from '../url_service'; + +export interface TestLocatorState extends SerializableState { + savedObjectId: string; + showFlyout: boolean; + pageNumber: number; +} + +export const testLocator: LocatorDefinition = { + id: 'TEST_LOCATOR', + getLocation: async ({ savedObjectId, pageNumber, showFlyout }) => { + return { + app: 'test_app', + route: `/my-object/${savedObjectId}?page=${pageNumber}`, + state: { + isFlyoutOpen: showFlyout, + }, + }; + }, +}; + +export const urlServiceTestSetup = (partialDeps: Partial = {}) => { + const deps: UrlServiceDependencies = { + navigate: async () => { + throw new Error('not implemented'); + }, + ...partialDeps, + }; + const service = new UrlService(deps); + + return { service, deps }; +}; diff --git a/src/plugins/share/common/url_service/index.ts b/src/plugins/share/common/url_service/index.ts new file mode 100644 index 00000000000000..84f74356bcf186 --- /dev/null +++ b/src/plugins/share/common/url_service/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './url_service'; +export * from './locators'; diff --git a/src/plugins/share/common/url_service/locators/index.ts b/src/plugins/share/common/url_service/locators/index.ts new file mode 100644 index 00000000000000..f9f87215eb4db5 --- /dev/null +++ b/src/plugins/share/common/url_service/locators/index.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './types'; +export * from './locator'; +export * from './locator_client'; diff --git a/src/plugins/share/common/url_service/locators/locator.ts b/src/plugins/share/common/url_service/locators/locator.ts new file mode 100644 index 00000000000000..68c3b05a7f4111 --- /dev/null +++ b/src/plugins/share/common/url_service/locators/locator.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 type { SavedObjectReference } from 'kibana/server'; +import type { PersistableState, SerializableState } from 'src/plugins/kibana_utils/common'; +import type { + LocatorDefinition, + LocatorPublic, + KibanaLocation, + LocatorNavigationParams, +} from './types'; + +export interface LocatorDependencies { + navigate: (location: KibanaLocation, params?: LocatorNavigationParams) => Promise; +} + +export class Locator

implements PersistableState

, LocatorPublic

{ + public readonly migrations: PersistableState

['migrations']; + + constructor( + public readonly definition: LocatorDefinition

, + protected readonly deps: LocatorDependencies + ) { + this.migrations = definition.migrations || {}; + } + + // PersistableState

------------------------------------------------------- + + public readonly telemetry: PersistableState

['telemetry'] = ( + state: P, + stats: Record + ): Record => { + return this.definition.telemetry ? this.definition.telemetry(state, stats) : stats; + }; + + public readonly inject: PersistableState

['inject'] = ( + state: P, + references: SavedObjectReference[] + ): P => { + return this.definition.inject ? this.definition.inject(state, references) : state; + }; + + public readonly extract: PersistableState

['extract'] = ( + state: P + ): { state: P; references: SavedObjectReference[] } => { + return this.definition.extract ? this.definition.extract(state) : { state, references: [] }; + }; + + // LocatorPublic

---------------------------------------------------------- + + public async getLocation(params: P): Promise { + return await this.definition.getLocation(params); + } + + public async navigate( + params: P, + { replace = false }: LocatorNavigationParams = {} + ): Promise { + const location = await this.getLocation(params); + await this.deps.navigate(location, { + replace, + }); + } +} diff --git a/src/plugins/share/common/url_service/locators/locator_client.ts b/src/plugins/share/common/url_service/locators/locator_client.ts new file mode 100644 index 00000000000000..168cc02d03ff15 --- /dev/null +++ b/src/plugins/share/common/url_service/locators/locator_client.ts @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { SerializableState } from 'src/plugins/kibana_utils/common'; +import type { LocatorDependencies } from './locator'; +import type { LocatorDefinition, LocatorPublic, ILocatorClient } from './types'; +import { Locator } from './locator'; + +export type LocatorClientDependencies = LocatorDependencies; + +export class LocatorClient implements ILocatorClient { + /** + * Collection of registered locators. + */ + protected locators: Map> = new Map(); + + constructor(protected readonly deps: LocatorClientDependencies) {} + + /** + * Creates and register a URL locator. + * + * @param definition A definition of URL locator. + * @returns A public interface of URL locator. + */ + public create

(definition: LocatorDefinition

): LocatorPublic

{ + const locator = new Locator

(definition, this.deps); + + this.locators.set(definition.id, locator); + + return locator; + } + + /** + * Returns a previously registered URL locator. + * + * @param id ID of a URL locator. + * @returns A public interface of a registered URL locator. + */ + public get

(id: string): undefined | LocatorPublic

{ + return this.locators.get(id); + } +} diff --git a/src/plugins/share/common/url_service/locators/types.ts b/src/plugins/share/common/url_service/locators/types.ts new file mode 100644 index 00000000000000..d811ae0fd4aa23 --- /dev/null +++ b/src/plugins/share/common/url_service/locators/types.ts @@ -0,0 +1,91 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { PersistableState, SerializableState } from 'src/plugins/kibana_utils/common'; + +/** + * URL locator registry. + */ +export interface ILocatorClient { + /** + * Create and register a new locator. + * + * @param urlGenerator Definition of the new locator. + */ + create

(locatorDefinition: LocatorDefinition

): LocatorPublic

; + + /** + * Retrieve a previously registered locator. + * + * @param id Unique ID of the locator. + */ + get

(id: string): undefined | LocatorPublic

; +} + +/** + * A convenience interface used to define and register a locator. + */ +export interface LocatorDefinition

+ extends Partial> { + /** + * Unique ID of the locator. Should be constant and unique across Kibana. + */ + id: string; + + /** + * Returns a deep link, including location state, which can be used for + * navigation in Kibana. + * + * @param params Parameters from which to generate a Kibana location. + */ + getLocation(params: P): Promise; +} + +/** + * Public interface of a registered locator. + */ +export interface LocatorPublic

{ + /** + * Returns a relative URL to the client-side redirect endpoint using this + * locator. (This method is necessary for compatibility with URL generators.) + */ + getLocation(params: P): Promise; + + /** + * Navigate using the `core.application.navigateToApp()` method to a Kibana + * location generated by this locator. This method is available only on the + * browser. + */ + navigate(params: P, navigationParams?: LocatorNavigationParams): Promise; +} + +export interface LocatorNavigationParams { + replace?: boolean; +} + +/** + * This interface represents a location in Kibana to which one can navigate + * using the `core.application.navigateToApp()` method. + */ +export interface KibanaLocation { + /** + * Kibana application ID. + */ + app: string; + + /** + * A URL route within a Kibana application. + */ + route: string; + + /** + * A serializable location state object, which the app can use to determine + * what should be displayed on the screen. + */ + state: S; +} diff --git a/src/plugins/share/common/url_service/url_service.ts b/src/plugins/share/common/url_service/url_service.ts new file mode 100644 index 00000000000000..0c3a0aabb750bc --- /dev/null +++ b/src/plugins/share/common/url_service/url_service.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { LocatorClient, LocatorClientDependencies } from './locators'; + +export type UrlServiceDependencies = LocatorClientDependencies; + +/** + * Common URL Service client interface for server-side and client-side. + */ +export class UrlService { + /** + * Client to work with locators. + */ + locators: LocatorClient = new LocatorClient(this.deps); + + constructor(protected readonly deps: UrlServiceDependencies) {} +} diff --git a/src/plugins/share/public/plugin.ts b/src/plugins/share/public/plugin.ts index 14d74e055cbd9a..eb7c46cdaef867 100644 --- a/src/plugins/share/public/plugin.ts +++ b/src/plugins/share/public/plugin.ts @@ -18,6 +18,7 @@ import { UrlGeneratorsSetup, UrlGeneratorsStart, } from './url_generators/url_generator_service'; +import { UrlService } from '../common/url_service'; export interface ShareSetupDependencies { securityOss?: SecurityOssPluginSetup; @@ -27,16 +28,60 @@ export interface ShareStartDependencies { securityOss?: SecurityOssPluginStart; } +/** @public */ +export type SharePluginSetup = ShareMenuRegistrySetup & { + /** + * @deprecated + * + * URL Generators are deprecated use UrlService instead. + */ + urlGenerators: UrlGeneratorsSetup; + + /** + * Utilities to work with URL locators and short URLs. + */ + url: UrlService; +}; + +/** @public */ +export type SharePluginStart = ShareMenuManagerStart & { + /** + * @deprecated + * + * URL Generators are deprecated use UrlService instead. + */ + urlGenerators: UrlGeneratorsStart; + + /** + * Utilities to work with URL locators and short URLs. + */ + url: UrlService; +}; + export class SharePlugin implements Plugin { private readonly shareMenuRegistry = new ShareMenuRegistry(); private readonly shareContextMenu = new ShareMenuManager(); private readonly urlGeneratorsService = new UrlGeneratorsService(); + private url?: UrlService; public setup(core: CoreSetup, plugins: ShareSetupDependencies): SharePluginSetup { core.application.register(createShortUrlRedirectApp(core, window.location)); + + this.url = new UrlService({ + navigate: async (location, { replace = false } = {}) => { + const [start] = await core.getStartServices(); + await start.application.navigateToApp(location.app, { + path: location.route, + state: location.state, + replace, + }); + }, + }); + return { ...this.shareMenuRegistry.setup(), urlGenerators: this.urlGeneratorsService.setup(core), + url: this.url, }; } @@ -48,16 +93,7 @@ export class SharePlugin implements Plugin { plugins.securityOss?.anonymousAccess ), urlGenerators: this.urlGeneratorsService.start(core), + url: this.url!, }; } } - -/** @public */ -export type SharePluginSetup = ShareMenuRegistrySetup & { - urlGenerators: UrlGeneratorsSetup; -}; - -/** @public */ -export type SharePluginStart = ShareMenuManagerStart & { - urlGenerators: UrlGeneratorsStart; -}; diff --git a/src/plugins/share/public/url_generators/README.md b/src/plugins/share/public/url_generators/README.md index 39ee5f2901e916..f948354aad9593 100644 --- a/src/plugins/share/public/url_generators/README.md +++ b/src/plugins/share/public/url_generators/README.md @@ -1,3 +1,9 @@ +# URL Generators are deprecated + +__Below is documentation of URL Generators, which are now deprecated and will be removed in favor of URL locators in 7.14.__ + +--- + ## URL Generator Services Developers who maintain pages in Kibana that other developers may want to link to diff --git a/src/plugins/share/public/url_generators/url_generator_service.ts b/src/plugins/share/public/url_generators/url_generator_service.ts index 982f0692102df6..5a8e7a1b5c17a8 100644 --- a/src/plugins/share/public/url_generators/url_generator_service.ts +++ b/src/plugins/share/public/url_generators/url_generator_service.ts @@ -13,10 +13,20 @@ import { UrlGeneratorInternal } from './url_generator_internal'; import { UrlGeneratorContract } from './url_generator_contract'; export interface UrlGeneratorsStart { + /** + * @deprecated + * + * URL Generators are deprecated, use URL locators in UrlService instead. + */ getUrlGenerator: (urlGeneratorId: T) => UrlGeneratorContract; } export interface UrlGeneratorsSetup { + /** + * @deprecated + * + * URL Generators are deprecated, use URL locators in UrlService instead. + */ registerUrlGenerator: ( generator: UrlGeneratorsDefinition ) => UrlGeneratorContract; diff --git a/src/plugins/share/server/plugin.ts b/src/plugins/share/server/plugin.ts index 744a4148215c3e..6e3c68935f77bf 100644 --- a/src/plugins/share/server/plugin.ts +++ b/src/plugins/share/server/plugin.ts @@ -12,11 +12,30 @@ import { CoreSetup, Plugin, PluginInitializerContext } from 'kibana/server'; import { createRoutes } from './routes/create_routes'; import { url } from './saved_objects'; import { CSV_SEPARATOR_SETTING, CSV_QUOTE_VALUES_SETTING } from '../common/constants'; +import { UrlService } from '../common/url_service'; + +/** @public */ +export interface SharePluginSetup { + url: UrlService; +} + +/** @public */ +export interface SharePluginStart { + url: UrlService; +} + +export class SharePlugin implements Plugin { + private url?: UrlService; -export class SharePlugin implements Plugin { constructor(private readonly initializerContext: PluginInitializerContext) {} public setup(core: CoreSetup) { + this.url = new UrlService({ + navigate: async () => { + throw new Error('Locator .navigate() does not work on server.'); + }, + }); + createRoutes(core, this.initializerContext.logger.get()); core.savedObjects.registerType(url); core.uiSettings.register({ @@ -41,10 +60,18 @@ export class SharePlugin implements Plugin { schema: schema.boolean(), }, }); + + return { + url: this.url, + }; } public start() { this.initializerContext.logger.get().debug('Starting plugin'); + + return { + url: this.url!, + }; } public stop() { diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index 1d37c25f52fd49..7b6c4ba9788f14 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -3184,6 +3184,137 @@ } } }, + "integrations": { + "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" + } + } + } + } + } + } + }, "ingestManager": { "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 7fd6ca4080d6af..bacfa5e77107fe 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 7fdcb50b704afe..7860949e098aa1 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 c35b8a3d24498e..0d58d80ed59653 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 3b043b8aab895e..710e209537b8e3 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/timelion/public/components/timelion_deprecation.tsx b/src/plugins/timelion/public/components/timelion_deprecation.tsx index efcef88b3d0a26..117aabed6773cb 100644 --- a/src/plugins/timelion/public/components/timelion_deprecation.tsx +++ b/src/plugins/timelion/public/components/timelion_deprecation.tsx @@ -19,7 +19,7 @@ export const TimelionDeprecation = ({ links }: DocLinksStart) => { title={ diff --git a/src/plugins/timelion/server/deprecations.ts b/src/plugins/timelion/server/deprecations.ts index e65d72cb460dfb..3c344e1d4a8d80 100644 --- a/src/plugins/timelion/server/deprecations.ts +++ b/src/plugins/timelion/server/deprecations.ts @@ -30,7 +30,7 @@ export const showWarningMessageIfTimelionSheetWasFound = async ( const count = await getTimelionSheetsCount(savedObjectsClient); if (count > 0) { logger.warn( - 'Deprecated since 7.0, the Timelion app will be removed in the last 7.x minor version. To continue using your Timelion worksheets, migrate them to a dashboard. See https://www.elastic.co/guide/en/kibana/current/create-panels-with-timelion.html.' + 'Deprecated since 7.0, the Timelion app will be removed in 7.16. To continue using your Timelion worksheets, migrate them to a dashboard. See https://www.elastic.co/guide/en/kibana/current/create-panels-with-timelion.html.' ); } }; @@ -49,7 +49,7 @@ export async function getDeprecations({ if (count > 0) { deprecations.push({ - message: `You have ${count} Timelion worksheets. The Timelion app will be removed in the last 7.x minor version. To continue using your Timelion worksheets, migrate them to a dashboard.`, + message: `You have ${count} Timelion worksheets. The Timelion app will be removed in 7.16. To continue using your Timelion worksheets, migrate them to a dashboard.`, documentationUrl: 'https://www.elastic.co/guide/en/kibana/current/create-panels-with-timelion.html', level: 'warning', 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 9550697e228512..f056c38b0c0c30 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 255bd9774f9df8..9e3cf0a5421c1c 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/src/plugins/vis_type_xy/public/config/get_axis.ts b/src/plugins/vis_type_xy/public/config/get_axis.ts index 91647f02e2a1e6..08b17c882eea6b 100644 --- a/src/plugins/vis_type_xy/public/config/get_axis.ts +++ b/src/plugins/vis_type_xy/public/config/get_axis.ts @@ -169,7 +169,7 @@ function getAxisDomain( const { min, max, defaultYExtents, boundsMargin } = scale; const fit = defaultYExtents; - const padding = boundsMargin; + const padding = boundsMargin || undefined; if (!isNil(min) && !isNil(max)) { return { fit, padding, min, max }; diff --git a/test/accessibility/apps/dashboard.ts b/test/accessibility/apps/dashboard.ts index 08d577b3df08cd..20b18583d0d72f 100644 --- a/test/accessibility/apps/dashboard.ts +++ b/test/accessibility/apps/dashboard.ts @@ -110,13 +110,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('Exit out of edit mode', async () => { - await PageObjects.dashboard.clickDiscardChanges(false); + await PageObjects.dashboard.clickCancelOutOfEditMode(false); await a11y.testAppSnapshot(); }); it('Discard changes', async () => { - await testSubjects.exists('dashboardDiscardConfirmDiscard'); - await testSubjects.click('dashboardDiscardConfirmDiscard'); + await PageObjects.common.clickConfirmOnModal(); await PageObjects.dashboard.getIsInViewMode(); await a11y.testAppSnapshot(); }); diff --git a/test/accessibility/apps/discover.ts b/test/accessibility/apps/discover.ts index 67abe15ea537a7..6705598ef6e74d 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 82b34793622987..692b140ade7eec 100644 --- a/test/accessibility/apps/management.ts +++ b/test/accessibility/apps/management.ts @@ -16,8 +16,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 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 +25,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 () => { diff --git a/test/accessibility/apps/visualize.ts b/test/accessibility/apps/visualize.ts index e493b288eaa89d..6478907fcb96a6 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 fab59ef256a050..1a48b391ae87d8 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 c75b6c607f56e3..16861f3c28051e 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 e14086f9d973a8..8d72cbd2fb37f5 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 3ccf6a7791f6c3..481f433deeb730 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 a06c37ea84b4cd..f050e2a0626d36 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 61b795ed67d332..5b82473721be8c 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 87c5aa535ccd98..913db9aee9c0f8 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 9c1e1bba0ab9a5..656b4e506fa23d 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 91f165dbdda7cc..500a642f60850e 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 2f62ea231b7229..598001644eedbe 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 cd34724e6cda35..7532278d7eb128 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 00000000000000..6fd5f644ae8949 --- /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 00000000000000..22f07553733235 --- /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 00000000000000..8ce9e3b36b5c8d --- /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 00000000000000..2cb90ca087f497 --- /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 00000000000000..e262b9d838e97a --- /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 00000000000000..b41a630889ff8a --- /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 00000000000000..a14201e750ddaf --- /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 00000000000000..3c74aa336e440c --- /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 00000000000000..3608089e4641a2 --- /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 00000000000000..2e48ba64841eeb --- /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 00000000000000..fa0283d69d8e3b --- /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 00000000000000..7a727a3e867550 --- /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 00000000000000..9faca08238033e --- /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 00000000000000..724f18e57f3efd --- /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 00000000000000..92d8c6fd6d3c25 --- /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 00000000000000..3980821c0fd096 --- /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 00000000000000..f5d556ca9994ab --- /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 00000000000000..6b924570a0e45b --- /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 a5ed61d8ab9af1..663deae1d34769 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 f0787500d505c4..2b35f1ec50e918 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 40f57cd914a2f4..b9ce3e84d53904 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 ef2fbc5258d668..be9d213a328453 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 7fff720e5195f3..c38c3a01708a74 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 dec20961b0de09..16b19583068187 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 ac6b11522124ba..4ffc98e0660bca 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/saved_objects/migrations.ts b/test/api_integration/apis/saved_objects/migrations.ts index d009a66e9df55f..0877998ca6c1f3 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_management/find.ts b/test/api_integration/apis/saved_objects_management/find.ts index df39e9b5c2a369..6aefd74f0f36b2 100644 --- a/test/api_integration/apis/saved_objects_management/find.ts +++ b/test/api_integration/apis/saved_objects_management/find.ts @@ -145,8 +145,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/scroll_count.ts b/test/api_integration/apis/saved_objects_management/scroll_count.ts index 78fd316eb4ecb6..088b26d8205da4 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 11fb74200d7ddf..f80bc1d0d9dfa4 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 7ef82cd5467ab5..96e7f6ab7161b1 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 d6b729f59d8d4e..1973fe4e4ab361 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/suggestions/suggestions.js b/test/api_integration/apis/suggestions/suggestions.js index b3c8ae238450ca..526cb9669f2788 100644 --- a/test/api_integration/apis/suggestions/suggestions.js +++ b/test/api_integration/apis/suggestions/suggestions.js @@ -13,11 +13,13 @@ export default function ({ getService }) { describe('Suggestions API', function () { before(async () => { - await esArchiver.load('index_patterns/basic_index'); + await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index'); await kibanaServer.importExport.load('index_patterns/basic_kibana'); }); after(async () => { - await esArchiver.unload('index_patterns/basic_index'); + await esArchiver.unload( + 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index' + ); await kibanaServer.importExport.unload('index_patterns/basic_kibana'); }); 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 8270c573e4c1e7..d2177481130a2c 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,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/management/saved_objects/search/mappings.json b/test/api_integration/fixtures/es_archiver/management/saved_objects/search/mappings.json index c670508247b1a2..7a6d752eafb08e 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,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/ui_counters/mappings.json b/test/api_integration/fixtures/es_archiver/saved_objects/ui_counters/mappings.json index 39902f8a9211a6..99f2f999db9881 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 14ed147b2da8e7..c2ec5c88810876 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 b62c5da05c2e6b..41d5c07e932394 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 742ba74c0dcafa..d99a2e8d102364 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.js deleted file mode 100644 index 9a06dd7b749699..00000000000000 --- a/test/common/services/kibana_server/extend_es_archiver.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -const ES_ARCHIVER_LOAD_METHODS = ['load', 'loadIfNeeded', 'unload', 'emptyKibanaIndex']; -const KIBANA_INDEX = '.kibana'; - -export function extendEsArchiver({ esArchiver, kibanaServer, retry, defaults }) { - // only extend the esArchiver if there are default uiSettings to restore - if (!defaults) { - return; - } - - ES_ARCHIVER_LOAD_METHODS.forEach((method) => { - const originalMethod = esArchiver[method]; - - esArchiver[method] = async (...args) => { - // esArchiver methods return a stats object, with information about the indexes created - const stats = await originalMethod.apply(esArchiver, args); - - const statsKeys = Object.keys(stats); - const kibanaKeys = statsKeys.filter( - // this also matches stats keys like '.kibana_1' and '.kibana_2,.kibana_1' - (key) => key.includes(KIBANA_INDEX) && stats[key].created - ); - - // if the kibana index was created by the esArchiver then update the uiSettings - // with the defaults to make sure that they are always in place initially - if (kibanaKeys.length > 0) { - await retry.try(async () => { - await kibanaServer.uiSettings.update(defaults); - }); - } - - return stats; - }; - }); -} diff --git a/test/common/services/kibana_server/extend_es_archiver.ts b/test/common/services/kibana_server/extend_es_archiver.ts new file mode 100644 index 00000000000000..98c28960bf5230 --- /dev/null +++ b/test/common/services/kibana_server/extend_es_archiver.ts @@ -0,0 +1,55 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { 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'; + +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; + } + + ES_ARCHIVER_LOAD_METHODS.forEach((method) => { + const originalMethod = esArchiver[method]; + + esArchiver[method] = async (...args: unknown[]) => { + // esArchiver methods return a stats object, with information about the indexes created + const stats = await originalMethod.apply(esArchiver, args as any); + + const statsKeys = Object.keys(stats); + const kibanaKeys = statsKeys.filter( + // this also matches stats keys like '.kibana_1' and '.kibana_2,.kibana_1' + (key) => key.includes(KIBANA_INDEX) && stats[key].created + ); + + // if the kibana index was created by the esArchiver then update the uiSettings + // with the defaults to make sure that they are always in place initially + if (kibanaKeys.length > 0) { + await retry.try(async () => { + await kibanaServer.uiSettings.update(defaults); + }); + } + + return stats; + }; + }); +} diff --git a/test/common/services/kibana_server/index.ts b/test/common/services/kibana_server/index.ts index 7f727179032f2c..2a749de2b4ce86 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/saved_object_info.ts b/test/common/services/saved_object_info.ts index 1558b364f53916..2be17636508942 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 1ee095fbdedeb0..cb6c487c564c3b 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'; @@ -47,9 +47,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 69788ebad2af2f..77ad5a5da9eeb9 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/functional/apps/context/_date_nanos.js b/test/functional/apps/context/_date_nanos.js index f5408661b9c6ef..35e38abc6fdb72 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 b837c55d821ac1..a933c2f20b1633 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 245f88a337dce2..7612dae338d9f0 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 641d520801c4dc..8877e5e47bd95d 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 3de3b2f843f554..62ce68e026f72a 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 7e0bf92e3292aa..1e901cdbd48bee 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 5d3d8bd251d63c..89c2d420299350 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 c2d6cc4c38b6be..e1a15009afe514 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 86c57efec818b5..acb04b4946fad2 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 809fb6fc140014..fecec34fd91e36 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 1f62256a3fdb59..5702286bba6b68 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 bf8300defc445a..07fa3355c6fbac 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 bdf97e8ced1407..015a00a713bdcf 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 c93636aeb63c67..3aba671c0a4b29 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_state.ts b/test/functional/apps/dashboard/dashboard_state.ts index 0f7722925293b1..047681e1a8ace7 100644 --- a/test/functional/apps/dashboard/dashboard_state.ts +++ b/test/functional/apps/dashboard/dashboard_state.ts @@ -34,6 +34,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const dashboardPanelActions = getService('dashboardPanelActions'); const dashboardAddPanel = getService('dashboardAddPanel'); + const enableNewChartLibraryDebug = async () => { + if (await PageObjects.visChart.isNewChartsLibraryEnabled()) { + await elasticChart.setNewChartUiDebugFlag(); + await queryBar.submitQuery(); + } + }; + describe('dashboard state', function describeIndexTests() { // Used to track flag before and after reset let isNewChartsLibraryEnabled = false; @@ -84,10 +91,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.gotoDashboardLandingPage(); await PageObjects.dashboard.loadSavedDashboard(dashboarName); - if (await PageObjects.visChart.isNewChartsLibraryEnabled()) { - await elasticChart.setNewChartUiDebugFlag(); - await queryBar.submitQuery(); - } + await enableNewChartLibraryDebug(); const colorChoiceRetained = await PageObjects.visChart.doesSelectedLegendColorExist( overwriteColor @@ -149,11 +153,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('Saved search will update when the query is changed in the URL', async () => { const currentQuery = await queryBar.getQueryString(); expect(currentQuery).to.equal(''); - const currentUrl = await browser.getCurrentUrl(); - const newUrl = currentUrl.replace('query:%27%27', 'query:%27abc12345678910%27'); - // Don't add the timestamp to the url or it will cause a hard refresh and we want to test a - // soft refresh. - await browser.get(newUrl.toString(), false); + const currentUrl = await getUrlFromShare(); + const newUrl = currentUrl.replace(`query:''`, `query:'abc12345678910'`); + + // We need to add a timestamp to the URL because URL changes now only work with a hard refresh. + await browser.get(newUrl.toString()); await PageObjects.header.waitUntilLoadingHasFinished(); const headers = await PageObjects.discover.getColumnHeaders(); @@ -200,20 +204,34 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { return sharedUrl; }; + const hardRefresh = async (newUrl: string) => { + // We need to add a timestamp to the URL because URL changes now only work with a hard refresh. + await browser.get(newUrl.toString()); + const alert = await browser.getAlert(); + await alert?.accept(); + await enableNewChartLibraryDebug(); + await PageObjects.dashboard.waitForRenderComplete(); + }; + describe('Directly modifying url updates dashboard state', () => { - it('for query parameter', async function () { + before(async () => { await PageObjects.dashboard.gotoDashboardLandingPage(); await PageObjects.dashboard.clickNewDashboard(); + await PageObjects.timePicker.setHistoricalDataRange(); + }); + it('for query parameter', async function () { const currentQuery = await queryBar.getQueryString(); expect(currentQuery).to.equal(''); - const currentUrl = await browser.getCurrentUrl(); - const newUrl = currentUrl.replace('query:%27%27', 'query:%27hi%27'); - // Don't add the timestamp to the url or it will cause a hard refresh and we want to test a - // soft refresh. - await browser.get(newUrl.toString(), false); + const currentUrl = await getUrlFromShare(); + const newUrl = currentUrl.replace(`query:''`, `query:'hi:hello'`); + + // We need to add a timestamp to the URL because URL changes now only work with a hard refresh. + await browser.get(newUrl.toString()); const newQuery = await queryBar.getQueryString(); - expect(newQuery).to.equal('hi'); + expect(newQuery).to.equal('hi:hello'); + await queryBar.clearQuery(); + await queryBar.clickQuerySubmitButton(); }); it('for panel size parameters', async function () { @@ -224,7 +242,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { `w:${DEFAULT_PANEL_WIDTH}`, `w:${DEFAULT_PANEL_WIDTH * 2}` ); - await browser.get(newUrl.toString(), false); + await hardRefresh(newUrl); + await retry.try(async () => { const newPanelDimensions = await PageObjects.dashboard.getPanelDimensions(); if (newPanelDimensions.length < 0) { @@ -247,7 +266,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.waitForRenderComplete(); const currentUrl = await getUrlFromShare(); const newUrl = currentUrl.replace(/panels:\!\(.*\),query/, 'panels:!(),query'); - await browser.get(newUrl.toString(), false); + await hardRefresh(newUrl); await retry.try(async () => { const newPanelCount = await PageObjects.dashboard.getPanelCount(); @@ -257,10 +276,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('for embeddable config color parameters on a visualization', () => { let originalPieSliceStyle = ''; - it('updates a pie slice color on a soft refresh', async function () { - await dashboardAddPanel.addVisualization(PIE_CHART_VIS_NAME); + before(async () => { + await dashboardAddPanel.addVisualization(PIE_CHART_VIS_NAME); + await enableNewChartLibraryDebug(); originalPieSliceStyle = await pieChart.getPieSliceStyle(`80,000`); + }); + + it('updates a pie slice color on a hard refresh', async function () { await PageObjects.visChart.openLegendOptionColors( '80,000', `[data-title="${PIE_CHART_VIS_NAME}"]` @@ -268,7 +291,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.visChart.selectNewLegendColorChoice('#F9D9F9'); const currentUrl = await getUrlFromShare(); const newUrl = currentUrl.replace('F9D9F9', 'FFFFFF'); - await browser.get(newUrl.toString(), false); + await hardRefresh(newUrl); await PageObjects.header.waitUntilLoadingHasFinished(); await retry.try(async () => { @@ -296,7 +319,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const newUrl = isNewChartsLibraryEnabled ? currentUrl.replace(`'80000':%23FFFFFF`, '') : currentUrl.replace(`vis:(colors:('80,000':%23FFFFFF))`, ''); - await browser.get(newUrl.toString(), false); + + await hardRefresh(newUrl); await PageObjects.header.waitUntilLoadingHasFinished(); await retry.try(async () => { diff --git a/test/functional/apps/dashboard/dashboard_unsaved_listing.ts b/test/functional/apps/dashboard/dashboard_unsaved_listing.ts index 1cdc4bbff2c532..2b2d96e8d723a3 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 fd203cd8c1356d..6b71dd34b76f88 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 2d6396be80f462..34fd4ddb346ed1 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 be540e18a503f9..02f178a5153a22 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 b2f21aefcf79cc..507d4b8308d4c5 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 b96e9572625731..943a6b3bdb469d 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 a9e0039de1f79f..66aca561383c31 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 20fe9aeb1387a2..d66f6e834c367f 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 11807831dc3524..e045b1a1e3f5eb 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 2cfa6d73dcb728..46a8545b79596b 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 1f63dcdafdcce2..02669759f68ea9 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 9f9422ddaec64a..4b83b2ac92deb9 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 9c7f472b287a72..96c7a5aac3f4bc 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 45642542cc0aca..00500450595ebf 100644 --- a/test/functional/apps/dashboard/panel_expand_toggle.ts +++ b/test/functional/apps/dashboard/panel_expand_toggle.ts @@ -12,7 +12,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); - const browser = getService('browser'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dashboardPanelActions = getService('dashboardPanelActions'); @@ -20,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', }); @@ -53,18 +52,5 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(panelCountAfterMaxThenMinimize).to.be(panelCount); }); }); - - it('minimizes using the browser back button', async () => { - const panelCount = await PageObjects.dashboard.getPanelCount(); - - await dashboardPanelActions.openContextMenu(); - await dashboardPanelActions.clickExpandPanelToggle(); - - await browser.goBack(); - await retry.try(async () => { - const panelCountAfterMaxThenMinimize = await PageObjects.dashboard.getPanelCount(); - expect(panelCountAfterMaxThenMinimize).to.be(panelCount); - }); - }); }); } diff --git a/test/functional/apps/dashboard/saved_search_embeddable.ts b/test/functional/apps/dashboard/saved_search_embeddable.ts index 098f6ccc00d94a..5bcec338aad1eb 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 8191b5efb51f61..77a858b22ec790 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 a4a586cb635d5c..e5c532537b6f04 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 f930987f16d5f8..8a4371a0adf774 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 99a78ebd069c5d..b29b07f9df4e4b 100644 --- a/test/functional/apps/dashboard/view_edit.ts +++ b/test/functional/apps/dashboard/view_edit.ts @@ -15,14 +15,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dashboardAddPanel = getService('dashboardAddPanel'); - const testSubjects = getService('testSubjects'); const PageObjects = getPageObjects(['dashboard', 'header', 'common', 'visualize', 'timePicker']); const dashboardName = 'dashboard with filter'; const filterBar = getService('filterBar'); 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', }); @@ -33,7 +32,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('create new dashboard opens in edit mode', async function () { await PageObjects.dashboard.gotoDashboardLandingPage(); await PageObjects.dashboard.clickNewDashboard(); - await PageObjects.dashboard.clickCancelOutOfEditMode(); + const isInViewMode = await PageObjects.dashboard.getIsInViewMode(); + expect(isInViewMode).to.be(false); }); it('existing dashboard opens in view mode', async function () { @@ -72,7 +72,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'Sep 19, 2013 @ 06:31:44.000', 'Sep 19, 2013 @ 06:31:44.000' ); - await PageObjects.dashboard.clickDiscardChanges(); + await PageObjects.dashboard.clickCancelOutOfEditMode(); const newTime = await PageObjects.timePicker.getTimeConfig(); @@ -85,7 +85,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await queryBar.setQuery(`${originalQuery}and extra stuff`); await queryBar.submitQuery(); - await PageObjects.dashboard.clickDiscardChanges(); + await PageObjects.dashboard.clickCancelOutOfEditMode(); const query = await queryBar.getQueryString(); expect(query).to.equal(originalQuery); @@ -105,7 +105,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { hasFilter = await filterBar.hasFilter('animal', 'dog'); expect(hasFilter).to.be(false); - await PageObjects.dashboard.clickDiscardChanges(); + await PageObjects.dashboard.clickCancelOutOfEditMode(); hasFilter = await filterBar.hasFilter('animal', 'dog'); expect(hasFilter).to.be(true); @@ -122,13 +122,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { redirectToOrigin: true, }); - await PageObjects.dashboard.clickDiscardChanges(false); + await PageObjects.dashboard.clickCancelOutOfEditMode(false); // for this sleep see https://github.com/elastic/kibana/issues/22299 await PageObjects.common.sleep(500); // confirm lose changes - await testSubjects.exists('dashboardDiscardConfirmDiscard'); - await testSubjects.click('dashboardDiscardConfirmDiscard'); + await PageObjects.common.clickConfirmOnModal(); const panelCount = await PageObjects.dashboard.getPanelCount(); expect(panelCount).to.eql(originalPanelCount); @@ -138,7 +137,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const originalPanelCount = await PageObjects.dashboard.getPanelCount(); await dashboardAddPanel.addVisualization('new viz panel'); - await PageObjects.dashboard.clickDiscardChanges(); + await PageObjects.dashboard.clickCancelOutOfEditMode(); const panelCount = await PageObjects.dashboard.getPanelCount(); expect(panelCount).to.eql(originalPanelCount); @@ -158,10 +157,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'Sep 19, 2015 @ 06:31:44.000', 'Sep 19, 2015 @ 06:31:44.000' ); - await PageObjects.dashboard.clickDiscardChanges(false); + await PageObjects.dashboard.clickCancelOutOfEditMode(false); - await testSubjects.exists('dashboardDiscardConfirmCancel'); - await testSubjects.click('dashboardDiscardConfirmCancel'); + await PageObjects.common.clickCancelOnModal(); await PageObjects.dashboard.saveDashboard(dashboardName, { storeTimeWithDashboard: true, }); @@ -188,10 +186,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); const newTime = await PageObjects.timePicker.getTimeConfig(); - await PageObjects.dashboard.clickDiscardChanges(false); + await PageObjects.dashboard.clickCancelOutOfEditMode(false); - await testSubjects.exists('dashboardDiscardConfirmCancel'); - await testSubjects.click('dashboardDiscardConfirmCancel'); + await PageObjects.common.clickCancelOnModal(); await PageObjects.dashboard.saveDashboard(dashboardName, { storeTimeWithDashboard: true }); await PageObjects.dashboard.loadSavedDashboard(dashboardName); diff --git a/test/functional/apps/discover/_data_grid.ts b/test/functional/apps/discover/_data_grid.ts index 366865b53fb0dc..eaefb3ba38f050 100644 --- a/test/functional/apps/discover/_data_grid.ts +++ b/test/functional/apps/discover/_data_grid.ts @@ -25,7 +25,7 @@ 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 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 ee60660ae4a9eb..bfce69ca08d552 100644 --- a/test/functional/apps/discover/_data_grid_context.ts +++ b/test/functional/apps/discover/_data_grid_context.ts @@ -37,7 +37,7 @@ 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 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 2225cb5871f344..e3e8a20b693f85 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 f0d6abb23d30fb..bbd633df6fa1ed 100644 --- a/test/functional/apps/discover/_data_grid_doc_table.ts +++ b/test/functional/apps/discover/_data_grid_doc_table.ts @@ -29,7 +29,7 @@ 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 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 5d73192c1608cf..8296b518bee32c 100644 --- a/test/functional/apps/discover/_data_grid_field_data.ts +++ b/test/functional/apps/discover/_data_grid_field_data.ts @@ -24,7 +24,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async function () { await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); await kibanaServer.importExport.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + 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 09970b3719c4eb..81327d0744bfe1 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 a3402cc733431a..7d4104c3ac3444 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 8ed54f88afea3a..f26d1f4536e558 100644 --- a/test/functional/apps/discover/_discover.ts +++ b/test/functional/apps/discover/_discover.ts @@ -32,7 +32,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.load('discover'); // 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(); @@ -327,10 +327,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const intervalS = 5; await PageObjects.timePicker.startAutoRefresh(intervalS); - // check inspector panel request stats for timestamp - await inspector.open(); - const getRequestTimestamp = async () => { + // check inspector panel request stats for timestamp + await inspector.open(); const requestStats = await inspector.getTableData(); const requestStatsRow = requestStats.filter( (r) => r && r[0] && r[0].includes('Request timestamp') @@ -338,6 +337,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { if (!requestStatsRow || !requestStatsRow[0] || !requestStatsRow[0][1]) { return ''; } + await inspector.close(); return requestStatsRow[0][1]; }; diff --git a/test/functional/apps/discover/_discover_fields_api.ts b/test/functional/apps/discover/_discover_fields_api.ts index 0a6029a9f10e85..d3df79dc8658b6 100644 --- a/test/functional/apps/discover/_discover_fields_api.ts +++ b/test/functional/apps/discover/_discover_fields_api.ts @@ -24,7 +24,7 @@ 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 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 e41422555f81d3..d4b3758fd9b8c9 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 90d3c4eca423a6..771dac4d40a64f 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 6f298a364abfa7..ffe989f8d498ce 100644 --- a/test/functional/apps/discover/_doc_table.ts +++ b/test/functional/apps/discover/_doc_table.ts @@ -33,7 +33,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.load('discover'); // 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 8b8877016b103e..f127c39fd5d9a5 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 1831fb9aa73b1f..e8698b984f6cc0 100644 --- a/test/functional/apps/discover/_field_data.ts +++ b/test/functional/apps/discover/_field_data.ts @@ -25,7 +25,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async function () { await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); await kibanaServer.importExport.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + 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 319722e0c88422..7de123bb44f2a6 100644 --- a/test/functional/apps/discover/_field_data_with_fields_api.ts +++ b/test/functional/apps/discover/_field_data_with_fields_api.ts @@ -25,7 +25,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async function () { await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); await kibanaServer.importExport.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + 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 b94ba3cda40440..4e9839d4e799ae 100644 --- a/test/functional/apps/discover/_filter_editor.ts +++ b/test/functional/apps/discover/_filter_editor.ts @@ -28,7 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.load('discover'); // 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 b3e63e482e7341..c7fe0a94b6019b 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 06933e828db7e1..e986429a15d264 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 cef02a0f54f052..ff3ad0daf69db1 100644 --- a/test/functional/apps/discover/_indexpattern_without_timefield.ts +++ b/test/functional/apps/discover/_indexpattern_without_timefield.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 expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { @@ -13,19 +13,29 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const security = getService('security'); + const testSubjects = getService('testSubjects'); const PageObjects = getPageObjects(['common', 'timePicker', 'discover']); describe('indexpattern without timefield', () => { before(async () => { await security.testUser.setRoles(['kibana_admin', 'kibana_timefield']); - await esArchiver.loadIfNeeded('index_pattern_without_timefield'); - await kibanaServer.uiSettings.replace({ defaultIndex: '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"}', + }); await PageObjects.common.navigateToApp('discover'); }); after(async () => { await security.testUser.restoreDefaults(); - await esArchiver.unload('index_pattern_without_timefield'); + await kibanaServer.uiSettings.unset('timepicker:timeDefaults'); + await kibanaServer.uiSettings.unset('defaultIndex'); + await esArchiver.unload( + 'test/functional/fixtures/es_archiver/index_pattern_without_timefield' + ); }); it('should not display a timepicker', async () => { @@ -34,6 +44,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { } }); + it('should adapt sidebar fields when switching', async () => { + await PageObjects.discover.selectIndexPattern('with-timefield'); + const timefieldExistsWithTimefield = await testSubjects.exists('field-@timestamp'); + expect(timefieldExistsWithTimefield).to.be(true); + await PageObjects.discover.selectIndexPattern('without-timefield'); + await PageObjects.discover.waitForDocTableLoadingComplete(); + const timefieldExistsWithoutTimefield = await testSubjects.exists('field-@timestamp'); + expect(timefieldExistsWithoutTimefield).to.be(false); + }); + it('should display a timepicker after switching to an index pattern with timefield', async () => { await PageObjects.discover.selectIndexPattern('with-timefield'); if (!(await PageObjects.timePicker.timePickerExists())) { diff --git a/test/functional/apps/discover/_inspector.ts b/test/functional/apps/discover/_inspector.ts index ca8539df9a9260..9d4fd93eb3a9f0 100644 --- a/test/functional/apps/discover/_inspector.ts +++ b/test/functional/apps/discover/_inspector.ts @@ -20,7 +20,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const STATS_ROW_VALUE_INDEX = 1; function getHitCount(requestStats: string[][]): string | undefined { const hitsCountStatsRow = requestStats.find((statsRow) => { - return statsRow[STATS_ROW_NAME_INDEX] === 'Hits (total)'; + return statsRow[STATS_ROW_NAME_INDEX] === 'Hits'; }); if (!hitsCountStatsRow) { @@ -35,7 +35,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); await kibanaServer.importExport.load('discover'); - await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); // delete .kibana index and update configDoc await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*', @@ -61,7 +61,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await inspector.open(); const requestStats = await inspector.getTableData(); - expect(getHitCount(requestStats)).to.be('14004'); + expect(getHitCount(requestStats)).to.be('500'); }); }); } diff --git a/test/functional/apps/discover/_large_string.ts b/test/functional/apps/discover/_large_string.ts index 0f6be04212a623..3e426c6237d89b 100644 --- a/test/functional/apps/discover/_large_string.ts +++ b/test/functional/apps/discover/_large_string.ts @@ -24,7 +24,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await security.testUser.setRoles(['kibana_admin', 'kibana_large_strings']); await kibanaServer.importExport.load('testlargestring'); - await esArchiver.loadIfNeeded('hamlet'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/hamlet'); await kibanaServer.uiSettings.replace({ defaultIndex: 'testlargestring' }); }); @@ -68,7 +68,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 62045e3c9a6b17..fd2ca4dd4b5cf1 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'); @@ -56,7 +56,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('allows creation of a new field', async function () { await createRuntimeField('runtimefield'); await PageObjects.header.waitUntilLoadingHasFinished(); - expect((await PageObjects.discover.getAllFieldNames()).includes('runtimefield')).to.be(true); + await retry.waitFor('fieldNames to include runtimefield', async () => { + const fieldNames = await PageObjects.discover.getAllFieldNames(); + return fieldNames.includes('runtimefield'); + }); }); it('allows editing of a newly created field', async function () { @@ -65,10 +68,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await fieldEditor.save(); await fieldEditor.confirmSave(); await PageObjects.header.waitUntilLoadingHasFinished(); - expect((await PageObjects.discover.getAllFieldNames()).includes('runtimefield')).to.be(false); - expect((await PageObjects.discover.getAllFieldNames()).includes('runtimefield edited')).to.be( - true - ); + + await retry.waitFor('fieldNames to include edits', async () => { + const fieldNames = await PageObjects.discover.getAllFieldNames(); + return fieldNames.includes('runtimefield edited'); + }); }); it('allows creation of a new field and use it in a saved search', async function () { @@ -94,7 +98,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.removeField('delete'); await fieldEditor.confirmDelete(); await PageObjects.header.waitUntilLoadingHasFinished(); - expect((await PageObjects.discover.getAllFieldNames()).includes('delete')).to.be(false); + await retry.waitFor('fieldNames to include edits', async () => { + const fieldNames = await PageObjects.discover.getAllFieldNames(); + return !fieldNames.includes('delete'); + }); }); it('doc view includes runtime fields', async function () { diff --git a/test/functional/apps/discover/_saved_queries.ts b/test/functional/apps/discover/_saved_queries.ts index acf78802fa18f7..67806c9d16a940 100644 --- a/test/functional/apps/discover/_saved_queries.ts +++ b/test/functional/apps/discover/_saved_queries.ts @@ -33,7 +33,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.load('discover'); // 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 512e05e4b2d792..151e8555eea77e 100644 --- a/test/functional/apps/discover/_shared_links.ts +++ b/test/functional/apps/discover/_shared_links.ts @@ -39,7 +39,7 @@ 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 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 f4b806976fc5d7..d8701261126c46 100644 --- a/test/functional/apps/discover/_sidebar.ts +++ b/test/functional/apps/discover/_sidebar.ts @@ -16,8 +16,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('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 4161f7f289dbfd..f3793dc3e02887 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 db76cd1c20c380..869fb625e87960 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 4bc1f54852b821..945c1fdcbdcf4e 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 401f33b789c859..a57ce0596abac9 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 49b6c162caa416..383b4faecc40c0 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 6c90556d77cf05..891e59d84a04bc 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 2daad1e457a6be..82723ad7ce9671 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 d9eb945be77771..0278955c577a10 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 3a09340f06ba04..038039275b8430 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/_kibana_settings.js b/test/functional/apps/management/_kibana_settings.js index 43f6631efb5c13..cfe4e88cda21de 100644 --- a/test/functional/apps/management/_kibana_settings.js +++ b/test/functional/apps/management/_kibana_settings.js @@ -37,14 +37,9 @@ export default function ({ getService, getPageObjects }) { describe('state:storeInSessionStorage', () => { async function getStateFromUrl() { const currentUrl = await browser.getCurrentUrl(); - let match = currentUrl.match(/(.*)?_g=(.*)&_a=(.*)/); - if (match) return [match[2], match[3]]; - match = currentUrl.match(/(.*)?_a=(.*)&_g=(.*)/); - if (match) return [match[3], match[2]]; - - if (!match) { - throw new Error('State in url is missing or malformed: ' + currentUrl); - } + const match = currentUrl.match(/(.*)?_g=(.*)/); + if (match) return match[2]; + throw new Error('State in url is missing or malformed: ' + currentUrl); } it('defaults to null', async () => { @@ -59,12 +54,11 @@ export default function ({ getService, getPageObjects }) { await PageObjects.common.navigateToApp('dashboard'); await PageObjects.dashboard.clickNewDashboard(); await PageObjects.timePicker.setDefaultAbsoluteRange(); - const [globalState, appState] = await getStateFromUrl(); + const globalState = await getStateFromUrl(); // We don't have to be exact, just need to ensure it's greater than when the hashed variation is being used, // which is less than 20 characters. expect(globalState.length).to.be.greaterThan(20); - expect(appState.length).to.be.greaterThan(20); }); it('setting to true change is preserved', async function () { @@ -81,12 +75,11 @@ export default function ({ getService, getPageObjects }) { await PageObjects.common.navigateToApp('dashboard'); await PageObjects.dashboard.clickNewDashboard(); await PageObjects.timePicker.setDefaultAbsoluteRange(); - const [globalState, appState] = await getStateFromUrl(); + const globalState = await getStateFromUrl(); // We don't have to be exact, just need to ensure it's less than the unhashed version, which will be // greater than 20 characters with the default state plus a time. expect(globalState.length).to.be.lessThan(20); - expect(appState.length).to.be.lessThan(20); }); it("changing 'state:storeInSessionStorage' also takes effect without full page reload", async () => { @@ -95,11 +88,10 @@ export default function ({ getService, getPageObjects }) { await PageObjects.settings.clickKibanaSettings(); await PageObjects.settings.toggleAdvancedSettingCheckbox('state:storeInSessionStorage'); await PageObjects.header.clickDashboard(); - const [globalState, appState] = await getStateFromUrl(); + const globalState = await getStateFromUrl(); // We don't have to be exact, just need to ensure it's greater than when the hashed variation is being used, // which is less than 20 characters. expect(globalState.length).to.be.greaterThan(20); - expect(appState.length).to.be.greaterThan(20); }); }); diff --git a/test/functional/apps/management/_mgmt_import_saved_objects.js b/test/functional/apps/management/_mgmt_import_saved_objects.js index 8697dc49de46a9..84e57a798c006f 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 44abf07b38ac65..105e1a394fecbc 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 c7a4c8c51bf44a..2ff9e55c59ebbc 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 7ed15a6cddbca3..6ced089936e5e9 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 dcfb8cf8b4c6b9..c8710a79e4fc82 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 ac0df0aa90c4df..c8049d2db4b28b 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 89889088bd73ba..a90e9274166859 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 92c65323333d01..26fd2a00430f18 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 8fba1a5ae2e5bc..b81a0e70d8a6d7 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/_area_chart.ts b/test/functional/apps/visualize/_area_chart.ts index 99f65458bb6063..be777607c78361 100644 --- a/test/functional/apps/visualize/_area_chart.ts +++ b/test/functional/apps/visualize/_area_chart.ts @@ -34,8 +34,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); describe('area charts', function indexPatternCreation() { + let isNewChartsLibraryEnabled = false; before(async () => { - await PageObjects.visualize.initTests(); + isNewChartsLibraryEnabled = await PageObjects.visChart.isNewChartsLibraryEnabled(); + await PageObjects.visualize.initTests(isNewChartsLibraryEnabled); }); const initAreaChart = async () => { log.debug('navigateToApp visualize'); diff --git a/test/functional/apps/visualize/_histogram_request_start.ts b/test/functional/apps/visualize/_histogram_request_start.ts index 8b5c31701d025b..28ebb25744d3fb 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/_line_chart_split_chart.ts b/test/functional/apps/visualize/_line_chart_split_chart.ts index 91c1db533cee9b..9b1c12de9666e4 100644 --- a/test/functional/apps/visualize/_line_chart_split_chart.ts +++ b/test/functional/apps/visualize/_line_chart_split_chart.ts @@ -25,6 +25,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ]); describe('line charts - split chart', function () { + let isNewChartsLibraryEnabled = false; const initLineChart = async function () { log.debug('navigateToApp visualize'); await PageObjects.visualize.navigateToNewAggBasedVisualization(); @@ -44,7 +45,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; before(async () => { - await PageObjects.visualize.initTests(); + isNewChartsLibraryEnabled = await PageObjects.visChart.isNewChartsLibraryEnabled(); + await PageObjects.visualize.initTests(isNewChartsLibraryEnabled); await initLineChart(); }); diff --git a/test/functional/apps/visualize/_line_chart_split_series.ts b/test/functional/apps/visualize/_line_chart_split_series.ts index 6630690b89c2c1..1c4b34b855cdea 100644 --- a/test/functional/apps/visualize/_line_chart_split_series.ts +++ b/test/functional/apps/visualize/_line_chart_split_series.ts @@ -25,6 +25,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ]); describe('line charts - split series', function () { + let isNewChartsLibraryEnabled = false; const initLineChart = async function () { log.debug('navigateToApp visualize'); await PageObjects.visualize.navigateToNewAggBasedVisualization(); @@ -42,7 +43,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; before(async () => { - await PageObjects.visualize.initTests(); + isNewChartsLibraryEnabled = await PageObjects.visChart.isNewChartsLibraryEnabled(); + await PageObjects.visualize.initTests(isNewChartsLibraryEnabled); await initLineChart(); }); diff --git a/test/functional/apps/visualize/_pie_chart.ts b/test/functional/apps/visualize/_pie_chart.ts index 8f76e2765e42c9..744ba3caa719e4 100644 --- a/test/functional/apps/visualize/_pie_chart.ts +++ b/test/functional/apps/visualize/_pie_chart.ts @@ -15,8 +15,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const filterBar = getService('filterBar'); const pieChart = getService('pieChart'); const inspector = getService('inspector'); - const browser = getService('browser'); - const kibanaServer = getService('kibanaServer'); const PageObjects = getPageObjects([ 'common', @@ -33,13 +31,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const vizName1 = 'Visualization PieChart'; before(async function () { isNewChartsLibraryEnabled = await PageObjects.visChart.isNewChartsLibraryEnabled(); - await PageObjects.visualize.initTests(); - if (isNewChartsLibraryEnabled) { - await kibanaServer.uiSettings.update({ - 'visualization:visualize:legacyChartsLibrary': false, - }); - await browser.refresh(); - } + await PageObjects.visualize.initTests(isNewChartsLibraryEnabled); + log.debug('navigateToApp visualize'); await PageObjects.visualize.navigateToNewAggBasedVisualization(); log.debug('clickPieChart'); diff --git a/test/functional/apps/visualize/_point_series_options.ts b/test/functional/apps/visualize/_point_series_options.ts index b81feaf29e1945..ee64fdf7ddda3b 100644 --- a/test/functional/apps/visualize/_point_series_options.ts +++ b/test/functional/apps/visualize/_point_series_options.ts @@ -60,9 +60,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.visEditor.clickGo(); } - describe('vlad point series', function describeIndexTests() { + describe('point series', function describeIndexTests() { + let isNewChartsLibraryEnabled = false; before(async () => { - await PageObjects.visualize.initTests(); + isNewChartsLibraryEnabled = await PageObjects.visChart.isNewChartsLibraryEnabled(); + await PageObjects.visualize.initTests(isNewChartsLibraryEnabled); await initChart(); }); diff --git a/test/functional/apps/visualize/_tsvb_chart.ts b/test/functional/apps/visualize/_tsvb_chart.ts index 690db676cb3686..1d4d4fee0175eb 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/_vertical_bar_chart.ts b/test/functional/apps/visualize/_vertical_bar_chart.ts index 1fe0d2f9a955bd..a728757a485e1a 100644 --- a/test/functional/apps/visualize/_vertical_bar_chart.ts +++ b/test/functional/apps/visualize/_vertical_bar_chart.ts @@ -19,8 +19,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']); describe('vertical bar chart', function () { + let isNewChartsLibraryEnabled = false; before(async () => { - await PageObjects.visualize.initTests(); + isNewChartsLibraryEnabled = await PageObjects.visChart.isNewChartsLibraryEnabled(); + await PageObjects.visualize.initTests(isNewChartsLibraryEnabled); }); const vizName1 = 'Visualization VerticalBarChart'; diff --git a/test/functional/apps/visualize/_vertical_bar_chart_nontimeindex.ts b/test/functional/apps/visualize/_vertical_bar_chart_nontimeindex.ts index 5f066e96c6e7cf..97817315b5801f 100644 --- a/test/functional/apps/visualize/_vertical_bar_chart_nontimeindex.ts +++ b/test/functional/apps/visualize/_vertical_bar_chart_nontimeindex.ts @@ -18,6 +18,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('vertical bar chart with index without time filter', function () { const vizName1 = 'Visualization VerticalBarChart without time filter'; + let isNewChartsLibraryEnabled = false; const initBarChart = async () => { log.debug('navigateToApp visualize'); @@ -40,7 +41,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; before(async () => { - await PageObjects.visualize.initTests(); + isNewChartsLibraryEnabled = await PageObjects.visChart.isNewChartsLibraryEnabled(); + await PageObjects.visualize.initTests(isNewChartsLibraryEnabled); await initBarChart(); }); diff --git a/test/functional/apps/visualize/index.ts b/test/functional/apps/visualize/index.ts index 1e0e12a7d31bba..cecd206abd1db0 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 97e746ba4a4c0b..566e6f033d2fd6 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 914559e5cea925..4e43ec90d16999 100644 --- a/test/functional/apps/visualize/legacy/index.ts +++ b/test/functional/apps/visualize/legacy/index.ts @@ -21,8 +21,8 @@ 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 esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/long_window_logstash'); await kibanaServer.importExport.load('visualize'); await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*', diff --git a/test/functional/fixtures/es_archiver/dashboard/legacy/mappings.json b/test/functional/fixtures/es_archiver/dashboard/legacy/mappings.json index a89fe1dfacfc83..45b2508d380330 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/mappings.json b/test/functional/fixtures/es_archiver/deprecations_service/mappings.json index 5f7c7e0e7b7dca..41cddecef0c419 100644 --- a/test/functional/fixtures/es_archiver/deprecations_service/mappings.json +++ b/test/functional/fixtures/es_archiver/deprecations_service/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/discover/mappings.json b/test/functional/fixtures/es_archiver/discover/mappings.json index 53bbe8a5baa5bd..519af2dd75b9e1 100644 --- a/test/functional/fixtures/es_archiver/discover/mappings.json +++ b/test/functional/fixtures/es_archiver/discover/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/empty_kibana/mappings.json b/test/functional/fixtures/es_archiver/empty_kibana/mappings.json index 403a891ba11757..264096beb11ee5 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/index_pattern_without_timefield/data.json b/test/functional/fixtures/es_archiver/index_pattern_without_timefield/data.json index 9493408a30040d..0888079ec7c52c 100644 --- a/test/functional/fixtures/es_archiver/index_pattern_without_timefield/data.json +++ b/test/functional/fixtures/es_archiver/index_pattern_without_timefield/data.json @@ -5,7 +5,7 @@ "index": ".kibana", "source": { "index-pattern": { - "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}]", + "fields": "[]", "title": "without-timefield" }, "type": "index-pattern" @@ -20,7 +20,6 @@ "index": "without-timefield", "source": { "@message" : "5", - "@timestamp": "2019-09-22T23:50:13.253Z", "referer": "http://twitter.com/error/takuya-onishi", "request": "/uploads/dafydd-williams.jpg", "response": "200", @@ -37,7 +36,7 @@ "index": ".kibana", "source": { "index-pattern": { - "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}]", + "fields": "[]", "title": "with-timefield", "timeFieldName": "@timestamp" }, diff --git a/test/functional/fixtures/es_archiver/index_pattern_without_timefield/mappings.json b/test/functional/fixtures/es_archiver/index_pattern_without_timefield/mappings.json index 00961119239511..dd41e01592a7b6 100644 --- a/test/functional/fixtures/es_archiver/index_pattern_without_timefield/mappings.json +++ b/test/functional/fixtures/es_archiver/index_pattern_without_timefield/mappings.json @@ -2,13 +2,6 @@ "type": "index", "value": { "index": "without-timefield", - "mappings": { - "properties": { - "@timestamp": { - "type": "date" - } - } - }, "settings": { "index": { "number_of_replicas": "0", 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 0024c6943ed1c0..63cc283f96d328 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 a89fe1dfacfc83..45b2508d380330 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 28198102d3d686..aefbd9d0ccc8a8 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 a89fe1dfacfc83..45b2508d380330 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 6a416126d7f263..05ca4d8e8307e5 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/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/mappings.json index 43b851e817fa81..653e6399548135 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,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/hidden_saved_objects/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects/mappings.json index 1de768d290d35d..a158deb527cc83 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,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/hidden_types/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_management/hidden_types/mappings.json index a9abae009cb59b..61763f55c1b6a6 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/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_management/nested_export_transform/mappings.json index 43b851e817fa81..653e6399548135 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,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/show_relationships/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_management/show_relationships/mappings.json index a5478a5805d501..aba581867bb8a9 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 a89fe1dfacfc83..45b2508d380330 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/mappings.json b/test/functional/fixtures/es_archiver/visualize/mappings.json index 464f6751eac5ca..59ec24853e2270 100644 --- a/test/functional/fixtures/es_archiver/visualize/mappings.json +++ b/test/functional/fixtures/es_archiver/visualize/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_embedding/mappings.json b/test/functional/fixtures/es_archiver/visualize_embedding/mappings.json index a89fe1dfacfc83..45b2508d380330 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 a89fe1dfacfc83..45b2508d380330 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 0f17621dbf5291..5ac113e7e4b743 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 194f0936274e5e..ecba9549cea02b 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 }); @@ -242,7 +245,10 @@ export class DashboardPageObject extends FtrService { public async switchToEditMode() { this.log.debug('Switching to edit mode'); - await this.testSubjects.click('dashboardEditMode'); + if (await this.testSubjects.exists('dashboardEditMode')) { + // if the dashboard is not already in edit mode + await this.testSubjects.click('dashboardEditMode'); + } // wait until the count of dashboard panels equals the count of toggle menu icons await this.retry.waitFor('in edit mode', async () => { const panels = await this.testSubjects.findAll('embeddablePanel', 2500); @@ -258,22 +264,17 @@ export class DashboardPageObject extends FtrService { public async clickCancelOutOfEditMode(accept = true) { this.log.debug('clickCancelOutOfEditMode'); + if (await this.getIsInViewMode()) return; + await this.retry.waitFor('leave edit mode button enabled', async () => { + const leaveEditModeButton = await this.testSubjects.find('dashboardViewOnlyMode'); + const isDisabled = await leaveEditModeButton.getAttribute('disabled'); + return !isDisabled; + }); await this.testSubjects.click('dashboardViewOnlyMode'); if (accept) { - const confirmation = await this.testSubjects.exists('dashboardDiscardConfirmKeep'); - if (confirmation) { - await this.testSubjects.click('dashboardDiscardConfirmKeep'); - } - } - } - - public async clickDiscardChanges(accept = true) { - this.log.debug('clickDiscardChanges'); - await this.testSubjects.click('dashboardViewOnlyMode'); - if (accept) { - const confirmation = await this.testSubjects.exists('dashboardDiscardConfirmDiscard'); + const confirmation = await this.testSubjects.exists('confirmModalTitleText'); if (confirmation) { - await this.testSubjects.click('dashboardDiscardConfirmDiscard'); + await this.common.clickConfirmOnModal(); } } } diff --git a/test/functional/page_objects/timelion_page.ts b/test/functional/page_objects/timelion_page.ts index 57913f8e2413dc..65584d98022be3 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 efd48346524299..f77db553e015f9 100644 --- a/test/functional/page_objects/visualize_page.ts +++ b/test/functional/page_objects/visualize_page.ts @@ -47,13 +47,14 @@ export class VisualizePageObject extends FtrService { LOGSTASH_NON_TIME_BASED: 'logstash*', }; - public async initTests() { + public async initTests(isNewLibrary = false) { await this.kibanaServer.savedObjects.clean({ types: ['visualization'] }); await this.kibanaServer.importExport.load('visualize'); await this.kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*', [UI_SETTINGS.FORMAT_BYTES_DEFAULT_PATTERN]: '0,0.[000]b', + 'visualization:visualize:legacyChartsLibrary': !isNewLibrary, }); } 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 b1561b29342dad..148c21ffac191b 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 738a8d55439ece..2b93fce4daa51e 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/functional/services/visualizations/pie_chart.ts b/test/functional/services/visualizations/pie_chart.ts index 99e0bb6ac4c4c6..7c925318f0211f 100644 --- a/test/functional/services/visualizations/pie_chart.ts +++ b/test/functional/services/visualizations/pie_chart.ts @@ -42,7 +42,7 @@ export class PieChartService extends FtrService { const pieWidth = pieSize.width; await pie.clickMouseButton({ xOffset: pieSlice.coords[0] - Math.floor(pieWidth / 2), - yOffset: Math.floor(pieHeight / 2) - pieSlice.coords[1], + yOffset: pieSlice.coords[1] - Math.floor(pieHeight / 2), }); } } else { @@ -94,7 +94,7 @@ export class PieChartService extends FtrService { const selectedSlice = slices.filter((slice) => { return slice.name.toString() === name.replace(',', ''); }); - return selectedSlice[0].color; + return selectedSlice[0]?.color; } const pieSlice = await this.getPieSlice(name); return await pieSlice.getAttribute('style'); diff --git a/test/interpreter_functional/config.ts b/test/interpreter_functional/config.ts index adcac520125ade..c0ec982fb98b6a 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 18d20c97be81e9..9cf7e0deba2fac 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 04b91542223bad..3470973f9c96c5 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 d17501305d0bda..02245002e83360 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 631cbc8146d654..3791e663fb68c3 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 00000000000000..539550974c563a --- /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 00000000000000..3fe16ddee53214 --- /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 00000000000000..90814bd552d37e --- /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?