diff --git a/.buildkite/disabled_jest_configs.json b/.buildkite/disabled_jest_configs.json index ce6235823b0ab..4b37f3d9be6b6 100644 --- a/.buildkite/disabled_jest_configs.json +++ b/.buildkite/disabled_jest_configs.json @@ -1,5 +1,4 @@ [ - "x-pack/plugins/triggers_actions_ui/jest.config.js", "x-pack/plugins/watcher/jest.config.js", "src/core/server/integration_tests/ui_settings/jest.integration.config.js" ] diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ffb147c7abb5e..fff20275b2cf2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -907,6 +907,7 @@ packages/kbn-dev-utils @elastic/kibana-operations packages/kbn-doc-links @elastic/kibana-docs packages/kbn-docs-utils @elastic/kibana-operations packages/kbn-ebt-tools @elastic/kibana-core +packages/kbn-ecs @elastic/kibana-core packages/kbn-es @elastic/kibana-operations packages/kbn-es-archiver @elastic/kibana-operations packages/kbn-es-errors @elastic/kibana-core diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 81f509082dadc..0c93a90e7b5f9 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 12ef39363300d..fac37527f9bf4 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 095bd8fa7eb95..b7eacadc2aaaf 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 4ef1f8e10f128..43d20c7c9dbd3 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 1d77204e75610..dff4c3d545ea7 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 6c4bc89ffb850..2a939efbe312e 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index 0250ac3b8986d..ba59022f44ed5 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 3aa67f1e94c10..db6dcf51cfde8 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index dd8bf7693d7ff..83b4684c967ca 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index b2a187f19c3e2..8bd1d5d81d4d0 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index 33e231df38ebf..57c676dab4d74 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_chat.mdx b/api_docs/cloud_chat.mdx index 0ce7ccd57eb1b..041034b63ea84 100644 --- a/api_docs/cloud_chat.mdx +++ b/api_docs/cloud_chat.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudChat title: "cloudChat" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudChat plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudChat'] --- import cloudChatObj from './cloud_chat.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index d81e026aa70a0..5101075970f3d 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index 1ee3eef59ad2c..1d45708a076e4 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; diff --git a/api_docs/console.mdx b/api_docs/console.mdx index f99f647229897..088aafa168739 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 69dd062cc4f27..55e779671d098 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/core.mdx b/api_docs/core.mdx index 6faca8be95423..408bacb587c10 100644 --- a/api_docs/core.mdx +++ b/api_docs/core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/core title: "core" image: https://source.unsplash.com/400x175/?github description: API docs for the core plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core'] --- import coreObj from './core.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index c9766612a6e6f..f582a84376252 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index 2fe55a4ae27fd..ef75aee991b3d 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index c933ef0a1d956..2088b82d402ae 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json index 46494fb6599e2..41ffa2a2bc478 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -7776,10 +7776,10 @@ }, { "parentPluginId": "data", - "id": "def-public.GetFieldsOptions.filter", + "id": "def-public.GetFieldsOptions.indexFilter", "type": "Object", "tags": [], - "label": "filter", + "label": "indexFilter", "description": [], "signature": [ "QueryDslQueryContainer", @@ -17022,7 +17022,7 @@ "\n Get a list of field objects for an index pattern that may contain wildcards\n" ], "signature": [ - "(options: { pattern: string | string[]; metaFields?: string[] | undefined; fieldCapsOptions?: { allow_no_indices: boolean; includeUnmapped?: boolean | undefined; } | undefined; type?: string | undefined; rollupIndex?: string | undefined; filter?: ", + "(options: { pattern: string | string[]; metaFields?: string[] | undefined; fieldCapsOptions?: { allow_no_indices: boolean; includeUnmapped?: boolean | undefined; } | undefined; type?: string | undefined; rollupIndex?: string | undefined; indexFilter?: ", "QueryDslQueryContainer", " | undefined; }) => Promise<{ fields: ", { @@ -17121,10 +17121,10 @@ }, { "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.filter", + "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.indexFilter", "type": "Object", "tags": [], - "label": "filter", + "label": "indexFilter", "description": [], "signature": [ "QueryDslQueryContainer", @@ -26661,10 +26661,10 @@ }, { "parentPluginId": "data", - "id": "def-common.GetFieldsOptions.filter", + "id": "def-common.GetFieldsOptions.indexFilter", "type": "Object", "tags": [], - "label": "filter", + "label": "indexFilter", "description": [], "signature": [ "QueryDslQueryContainer", diff --git a/api_docs/data.mdx b/api_docs/data.mdx index f2969c85f8cbf..18d0a547d54ec 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 5fd034d71a6f1..f4877a21837e0 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 14f2616868ebd..e95a86fae3f25 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 09b86f758cd33..0d3acb151a685 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index af387685788d5..42008d40a5071 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index 661a72104f231..908f3a117e342 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.devdocs.json b/api_docs/data_views.devdocs.json index 976b37bd2f01e..445e80d1b4524 100644 --- a/api_docs/data_views.devdocs.json +++ b/api_docs/data_views.devdocs.json @@ -12785,7 +12785,7 @@ "\n Get a list of field objects for an index pattern that may contain wildcards\n" ], "signature": [ - "(options: { pattern: string | string[]; metaFields?: string[] | undefined; fieldCapsOptions?: { allow_no_indices: boolean; includeUnmapped?: boolean | undefined; } | undefined; type?: string | undefined; rollupIndex?: string | undefined; filter?: ", + "(options: { pattern: string | string[]; metaFields?: string[] | undefined; fieldCapsOptions?: { allow_no_indices: boolean; includeUnmapped?: boolean | undefined; } | undefined; type?: string | undefined; rollupIndex?: string | undefined; indexFilter?: ", "QueryDslQueryContainer", " | undefined; }) => Promise<{ fields: ", { @@ -12884,10 +12884,10 @@ }, { "parentPluginId": "dataViews", - "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.filter", + "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.indexFilter", "type": "Object", "tags": [], - "label": "filter", + "label": "indexFilter", "description": [], "signature": [ "QueryDslQueryContainer", @@ -23422,10 +23422,10 @@ }, { "parentPluginId": "dataViews", - "id": "def-common.GetFieldsOptions.filter", + "id": "def-common.GetFieldsOptions.indexFilter", "type": "Object", "tags": [], - "label": "filter", + "label": "indexFilter", "description": [], "signature": [ "QueryDslQueryContainer", diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 413b51ff9d4ff..f6ce569d1d932 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index f82be37d2ce59..927159f119a7d 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 70ae242225c2e..b90368b3021f7 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 1d7608f5642d3..caab93041b0d4 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index a358081412449..e4340ed74b3b5 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 8d9c918b0218e..043485b8d88ef 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 96aa3f74d844b..c8be89623c2f2 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 884af4cabf8e1..2aa6171e9cd75 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 6585492fad461..1d1d221acf43e 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 13deeea5fdde8..beb700808413d 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index dd968c368bf02..1e04bc43ce634 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 757b5228e240e..596dda08913fc 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 8ba960548f4e2..9287b090bc060 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index 05b2ce99a7ee5..d42dec5463e26 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 78b2a6940e5f9..153be192fc01b 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 36ae9aa57a8bc..47e2f0540f016 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index 3c522134dfe41..d98d3644ba658 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index bb5adc6b9ab90..5c64139fb9ff6 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 943d13e794e19..52a6a48dae31b 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index b2db52ed8d8ff..de4021bead1be 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index de5166c4934e0..a2ad0989e401c 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index cf48bb3dd2ca7..a5a9fef5aa65e 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index b6dbadcf3cedd..5c5d3fd9e5bd0 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 8da8a7744ec8f..3dedac66636b0 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index bd256f82e7f9f..e9e29bafe83ad 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 9042bd8b99256..9c9967edef3d9 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index efcc5967cd585..722dddbe0b001 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index bdbe9324be981..aa3e3f78af1bc 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index c0f3adff39807..e4c7b652af96b 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.mdx b/api_docs/features.mdx index 1a4c38f937398..0afe14ef978d2 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index 03a0c16178b32..c52c1df16f32a 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index e8b665885d35f..6697e5eb9fe39 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index 50149bbd51ccb..2f6b82c1af173 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index 558de8f148caa..26daa27e2f856 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index cdce3a06412cc..7dbe768a37a6c 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -10590,7 +10590,8 @@ "label": "fleet", "description": [], "signature": [ - "{ hosts: string[]; proxy_url?: string | undefined; proxy_headers?: any; ssl?: { verification_mode?: string | undefined; certificate_authorities?: string[] | undefined; renegotiation?: string | undefined; } | undefined; } | { kibana: ", + "FullAgentPolicyFleetConfig", + " | { kibana: ", { "pluginId": "fleet", "scope": "common", @@ -12122,6 +12123,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "fleet", + "id": "def-common.NewAgentPolicy.inactivity_timeout", + "type": "number", + "tags": [], + "label": "inactivity_timeout", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "fleet", "id": "def-common.NewAgentPolicy.is_preconfigured", @@ -17605,28 +17620,12 @@ "label": "getCheckPermissionsPath", "description": [], "signature": [ - "(fleetServerSetup?: boolean | undefined) => string" + "() => string" ], "path": "x-pack/plugins/fleet/common/services/routes.ts", "deprecated": false, "trackAdoption": false, - "children": [ - { - "parentPluginId": "fleet", - "id": "def-common.appRoutesService.getCheckPermissionsPath.$1", - "type": "CompoundType", - "tags": [], - "label": "fleetServerSetup", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "x-pack/plugins/fleet/common/services/routes.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], + "children": [], "returnComment": [] }, { diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 6f1332902aee0..c6232687219ed 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Fleet](https://github.com/orgs/elastic/teams/fleet) for questions regar | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1027 | 3 | 922 | 19 | +| 1027 | 3 | 922 | 20 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index b01ceb9b0b3d5..53752f95b8eb3 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.devdocs.json b/api_docs/guided_onboarding.devdocs.json index b22c8313da7e4..8ff0a5ea7ecbf 100644 --- a/api_docs/guided_onboarding.devdocs.json +++ b/api_docs/guided_onboarding.devdocs.json @@ -948,6 +948,17 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "guidedOnboarding", + "id": "def-server.testGuideConfig.telemetryId", + "type": "string", + "tags": [], + "label": "telemetryId", + "description": [], + "path": "src/plugins/guided_onboarding/common/test_guide_config.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "guidedOnboarding", "id": "def-server.testGuideConfig.completedGuideRedirectLocation", @@ -1189,6 +1200,17 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "guidedOnboarding", + "id": "def-common.GuideConfig.telemetryId", + "type": "string", + "tags": [], + "label": "telemetryId", + "description": [], + "path": "src/plugins/guided_onboarding/common/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "guidedOnboarding", "id": "def-common.GuideConfig.docs", @@ -1465,7 +1487,7 @@ "section": "def-common.GuideConfig", "text": "GuideConfig" }, - "; security: ", + "; kubernetes: ", { "pluginId": "guidedOnboarding", "scope": "common", @@ -1473,7 +1495,7 @@ "section": "def-common.GuideConfig", "text": "GuideConfig" }, - "; observability: ", + "; siem: ", { "pluginId": "guidedOnboarding", "scope": "common", @@ -1551,7 +1573,7 @@ "label": "testGuideId", "description": [], "signature": [ - "\"search\" | \"security\" | \"observability\" | \"testGuide\"" + "\"search\" | \"kubernetes\" | \"siem\" | \"testGuide\"" ], "path": "src/plugins/guided_onboarding/common/test_guide_config.ts", "deprecated": false, @@ -1604,6 +1626,17 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "guidedOnboarding", + "id": "def-common.testGuideConfig.telemetryId", + "type": "string", + "tags": [], + "label": "telemetryId", + "description": [], + "path": "src/plugins/guided_onboarding/common/test_guide_config.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "guidedOnboarding", "id": "def-common.testGuideConfig.completedGuideRedirectLocation", diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index d511a58959d4e..fa4d2c2d4f93f 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Journey Onboarding](https://github.com/orgs/elastic/teams/platform-onbo | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 91 | 0 | 90 | 0 | +| 94 | 0 | 93 | 0 | ## Client diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 051c83916997a..0e80cccce52ca 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 1b43a6146aef0..df292fb24960c 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index c991e94beeffd..8304a05623f42 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index f1853ee728b29..d138ef36dd028 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 6e61f0e79301c..d24ff1fe679e7 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 0c82593d80adb..4b7afa427c5da 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index 3b81ca2864917..cbbf12af7a614 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index a9c2dcaa41e49..0c89ce831d53d 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index 952a88dc5ab89..91095e0b80cc5 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] --- import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx index eb4821af50637..29e653c42b222 100644 --- a/api_docs/kbn_alerts.mdx +++ b/api_docs/kbn_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts title: "@kbn/alerts" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts'] --- import kbnAlertsObj from './kbn_alerts.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 5d7b6d6bc6f6b..d28813217d5a9 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index fe7c34561bf73..ea80e523b923a 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index 8b46aff007c34..3d418505ddbfa 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] --- import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index 99b811a6d6916..c7742e3b454c0 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] --- import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index 08f20f5d5ebee..b3635a41a4f46 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] --- import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index b30b9190d46b7..19acdcd414876 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_gainsight.mdx b/api_docs/kbn_analytics_shippers_gainsight.mdx index 122ab294c8f3c..e57bc170e4d09 100644 --- a/api_docs/kbn_analytics_shippers_gainsight.mdx +++ b/api_docs/kbn_analytics_shippers_gainsight.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-gainsight title: "@kbn/analytics-shippers-gainsight" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-gainsight plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-gainsight'] --- import kbnAnalyticsShippersGainsightObj from './kbn_analytics_shippers_gainsight.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index 2151a932c7f03..f22ddf8a415ab 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 3e18ba133c6c8..4de747bf5b179 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index c357945071fdf..e800ee95fcc91 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index c61c0b89a9037..9cdb5f6b38129 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index ca31987c79023..21dbee87e461b 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index 651d5f57ab388..3640fa391aaee 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index 2f8f8ba4ff522..509de3c408ace 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 7279733bf559d..611fc59f7c4b5 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index 98a0a9f44b7df..e1d98dff18d2b 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index 11b6aada6b2e8..898b17778b008 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 8c708154026be..dea1d3e06cc6e 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 4971d9f30daaf..a4a1a393a47cb 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index dcf36fb47ebb9..1274053424a74 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index 13dbfdf0ecdb6..b63c0c940c8fb 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_inspector.mdx b/api_docs/kbn_content_management_inspector.mdx index 4a58aa041c08b..cf557fc419d4e 100644 --- a/api_docs/kbn_content_management_inspector.mdx +++ b/api_docs/kbn_content_management_inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-inspector title: "@kbn/content-management-inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-inspector plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-inspector'] --- import kbnContentManagementInspectorObj from './kbn_content_management_inspector.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list.mdx b/api_docs/kbn_content_management_table_list.mdx index 4a9be5529aeb7..72eb7d0cb84e7 100644 --- a/api_docs/kbn_content_management_table_list.mdx +++ b/api_docs/kbn_content_management_table_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list title: "@kbn/content-management-table-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list'] --- import kbnContentManagementTableListObj from './kbn_content_management_table_list.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index 014013325c87b..d983d56f49ee1 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index 4717b4e9983fd..29e8c3834851d 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index 2858ad1fe4c9a..4cabc580e87f1 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index eaf2d053878f7..a127b69c5f7ce 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index 21fd660f2a8e2..bc8553d192571 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index d1a91e532d9bf..d8620c4a94e98 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index 547a24feed581..6e18afeee2d88 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index 44051244c4cdc..32b32cb1e61d3 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index 61cd4224c3109..2067fcf0c8226 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index c1ce5d5868b8f..90bc0d0d49db5 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index 5dc58b9603185..c22d791b690ef 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index c79d8deee6fcf..766bacf1b7685 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index e80309adc415f..5397d4eab1327 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 0dcba83d15c30..b2b8262a63051 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 0f65788a377b0..7f06171d25bfb 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index 1253b86bb8aee..211eea4efaf68 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index 0789a8839ef9a..27de5e1fa1d92 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index 72a7ce1aa5619..0de3bda52c578 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index b45900b18ea6e..7631c73830e68 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index 52c30fee48933..e487452cda67c 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index 8262beb0f3a8d..0a09ce8031038 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index 76bdb321cde3b..948cf50b0f3b5 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 9964e19fd1aea..e53cbd02f9223 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index a9a6c588d7cf8..51da6ea59507a 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index 1dacb9bc14d2d..91754233120f8 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index e28d9960f9fa3..cc3169962a7d0 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index d1dd88eb7598b..1b1a815a43a08 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index a51a74ca2d84f..639f6ec8df6b1 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index 56d253ed005cf..5e12957fa796d 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index ac8c1f1a2880a..a9215f2bd22aa 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index 493757230f140..650f8452eeaac 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 03c9f26c40bd2..79ce4c0c9693b 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index 7a907604907f7..83198decd6f89 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index 97efe33bbdcff..c671a33bfd225 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index 20c103d3f10a5..e50e99a22c582 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index f9367acaac2e7..39cdfe775d273 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index c4162235c537e..d8dd523a5f98a 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index 1b672a24fbceb..0517c138d0a25 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index 31aad14e54149..15c0823c343bd 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index e6155f9476d7a..c2f7bf364ba9e 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index 2908761362f41..2cfb042dd3f3b 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index 084107bb02eb8..fec1909f48772 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index fa43d226e9da4..f9a1079c03b4b 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index 666df767ccba1..a6dbf68aca252 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index b1f602a0bdb63..4d01639633469 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index eb91be7c35217..48f1770282bbd 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index ddf4dc7148a31..0ef9cb64a2324 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index a55931725b6ff..c3c60e429ebe5 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index b02267df754df..cef226a836393 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index fb784ab907d94..901d37ca999af 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index 8a98e64006030..ec1479ff0df67 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index 71b956a07ad0a..0a9434c05beeb 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index f5b8aede2ce60..e5d8b2233f820 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index 79f43671dd189..b1aa1ce0bae94 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 2edef18da333f..90f89e5640201 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index 7995754b8f545..eba5b28785f12 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index 06cbd2bfa701e..f7f3908a9caed 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index e48d28608980f..217c3139f846d 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index 4dc6e92149948..503776dcac1e6 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index 2577fc7269dbd..cc71e24f14785 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index b86e0409c4b00..096b76b6aa5c0 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index 0654163a01a7c..521d63304feb5 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 143046575bdb9..90ae008194d93 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 936814b3441d5..abd63c8682d49 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index 91fa32fae7eae..e1e8315fe079b 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index 2445bbea45e81..a2e735cff1503 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index f4d9f5b62c535..a4c3e397dd2c1 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index b6b5665db2e2a..f9e4be3288b55 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index 2567d63e7bd48..fb5003dfaec22 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index 7acd5544acb75..b10132bba5136 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser.mdx b/api_docs/kbn_core_injected_metadata_browser.mdx index 3d82369c0142e..b3a5f255712c5 100644 --- a/api_docs/kbn_core_injected_metadata_browser.mdx +++ b/api_docs/kbn_core_injected_metadata_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser title: "@kbn/core-injected-metadata-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser'] --- import kbnCoreInjectedMetadataBrowserObj from './kbn_core_injected_metadata_browser.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index a2a46380dda2e..5ace041bb06c7 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index 3cbc99636f7c3..25c32098ff1b2 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index 532e22caa1a45..dadce5976f4e0 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index b7269ea2d0f39..b39cab428a922 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index 49fbd6849b3f6..5dbfcad227a46 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index 66cd00d4831a2..8caedb7ddfd6e 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index 5037fed258886..c3c649c59cebb 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index 088cff0ddd4a4..497e9b7b1ed7b 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index 539ab6849cd60..2e1c9b9b298fd 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index f9acec9226990..aee1bc97bdd7a 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index c67fee667aaae..f3bc2c1f382b1 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index 6394917d11cee..7cec1e2bb3dc1 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index da464a62f1938..68d4791981142 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index 44d8d3caf8655..cb7d24791071b 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index ff022efdd7c35..b8f5f6afd6f6f 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index 4fc4e40f9dffa..7d64a7a3f12a5 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index 578915d9a5d4b..3f5150096bbaa 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index ca7653462bb7d..abd92ad63462a 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 3513bd8ed521f..90ea37eb5b292 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index e925e5b3a1736..d9872071926ee 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index 05669dd3461df..c31fcc678e227 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index 6cc7b3475b478..3a6b3543d28c8 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index 6d584052b6f2b..9a39d3ff28f65 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index 63182b60b78fe..a7ca611c3863c 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index b325fe69651d2..d288f8f3b05f6 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index 7f8294d60db6e..c1a623b2ecb13 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index 631ab5dc1b292..bfcfe1728c0d6 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index 41d82ffd4f7f5..177be5239c8e0 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 732eed981c32a..b52065b1dc5c1 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index cfe1ee6d5d250..7272cccde3593 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index 495fbca0b8648..ea065e4e02449 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index 2050daf16efd0..a6a14f8e1d9c9 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index 9c0865a41824b..ddef17168aab8 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index 8a7870c1ee7fc..c386ed8794884 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index f4fba839f6b10..1820c9f4a89ac 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index e6f455b270df5..07732d14a07ea 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index f5135951d5f7a..4e9c83c5d2cdc 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index 2750400624ac0..45f2340ef7585 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index e5e03067b6e79..45378f6a4a38b 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_internal.mdx b/api_docs/kbn_core_saved_objects_api_server_internal.mdx index 4db04251204f0..ac6e8d11d5724 100644 --- a/api_docs/kbn_core_saved_objects_api_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-internal title: "@kbn/core-saved-objects-api-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-internal'] --- import kbnCoreSavedObjectsApiServerInternalObj from './kbn_core_saved_objects_api_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index ae0b40f563612..f40e0719e8ea4 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index 043a3cce88dfb..1b7dbe4fe10df 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index 8ffb7722daae9..21d3df325a07a 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index db94405e4bc45..b04abc14378d3 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index ea53a4b24d70d..a3f977bd8865c 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index c5b682d33a6ed..b3fcfdc024010 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index 24f72e39b4884..9ee1c51d79c28 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index f98da74135ba1..eb2e7ad8ebd58 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index 2da164bb4a1f2..775d3ee01e248 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index 0dde851c6b589..929148644c9ed 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index 6c74978009c4d..8e78268897868 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index ffeb2ed6438bd..058e96396f2a0 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index 7ca4102c6ab74..f0da9f553826b 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index 66d40e94049e0..fd0b98e723c22 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index a7e2ae6775f84..3518a0332acbd 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index c64c56ea02bda..d1fedf5b80ef5 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index 89d8a4a3da84b..944fb65ce1c9c 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index 74bf165f35935..b67c391487649 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index 0ad587a8972c3..c66c15b251f0c 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index 83cd33092c74b..ae8b1a8b8c454 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 97bf9389eb391..24d46038bb29e 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index 7f989b9c54255..edc231fe6167f 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_kbn_server.devdocs.json b/api_docs/kbn_core_test_helpers_kbn_server.devdocs.json index 093ae6c247016..776ff1e31ea9f 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.devdocs.json +++ b/api_docs/kbn_core_test_helpers_kbn_server.devdocs.json @@ -86,7 +86,7 @@ "signature": [ "(settings: {}, cliArgs: Partial<", "CliArgs", - ">) => ", + ">, customKibanaVersion: string | undefined) => ", { "pluginId": "@kbn/core-root-server-internal", "scope": "server", @@ -132,6 +132,21 @@ "deprecated": false, "trackAdoption": false, "isRequired": true + }, + { + "parentPluginId": "@kbn/core-test-helpers-kbn-server", + "id": "def-server.createRootWithCorePlugins.$3", + "type": "string", + "tags": [], + "label": "customKibanaVersion", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/test-helpers/core-test-helpers-kbn-server/src/create_root.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false } ], "returnComment": [], @@ -147,7 +162,7 @@ "signature": [ "(settings: Record, cliArgs: Partial<", "CliArgs", - ">) => ", + ">, customKibanaVersion: string | undefined) => ", { "pluginId": "@kbn/core-root-server-internal", "scope": "server", @@ -191,6 +206,21 @@ "deprecated": false, "trackAdoption": false, "isRequired": true + }, + { + "parentPluginId": "@kbn/core-test-helpers-kbn-server", + "id": "def-server.createRootWithSettings.$3", + "type": "string", + "tags": [], + "label": "customKibanaVersion", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/test-helpers/core-test-helpers-kbn-server/src/create_root.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false } ], "returnComment": [], diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index 5b128182ff113..713e0e1b2a048 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; @@ -21,7 +21,7 @@ Contact Kibana Core for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 52 | 1 | 46 | 0 | +| 54 | 1 | 48 | 0 | ## Server diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index a65c1990d6cf3..fd46e183794a9 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index 68338c52c41fb..0a2b14c58f102 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 902cb3c9376cc..9e056a3c4b585 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_internal.mdx b/api_docs/kbn_core_theme_browser_internal.mdx index 07ac49acbafdf..f77bb6252ede2 100644 --- a/api_docs/kbn_core_theme_browser_internal.mdx +++ b/api_docs/kbn_core_theme_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal title: "@kbn/core-theme-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-internal'] --- import kbnCoreThemeBrowserInternalObj from './kbn_core_theme_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index d57f45c49ddfe..addf8baa23207 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index 16a1f288374a8..8eb92c6c29f93 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index 14493a494a6c1..aed3b3ea686f6 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index 3b40a185059ef..7b3f2b792bbd6 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 34cdc93518e7a..0fe09eb2fdbe3 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index eb760077b882a..a30142653f61f 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index 2f0c8c0030bc2..0c288515169b2 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index fe3e121d5044c..a4997c5217abc 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index 6fde539da3892..8059ceb401b92 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index 8f0b65837e0da..770d668322507 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index cf26bfc20c25d..a18c8b25b7699 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index 7343cc900c3e1..f5abec34c91f0 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index e9e81ae2f37dd..70d982d3fcf90 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index e0226ab78312d..bec6da45afce8 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index f173c9cbafed8..590b242e15c71 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index dbbcd80f69e7f..38598fead9151 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index 790bc61b5a07f..c145a291d2b6c 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index c868113b58cfb..6d7c4ea295666 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index d71b23711d474..365342a2ddf99 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 4e3c6835709cf..672456a2f43c3 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index b79cc3e76c867..c7922117596ee 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index a804a187c8e8a..5eddad838e282 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index e22f1eeff2736..8255c40f1c665 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index 2c026064d64ba..1e6fe11aae1f8 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 19e0b01951eb2..f4e5edeaacbb7 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 3156d3afd2e82..8d9b903640fd4 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 2c9cfa9a06eb1..c68768f9447a7 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 8e566cd3b7ffa..011add756673f 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index c82bb508e2785..3ffd1e16ddc46 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index a89484d0928c5..8ccfadadfa55d 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index dfe671f534646..a15b59ce98113 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_get_repo_files.mdx b/api_docs/kbn_get_repo_files.mdx index 9adaa07e426a4..a2728482ea92c 100644 --- a/api_docs/kbn_get_repo_files.mdx +++ b/api_docs/kbn_get_repo_files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-get-repo-files title: "@kbn/get-repo-files" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/get-repo-files plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/get-repo-files'] --- import kbnGetRepoFilesObj from './kbn_get_repo_files.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.devdocs.json b/api_docs/kbn_guided_onboarding.devdocs.json index 39521593c905b..7932c979d41a2 100644 --- a/api_docs/kbn_guided_onboarding.devdocs.json +++ b/api_docs/kbn_guided_onboarding.devdocs.json @@ -56,10 +56,10 @@ }, { "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.ObservabilityLinkCard", + "id": "def-common.InfrastructureLinkCard", "type": "Function", "tags": [], - "label": "ObservabilityLinkCard", + "label": "InfrastructureLinkCard", "description": [], "signature": [ "({ navigateToApp, isDarkTheme, addBasePath, }: { navigateToApp: (appId: string, options?: ", @@ -72,24 +72,24 @@ }, " | undefined) => Promise; isDarkTheme: boolean; addBasePath: (url: string) => string; }) => JSX.Element" ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/observability_link_card.tsx", + "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.ObservabilityLinkCard.$1", + "id": "def-common.InfrastructureLinkCard.$1", "type": "Object", "tags": [], "label": "{\n navigateToApp,\n isDarkTheme,\n addBasePath,\n}", "description": [], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/observability_link_card.tsx", + "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.ObservabilityLinkCard.$1.navigateToApp", + "id": "def-common.InfrastructureLinkCard.$1.navigateToApp", "type": "Function", "tags": [], "label": "navigateToApp", @@ -105,13 +105,13 @@ }, " | undefined) => Promise" ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/observability_link_card.tsx", + "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.ObservabilityLinkCard.$1.navigateToApp.$1", + "id": "def-common.InfrastructureLinkCard.$1.navigateToApp.$1", "type": "string", "tags": [], "label": "appId", @@ -119,14 +119,14 @@ "signature": [ "string" ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/observability_link_card.tsx", + "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true }, { "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.ObservabilityLinkCard.$1.navigateToApp.$2", + "id": "def-common.InfrastructureLinkCard.$1.navigateToApp.$2", "type": "Object", "tags": [], "label": "options", @@ -141,7 +141,7 @@ }, " | undefined" ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/observability_link_card.tsx", + "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", "deprecated": false, "trackAdoption": false, "isRequired": false @@ -151,18 +151,18 @@ }, { "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.ObservabilityLinkCard.$1.isDarkTheme", + "id": "def-common.InfrastructureLinkCard.$1.isDarkTheme", "type": "boolean", "tags": [], "label": "isDarkTheme", "description": [], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/observability_link_card.tsx", + "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.ObservabilityLinkCard.$1.addBasePath", + "id": "def-common.InfrastructureLinkCard.$1.addBasePath", "type": "Function", "tags": [], "label": "addBasePath", @@ -170,13 +170,13 @@ "signature": [ "(url: string) => string" ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/observability_link_card.tsx", + "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.ObservabilityLinkCard.$1.addBasePath.$1", + "id": "def-common.InfrastructureLinkCard.$1.addBasePath.$1", "type": "string", "tags": [], "label": "url", @@ -184,7 +184,7 @@ "signature": [ "string" ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/observability_link_card.tsx", + "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -219,7 +219,7 @@ "label": "guideId", "description": [], "signature": [ - "\"search\" | \"security\" | \"observability\" | \"testGuide\"" + "\"search\" | \"kubernetes\" | \"siem\" | \"testGuide\"" ], "path": "packages/kbn-guided-onboarding/src/types.ts", "deprecated": false, @@ -322,6 +322,21 @@ ], "enums": [], "misc": [ + { + "parentPluginId": "@kbn/guided-onboarding", + "id": "def-common.GuideCardUseCase", + "type": "Type", + "tags": [], + "label": "GuideCardUseCase", + "description": [], + "signature": [ + "\"search\" | \"kubernetes\" | \"siem\"" + ], + "path": "packages/kbn-guided-onboarding/src/components/landing_page/guide_card.tsx", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/guided-onboarding", "id": "def-common.GuideId", @@ -330,7 +345,7 @@ "label": "GuideId", "description": [], "signature": [ - "\"search\" | \"security\" | \"observability\" | \"testGuide\"" + "\"search\" | \"kubernetes\" | \"siem\" | \"testGuide\"" ], "path": "packages/kbn-guided-onboarding/src/types.ts", "deprecated": false, @@ -385,21 +400,6 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.UseCase", - "type": "Type", - "tags": [], - "label": "UseCase", - "description": [], - "signature": [ - "\"search\" | \"security\" | \"observability\"" - ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/use_case_card.tsx", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false } ], "objects": [] diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index 1d43c18405191..2d977062ca6d0 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index af17e92b1c82d..d705e13aa34f2 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index ecf2ef304e194..eb85576e5f28c 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index ff1d1a23d46c8..c1824eec5ccc1 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index 223a5d1caa676..8fdd0aedbb7be 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index 953bb09482a65..4beb255a45b63 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index 2ece4045d8938..12e8d0a338c88 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index b5665b0d2323b..31f691de68164 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index 96b5332921c16..a45d22024c65d 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 7c0f9e9443d9b..61a17ca410d7e 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index d0e49f43a5c34..c41905b75f553 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 6f971a47e26be..d44286fdcefd4 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index 0ec99df3ee673..acc2de4a379b3 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 3466e5b2d4790..330b4ced21392 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index 0d3489495e97c..fb276c9ef9d54 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index 25b9b96cf03ce..15051c2a89250 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index 1ba97af8c8181..70e85bdbbc853 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index d8316e07db1a6..4bcee17ed7cbb 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 59dfb07007400..709226972469e 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 0a5f2e8e122cb..6067aec8fc495 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index d53583efc1f1e..5ad757518c07a 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 0d3f093c35f21..b8acedb030ea9 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 4fda64130b67c..7b4b3798e84b8 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index a3cec60355ab9..c92030887c831 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index d096b30ee1b22..817745fab0282 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index 4bc88e9882f3c..b122b04f8c2bf 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_peggy.mdx b/api_docs/kbn_peggy.mdx index 9e684736be6cc..b9dfba62c7c4a 100644 --- a/api_docs/kbn_peggy.mdx +++ b/api_docs/kbn_peggy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-peggy title: "@kbn/peggy" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/peggy plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/peggy'] --- import kbnPeggyObj from './kbn_peggy.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index cba0528635bb1..a963292b481d7 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index c5b1f9dbba065..453e04539ae66 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 9a70e37bd2659..242a53b6fbba3 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 4a20df46d2b92..033f322d5005f 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 90d5590a3b1ae..3698718faa9c0 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index dd58aafe5aa3e..cde337c735029 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.devdocs.json b/api_docs/kbn_rule_data_utils.devdocs.json index 74b279fa11a15..5e6f6cf54b5bb 100644 --- a/api_docs/kbn_rule_data_utils.devdocs.json +++ b/api_docs/kbn_rule_data_utils.devdocs.json @@ -1221,7 +1221,7 @@ "label": "AlertConsumers", "description": [], "signature": [ - "\"infrastructure\" | \"apm\" | \"observability\" | \"logs\" | \"uptime\" | \"siem\"" + "\"infrastructure\" | \"apm\" | \"siem\" | \"logs\" | \"uptime\" | \"observability\"" ], "path": "packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts", "deprecated": false, @@ -1446,7 +1446,7 @@ "label": "ValidFeatureId", "description": [], "signature": [ - "\"infrastructure\" | \"apm\" | \"observability\" | \"logs\" | \"uptime\" | \"siem\"" + "\"infrastructure\" | \"apm\" | \"siem\" | \"logs\" | \"uptime\" | \"observability\"" ], "path": "packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts", "deprecated": false, diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 88cf02a662b90..f18acf004b9c9 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index d6ba35aca806b..f8b848846a86b 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 4cf56e62ddeeb..ca4327fca23ea 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index 450d2b59dace3..3f15d77d0c22a 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index e03071df63549..6256412cbad37 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index 97044c140da52..153d24802ac43 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 872cb26643e68..14ef6adad86ee 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index 8f4e19c3d56d1..09821025cbbbe 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index a549fc304e34b..72977de2682ab 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index 21921c0d13904..b8c4848819d9c 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 3b2592c8a92f8..7fc8f6ff5495a 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index 34e91cc7b7aa4..a1d14692e93bc 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 0d49dd47aff7a..922d1c3bed38f 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 5a10a7a90fe8e..e8d3dab8afac5 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 0e0a3e1cc999a..00591486401ae 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index ae4951c25007b..8f4dd802ffba5 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index ddd3c9c2d8655..cc1cb81958bd9 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 1a50cbf72f6ae..3ee61d61068de 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index d4439bb0924df..5ccfa05fcfbc7 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index 605dd32e62c84..458353153b293 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx index c878555e40c40..ba4f5af3ebc4d 100644 --- a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx +++ b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-user-profile-components title: "@kbn/shared-ux-avatar-user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-user-profile-components plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-user-profile-components'] --- import kbnSharedUxAvatarUserProfileComponentsObj from './kbn_shared_ux_avatar_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index e834f20d8d16e..535894d18b9a1 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx index 7f519de949738..c9214bc417098 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen-mocks title: "@kbn/shared-ux-button-exit-full-screen-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen-mocks'] --- import kbnSharedUxButtonExitFullScreenMocksObj from './kbn_shared_ux_button_exit_full_screen_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 4bdd7280e7179..1f216105de9ba 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index b555102c6e0e4..5e03809663a94 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index cf3b575f0313d..8f93358f3ecef 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index 28c11a9e426d6..78a6f38adcca5 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context'] --- import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx index e8d5aa6435886..58bf4a356f36d 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image'] --- import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx index 59903d18dc46c..d55dcb60a7c10 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks'] --- import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx index f83bf92846105..9a151f6e6ba8f 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks'] --- import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx index 73187578b06d8..4ba211834b9e7 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util'] --- import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index feeecdbf29527..64c868e6e3f39 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index c8ba30cf37355..8f32505c3985e 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index 76946d7bcb74e..2d7509770dfc7 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index a6f60849580fa..e33ed4296101b 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index cc3757b5931ea..b5663a9a37690 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index 8dbe0081a6a79..804e02bcc2e60 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index ce898fa852a4a..e38dab1ff313e 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index 1a57e4a164c12..255bc42b313e9 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index 6ab4667b5af16..a553d89816bda 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index da7e61f8e890d..f6afbd5eb95c4 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index 434d8d1d9bbf2..a023ad568213a 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index 53639128baa0c..e520307d79a2d 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index ff2660c08e90c..50a1fc0796bd2 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index 07df7c5095e53..a42ba00ab88ae 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index 5704b8907009e..28f6d73c284b5 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index d6912756c72d8..ea8baf1caa33e 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index b4c4e5d3707ba..158863c72c867 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index b36a98476977f..23284cc33cdc0 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found'] --- import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index ca0303f0ab94b..e832ba90f7c0f 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index 57f972964a08d..8bc1adb2947d8 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index ca21fb85018f9..bb2ebc1af4be9 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index 15cf3ac4dba12..72c13e9c32a41 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 0fbd914a7dd35..681945a2dedc2 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 3b765bbfecb73..1ff6f3fe4c608 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_package_json.mdx b/api_docs/kbn_sort_package_json.mdx index 9779e0fbe058c..fafd5222ebca6 100644 --- a/api_docs/kbn_sort_package_json.mdx +++ b/api_docs/kbn_sort_package_json.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-package-json title: "@kbn/sort-package-json" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-package-json plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-package-json'] --- import kbnSortPackageJsonObj from './kbn_sort_package_json.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 602069253296e..ccca313fd0b1e 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index 0b119c24f93d5..d72dd1355a7ce 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index 170bd4e8ec398..933eb9ccffea6 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 2c470f0877f8d..e97be58439a9a 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 05bb48f0e3f37..a22ccbe4a750a 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 1e4a233f730ec..896d38b052882 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index 6a1cc1e8be0c2..8c883152d4c17 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index a0f9b050a9556..e3ca461de4c33 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer.mdx b/api_docs/kbn_type_summarizer.mdx index b8d68d443663c..aad25cadde895 100644 --- a/api_docs/kbn_type_summarizer.mdx +++ b/api_docs/kbn_type_summarizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer title: "@kbn/type-summarizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer'] --- import kbnTypeSummarizerObj from './kbn_type_summarizer.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer_core.mdx b/api_docs/kbn_type_summarizer_core.mdx index 771b3c723eb6e..0277db1f3b47d 100644 --- a/api_docs/kbn_type_summarizer_core.mdx +++ b/api_docs/kbn_type_summarizer_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer-core title: "@kbn/type-summarizer-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer-core plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer-core'] --- import kbnTypeSummarizerCoreObj from './kbn_type_summarizer_core.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index 52584ec05ed42..a4100dc0d0494 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index 0c08486ba3185..05e0217cb438c 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 732ad510a9483..86dfb083a68d7 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index 81970d3d9caf6..27218f9634b17 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 15e961d99198e..1246cebf09e9b 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index eadfce131f9c4..24311ab5c297a 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index 488829dca8578..ee944d150a207 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index 66e4cda07cc3d..1d7a3b7c98490 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index e4daae520ac4e..d5a080693fcb8 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 2777e796186da..1a5685c2ba56f 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index adb2f97f1387e..bdb3368ccfe03 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index 9d44be41e2b57..73be637c8b55a 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 2ee3fb213b8f9..7ebb44c161712 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index e2f5e737ed2ad..e842258298305 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index dcaf543732ce4..4ba5de7ce3f21 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 2103afa42e92d..e49b9998f22a7 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index d3d443e2cc462..b290cf013ca85 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 1ac934b26e3a9..79f43d14fe9cc 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index f7787c47a0731..804e4e4c46800 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 0c5e395f55e84..4b0b12d0e940a 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 72c49a56434f6..14dbc8fdb9f6b 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index 852d63fb2253c..1e3fb18b74ad0 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index 8ba23626740be..aca427dda1cf4 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index 3f9c828be71fb..d06437a3cdc75 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index 54637ad8c21c2..84ea320d18735 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index 42cbdcba190d9..b078a0d4d579e 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 5a92bd0ec9aa7..0038e62bd1d31 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 44f97bb5d4f8c..202a26f792abe 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 6a4a47fbb0f9a..8f4b77c974a75 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -21,7 +21,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 33704 | 520 | 23474 | 1154 | +| 33695 | 520 | 23465 | 1156 | ## Plugin Directory @@ -87,13 +87,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 62 | 0 | 62 | 2 | | | [@elastic/kibana-app-services](https://github.com/orgs/elastic/teams/team:AppServicesUx) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 252 | 1 | 45 | 5 | | | [@elastic/kibana-global-experience](https://github.com/orgs/elastic/teams/@elastic/kibana-global-experience) | Simple UI for managing files in Kibana | 2 | 1 | 2 | 0 | -| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1027 | 3 | 922 | 19 | +| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1027 | 3 | 922 | 20 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 68 | 0 | 14 | 5 | | globalSearchBar | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | globalSearchProviders | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | graph | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 0 | 0 | 0 | 0 | | grokdebugger | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | -| | [Journey Onboarding](https://github.com/orgs/elastic/teams/platform-onboarding) | Guided onboarding framework | 91 | 0 | 90 | 0 | +| | [Journey Onboarding](https://github.com/orgs/elastic/teams/platform-onboarding) | Guided onboarding framework | 94 | 0 | 93 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 143 | 0 | 104 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 4 | 0 | 4 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 177 | 0 | 172 | 3 | @@ -141,7 +141,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 32 | 0 | 13 | 0 | | | [Kibana Reporting Services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 27 | 0 | 8 | 4 | | searchprofiler | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | -| | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 250 | 0 | 90 | 1 | +| | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 251 | 0 | 91 | 1 | | | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 112 | 0 | 75 | 28 | | | [Security Team](https://github.com/orgs/elastic/teams/security-team) | - | 7 | 0 | 7 | 1 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds URL Service and sharing capabilities to Kibana | 115 | 0 | 56 | 10 | @@ -154,12 +154,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 44 | 0 | 1 | 0 | | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 31 | 0 | 26 | 6 | | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 1 | 0 | 1 | 0 | -| | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 11 | 0 | 10 | 0 | +| | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 2 | 0 | 1 | 1 | | | [Protections Experience Team](https://github.com/orgs/elastic/teams/protections-experience) | Elastic threat intelligence helps you see if you are open to or have been subject to current or historical known threats | 34 | 0 | 14 | 3 | | | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 257 | 1 | 214 | 21 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the transforms features provided by Elastic. Transforms enable you to convert existing Elasticsearch indices into summarized indices, which provide opportunities for new insights and analytics. | 4 | 0 | 4 | 1 | | translations | [Kibana Localization](https://github.com/orgs/elastic/teams/kibana-localization) | - | 0 | 0 | 0 | 0 | -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 532 | 11 | 503 | 51 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 526 | 11 | 497 | 51 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds UI Actions service to Kibana | 135 | 2 | 92 | 11 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends UI Actions plugin with more functionality | 206 | 0 | 142 | 9 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the field list which can be integrated into apps | 215 | 0 | 203 | 7 | @@ -350,7 +350,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | Kibana Core | - | 4 | 0 | 4 | 0 | | | Kibana Core | - | 11 | 0 | 11 | 0 | | | Kibana Core | - | 5 | 0 | 5 | 0 | -| | Kibana Core | - | 52 | 1 | 46 | 0 | +| | Kibana Core | - | 54 | 1 | 48 | 0 | | | Kibana Core | - | 13 | 0 | 12 | 0 | | | [Owner missing] | - | 4 | 0 | 4 | 0 | | | Kibana Core | - | 6 | 0 | 4 | 0 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 603da7bba83a5..d53f4cf225694 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index 89b95da2e76d4..905e514f37cac 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 97a35e151a793..20d6bdee3a18f 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 654b176c7c361..d047a0ce614eb 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index f0bdfe4532c62..6c726efbefa1c 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json index 94a78d49d29a0..0642e373d8c77 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -2040,7 +2040,7 @@ "\nID of the Kibana feature associated with the index.\nUsed by alerts-as-data RBAC.\n\nNote from @dhurley14\nThe purpose of the `feature` param is to force the user to update\nthe data structure which contains the mapping of consumers to alerts\nas data indices. The idea is it is typed such that it forces the\nuser to go to the code and modify it. At least until a better system\nis put in place or we move the alerts as data client out of rule registry.\n" ], "signature": [ - "\"infrastructure\" | \"apm\" | \"observability\" | \"logs\" | \"uptime\" | \"siem\"" + "\"infrastructure\" | \"apm\" | \"siem\" | \"logs\" | \"uptime\" | \"observability\"" ], "path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/index_options.ts", "deprecated": false, diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 75d97bdb6e392..a1f7510189745 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 91d60b3f87dae..42935bacc8d8e 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index d72f12613a27c..2b5e501ad9d9d 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index 5fe03432f059d..f76dd8483d144 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 023997b789d40..e062d93530af0 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index c2c09dbf57635..e8759f8ac6631 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index 46a93d11babfe..f162ce52d3770 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 8022e30c3a6fd..9c75acc449562 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index eb04b823f8df2..1ab3ce5089be9 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index bf9b08f74ab2d..0b78555d2c85b 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/security.devdocs.json b/api_docs/security.devdocs.json index 6e9570a09456e..ec61dc141f3b7 100644 --- a/api_docs/security.devdocs.json +++ b/api_docs/security.devdocs.json @@ -3043,6 +3043,20 @@ "path": "x-pack/plugins/security/common/model/api_key.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-common.ApiKey.role_descriptors", + "type": "Object", + "tags": [], + "label": "role_descriptors", + "description": [], + "signature": [ + "Record | undefined" + ], + "path": "x-pack/plugins/security/common/model/api_key.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/security.mdx b/api_docs/security.mdx index c4e1584351261..e9ee386a80bcf 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Platform Security](https://github.com/orgs/elastic/teams/kibana-securit | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 250 | 0 | 90 | 1 | +| 251 | 0 | 91 | 1 | ## Client diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index ee5bc88502ba5..71e198f813d45 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index f766d1e4d8bbe..ce89037296415 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index ad8e5257fcc61..2ac7695c3cafd 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 5ce2144b52f92..e3adaf9987f6b 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index e6baad5e22b71..477be43de538f 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index d7b8ed8b1ec0b..72228f8041a7c 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index 95389d8c57527..3d31f79bad67e 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 33fd27694fb1f..fc361e11ea867 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 9b69d3c119fa3..6ad1a006222d2 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index e32aeddce16b5..b66fde7d606f8 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index 19a43a6cdb4cb..8e5b7f5631139 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.devdocs.json b/api_docs/telemetry_management_section.devdocs.json index 3b32bad1b2688..6224d9afdbf50 100644 --- a/api_docs/telemetry_management_section.devdocs.json +++ b/api_docs/telemetry_management_section.devdocs.json @@ -1,181 +1,45 @@ { "id": "telemetryManagementSection", "client": { - "classes": [ + "classes": [], + "functions": [ { "parentPluginId": "telemetryManagementSection", - "id": "def-public.OptInExampleFlyout", - "type": "Class", + "id": "def-public.LazyOptInExampleFlyout", + "type": "Function", "tags": [], - "label": "OptInExampleFlyout", - "description": [ - "\nReact component for displaying the example data associated with the Telemetry opt-in banner." - ], + "label": "LazyOptInExampleFlyout", + "description": [], "signature": [ - { - "pluginId": "telemetryManagementSection", - "scope": "public", - "docId": "kibTelemetryManagementSectionPluginApi", - "section": "def-public.OptInExampleFlyout", - "text": "OptInExampleFlyout" - }, - " extends React.PureComponent" + "React.ExoticComponent> & { readonly _result: typeof ", + "OptInExampleFlyout", + "; }" ], - "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", + "path": "src/plugins/telemetry_management_section/public/components/lazy_opt_in_example_flyout.tsx", "deprecated": false, "trackAdoption": false, + "returnComment": [], "children": [ { "parentPluginId": "telemetryManagementSection", - "id": "def-public.OptInExampleFlyout._isMounted", - "type": "boolean", - "tags": [], - "label": "_isMounted", - "description": [], - "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "telemetryManagementSection", - "id": "def-public.OptInExampleFlyout.state", - "type": "Object", - "tags": [], - "label": "state", - "description": [], - "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "telemetryManagementSection", - "id": "def-public.OptInExampleFlyout.state.data", - "type": "Uncategorized", - "tags": [], - "label": "data", - "description": [], - "signature": [ - "null" - ], - "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "telemetryManagementSection", - "id": "def-public.OptInExampleFlyout.state.isLoading", - "type": "boolean", - "tags": [], - "label": "isLoading", - "description": [], - "signature": [ - "true" - ], - "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "telemetryManagementSection", - "id": "def-public.OptInExampleFlyout.state.hasPrivilegeToRead", - "type": "boolean", - "tags": [], - "label": "hasPrivilegeToRead", - "description": [], - "signature": [ - "false" - ], - "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", - "deprecated": false, - "trackAdoption": false - } - ] - }, - { - "parentPluginId": "telemetryManagementSection", - "id": "def-public.OptInExampleFlyout.componentDidMount", - "type": "Function", - "tags": [], - "label": "componentDidMount", - "description": [], - "signature": [ - "() => Promise" - ], - "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "telemetryManagementSection", - "id": "def-public.OptInExampleFlyout.componentWillUnmount", - "type": "Function", - "tags": [], - "label": "componentWillUnmount", - "description": [], - "signature": [ - "() => void" - ], - "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "telemetryManagementSection", - "id": "def-public.OptInExampleFlyout.renderBody", - "type": "Function", + "id": "def-public.LazyOptInExampleFlyout.$1", + "type": "Uncategorized", "tags": [], - "label": "renderBody", + "label": "props", "description": [], "signature": [ - "({ data, isLoading, hasPrivilegeToRead }: State) => JSX.Element" + "P" ], - "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", + "path": "node_modules/@types/react/index.d.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "telemetryManagementSection", - "id": "def-public.OptInExampleFlyout.renderBody.$1", - "type": "Object", - "tags": [], - "label": "{ data, isLoading, hasPrivilegeToRead }", - "description": [], - "signature": [ - "State" - ], - "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "telemetryManagementSection", - "id": "def-public.OptInExampleFlyout.render", - "type": "Function", - "tags": [], - "label": "render", - "description": [], - "signature": [ - "() => JSX.Element" - ], - "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "trackAdoption": false } ], "initialIsOpen": false } ], - "functions": [], "interfaces": [], "enums": [], "misc": [], diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index c962c593245aa..261489771e804 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; @@ -21,10 +21,10 @@ Contact [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetr | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 11 | 0 | 10 | 0 | +| 2 | 0 | 1 | 1 | ## Client -### Classes - +### Functions + diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index fefededbe1bc8..7b739f4cb4c1a 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 837b68028c2b9..d52dd1367ed27 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index 2c4919a48dcea..6e3616c13b6f4 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json index 489d1bc568121..e8d6aa6f7d83d 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -466,76 +466,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.disableRule", - "type": "Function", - "tags": [], - "label": "disableRule", - "description": [], - "signature": [ - "({ id, http }: { id: string; http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; }) => Promise" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/disable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.disableRule.$1", - "type": "Object", - "tags": [], - "label": "{ id, http }", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/disable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.disableRule.$1.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/disable.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.disableRule.$1.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/disable.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.EditConnectorFlyout", @@ -570,76 +500,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.enableRule", - "type": "Function", - "tags": [], - "label": "enableRule", - "description": [], - "signature": [ - "({ id, http }: { id: string; http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; }) => Promise" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/enable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.enableRule.$1", - "type": "Object", - "tags": [], - "label": "{ id, http }", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/enable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.enableRule.$1.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/enable.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.enableRule.$1.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/enable.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.ForLastExpression", @@ -3050,6 +2910,38 @@ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.ActionParamsProps.onBlur", + "type": "Function", + "tags": [], + "label": "onBlur", + "description": [], + "signature": [ + "((field?: string | undefined) => void) | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.ActionParamsProps.onBlur.$1", + "type": "string", + "tags": [], + "label": "field", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] } ], "initialIsOpen": false diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 6ccf6d4ff5d3a..4662efe5cbfda 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 532 | 11 | 503 | 51 | +| 526 | 11 | 497 | 51 | ## Client diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 234766ee0a9dc..d5c87cc659d7e 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 746bfae122d44..fe5727db39f33 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_field_list.mdx b/api_docs/unified_field_list.mdx index 6b0d9a59cfb95..424643b7d5d21 100644 --- a/api_docs/unified_field_list.mdx +++ b/api_docs/unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedFieldList title: "unifiedFieldList" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedFieldList plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedFieldList'] --- import unifiedFieldListObj from './unified_field_list.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index 33a1f7a70b8eb..f04ddd348d6cc 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index bce6c333b19a9..fdbd47096b251 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 45a34d5932d9b..23cc83f51f15f 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 3f7450c7ed9c3..98aa233a96e30 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 8e2bcb61b7627..3817dfc33a728 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index eb8aeed7cd9be..e7fc15e93a2bc 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index 8183c897abaac..f06abaf3765ce 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index a3061dd2810fc..e9cdc69036982 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index 7a0ff95abd12e..0abb75ce681c1 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index faa8a60bd004a..af432e35a1e89 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index 619035c30bff8..8f4c53243620c 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index 7498a797bfec1..a5162aa03d20f 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 0f85c43ef3feb..06193c254c39e 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index 63dd9b7164f04..41e5c1a3ab78c 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 66ea8ebeb1bd0..44ec66c13cb39 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 97e9dd55661f5..a155ca54cbcf2 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 58ba10e056490..2a564370198ff 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2022-12-14 +date: 2022-12-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/docs/index-custom-title-page.html b/docs/index-custom-title-page.html index 7af50716913b4..baaa155a8913b 100644 --- a/docs/index-custom-title-page.html +++ b/docs/index-custom-title-page.html @@ -63,8 +63,6 @@

Bring your data to life

- What's new - Release notes How-to videos

diff --git a/docs/user/alerting/create-and-manage-rules.asciidoc b/docs/user/alerting/create-and-manage-rules.asciidoc index d9d5c7bd3d5b0..08a60008bd384 100644 --- a/docs/user/alerting/create-and-manage-rules.asciidoc +++ b/docs/user/alerting/create-and-manage-rules.asciidoc @@ -134,6 +134,8 @@ Using the https://mustache.github.io/[Mustache] template syntax `{{variable name `alert.actionGroup`:: The ID of the action group of the alert that scheduled the action. `alert.actionSubgroup`:: The action subgroup of the alert that scheduled the action. `alert.actionGroupName`:: The name of the action group of the alert that scheduled the action. +`alert.flapping`:: A flag on the alert that indicates whether the alert status is changing repeatedly. + `kibanaBaseUrl`:: The configured <>. If not configured, this will be empty. [role="screenshot"] diff --git a/docs/user/whats-new.asciidoc b/docs/user/whats-new.asciidoc index 399de14d5f18c..e9d1faf845c6f 100644 --- a/docs/user/whats-new.asciidoc +++ b/docs/user/whats-new.asciidoc @@ -5,7 +5,7 @@ Here are the highlights of what's new and improved in {minor-version}. For detailed information about this release, check the <>. -Previous versions: {kibana-ref-all}/8.4/whats-new.html[8.4] | {kibana-ref-all}/8.3/whats-new.html[8.3] | {kibana-ref-all}/8.2/whats-new.html[8.2] +Previous versions: {kibana-ref-all}/8.6/whats-new.html[8.6] | {kibana-ref-all}/8.5/whats-new.html[8.5] | {kibana-ref-all}/8.4/whats-new.html[8.4] | {kibana-ref-all}/8.3/whats-new.html[8.3] | {kibana-ref-all}/8.2/whats-new.html[8.2] | {kibana-ref-all}/8.1/whats-new.html[8.1] | {kibana-ref-all}/8.0/whats-new.html[8.0] //NOTE: The notable-highlights tagged regions are re-used in the diff --git a/package.json b/package.json index 5254788a08c84..57891f7d4a953 100644 --- a/package.json +++ b/package.json @@ -328,6 +328,7 @@ "@kbn/datemath": "link:bazel-bin/packages/kbn-datemath", "@kbn/doc-links": "link:bazel-bin/packages/kbn-doc-links", "@kbn/ebt-tools": "link:bazel-bin/packages/kbn-ebt-tools", + "@kbn/ecs": "link:bazel-bin/packages/kbn-ecs", "@kbn/es-errors": "link:bazel-bin/packages/kbn-es-errors", "@kbn/es-query": "link:bazel-bin/packages/kbn-es-query", "@kbn/es-types": "link:bazel-bin/packages/kbn-es-types", diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index 78e7a74fa0b32..77e61fe416f10 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -227,6 +227,7 @@ filegroup( "//packages/kbn-doc-links:build", "//packages/kbn-docs-utils:build", "//packages/kbn-ebt-tools:build", + "//packages/kbn-ecs:build", "//packages/kbn-es:build", "//packages/kbn-es-archiver:build", "//packages/kbn-es-errors:build", @@ -597,6 +598,7 @@ filegroup( "//packages/kbn-doc-links:build_types", "//packages/kbn-docs-utils:build_types", "//packages/kbn-ebt-tools:build_types", + "//packages/kbn-ecs:build_types", "//packages/kbn-es-archiver:build_types", "//packages/kbn-es-errors:build_types", "//packages/kbn-es-query:build_types", diff --git a/packages/core/http/core-http-resources-server-internal/src/http_resources_service.test.ts b/packages/core/http/core-http-resources-server-internal/src/http_resources_service.test.ts index 32245c6e9f61c..26a61ae1c369d 100644 --- a/packages/core/http/core-http-resources-server-internal/src/http_resources_service.test.ts +++ b/packages/core/http/core-http-resources-server-internal/src/http_resources_service.test.ts @@ -73,7 +73,10 @@ describe('HttpResources service', () => { await routeHandler(context, kibanaRequest, responseFactory); expect(getDeps().rendering.render).toHaveBeenCalledWith( kibanaRequest, - (await context.core).uiSettings.client, + { + client: (await context.core).uiSettings.client, + globalClient: (await context.core).uiSettings.globalClient, + }, { isAnonymousPage: false, vars: { @@ -95,7 +98,10 @@ describe('HttpResources service', () => { await routeHandler(context, kibanaRequest, responseFactory); expect(getDeps().rendering.render).toHaveBeenCalledWith( kibanaRequest, - (await context.core).uiSettings.client, + { + client: (await context.core).uiSettings.client, + globalClient: (await context.core).uiSettings.globalClient, + }, { isAnonymousPage: true, vars: { diff --git a/packages/core/http/core-http-resources-server-internal/src/http_resources_service.ts b/packages/core/http/core-http-resources-server-internal/src/http_resources_service.ts index 13bd334148ae5..0e659e30d474c 100644 --- a/packages/core/http/core-http-resources-server-internal/src/http_resources_service.ts +++ b/packages/core/http/core-http-resources-server-internal/src/http_resources_service.ts @@ -105,7 +105,7 @@ export class HttpResourcesService implements CoreService; user?: Record | undefined; }; + globalUiSettings: { + defaults: Record; + user?: Record | undefined; + }; }; getInjectedVar: (name: string, defaultValue?: any) => unknown; getInjectedVars: () => { diff --git a/packages/core/injected-metadata/core-injected-metadata-browser-mocks/src/injected_metadata_service.mock.ts b/packages/core/injected-metadata/core-injected-metadata-browser-mocks/src/injected_metadata_service.mock.ts index ca510df64c1e2..72e1d9580d238 100644 --- a/packages/core/injected-metadata/core-injected-metadata-browser-mocks/src/injected_metadata_service.mock.ts +++ b/packages/core/injected-metadata/core-injected-metadata-browser-mocks/src/injected_metadata_service.mock.ts @@ -44,6 +44,10 @@ const createSetupContractMock = () => { defaults: { legacyInjectedUiSettingDefaults: true }, user: { legacyInjectedUiSettingUserValues: true }, }, + globalSettings: { + defaults: { legacyInjectedUiSettingDefaults: true }, + user: { legacyInjectedUiSettingUserValues: true }, + }, } as any); setupContract.getPlugins.mockReturnValue([]); setupContract.getTheme.mockReturnValue({ darkMode: false, version: 'v8' }); diff --git a/packages/core/injected-metadata/core-injected-metadata-common-internal/src/types.ts b/packages/core/injected-metadata/core-injected-metadata-common-internal/src/types.ts index 77d7640f2ea17..8f45eaf517fcc 100644 --- a/packages/core/injected-metadata/core-injected-metadata-common-internal/src/types.ts +++ b/packages/core/injected-metadata/core-injected-metadata-common-internal/src/types.ts @@ -65,5 +65,9 @@ export interface InjectedMetadata { defaults: Record; // unreferencing UiSettingsParams here user: Record; // unreferencing UserProvidedValues here }; + globalUiSettings: { + defaults: Record; // unreferencing UiSettingsParams here + user: Record; // unreferencing UserProvidedValues here + }; }; } diff --git a/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_setup.mock.ts b/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_setup.mock.ts index b9877891ada98..6c5c235609f15 100644 --- a/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_setup.mock.ts +++ b/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_setup.mock.ts @@ -13,7 +13,7 @@ import { analyticsServiceMock } from '@kbn/core-analytics-browser-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-browser-mocks'; import { fatalErrorsServiceMock } from '@kbn/core-fatal-errors-browser-mocks'; import { httpServiceMock } from '@kbn/core-http-browser-mocks'; -import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; +import { uiSettingsServiceMock, settingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import { deprecationsServiceMock } from '@kbn/core-deprecations-browser-mocks'; import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; import { applicationServiceMock } from '@kbn/core-application-browser-mocks'; @@ -40,6 +40,7 @@ export function createCoreSetupMock({ http: httpServiceMock.createSetupContract({ basePath }), notifications: notificationServiceMock.createSetupContract(), uiSettings: uiSettingsServiceMock.createSetupContract(), + settings: settingsServiceMock.createSetupContract(), deprecations: deprecationsServiceMock.createSetupContract(), injectedMetadata: { getInjectedVar: injectedMetadataServiceMock.createSetupContract().getInjectedVar, diff --git a/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_start.mock.ts b/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_start.mock.ts index 4fa223e05173b..448208398694e 100644 --- a/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_start.mock.ts +++ b/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_start.mock.ts @@ -14,7 +14,7 @@ import { executionContextServiceMock } from '@kbn/core-execution-context-browser import { i18nServiceMock } from '@kbn/core-i18n-browser-mocks'; import { fatalErrorsServiceMock } from '@kbn/core-fatal-errors-browser-mocks'; import { httpServiceMock } from '@kbn/core-http-browser-mocks'; -import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; +import { uiSettingsServiceMock, settingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import { deprecationsServiceMock } from '@kbn/core-deprecations-browser-mocks'; import { overlayServiceMock } from '@kbn/core-overlays-browser-mocks'; import { savedObjectsServiceMock } from '@kbn/core-saved-objects-browser-mocks'; @@ -34,6 +34,7 @@ export function createCoreStartMock({ basePath = '' } = {}) { notifications: notificationServiceMock.createStartContract(), overlays: overlayServiceMock.createStartContract(), uiSettings: uiSettingsServiceMock.createStartContract(), + settings: settingsServiceMock.createStartContract(), savedObjects: savedObjectsServiceMock.createStartContract(), deprecations: deprecationsServiceMock.createStartContract(), theme: themeServiceMock.createStartContract(), diff --git a/packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts b/packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts index 0df6e7a250864..3b965ab69a20b 100644 --- a/packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts +++ b/packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts @@ -12,7 +12,7 @@ import type { AnalyticsServiceSetup } from '@kbn/core-analytics-browser'; import type { ExecutionContextSetup } from '@kbn/core-execution-context-browser'; import type { HttpSetup } from '@kbn/core-http-browser'; import type { FatalErrorsSetup } from '@kbn/core-fatal-errors-browser'; -import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; +import type { IUiSettingsClient, SettingsStart } from '@kbn/core-ui-settings-browser'; import type { NotificationsSetup } from '@kbn/core-notifications-browser'; import type { ApplicationSetup } from '@kbn/core-application-browser'; import type { CoreStart } from './core_start'; @@ -43,7 +43,10 @@ export interface CoreSetup { - afterEach(() => mockFs.restore()); - - it('returns empty object when no cgroup file present', async () => { - mockFs({ - '/proc/self': { - /** empty directory */ - }, - }); - - const logger = loggerMock.create(); - const collector = new OsCgroupMetricsCollector({ logger }); - expect(await collector.collect()).toEqual({}); - expect(logger.error).not.toHaveBeenCalled(); - }); - - it('collects default cgroup data', async () => { - mockFs({ - '/proc/self/cgroup': ` -123:memory:/groupname -123:cpu:/groupname -123:cpuacct:/groupname - `, - '/sys/fs/cgroup/cpuacct/groupname/cpuacct.usage': '111', - '/sys/fs/cgroup/cpu/groupname/cpu.cfs_period_us': '222', - '/sys/fs/cgroup/cpu/groupname/cpu.cfs_quota_us': '333', - '/sys/fs/cgroup/cpu/groupname/cpu.stat': ` -nr_periods 444 -nr_throttled 555 -throttled_time 666 - `, - }); - - const collector = new OsCgroupMetricsCollector({ logger: loggerMock.create() }); - expect(await collector.collect()).toMatchInlineSnapshot(` - Object { - "cpu": Object { - "cfs_period_micros": 222, - "cfs_quota_micros": 333, - "control_group": "/groupname", - "stat": Object { - "number_of_elapsed_periods": 444, - "number_of_times_throttled": 555, - "time_throttled_nanos": 666, - }, - }, - "cpuacct": Object { - "control_group": "/groupname", - "usage_nanos": 111, - }, - } - `); - }); - - it('collects override cgroup data', async () => { - mockFs({ - '/proc/self/cgroup': ` -123:memory:/groupname -123:cpu:/groupname -123:cpuacct:/groupname - `, - '/sys/fs/cgroup/cpuacct/xxcustomcpuacctxx/cpuacct.usage': '111', - '/sys/fs/cgroup/cpu/xxcustomcpuxx/cpu.cfs_period_us': '222', - '/sys/fs/cgroup/cpu/xxcustomcpuxx/cpu.cfs_quota_us': '333', - '/sys/fs/cgroup/cpu/xxcustomcpuxx/cpu.stat': ` -nr_periods 444 -nr_throttled 555 -throttled_time 666 - `, - }); - - const collector = new OsCgroupMetricsCollector({ - logger: loggerMock.create(), - cpuAcctPath: 'xxcustomcpuacctxx', - cpuPath: 'xxcustomcpuxx', - }); - expect(await collector.collect()).toMatchInlineSnapshot(` - Object { - "cpu": Object { - "cfs_period_micros": 222, - "cfs_quota_micros": 333, - "control_group": "xxcustomcpuxx", - "stat": Object { - "number_of_elapsed_periods": 444, - "number_of_times_throttled": 555, - "time_throttled_nanos": 666, - }, - }, - "cpuacct": Object { - "control_group": "xxcustomcpuacctxx", - "usage_nanos": 111, - }, - } - `); - }); - - it('returns empty object and logs error on an EACCES error', async () => { - mockFs({ - '/proc/self/cgroup': ` -123:memory:/groupname -123:cpu:/groupname -123:cpuacct:/groupname - `, - '/sys/fs/cgroup': mockFs.directory({ mode: parseInt('0000', 8) }), - }); - - const logger = loggerMock.create(); - - const collector = new OsCgroupMetricsCollector({ logger }); - expect(await collector.collect()).toEqual({}); - expect(logger.error).toHaveBeenCalledWith( - "cgroup metrics could not be read due to error: [Error: EACCES, permission denied '/sys/fs/cgroup/cpuacct/groupname/cpuacct.usage']" - ); - }); -}); diff --git a/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup.ts b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup.ts deleted file mode 100644 index ea93c8be2956e..0000000000000 --- a/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup.ts +++ /dev/null @@ -1,192 +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 fs from 'fs'; -import { join as joinPath } from 'path'; -import type { Logger } from '@kbn/logging'; -import type { MetricsCollector, OpsOsMetrics } from '@kbn/core-metrics-server'; - -type OsCgroupMetrics = Pick; - -interface OsCgroupMetricsCollectorOptions { - logger: Logger; - cpuPath?: string; - cpuAcctPath?: string; -} - -export class OsCgroupMetricsCollector implements MetricsCollector { - /** Used to prevent unnecessary file reads on systems not using cgroups. */ - private noCgroupPresent = false; - private cpuPath?: string; - private cpuAcctPath?: string; - - constructor(private readonly options: OsCgroupMetricsCollectorOptions) {} - - public async collect(): Promise { - try { - if (this.noCgroupPresent) { - return {}; - } - - await this.initializePaths(); - if (!this.cpuAcctPath || !this.cpuPath) { - return {}; - } - - const [cpuAcctUsage, cpuFsPeriod, cpuFsQuota, cpuStat] = await Promise.all([ - readCPUAcctUsage(this.cpuAcctPath), - readCPUFsPeriod(this.cpuPath), - readCPUFsQuota(this.cpuPath), - readCPUStat(this.cpuPath), - ]); - - return { - cpuacct: { - control_group: this.cpuAcctPath, - usage_nanos: cpuAcctUsage, - }, - - cpu: { - control_group: this.cpuPath, - cfs_period_micros: cpuFsPeriod, - cfs_quota_micros: cpuFsQuota, - stat: cpuStat, - }, - }; - } catch (err) { - this.noCgroupPresent = true; - - if (err.code !== 'ENOENT') { - this.options.logger.error( - `cgroup metrics could not be read due to error: [${err.toString()}]` - ); - } - - return {}; - } - } - - public reset() {} - - private async initializePaths() { - // Perform this setup lazily on the first collect call and then memoize the results. - // Makes the assumption this data doesn't change while the process is running. - if (this.cpuPath && this.cpuAcctPath) { - return; - } - - // Only read the file if both options are undefined. - if (!this.options.cpuPath || !this.options.cpuAcctPath) { - const cgroups = await readControlGroups(); - this.cpuPath = this.options.cpuPath || cgroups[GROUP_CPU]; - this.cpuAcctPath = this.options.cpuAcctPath || cgroups[GROUP_CPUACCT]; - } else { - this.cpuPath = this.options.cpuPath; - this.cpuAcctPath = this.options.cpuAcctPath; - } - - // prevents undefined cgroup paths - if (!this.cpuPath || !this.cpuAcctPath) { - this.noCgroupPresent = true; - } - } -} - -const CONTROL_GROUP_RE = new RegExp('\\d+:([^:]+):(/.*)'); -const CONTROLLER_SEPARATOR_RE = ','; - -const PROC_SELF_CGROUP_FILE = '/proc/self/cgroup'; -const PROC_CGROUP_CPU_DIR = '/sys/fs/cgroup/cpu'; -const PROC_CGROUP_CPUACCT_DIR = '/sys/fs/cgroup/cpuacct'; - -const GROUP_CPUACCT = 'cpuacct'; -const CPUACCT_USAGE_FILE = 'cpuacct.usage'; - -const GROUP_CPU = 'cpu'; -const CPU_FS_PERIOD_US_FILE = 'cpu.cfs_period_us'; -const CPU_FS_QUOTA_US_FILE = 'cpu.cfs_quota_us'; -const CPU_STATS_FILE = 'cpu.stat'; - -async function readControlGroups() { - const data = await fs.promises.readFile(PROC_SELF_CGROUP_FILE); - - return data - .toString() - .split(/\n/) - .reduce((acc, line) => { - const matches = line.match(CONTROL_GROUP_RE); - - if (matches !== null) { - const controllers = matches[1].split(CONTROLLER_SEPARATOR_RE); - controllers.forEach((controller) => { - acc[controller] = matches[2]; - }); - } - - return acc; - }, {} as Record); -} - -async function fileContentsToInteger(path: string) { - const data = await fs.promises.readFile(path); - return parseInt(data.toString(), 10); -} - -function readCPUAcctUsage(controlGroup: string) { - return fileContentsToInteger(joinPath(PROC_CGROUP_CPUACCT_DIR, controlGroup, CPUACCT_USAGE_FILE)); -} - -function readCPUFsPeriod(controlGroup: string) { - return fileContentsToInteger(joinPath(PROC_CGROUP_CPU_DIR, controlGroup, CPU_FS_PERIOD_US_FILE)); -} - -function readCPUFsQuota(controlGroup: string) { - return fileContentsToInteger(joinPath(PROC_CGROUP_CPU_DIR, controlGroup, CPU_FS_QUOTA_US_FILE)); -} - -async function readCPUStat(controlGroup: string) { - const stat = { - number_of_elapsed_periods: -1, - number_of_times_throttled: -1, - time_throttled_nanos: -1, - }; - - try { - const data = await fs.promises.readFile( - joinPath(PROC_CGROUP_CPU_DIR, controlGroup, CPU_STATS_FILE) - ); - return data - .toString() - .split(/\n/) - .reduce((acc, line) => { - const fields = line.split(/\s+/); - - switch (fields[0]) { - case 'nr_periods': - acc.number_of_elapsed_periods = parseInt(fields[1], 10); - break; - - case 'nr_throttled': - acc.number_of_times_throttled = parseInt(fields[1], 10); - break; - - case 'throttled_time': - acc.time_throttled_nanos = parseInt(fields[1], 10); - break; - } - - return acc; - }, stat); - } catch (err) { - if (err.code === 'ENOENT') { - return stat; - } - - throw err; - } -} diff --git a/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/cgroup.test.ts b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/cgroup.test.ts new file mode 100644 index 0000000000000..4ac8870de5051 --- /dev/null +++ b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/cgroup.test.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. + */ + +jest.mock('./v1', () => { + const actual = jest.requireActual('./v1'); + return { + ...actual, + gatherV1CgroupMetrics: jest.fn(actual.gatherV1CgroupMetrics), + }; +}); + +jest.mock('./v2', () => { + const actual = jest.requireActual('./v2'); + return { + ...actual, + gatherV2CgroupMetrics: jest.fn(actual.gatherV2CgroupMetrics), + }; +}); + +import mockFs from 'mock-fs'; +import { loggerMock } from '@kbn/logging-mocks'; +import { OsCgroupMetricsCollector } from '.'; +import { Logger } from '@kbn/logging'; +import { gatherV1CgroupMetrics } from './v1'; +import { gatherV2CgroupMetrics } from './v2'; + +describe('OsCgroupMetricsCollector', () => { + let collector: OsCgroupMetricsCollector; + let logger: Logger; + beforeEach(() => { + logger = loggerMock.create(); + collector = new OsCgroupMetricsCollector({ logger }); + }); + afterEach(() => { + mockFs.restore(); + jest.clearAllMocks(); + }); + + it('returns empty object when no cgroup file present', async () => { + mockFs({ + '/proc/self': { + /** empty directory */ + }, + }); + + expect(await collector.collect()).toEqual({}); + expect(logger.error).not.toHaveBeenCalled(); + }); + + it('returns empty object and logs error on an EACCES error', async () => { + mockFs({ + '/proc/self/cgroup': ` +123:memory:/groupname +123:cpu:/groupname +123:cpuacct:/groupname + `, + '/sys/fs/cgroup': mockFs.directory({ mode: parseInt('0000', 8) }), + }); + + expect(await collector.collect()).toEqual({}); + expect(logger.error).toHaveBeenCalledWith( + "cgroup metrics could not be read due to error: [Error: EACCES, permission denied '/sys/fs/cgroup/cpuacct/groupname/cpuacct.usage']" + ); + }); + + it('delegates correctly to the v1 implementation', async () => { + mockFs({ + '/proc/self/cgroup': `123:memory:/groupname +123:cpu:/groupname +123:cpuacct:/groupname`, + }); + + await collector.collect(); + + expect(gatherV1CgroupMetrics).toHaveBeenCalledTimes(1); + expect(gatherV1CgroupMetrics).toHaveBeenCalledWith({ + cpuAcctPath: '/groupname', + cpuPath: '/groupname', + }); + expect(gatherV2CgroupMetrics).toHaveBeenCalledTimes(0); + }); + + it('delegates correctly to the v2 implementation', async () => { + mockFs({ + '/proc/self/cgroup': `0::/groupname`, + }); + + await collector.collect(); + + expect(gatherV2CgroupMetrics).toHaveBeenCalledTimes(1); + expect(gatherV2CgroupMetrics).toHaveBeenCalledWith({ + cpuAcctPath: '/groupname', + cpuPath: '/groupname', + }); + expect(gatherV1CgroupMetrics).toHaveBeenCalledTimes(0); + }); + + it('passes through overrides', async () => { + mockFs({ + '/proc/self/cgroup': `0:test:/groupname`, + }); + + logger = loggerMock.create(); + collector = new OsCgroupMetricsCollector({ + logger, + cpuAcctPath: '/override1', + cpuPath: '/override2', + }); + + await collector.collect(); + + expect(gatherV1CgroupMetrics).toHaveBeenCalledWith({ + cpuAcctPath: '/override1', + cpuPath: '/override2', + }); + }); +}); diff --git a/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/cgroup.ts b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/cgroup.ts new file mode 100644 index 0000000000000..b336bff923b25 --- /dev/null +++ b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/cgroup.ts @@ -0,0 +1,78 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { Logger } from '@kbn/logging'; +import type { MetricsCollector } from '@kbn/core-metrics-server'; + +import { gatherV1CgroupMetrics } from './v1'; +import { gatherV2CgroupMetrics } from './v2'; +import { gatherInfo } from './gather_info'; +import { GROUP_CPU, GROUP_CPUACCT } from './constants'; +import { OsCgroupMetrics } from './types'; + +interface OsCgroupMetricsCollectorOptions { + logger: Logger; + cpuPath?: string; + cpuAcctPath?: string; +} + +export class OsCgroupMetricsCollector implements MetricsCollector { + /** Used to prevent unnecessary file reads on systems not using cgroups. */ + private noCgroupPresent = false; + /** Are resources being managed by cgroup2? */ + private isCgroup2 = false; + private cpuPath?: string; + private cpuAcctPath?: string; + + constructor(private readonly options: OsCgroupMetricsCollectorOptions) {} + + public async collect(): Promise { + try { + if (this.noCgroupPresent) { + return {}; + } + + await this.initializePaths(); + if (!this.hasPaths()) { + return {}; + } + + const args = { cpuAcctPath: this.cpuAcctPath!, cpuPath: this.cpuPath! }; + // "await" to handle any errors here. + return await (this.isCgroup2 ? gatherV2CgroupMetrics(args) : gatherV1CgroupMetrics(args)); + } catch (err) { + this.noCgroupPresent = true; + + if (err.code !== 'ENOENT') { + this.options.logger.error( + `cgroup metrics could not be read due to error: [${err.toString()}]` + ); + } + + return {}; + } + } + + public reset() {} + + private hasPaths(): boolean { + return Boolean(this.cpuPath && this.cpuAcctPath); + } + + private async initializePaths(): Promise { + if (this.hasPaths()) return; + + const { data: cgroups, v2 } = await gatherInfo(); + this.isCgroup2 = v2; + this.cpuPath = this.options.cpuPath || cgroups[GROUP_CPU]; + this.cpuAcctPath = this.options.cpuAcctPath || cgroups[GROUP_CPUACCT]; + + // prevents undefined cgroup paths + this.noCgroupPresent = Boolean(!this.cpuPath || !this.cpuAcctPath); + } +} diff --git a/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/constants.ts b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/constants.ts new file mode 100644 index 0000000000000..2d91838bd448f --- /dev/null +++ b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/constants.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 const GROUP_CPUACCT = 'cpuacct'; +export const GROUP_CPU = 'cpu'; diff --git a/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/gather_info.test.ts b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/gather_info.test.ts new file mode 100644 index 0000000000000..bf86907e656d9 --- /dev/null +++ b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/gather_info.test.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 mockFs from 'mock-fs'; +import { gatherInfo } from './gather_info'; + +describe('gatherInfo', () => { + afterEach(() => mockFs.restore()); + + test('parse cgroup file entries', async () => { + mockFs({ + '/proc/self/cgroup': `0:controller:/path + 1:controller2,controller3:/otherpath`, + }); + const { data } = await gatherInfo(); + expect(data).toEqual({ + controller: '/path', + controller2: '/otherpath', + controller3: '/otherpath', + }); + }); + + test('detect cgroup version', async () => { + mockFs({ + '/proc/self/cgroup': `0:controller:/path + 1:controller2,controller3:/otherpath`, + }); + await expect(gatherInfo()).resolves.toMatchObject({ v2: false }); + mockFs({ + '/proc/self/cgroup': ` + + 0::/path + +`, + }); + await expect(gatherInfo()).resolves.toMatchObject({ v2: true }); + }); + + test('missing cgroup file', async () => { + mockFs({}); + await expect(gatherInfo()).rejects.toMatchObject({ code: 'ENOENT' }); + }); + + test('invalid cgroup file', async () => { + mockFs({ + '/proc/self/cgroup': `invalid`, + }); + await expect(gatherInfo()).resolves.toEqual({ data: {}, v2: false }); + }); +}); diff --git a/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/gather_info.ts b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/gather_info.ts new file mode 100644 index 0000000000000..7e490a577ff07 --- /dev/null +++ b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/gather_info.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 fs from 'fs/promises'; + +import { GROUP_CPU, GROUP_CPUACCT } from './constants'; + +const CONTROL_GROUP_RE = new RegExp('\\d+:([^:]+):(/.*)'); +const CONTROLLER_SEPARATOR_RE = ','; +const PROC_SELF_CGROUP_FILE = '/proc/self/cgroup'; + +/** + * Check whether the contents of /proc/self/cgroup indicate that we are running in a cgroup v2 + * + * @note cgroup v2 is always in the format "0::". See https://www.kernel.org/doc/Documentation/cgroup-v2.txt. + */ +function isCgroups2(procSelfLines: string[]): boolean { + return procSelfLines.length === 1 && procSelfLines[0].trim().startsWith('0::'); +} + +async function readProcSelf(): Promise { + const data = (await fs.readFile(PROC_SELF_CGROUP_FILE)).toString(); + return data.split(/\n/).filter((line) => line.trim().length > 0); +} + +interface Result { + data: Record; + v2: boolean; +} + +export async function gatherInfo(): Promise { + const lines = await readProcSelf(); + + if (isCgroups2(lines)) { + // eslint-disable-next-line prettier/prettier + const [/* '0' */, /* '' */, path] = lines[0].trim().split(':'); + return { + data: { + [GROUP_CPU]: path, + [GROUP_CPUACCT]: path, + }, + v2: true, + }; + } + + const data = lines.reduce((acc, line) => { + const matches = line.match(CONTROL_GROUP_RE); + + if (matches !== null) { + const controllers = matches[1].split(CONTROLLER_SEPARATOR_RE); + controllers.forEach((controller) => { + acc[controller] = matches[2]; + }); + } + + return acc; + }, {} as Record); + + return { data, v2: false }; +} diff --git a/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/index.ts b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/index.ts new file mode 100644 index 0000000000000..cddf09b19f5ae --- /dev/null +++ b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/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 { OsCgroupMetricsCollector } from './cgroup'; diff --git a/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/types.ts b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/types.ts new file mode 100644 index 0000000000000..84b03e3ba151a --- /dev/null +++ b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/types.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { OpsOsMetrics } from '@kbn/core-metrics-server'; + +export type OsCgroupMetrics = Pick; diff --git a/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/v1.test.ts b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/v1.test.ts new file mode 100644 index 0000000000000..e11218a2cc61d --- /dev/null +++ b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/v1.test.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 mockFs from 'mock-fs'; +import { gatherV1CgroupMetrics } from './v1'; + +describe('gatherV1CgroupMetrics', () => { + afterEach(() => mockFs.restore()); + + it('collects cgroup data', async () => { + mockFs({ + '/proc/self/cgroup': ` +123:memory:/groupname +123:cpu:/groupname +123:cpuacct:/groupname + `, + '/sys/fs/cgroup/cpuacct/groupname/cpuacct.usage': '111', + '/sys/fs/cgroup/cpu/groupname/cpu.cfs_period_us': '222', + '/sys/fs/cgroup/cpu/groupname/cpu.cfs_quota_us': '333', + '/sys/fs/cgroup/cpu/groupname/cpu.stat': ` +nr_periods 444 +nr_throttled 555 +throttled_time 666 + `, + }); + + expect(await gatherV1CgroupMetrics({ cpuAcctPath: '/groupname', cpuPath: '/groupname' })) + .toMatchInlineSnapshot(` + Object { + "cpu": Object { + "cfs_period_micros": 222, + "cfs_quota_micros": 333, + "control_group": "/groupname", + "stat": Object { + "number_of_elapsed_periods": 444, + "number_of_times_throttled": 555, + "time_throttled_nanos": 666, + }, + }, + "cpuacct": Object { + "control_group": "/groupname", + "usage_nanos": 111, + }, + } + `); + }); +}); diff --git a/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/v1.ts b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/v1.ts new file mode 100644 index 0000000000000..4e78879d1486d --- /dev/null +++ b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/v1.ts @@ -0,0 +1,103 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import fs from 'fs/promises'; +import { join as joinPath } from 'path'; +import type { OsCgroupMetrics } from './types'; + +const CPU_STATS_FILE = 'cpu.stat'; +const CPUACCT_USAGE_FILE = 'cpuacct.usage'; +const CPU_FS_QUOTA_US_FILE = 'cpu.cfs_quota_us'; +const PROC_CGROUP_CPU_DIR = '/sys/fs/cgroup/cpu'; +const CPU_FS_PERIOD_US_FILE = 'cpu.cfs_period_us'; +const PROC_CGROUP_CPUACCT_DIR = '/sys/fs/cgroup/cpuacct'; + +interface Arg { + cpuPath: string; + cpuAcctPath: string; +} + +export async function gatherV1CgroupMetrics({ + cpuAcctPath, + cpuPath, +}: Arg): Promise { + const [cpuAcctUsage, cpuFsPeriod, cpuFsQuota, cpuStat] = await Promise.all([ + readCPUAcctUsage(cpuAcctPath), + readCPUFsPeriod(cpuPath), + readCPUFsQuota(cpuPath), + readCPUStat(cpuPath), + ]); + + return { + cpuacct: { + control_group: cpuAcctPath, + usage_nanos: cpuAcctUsage, + }, + + cpu: { + control_group: cpuPath, + cfs_period_micros: cpuFsPeriod, + cfs_quota_micros: cpuFsQuota, + stat: cpuStat, + }, + }; +} + +async function fileContentsToInteger(path: string) { + const data = await fs.readFile(path); + return parseInt(data.toString(), 10); +} + +function readCPUAcctUsage(controlGroup: string) { + return fileContentsToInteger(joinPath(PROC_CGROUP_CPUACCT_DIR, controlGroup, CPUACCT_USAGE_FILE)); +} + +function readCPUFsPeriod(controlGroup: string) { + return fileContentsToInteger(joinPath(PROC_CGROUP_CPU_DIR, controlGroup, CPU_FS_PERIOD_US_FILE)); +} + +function readCPUFsQuota(controlGroup: string) { + return fileContentsToInteger(joinPath(PROC_CGROUP_CPU_DIR, controlGroup, CPU_FS_QUOTA_US_FILE)); +} + +async function readCPUStat(controlGroup: string) { + const stat = { + number_of_elapsed_periods: -1, + number_of_times_throttled: -1, + time_throttled_nanos: -1, + }; + + try { + const data = await fs.readFile(joinPath(PROC_CGROUP_CPU_DIR, controlGroup, CPU_STATS_FILE)); + return data + .toString() + .split(/\n/) + .reduce((acc, line) => { + const [key, value] = line.split(/\s+/); + + switch (key) { + case 'nr_periods': + acc.number_of_elapsed_periods = parseInt(value, 10); + break; + case 'nr_throttled': + acc.number_of_times_throttled = parseInt(value, 10); + break; + case 'throttled_time': + acc.time_throttled_nanos = parseInt(value, 10); + break; + } + + return acc; + }, stat); + } catch (err) { + if (err.code === 'ENOENT') { + return stat; + } + + throw err; + } +} diff --git a/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/v2.test.ts b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/v2.test.ts new file mode 100644 index 0000000000000..96c720fe9a639 --- /dev/null +++ b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/v2.test.ts @@ -0,0 +1,79 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import mockFs from 'mock-fs'; +import { gatherV2CgroupMetrics } from './v2'; + +describe('gatherV2CgroupMetrics', () => { + afterEach(() => mockFs.restore()); + + it('collects default cgroup data for "root"', async () => { + mockFs({ + '/proc/self/cgroup': `0::/`, + '/sys/fs/cgroup/cpu.max': 'max 100000', // "max" is a special no-value value + '/sys/fs/cgroup/cpu.stat': `usage_usec 185247 +user_usec 59279 +system_usec 125968 +nr_periods 123 +nr_throttled 1 +throttled_usec 123123`, + }); + + expect(await gatherV2CgroupMetrics({ cpuAcctPath: '/', cpuPath: '/' })).toMatchInlineSnapshot(` + Object { + "cpu": Object { + "cfs_period_micros": 100000, + "cfs_quota_micros": -1, + "control_group": "/", + "stat": Object { + "number_of_elapsed_periods": 123, + "number_of_times_throttled": 1, + "time_throttled_nanos": 123123, + }, + }, + "cpuacct": Object { + "control_group": "/", + "usage_nanos": 185247, + }, + } + `); + }); + + it('collects default cgroup data', async () => { + mockFs({ + '/proc/self/cgroup': `0::/mypath`, + '/sys/fs/cgroup/mypath/cpu.max': '111 100000', + '/sys/fs/cgroup/mypath/cpu.stat': `usage_usec 185247 +user_usec 59279 +system_usec 125968 +nr_periods 123 +nr_throttled 1 +throttled_usec 123123`, + }); + + expect(await gatherV2CgroupMetrics({ cpuAcctPath: '/mypath', cpuPath: '/mypath' })) + .toMatchInlineSnapshot(` + Object { + "cpu": Object { + "cfs_period_micros": 100000, + "cfs_quota_micros": 111, + "control_group": "/mypath", + "stat": Object { + "number_of_elapsed_periods": 123, + "number_of_times_throttled": 1, + "time_throttled_nanos": 123123, + }, + }, + "cpuacct": Object { + "control_group": "/mypath", + "usage_nanos": 185247, + }, + } + `); + }); +}); diff --git a/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/v2.ts b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/v2.ts new file mode 100644 index 0000000000000..ac7fba7cfaf4d --- /dev/null +++ b/packages/core/metrics/core-metrics-collectors-server-internal/src/cgroup/v2.ts @@ -0,0 +1,87 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import fs from 'fs/promises'; +import { join as joinPath } from 'path'; +import type { OsCgroupMetrics } from './types'; + +const PROC_CGROUP2_DIR = '/sys/fs/cgroup'; +const CPU_STATS_FILE = 'cpu.stat'; +const CPU_MAX_FILE = 'cpu.max'; + +interface Arg { + cpuPath: string; + cpuAcctPath: string; +} + +export async function gatherV2CgroupMetrics(arg: Arg): Promise { + const [{ usage_nanos: usageNanos, ...stat }, cpuMax] = await Promise.all([ + readCPUStat(arg.cpuPath), + readCPUMax(arg.cpuPath), + ]); + + return { + cpu: { + ...cpuMax, + control_group: arg.cpuPath, + stat, + }, + cpuacct: { + control_group: arg.cpuPath, + usage_nanos: usageNanos, + }, + }; +} +interface CPUMax { + cfs_period_micros: number; + cfs_quota_micros: number; +} + +async function readCPUMax(group: string): Promise { + const [quota, period] = (await fs.readFile(joinPath(PROC_CGROUP2_DIR, group, CPU_MAX_FILE))) + .toString() + .trim() + .split(/\s+/); + return { + cfs_quota_micros: quota === 'max' ? -1 : parseInt(quota, 10), + cfs_period_micros: parseInt(period, 10), + }; +} + +type CPUStat = Required['cpu']['stat'] & { usage_nanos: number }; + +async function readCPUStat(group: string): Promise { + const stat: CPUStat = { + number_of_elapsed_periods: -1, + number_of_times_throttled: -1, + time_throttled_nanos: -1, + usage_nanos: -1, + }; + return (await fs.readFile(joinPath(PROC_CGROUP2_DIR, group, CPU_STATS_FILE))) + .toString() + .split(/\n/) + .reduce((acc, line) => { + const [key, value] = line.split(/\s+/); + switch (key) { + case 'nr_periods': + acc.number_of_elapsed_periods = parseInt(value, 10); + break; + case 'nr_throttled': + acc.number_of_times_throttled = parseInt(value, 10); + break; + case 'throttled_usec': + acc.time_throttled_nanos = parseInt(value, 10); + break; + // In V2 cpuacct also lives in cpu.stat + case 'usage_usec': + acc.usage_nanos = parseInt(value, 10); + break; + } + return stat; + }, stat); +} diff --git a/packages/core/plugins/core-plugins-browser-internal/src/plugin_context.ts b/packages/core/plugins/core-plugins-browser-internal/src/plugin_context.ts index 351dd581b5f83..c20c585e5c939 100644 --- a/packages/core/plugins/core-plugins-browser-internal/src/plugin_context.ts +++ b/packages/core/plugins/core-plugins-browser-internal/src/plugin_context.ts @@ -79,6 +79,7 @@ export function createPluginSetupContext< http: deps.http, notifications: deps.notifications, uiSettings: deps.uiSettings, + settings: deps.settings, injectedMetadata: { getInjectedVar: deps.injectedMetadata.getInjectedVar, }, @@ -125,6 +126,7 @@ export function createPluginStartContext< notifications: deps.notifications, overlays: deps.overlays, uiSettings: deps.uiSettings, + settings: deps.settings, savedObjects: deps.savedObjects, injectedMetadata: { getInjectedVar: deps.injectedMetadata.getInjectedVar, diff --git a/packages/core/rendering/core-rendering-server-internal/src/__snapshots__/rendering_service.test.ts.snap b/packages/core/rendering/core-rendering-server-internal/src/__snapshots__/rendering_service.test.ts.snap index 9fe0cb545e7aa..30cdc921cf462 100644 --- a/packages/core/rendering/core-rendering-server-internal/src/__snapshots__/rendering_service.test.ts.snap +++ b/packages/core/rendering/core-rendering-server-internal/src/__snapshots__/rendering_service.test.ts.snap @@ -35,6 +35,10 @@ Object { "translationsUrl": "/mock-server-basepath/translations/en.json", }, "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object {}, + }, "uiSettings": Object { "defaults": Object { "registered": Object { @@ -91,6 +95,10 @@ Object { "translationsUrl": "/mock-server-basepath/translations/en.json", }, "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object {}, + }, "uiSettings": Object { "defaults": Object { "registered": Object { @@ -151,6 +159,10 @@ Object { "translationsUrl": "/translations/en.json", }, "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object {}, + }, "uiSettings": Object { "defaults": Object { "registered": Object { @@ -207,6 +219,134 @@ Object { "translationsUrl": "/mock-server-basepath/translations/en.json", }, "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object {}, + }, + "uiSettings": Object { + "defaults": Object { + "registered": Object { + "name": "title", + }, + }, + "user": Object {}, + }, + }, + "publicBaseUrl": "http://myhost.com/mock-server-basepath", + "serverBasePath": "/mock-server-basepath", + "theme": Object { + "darkMode": "theme:darkMode", + "version": "v8", + }, + "uiPlugins": Array [], + "vars": Object {}, + "version": Any, +} +`; + +exports[`RenderingService preboot() render() renders "core" page with global settings 1`] = ` +Object { + "anonymousStatusPage": false, + "basePath": "/mock-server-basepath", + "branch": Any, + "buildNumber": Any, + "clusterInfo": Object {}, + "csp": Object { + "warnLegacyBrowsers": true, + }, + "env": Object { + "mode": Object { + "dev": Any, + "name": Any, + "prod": Any, + }, + "packageInfo": Object { + "branch": Any, + "buildNum": Any, + "buildSha": Any, + "dist": Any, + "version": Any, + }, + }, + "externalUrl": Object { + "policy": Array [ + Object { + "allow": true, + }, + ], + }, + "i18n": Object { + "translationsUrl": "/mock-server-basepath/translations/en.json", + }, + "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object { + "foo:bar": Object { + "userValue": true, + }, + }, + }, + "uiSettings": Object { + "defaults": Object { + "registered": Object { + "name": "title", + }, + }, + "user": Object {}, + }, + }, + "publicBaseUrl": "http://myhost.com/mock-server-basepath", + "serverBasePath": "/mock-server-basepath", + "theme": Object { + "darkMode": "theme:darkMode", + "version": "v8", + }, + "uiPlugins": Array [], + "vars": Object {}, + "version": Any, +} +`; + +exports[`RenderingService preboot() render() renders "core" with excluded global user settings 1`] = ` +Object { + "anonymousStatusPage": false, + "basePath": "/mock-server-basepath", + "branch": Any, + "buildNumber": Any, + "clusterInfo": Object {}, + "csp": Object { + "warnLegacyBrowsers": true, + }, + "env": Object { + "mode": Object { + "dev": Any, + "name": Any, + "prod": Any, + }, + "packageInfo": Object { + "branch": Any, + "buildNum": Any, + "buildSha": Any, + "dist": Any, + "version": Any, + }, + }, + "externalUrl": Object { + "policy": Array [ + Object { + "allow": true, + }, + ], + }, + "i18n": Object { + "translationsUrl": "/mock-server-basepath/translations/en.json", + }, + "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object {}, + }, "uiSettings": Object { "defaults": Object { "registered": Object { @@ -263,6 +403,10 @@ Object { "translationsUrl": "/mock-server-basepath/translations/en.json", }, "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object {}, + }, "uiSettings": Object { "defaults": Object { "registered": Object { @@ -319,6 +463,10 @@ Object { "translationsUrl": "/mock-server-basepath/translations/en.json", }, "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object {}, + }, "uiSettings": Object { "defaults": Object { "registered": Object { @@ -379,6 +527,10 @@ Object { "translationsUrl": "/mock-server-basepath/translations/en.json", }, "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object {}, + }, "uiSettings": Object { "defaults": Object { "registered": Object { @@ -443,6 +595,10 @@ Object { "translationsUrl": "/translations/en.json", }, "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object {}, + }, "uiSettings": Object { "defaults": Object { "registered": Object { @@ -499,6 +655,142 @@ Object { "translationsUrl": "/mock-server-basepath/translations/en.json", }, "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object {}, + }, + "uiSettings": Object { + "defaults": Object { + "registered": Object { + "name": "title", + }, + }, + "user": Object {}, + }, + }, + "publicBaseUrl": "http://myhost.com/mock-server-basepath", + "serverBasePath": "/mock-server-basepath", + "theme": Object { + "darkMode": "theme:darkMode", + "version": "v8", + }, + "uiPlugins": Array [], + "vars": Object {}, + "version": Any, +} +`; + +exports[`RenderingService setup() render() renders "core" page with global settings 1`] = ` +Object { + "anonymousStatusPage": false, + "basePath": "/mock-server-basepath", + "branch": Any, + "buildNumber": Any, + "clusterInfo": Object { + "cluster_name": "cluster-name", + "cluster_uuid": "cluster-uuid", + "cluster_version": "8.0.0", + }, + "csp": Object { + "warnLegacyBrowsers": true, + }, + "env": Object { + "mode": Object { + "dev": Any, + "name": Any, + "prod": Any, + }, + "packageInfo": Object { + "branch": Any, + "buildNum": Any, + "buildSha": Any, + "dist": Any, + "version": Any, + }, + }, + "externalUrl": Object { + "policy": Array [ + Object { + "allow": true, + }, + ], + }, + "i18n": Object { + "translationsUrl": "/mock-server-basepath/translations/en.json", + }, + "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object { + "foo:bar": Object { + "userValue": true, + }, + }, + }, + "uiSettings": Object { + "defaults": Object { + "registered": Object { + "name": "title", + }, + }, + "user": Object {}, + }, + }, + "publicBaseUrl": "http://myhost.com/mock-server-basepath", + "serverBasePath": "/mock-server-basepath", + "theme": Object { + "darkMode": "theme:darkMode", + "version": "v8", + }, + "uiPlugins": Array [], + "vars": Object {}, + "version": Any, +} +`; + +exports[`RenderingService setup() render() renders "core" with excluded global user settings 1`] = ` +Object { + "anonymousStatusPage": false, + "basePath": "/mock-server-basepath", + "branch": Any, + "buildNumber": Any, + "clusterInfo": Object { + "cluster_name": "cluster-name", + "cluster_uuid": "cluster-uuid", + "cluster_version": "8.0.0", + }, + "csp": Object { + "warnLegacyBrowsers": true, + }, + "env": Object { + "mode": Object { + "dev": Any, + "name": Any, + "prod": Any, + }, + "packageInfo": Object { + "branch": Any, + "buildNum": Any, + "buildSha": Any, + "dist": Any, + "version": Any, + }, + }, + "externalUrl": Object { + "policy": Array [ + Object { + "allow": true, + }, + ], + }, + "i18n": Object { + "translationsUrl": "/mock-server-basepath/translations/en.json", + }, + "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object {}, + }, "uiSettings": Object { "defaults": Object { "registered": Object { @@ -559,6 +851,10 @@ Object { "translationsUrl": "/mock-server-basepath/translations/en.json", }, "legacyMetadata": Object { + "globalUiSettings": Object { + "defaults": Object {}, + "user": Object {}, + }, "uiSettings": Object { "defaults": Object { "registered": Object { diff --git a/packages/core/rendering/core-rendering-server-internal/src/rendering_service.test.ts b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.test.ts index 48196717c6f9f..b5ac580ae8d05 100644 --- a/packages/core/rendering/core-rendering-server-internal/src/rendering_service.test.ts +++ b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.test.ts @@ -58,11 +58,17 @@ function renderTestCases( > ) { describe('render()', () => { - let uiSettings: ReturnType; + let uiSettings: { + client: ReturnType; + globalClient: ReturnType; + }; beforeEach(async () => { - uiSettings = uiSettingsServiceMock.createClient(); - uiSettings.getRegistered.mockReturnValue({ + uiSettings = { + client: uiSettingsServiceMock.createClient(), + globalClient: uiSettingsServiceMock.createClient(), + }; + uiSettings.client.getRegistered.mockReturnValue({ registered: { name: 'title' }, }); }); @@ -106,7 +112,7 @@ function renderTestCases( it('renders "core" page driven by settings', async () => { const userSettings = { 'theme:darkMode': { userValue: true } }; - uiSettings.getUserProvided.mockResolvedValue(userSettings); + uiSettings.client.getUserProvided.mockResolvedValue(userSettings); const [render] = await getRender(); const content = await render(createKibanaRequest(), uiSettings); const dom = load(content); @@ -116,9 +122,21 @@ function renderTestCases( expect(data.legacyMetadata.uiSettings.user).toEqual(userSettings); // user settings are injected }); + it('renders "core" page with global settings', async () => { + const userSettings = { 'foo:bar': { userValue: true } }; + uiSettings.globalClient.getUserProvided.mockResolvedValue(userSettings); + const [render] = await getRender(); + const content = await render(createKibanaRequest(), uiSettings); + const dom = load(content); + const data = JSON.parse(dom('kbn-injected-metadata').attr('data') ?? '""'); + + expect(data).toMatchSnapshot(INJECTED_METADATA); + expect(data.legacyMetadata.globalUiSettings.user).toEqual(userSettings); // user settings are injected + }); + it('renders "core" with excluded user settings', async () => { const userSettings = { 'theme:darkMode': { userValue: true } }; - uiSettings.getUserProvided.mockResolvedValue(userSettings); + uiSettings.client.getUserProvided.mockResolvedValue(userSettings); const [render] = await getRender(); const content = await render(createKibanaRequest(), uiSettings, { isAnonymousPage: true, @@ -130,6 +148,20 @@ function renderTestCases( expect(data.legacyMetadata.uiSettings.user).toEqual({}); // user settings are not injected }); + it('renders "core" with excluded global user settings', async () => { + const userSettings = { 'foo:bar': { userValue: true } }; + uiSettings.globalClient.getUserProvided.mockResolvedValue(userSettings); + const [render] = await getRender(); + const content = await render(createKibanaRequest(), uiSettings, { + isAnonymousPage: true, + }); + const dom = load(content); + const data = JSON.parse(dom('kbn-injected-metadata').attr('data') ?? '""'); + + expect(data).toMatchSnapshot(INJECTED_METADATA); + expect(data.legacyMetadata.globalUiSettings.user).toEqual({}); // user settings are not injected + }); + it('calls `getStylesheetPaths` with the correct parameters', async () => { getSettingValueMock.mockImplementation((settingName: string) => { if (settingName === 'theme:darkMode') { diff --git a/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx index 653768c83d784..c5662441cbae3 100644 --- a/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx +++ b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx @@ -84,7 +84,10 @@ export class RenderingService { private async render( { elasticsearch, http, uiPlugins, status }: RenderOptions, request: KibanaRequest, - uiSettings: IUiSettingsClient, + uiSettings: { + client: IUiSettingsClient; + globalClient: IUiSettingsClient; + }, { isAnonymousPage = false, vars, includeExposedConfigKeys }: IRenderOptions = {} ) { const env = { @@ -95,8 +98,12 @@ export class RenderingService { const basePath = http.basePath.get(request); const { serverBasePath, publicBaseUrl } = http.basePath; const settings = { - defaults: uiSettings.getRegistered() ?? {}, - user: isAnonymousPage ? {} : await uiSettings.getUserProvided(), + defaults: uiSettings.client?.getRegistered() ?? {}, + user: isAnonymousPage ? {} : await uiSettings.client?.getUserProvided(), + }; + const globalSettings = { + defaults: uiSettings.globalClient?.getRegistered() ?? {}, + user: isAnonymousPage ? {} : await uiSettings.globalClient?.getUserProvided(), }; let clusterInfo = {}; @@ -168,6 +175,7 @@ export class RenderingService { ), legacyMetadata: { uiSettings: settings, + globalUiSettings: globalSettings, }, }, }; diff --git a/packages/core/rendering/core-rendering-server-internal/src/types.ts b/packages/core/rendering/core-rendering-server-internal/src/types.ts index e2f7797ac5c42..16505366e9a75 100644 --- a/packages/core/rendering/core-rendering-server-internal/src/types.ts +++ b/packages/core/rendering/core-rendering-server-internal/src/types.ts @@ -81,7 +81,10 @@ export interface InternalRenderingServiceSetup { */ render( request: KibanaRequest, - uiSettings: IUiSettingsClient, + uiSettings: { + client: IUiSettingsClient; + globalClient: IUiSettingsClient; + }, options?: IRenderOptions ): Promise; } diff --git a/packages/core/root/core-root-browser-internal/src/core_system.test.mocks.ts b/packages/core/root/core-root-browser-internal/src/core_system.test.mocks.ts index 36cdcb4ae7520..54d89021a4d93 100644 --- a/packages/core/root/core-root-browser-internal/src/core_system.test.mocks.ts +++ b/packages/core/root/core-root-browser-internal/src/core_system.test.mocks.ts @@ -19,6 +19,7 @@ import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; import { overlayServiceMock } from '@kbn/core-overlays-browser-mocks'; import { pluginsServiceMock } from '@kbn/core-plugins-browser-mocks'; import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; +import { settingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import { renderingServiceMock } from '@kbn/core-rendering-browser-mocks'; import { integrationsServiceMock } from '@kbn/core-integrations-browser-mocks'; import { coreAppsMock } from '@kbn/core-apps-browser-mocks'; @@ -77,8 +78,11 @@ export const MockUiSettingsService = uiSettingsServiceMock.create(); export const UiSettingsServiceConstructor = jest .fn() .mockImplementation(() => MockUiSettingsService); +export const MockSettingsService = settingsServiceMock.create(); +export const SettingsServiceConstructor = jest.fn().mockImplementation(() => MockSettingsService); jest.doMock('@kbn/core-ui-settings-browser-internal', () => ({ UiSettingsService: UiSettingsServiceConstructor, + SettingsService: SettingsServiceConstructor, })); export const MockChromeService = chromeServiceMock.create(); diff --git a/packages/core/root/core-root-browser-internal/src/core_system.test.ts b/packages/core/root/core-root-browser-internal/src/core_system.test.ts index cb9618ce6034c..c6134a44c4f76 100644 --- a/packages/core/root/core-root-browser-internal/src/core_system.test.ts +++ b/packages/core/root/core-root-browser-internal/src/core_system.test.ts @@ -24,6 +24,7 @@ import { NotificationServiceConstructor, OverlayServiceConstructor, UiSettingsServiceConstructor, + SettingsServiceConstructor, MockApplicationService, MockDocLinksService, MockRenderingService, @@ -40,6 +41,7 @@ import { fetchOptionalMemoryInfoMock, MockLoggingSystem, LoggingSystemConstructor, + MockSettingsService, } from './core_system.test.mocks'; import type { EnvironmentMode } from '@kbn/config'; import { CoreSystem } from './core_system'; @@ -131,6 +133,7 @@ describe('constructor', () => { expect(NotificationServiceConstructor).toHaveBeenCalledTimes(1); expect(HttpServiceConstructor).toHaveBeenCalledTimes(1); expect(UiSettingsServiceConstructor).toHaveBeenCalledTimes(1); + expect(SettingsServiceConstructor).toHaveBeenCalledTimes(1); expect(ChromeServiceConstructor).toHaveBeenCalledTimes(1); expect(OverlayServiceConstructor).toHaveBeenCalledTimes(1); expect(RenderingServiceConstructor).toHaveBeenCalledTimes(1); @@ -266,6 +269,11 @@ describe('#setup()', () => { expect(MockUiSettingsService.setup).toHaveBeenCalledTimes(1); }); + it('calls settings#setup()', async () => { + await setupCore(); + expect(MockSettingsService.setup).toHaveBeenCalledTimes(1); + }); + it('calls fatalErrors#setup()', async () => { await setupCore(); expect(MockFatalErrorsService.setup).toHaveBeenCalledTimes(1); @@ -411,6 +419,11 @@ describe('#start()', () => { expect(MockUiSettingsService.start).toHaveBeenCalledTimes(1); }); + it('calls settings#start()', async () => { + await startCore(); + expect(MockSettingsService.start).toHaveBeenCalledTimes(1); + }); + it('calls i18n#start()', async () => { await startCore(); expect(MockI18nService.start).toHaveBeenCalledTimes(1); diff --git a/packages/core/root/core-root-browser-internal/src/core_system.ts b/packages/core/root/core-root-browser-internal/src/core_system.ts index eb61e0547279d..7490a9b00305d 100644 --- a/packages/core/root/core-root-browser-internal/src/core_system.ts +++ b/packages/core/root/core-root-browser-internal/src/core_system.ts @@ -23,7 +23,7 @@ import { ExecutionContextService } from '@kbn/core-execution-context-browser-int import type { FatalErrorsSetup } from '@kbn/core-fatal-errors-browser'; import { FatalErrorsService } from '@kbn/core-fatal-errors-browser-internal'; import { HttpService } from '@kbn/core-http-browser-internal'; -import { UiSettingsService } from '@kbn/core-ui-settings-browser-internal'; +import { SettingsService, UiSettingsService } from '@kbn/core-ui-settings-browser-internal'; import { DeprecationsService } from '@kbn/core-deprecations-browser-internal'; import { IntegrationsService } from '@kbn/core-integrations-browser-internal'; import { reportPerformanceMetricEvent } from '@kbn/ebt-tools'; @@ -88,6 +88,7 @@ export class CoreSystem { private readonly http: HttpService; private readonly savedObjects: SavedObjectsService; private readonly uiSettings: UiSettingsService; + private readonly settings: SettingsService; private readonly chrome: ChromeService; private readonly i18n: I18nService; private readonly overlay: OverlayService; @@ -132,6 +133,7 @@ export class CoreSystem { this.http = new HttpService(); this.savedObjects = new SavedObjectsService(); this.uiSettings = new UiSettingsService(); + this.settings = new SettingsService(); this.overlay = new OverlayService(); this.chrome = new ChromeService({ browserSupportsCsp, @@ -232,6 +234,7 @@ export class CoreSystem { executionContext, }); const uiSettings = this.uiSettings.setup({ http, injectedMetadata }); + const settings = this.settings.setup({ http, injectedMetadata }); const notifications = this.notifications.setup({ uiSettings }); const application = this.application.setup({ http }); @@ -246,6 +249,7 @@ export class CoreSystem { notifications, theme, uiSettings, + settings, executionContext, }; @@ -273,6 +277,7 @@ export class CoreSystem { const analytics = this.analytics.start(); const injectedMetadata = await this.injectedMetadata.start(); const uiSettings = await this.uiSettings.start(); + const settings = await this.settings.start(); const docLinks = this.docLinks.start({ injectedMetadata }); const http = await this.http.start(); const savedObjects = await this.savedObjects.start({ http }); @@ -330,6 +335,7 @@ export class CoreSystem { notifications, overlays, uiSettings, + settings, fatalErrors, deprecations, }; @@ -386,6 +392,7 @@ export class CoreSystem { this.http.stop(); this.integrations.stop(); this.uiSettings.stop(); + this.settings.stop(); this.chrome.stop(); this.i18n.stop(); this.application.stop(); diff --git a/packages/core/saved-objects/core-saved-objects-server/BUILD.bazel b/packages/core/saved-objects/core-saved-objects-server/BUILD.bazel index 98b1470fee9d7..8be58e1f28568 100644 --- a/packages/core/saved-objects/core-saved-objects-server/BUILD.bazel +++ b/packages/core/saved-objects/core-saved-objects-server/BUILD.bazel @@ -44,6 +44,7 @@ TYPES_DEPS = [ "//packages/kbn-utility-types:npm_module_types", "//packages/kbn-config-schema:npm_module_types", "//packages/kbn-logging:npm_module_types", + "//packages/kbn-ecs:npm_module_types", "//packages/core/http/core-http-server:npm_module_types", "//packages/core/elasticsearch/core-elasticsearch-server:npm_module_types", "//packages/core/saved-objects/core-saved-objects-common:npm_module_types", diff --git a/packages/core/saved-objects/core-saved-objects-server/src/extensions/security.ts b/packages/core/saved-objects/core-saved-objects-server/src/extensions/security.ts index 2eadd954e6ad4..2d6df725068be 100644 --- a/packages/core/saved-objects/core-saved-objects-server/src/extensions/security.ts +++ b/packages/core/saved-objects/core-saved-objects-server/src/extensions/security.ts @@ -7,7 +7,7 @@ */ import type { SavedObject } from '@kbn/core-saved-objects-common'; -import type { EcsEventOutcome } from '@kbn/logging'; +import type { EcsEventOutcome } from '@kbn/ecs'; /** * The CheckAuthorizationParams interface contains settings for checking diff --git a/packages/core/ui-settings/core-ui-settings-browser-internal/index.ts b/packages/core/ui-settings/core-ui-settings-browser-internal/index.ts index e45334755ac16..ac2b00b418018 100644 --- a/packages/core/ui-settings/core-ui-settings-browser-internal/index.ts +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/index.ts @@ -7,4 +7,5 @@ */ export { UiSettingsService } from './src/ui_settings_service'; +export { SettingsService } from './src/settings_service'; export type { UiSettingsClient } from './src/ui_settings_client'; diff --git a/packages/core/ui-settings/core-ui-settings-browser-internal/src/settings_service.test.ts b/packages/core/ui-settings/core-ui-settings-browser-internal/src/settings_service.test.ts new file mode 100644 index 0000000000000..b6e0350c2248b --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/src/settings_service.test.ts @@ -0,0 +1,90 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 * as Rx from 'rxjs'; + +import { httpServiceMock } from '@kbn/core-http-browser-mocks'; +import { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks'; +import { SettingsService } from './settings_service'; + +const httpSetup = httpServiceMock.createSetupContract(); + +const injectedMetadata = injectedMetadataServiceMock.createSetupContract(); +injectedMetadata.getLegacyMetadata.mockReturnValue({ + app: { + id: 'foo', + title: 'Foo App', + }, + nav: [], + uiSettings: { + defaults: { foo: { value: 'bar' }, bar: { value: 'baz' } }, + user: {}, + }, + globalUiSettings: { + defaults: { baz: { value: 'eggs' }, laz: { value: 'has' } }, + user: { first: { value: 'second' } }, + }, +} as any); + +const defaultDeps = { + http: httpSetup, + injectedMetadata, +}; + +describe('#setup', () => { + it('initializes two clients correctly', () => { + const service = new SettingsService(); + const { client, globalClient } = service.setup(defaultDeps); + expect(client.get('foo')).toEqual('bar'); + expect(client.get('bar')).toEqual('baz'); + expect(globalClient.get('baz')).toEqual('eggs'); + expect(globalClient.get('laz')).toEqual('has'); + expect(globalClient.get('first')).toEqual('second'); + }); +}); + +describe('#start', () => { + it('throws if called before #setup', () => { + const service = new SettingsService(); + expect(() => service.start()).toThrow('#setup must be called before start'); + }); +}); + +describe('#stop', () => { + it('runs fine if service never set up', () => { + const service = new SettingsService(); + expect(() => service.stop()).not.toThrowError(); + }); + + it('stops the uiSettingsClient and uiSettingsApi', async () => { + const service = new SettingsService(); + let loadingCount$: Rx.Observable; + defaultDeps.http.addLoadingCountSource.mockImplementation((obs$) => (loadingCount$ = obs$)); + const { client, globalClient } = service.setup(defaultDeps); + + service.stop(); + + await expect( + Rx.lastValueFrom( + Rx.combineLatest([client!.getUpdate$(), client!.getUpdateErrors$(), loadingCount$!]), + { defaultValue: undefined } + ) + ).resolves.toBe(undefined); + + await expect( + Rx.lastValueFrom( + Rx.combineLatest([ + globalClient!.getUpdate$(), + globalClient!.getUpdateErrors$(), + loadingCount$!, + ]), + { defaultValue: undefined } + ) + ).resolves.toBe(undefined); + }); +}); diff --git a/packages/core/ui-settings/core-ui-settings-browser-internal/src/settings_service.ts b/packages/core/ui-settings/core-ui-settings-browser-internal/src/settings_service.ts new file mode 100644 index 0000000000000..edda603644fa2 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/src/settings_service.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 { Subject } from 'rxjs'; + +import type { InternalInjectedMetadataSetup } from '@kbn/core-injected-metadata-browser-internal'; +import type { HttpSetup } from '@kbn/core-http-browser'; +import type { SettingsStart, SettingsSetup } from '@kbn/core-ui-settings-browser'; +import { UiSettingsApi } from './ui_settings_api'; +import { UiSettingsClient } from './ui_settings_client'; +import { UiSettingsGlobalClient } from './ui_settings_global_client'; + +export interface SettingsServiceDeps { + http: HttpSetup; + injectedMetadata: InternalInjectedMetadataSetup; +} + +/** @internal */ +export class SettingsService { + private uiSettingsApi?: UiSettingsApi; + private uiSettingsClient?: UiSettingsClient; + private uiSettingsGlobalClient?: UiSettingsGlobalClient; + private done$ = new Subject(); + + public setup({ http, injectedMetadata }: SettingsServiceDeps): SettingsSetup { + this.uiSettingsApi = new UiSettingsApi(http); + http.addLoadingCountSource(this.uiSettingsApi.getLoadingCount$()); + + // TODO: Migrate away from legacyMetadata https://github.com/elastic/kibana/issues/22779 + const legacyMetadata = injectedMetadata.getLegacyMetadata(); + + this.uiSettingsClient = new UiSettingsClient({ + api: this.uiSettingsApi, + defaults: legacyMetadata.uiSettings.defaults, + initialSettings: legacyMetadata.uiSettings.user, + done$: this.done$, + }); + + this.uiSettingsGlobalClient = new UiSettingsGlobalClient({ + api: this.uiSettingsApi, + defaults: legacyMetadata.globalUiSettings.defaults, + initialSettings: legacyMetadata.globalUiSettings.user, + done$: this.done$, + }); + + return { + client: this.uiSettingsClient, + globalClient: this.uiSettingsGlobalClient, + }; + } + + public start(): SettingsStart { + if (!this.uiSettingsClient || !this.uiSettingsGlobalClient) { + throw new Error('#setup must be called before start'); + } + return { + client: this.uiSettingsClient, + globalClient: this.uiSettingsGlobalClient, + }; + } + + public stop() { + this.done$.complete(); + + if (this.uiSettingsApi) { + this.uiSettingsApi.stop(); + } + } +} diff --git a/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.ts b/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.ts index 3ff66d8216967..c531d18aded13 100644 --- a/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.ts +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.ts @@ -20,7 +20,10 @@ export interface UiSettingsServiceDeps { injectedMetadata: InternalInjectedMetadataSetup; } -/** @internal */ +/** + * @Internal + * @Deprecated + **/ export class UiSettingsService { private uiSettingsApi?: UiSettingsApi; private uiSettingsClient?: UiSettingsClient; diff --git a/packages/core/ui-settings/core-ui-settings-browser-mocks/index.ts b/packages/core/ui-settings/core-ui-settings-browser-mocks/index.ts index 4d86ef0335dc5..a6b6ef7c44b82 100644 --- a/packages/core/ui-settings/core-ui-settings-browser-mocks/index.ts +++ b/packages/core/ui-settings/core-ui-settings-browser-mocks/index.ts @@ -7,3 +7,4 @@ */ export { uiSettingsServiceMock } from './src/ui_settings_service.mock'; +export { settingsServiceMock } from './src/settings_service.mock'; diff --git a/packages/core/ui-settings/core-ui-settings-browser-mocks/src/client.mock.ts b/packages/core/ui-settings/core-ui-settings-browser-mocks/src/client.mock.ts new file mode 100644 index 0000000000000..0f7c9a6bd0ad5 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-mocks/src/client.mock.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 { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; +import { Subject } from 'rxjs'; + +export const clientMock = () => { + const mock: jest.Mocked = { + getAll: jest.fn(), + get: jest.fn(), + get$: jest.fn(), + set: jest.fn(), + remove: jest.fn(), + isDeclared: jest.fn(), + isDefault: jest.fn(), + isCustom: jest.fn(), + isOverridden: jest.fn(), + getUpdate$: jest.fn(), + getUpdateErrors$: jest.fn(), + }; + mock.get$.mockReturnValue(new Subject()); + mock.getUpdate$.mockReturnValue(new Subject()); + mock.getUpdateErrors$.mockReturnValue(new Subject()); + mock.getAll.mockReturnValue({}); + return mock; +}; diff --git a/packages/core/ui-settings/core-ui-settings-browser-mocks/src/service_contract.mock.ts b/packages/core/ui-settings/core-ui-settings-browser-mocks/src/service_contract.mock.ts new file mode 100644 index 0000000000000..17cdfe6932405 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-mocks/src/service_contract.mock.ts @@ -0,0 +1,15 @@ +/* + * Copyright 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 serviceContractMock = (): jest.Mocked => { + return { + setup: jest.fn(), + start: jest.fn(), + stop: jest.fn(), + }; +}; diff --git a/packages/core/ui-settings/core-ui-settings-browser-mocks/src/settings_service.mock.ts b/packages/core/ui-settings/core-ui-settings-browser-mocks/src/settings_service.mock.ts new file mode 100644 index 0000000000000..6adcf4f1b05b1 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-mocks/src/settings_service.mock.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 { clientMock } from './client.mock'; +import { serviceContractMock } from './service_contract.mock'; + +const createSetupContractMock = () => { + const client = clientMock(); + const globalClient = clientMock(); + + return { + client, + globalClient, + }; +}; + +const createMock = () => { + const mocked = serviceContractMock(); + mocked.setup.mockReturnValue(createSetupContractMock()); + return mocked; +}; + +export const settingsServiceMock = { + create: createMock, + createSetupContract: createSetupContractMock, + createStartContract: createSetupContractMock, +}; diff --git a/packages/core/ui-settings/core-ui-settings-browser-mocks/src/ui_settings_service.mock.ts b/packages/core/ui-settings/core-ui-settings-browser-mocks/src/ui_settings_service.mock.ts index 834a86d03e049..f223185d758b6 100644 --- a/packages/core/ui-settings/core-ui-settings-browser-mocks/src/ui_settings_service.mock.ts +++ b/packages/core/ui-settings/core-ui-settings-browser-mocks/src/ui_settings_service.mock.ts @@ -6,41 +6,15 @@ * Side Public License, v 1. */ -import * as Rx from 'rxjs'; -import type { PublicMethodsOf } from '@kbn/utility-types'; -import type { UiSettingsService } from '@kbn/core-ui-settings-browser-internal'; -import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; +import { clientMock } from './client.mock'; +import { serviceContractMock } from './service_contract.mock'; const createSetupContractMock = () => { - const setupContract: jest.Mocked = { - getAll: jest.fn(), - get: jest.fn(), - get$: jest.fn(), - set: jest.fn(), - remove: jest.fn(), - isDeclared: jest.fn(), - isDefault: jest.fn(), - isCustom: jest.fn(), - isOverridden: jest.fn(), - getUpdate$: jest.fn(), - getUpdateErrors$: jest.fn(), - }; - setupContract.get$.mockReturnValue(new Rx.Subject()); - setupContract.getUpdate$.mockReturnValue(new Rx.Subject()); - setupContract.getUpdateErrors$.mockReturnValue(new Rx.Subject()); - setupContract.getAll.mockReturnValue({}); - - return setupContract; + return clientMock(); }; -type UiSettingsServiceContract = PublicMethodsOf; const createMock = () => { - const mocked: jest.Mocked = { - setup: jest.fn(), - start: jest.fn(), - stop: jest.fn(), - }; - + const mocked = serviceContractMock(); mocked.setup.mockReturnValue(createSetupContractMock()); return mocked; }; diff --git a/packages/core/ui-settings/core-ui-settings-browser/index.ts b/packages/core/ui-settings/core-ui-settings-browser/index.ts index 9b115f1b533af..aadb4999ed5f5 100644 --- a/packages/core/ui-settings/core-ui-settings-browser/index.ts +++ b/packages/core/ui-settings/core-ui-settings-browser/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export type { UiSettingsState, IUiSettingsClient } from './src/types'; +export type { UiSettingsState, IUiSettingsClient, SettingsStart, SettingsSetup } from './src/types'; diff --git a/packages/core/ui-settings/core-ui-settings-browser/src/types.ts b/packages/core/ui-settings/core-ui-settings-browser/src/types.ts index 4d23814c2b35d..d722fb158cb51 100644 --- a/packages/core/ui-settings/core-ui-settings-browser/src/types.ts +++ b/packages/core/ui-settings/core-ui-settings-browser/src/types.ts @@ -99,3 +99,12 @@ export interface IUiSettingsClient { */ getUpdateErrors$: () => Observable; } + +/** @public */ +export interface SettingsStart { + client: IUiSettingsClient; + globalClient: IUiSettingsClient; +} + +/** @public */ +export type SettingsSetup = SettingsStart; diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/saved_objects/ui_settings.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/saved_objects/ui_settings.ts index ba6abf0442497..f03bc2a3ab657 100644 --- a/packages/core/ui-settings/core-ui-settings-server-internal/src/saved_objects/ui_settings.ts +++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/saved_objects/ui_settings.ts @@ -46,7 +46,7 @@ export const uiSettingsType: SavedObjectsType = { export const uiSettingsGlobalType: SavedObjectsType = { name: 'config-global', - hidden: true, + hidden: false, namespaceType: 'agnostic', mappings: { dynamic: false, diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts index 77d494188d20a..e4dabb6b50f46 100644 --- a/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts +++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts @@ -107,7 +107,6 @@ export class UiSettingsService const { version, buildNum } = this.coreContext.env.packageInfo; return (savedObjectsClient: SavedObjectsClientContract): ClientType => { const isNamespaceScope = scope === 'namespace'; - const options = { type: (isNamespaceScope ? 'config' : 'config-global') as 'config' | 'config-global', id: version, diff --git a/packages/kbn-ecs/BUILD.bazel b/packages/kbn-ecs/BUILD.bazel new file mode 100644 index 0000000000000..c6701f62915cf --- /dev/null +++ b/packages/kbn-ecs/BUILD.bazel @@ -0,0 +1,104 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "kbn-ecs" +PKG_REQUIRE_NAME = "@kbn/ecs" + +SOURCE_FILES = glob( + [ + "**/*.ts", + ], + exclude = [ + "**/*.config.js", + "**/*.mock.*", + "**/*.test.*", + "**/*.stories.*", + "**/__snapshots__/**", + "**/integration_tests/**", + "**/mocks/**", + "**/scripts/**", + "**/storybook/**", + "**/test_fixtures/**", + "**/test_helpers/**", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest" +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + emit_declaration_only = True, + out_dir = "target_types", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +js_library( + name = "npm_module_types", + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":tsc_types"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [ + ":npm_module", + ], + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "build_types", + deps = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-ecs/README.md b/packages/kbn-ecs/README.md new file mode 100644 index 0000000000000..8e57bb8f56691 --- /dev/null +++ b/packages/kbn-ecs/README.md @@ -0,0 +1,5 @@ +# @kbn/ecs + +Base types for Elastic common schema. These types are used for `logging` and any extensions to the types declared in this package need to be in their own dedicated packages. + +https://www.elastic.co/guide/en/ecs/current/index.html \ No newline at end of file diff --git a/packages/kbn-ecs/index.ts b/packages/kbn-ecs/index.ts new file mode 100644 index 0000000000000..2ad902cd523c9 --- /dev/null +++ b/packages/kbn-ecs/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './src/ecs'; diff --git a/packages/kbn-ecs/jest.config.js b/packages/kbn-ecs/jest.config.js new file mode 100644 index 0000000000000..0ae87bb211512 --- /dev/null +++ b/packages/kbn-ecs/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../..', + roots: ['/packages/kbn-ecs'], +}; diff --git a/packages/kbn-ecs/kibana.jsonc b/packages/kbn-ecs/kibana.jsonc new file mode 100644 index 0000000000000..34d275e79c10a --- /dev/null +++ b/packages/kbn-ecs/kibana.jsonc @@ -0,0 +1,7 @@ +{ + "type": "shared-common", + "id": "@kbn/ecs", + "owner": "@elastic/kibana-core", + "runtimeDeps": [], + "typeDeps": [], +} diff --git a/packages/kbn-ecs/package.json b/packages/kbn-ecs/package.json new file mode 100644 index 0000000000000..9a00ecaa5c178 --- /dev/null +++ b/packages/kbn-ecs/package.json @@ -0,0 +1,9 @@ +{ + "name": "@kbn/ecs", + "version": "1.0.0", + "private": true, + "author": "Kibana Core", + "license": "SSPL-1.0 OR Elastic License 2.0", + "main": "./target_node/index.js", + "types": "./target_types/index.d.ts" +} diff --git a/packages/kbn-logging/src/ecs/agent.ts b/packages/kbn-ecs/src/ecs/agent.ts similarity index 100% rename from packages/kbn-logging/src/ecs/agent.ts rename to packages/kbn-ecs/src/ecs/agent.ts diff --git a/packages/kbn-logging/src/ecs/autonomous_system.ts b/packages/kbn-ecs/src/ecs/autonomous_system.ts similarity index 100% rename from packages/kbn-logging/src/ecs/autonomous_system.ts rename to packages/kbn-ecs/src/ecs/autonomous_system.ts diff --git a/packages/kbn-logging/src/ecs/base.ts b/packages/kbn-ecs/src/ecs/base.ts similarity index 100% rename from packages/kbn-logging/src/ecs/base.ts rename to packages/kbn-ecs/src/ecs/base.ts diff --git a/packages/kbn-logging/src/ecs/client.ts b/packages/kbn-ecs/src/ecs/client.ts similarity index 100% rename from packages/kbn-logging/src/ecs/client.ts rename to packages/kbn-ecs/src/ecs/client.ts diff --git a/packages/kbn-logging/src/ecs/cloud.ts b/packages/kbn-ecs/src/ecs/cloud.ts similarity index 100% rename from packages/kbn-logging/src/ecs/cloud.ts rename to packages/kbn-ecs/src/ecs/cloud.ts diff --git a/packages/kbn-logging/src/ecs/code_signature.ts b/packages/kbn-ecs/src/ecs/code_signature.ts similarity index 100% rename from packages/kbn-logging/src/ecs/code_signature.ts rename to packages/kbn-ecs/src/ecs/code_signature.ts diff --git a/packages/kbn-logging/src/ecs/container.ts b/packages/kbn-ecs/src/ecs/container.ts similarity index 100% rename from packages/kbn-logging/src/ecs/container.ts rename to packages/kbn-ecs/src/ecs/container.ts diff --git a/packages/kbn-logging/src/ecs/data_stream.ts b/packages/kbn-ecs/src/ecs/data_stream.ts similarity index 100% rename from packages/kbn-logging/src/ecs/data_stream.ts rename to packages/kbn-ecs/src/ecs/data_stream.ts diff --git a/packages/kbn-logging/src/ecs/destination.ts b/packages/kbn-ecs/src/ecs/destination.ts similarity index 100% rename from packages/kbn-logging/src/ecs/destination.ts rename to packages/kbn-ecs/src/ecs/destination.ts diff --git a/packages/kbn-logging/src/ecs/dll.ts b/packages/kbn-ecs/src/ecs/dll.ts similarity index 100% rename from packages/kbn-logging/src/ecs/dll.ts rename to packages/kbn-ecs/src/ecs/dll.ts diff --git a/packages/kbn-logging/src/ecs/dns.ts b/packages/kbn-ecs/src/ecs/dns.ts similarity index 100% rename from packages/kbn-logging/src/ecs/dns.ts rename to packages/kbn-ecs/src/ecs/dns.ts diff --git a/packages/kbn-logging/src/ecs/elf.ts b/packages/kbn-ecs/src/ecs/elf.ts similarity index 100% rename from packages/kbn-logging/src/ecs/elf.ts rename to packages/kbn-ecs/src/ecs/elf.ts diff --git a/packages/kbn-logging/src/ecs/email.ts b/packages/kbn-ecs/src/ecs/email.ts similarity index 100% rename from packages/kbn-logging/src/ecs/email.ts rename to packages/kbn-ecs/src/ecs/email.ts diff --git a/packages/kbn-logging/src/ecs/error.ts b/packages/kbn-ecs/src/ecs/error.ts similarity index 100% rename from packages/kbn-logging/src/ecs/error.ts rename to packages/kbn-ecs/src/ecs/error.ts diff --git a/packages/kbn-logging/src/ecs/event.ts b/packages/kbn-ecs/src/ecs/event.ts similarity index 100% rename from packages/kbn-logging/src/ecs/event.ts rename to packages/kbn-ecs/src/ecs/event.ts diff --git a/packages/kbn-logging/src/ecs/faas.ts b/packages/kbn-ecs/src/ecs/faas.ts similarity index 100% rename from packages/kbn-logging/src/ecs/faas.ts rename to packages/kbn-ecs/src/ecs/faas.ts diff --git a/packages/kbn-logging/src/ecs/file.ts b/packages/kbn-ecs/src/ecs/file.ts similarity index 100% rename from packages/kbn-logging/src/ecs/file.ts rename to packages/kbn-ecs/src/ecs/file.ts diff --git a/packages/kbn-logging/src/ecs/geo.ts b/packages/kbn-ecs/src/ecs/geo.ts similarity index 100% rename from packages/kbn-logging/src/ecs/geo.ts rename to packages/kbn-ecs/src/ecs/geo.ts diff --git a/packages/kbn-logging/src/ecs/group.ts b/packages/kbn-ecs/src/ecs/group.ts similarity index 100% rename from packages/kbn-logging/src/ecs/group.ts rename to packages/kbn-ecs/src/ecs/group.ts diff --git a/packages/kbn-logging/src/ecs/hash.ts b/packages/kbn-ecs/src/ecs/hash.ts similarity index 100% rename from packages/kbn-logging/src/ecs/hash.ts rename to packages/kbn-ecs/src/ecs/hash.ts diff --git a/packages/kbn-logging/src/ecs/host.ts b/packages/kbn-ecs/src/ecs/host.ts similarity index 100% rename from packages/kbn-logging/src/ecs/host.ts rename to packages/kbn-ecs/src/ecs/host.ts diff --git a/packages/kbn-logging/src/ecs/http.ts b/packages/kbn-ecs/src/ecs/http.ts similarity index 100% rename from packages/kbn-logging/src/ecs/http.ts rename to packages/kbn-ecs/src/ecs/http.ts diff --git a/packages/kbn-logging/src/ecs/index.ts b/packages/kbn-ecs/src/ecs/index.ts similarity index 86% rename from packages/kbn-logging/src/ecs/index.ts rename to packages/kbn-ecs/src/ecs/index.ts index 2e472185708ec..e47671515b3de 100644 --- a/packages/kbn-logging/src/ecs/index.ts +++ b/packages/kbn-ecs/src/ecs/index.ts @@ -45,6 +45,45 @@ import { EcsUser } from './user'; import { EcsUserAgent } from './user_agent'; import { EcsVulnerability } from './vulnerability'; +export type { + EcsAgent, + EcsAutonomousSystem, + EcsBase, + EcsClient, + EcsCloud, + EcsContainer, + EcsDataStream, + EcsDestination, + EcsDns, + EcsEmail, + EcsError, + EcsFaas, + EcsFile, + EcsGroup, + EcsHost, + EcsHttp, + EcsLog, + EcsNetwork, + EcsObserver, + EcsOrchestrator, + EcsOrganization, + EcsPackage, + EcsProcess, + EcsRegistry, + EcsRelated, + EcsRule, + EcsServer, + EcsService, + EcsSource, + EcsThreat, + EcsTls, + EcsTracing, + EcsUrl, + EcsUser, + EcsUserAgent, + EcsVulnerability, +}; + export type { EcsEvent, EcsEventCategory, diff --git a/packages/kbn-logging/src/ecs/interface.ts b/packages/kbn-ecs/src/ecs/interface.ts similarity index 100% rename from packages/kbn-logging/src/ecs/interface.ts rename to packages/kbn-ecs/src/ecs/interface.ts diff --git a/packages/kbn-logging/src/ecs/log.ts b/packages/kbn-ecs/src/ecs/log.ts similarity index 100% rename from packages/kbn-logging/src/ecs/log.ts rename to packages/kbn-ecs/src/ecs/log.ts diff --git a/packages/kbn-logging/src/ecs/network.ts b/packages/kbn-ecs/src/ecs/network.ts similarity index 100% rename from packages/kbn-logging/src/ecs/network.ts rename to packages/kbn-ecs/src/ecs/network.ts diff --git a/packages/kbn-logging/src/ecs/observer.ts b/packages/kbn-ecs/src/ecs/observer.ts similarity index 100% rename from packages/kbn-logging/src/ecs/observer.ts rename to packages/kbn-ecs/src/ecs/observer.ts diff --git a/packages/kbn-logging/src/ecs/orchestrator.ts b/packages/kbn-ecs/src/ecs/orchestrator.ts similarity index 100% rename from packages/kbn-logging/src/ecs/orchestrator.ts rename to packages/kbn-ecs/src/ecs/orchestrator.ts diff --git a/packages/kbn-logging/src/ecs/organization.ts b/packages/kbn-ecs/src/ecs/organization.ts similarity index 100% rename from packages/kbn-logging/src/ecs/organization.ts rename to packages/kbn-ecs/src/ecs/organization.ts diff --git a/packages/kbn-logging/src/ecs/os.ts b/packages/kbn-ecs/src/ecs/os.ts similarity index 100% rename from packages/kbn-logging/src/ecs/os.ts rename to packages/kbn-ecs/src/ecs/os.ts diff --git a/packages/kbn-logging/src/ecs/package.ts b/packages/kbn-ecs/src/ecs/package.ts similarity index 100% rename from packages/kbn-logging/src/ecs/package.ts rename to packages/kbn-ecs/src/ecs/package.ts diff --git a/packages/kbn-logging/src/ecs/pe.ts b/packages/kbn-ecs/src/ecs/pe.ts similarity index 100% rename from packages/kbn-logging/src/ecs/pe.ts rename to packages/kbn-ecs/src/ecs/pe.ts diff --git a/packages/kbn-logging/src/ecs/process.ts b/packages/kbn-ecs/src/ecs/process.ts similarity index 100% rename from packages/kbn-logging/src/ecs/process.ts rename to packages/kbn-ecs/src/ecs/process.ts diff --git a/packages/kbn-logging/src/ecs/registry.ts b/packages/kbn-ecs/src/ecs/registry.ts similarity index 100% rename from packages/kbn-logging/src/ecs/registry.ts rename to packages/kbn-ecs/src/ecs/registry.ts diff --git a/packages/kbn-logging/src/ecs/related.ts b/packages/kbn-ecs/src/ecs/related.ts similarity index 100% rename from packages/kbn-logging/src/ecs/related.ts rename to packages/kbn-ecs/src/ecs/related.ts diff --git a/packages/kbn-logging/src/ecs/rule.ts b/packages/kbn-ecs/src/ecs/rule.ts similarity index 100% rename from packages/kbn-logging/src/ecs/rule.ts rename to packages/kbn-ecs/src/ecs/rule.ts diff --git a/packages/kbn-logging/src/ecs/server.ts b/packages/kbn-ecs/src/ecs/server.ts similarity index 100% rename from packages/kbn-logging/src/ecs/server.ts rename to packages/kbn-ecs/src/ecs/server.ts diff --git a/packages/kbn-logging/src/ecs/service.ts b/packages/kbn-ecs/src/ecs/service.ts similarity index 100% rename from packages/kbn-logging/src/ecs/service.ts rename to packages/kbn-ecs/src/ecs/service.ts diff --git a/packages/kbn-logging/src/ecs/source.ts b/packages/kbn-ecs/src/ecs/source.ts similarity index 100% rename from packages/kbn-logging/src/ecs/source.ts rename to packages/kbn-ecs/src/ecs/source.ts diff --git a/packages/kbn-logging/src/ecs/threat.ts b/packages/kbn-ecs/src/ecs/threat.ts similarity index 100% rename from packages/kbn-logging/src/ecs/threat.ts rename to packages/kbn-ecs/src/ecs/threat.ts diff --git a/packages/kbn-logging/src/ecs/tls.ts b/packages/kbn-ecs/src/ecs/tls.ts similarity index 100% rename from packages/kbn-logging/src/ecs/tls.ts rename to packages/kbn-ecs/src/ecs/tls.ts diff --git a/packages/kbn-logging/src/ecs/tracing.ts b/packages/kbn-ecs/src/ecs/tracing.ts similarity index 100% rename from packages/kbn-logging/src/ecs/tracing.ts rename to packages/kbn-ecs/src/ecs/tracing.ts diff --git a/packages/kbn-logging/src/ecs/url.ts b/packages/kbn-ecs/src/ecs/url.ts similarity index 100% rename from packages/kbn-logging/src/ecs/url.ts rename to packages/kbn-ecs/src/ecs/url.ts diff --git a/packages/kbn-logging/src/ecs/user.ts b/packages/kbn-ecs/src/ecs/user.ts similarity index 100% rename from packages/kbn-logging/src/ecs/user.ts rename to packages/kbn-ecs/src/ecs/user.ts diff --git a/packages/kbn-logging/src/ecs/user_agent.ts b/packages/kbn-ecs/src/ecs/user_agent.ts similarity index 100% rename from packages/kbn-logging/src/ecs/user_agent.ts rename to packages/kbn-ecs/src/ecs/user_agent.ts diff --git a/packages/kbn-logging/src/ecs/vlan.ts b/packages/kbn-ecs/src/ecs/vlan.ts similarity index 100% rename from packages/kbn-logging/src/ecs/vlan.ts rename to packages/kbn-ecs/src/ecs/vlan.ts diff --git a/packages/kbn-logging/src/ecs/vulnerability.ts b/packages/kbn-ecs/src/ecs/vulnerability.ts similarity index 100% rename from packages/kbn-logging/src/ecs/vulnerability.ts rename to packages/kbn-ecs/src/ecs/vulnerability.ts diff --git a/packages/kbn-logging/src/ecs/x509.ts b/packages/kbn-ecs/src/ecs/x509.ts similarity index 100% rename from packages/kbn-logging/src/ecs/x509.ts rename to packages/kbn-ecs/src/ecs/x509.ts diff --git a/packages/kbn-ecs/tsconfig.json b/packages/kbn-ecs/tsconfig.json new file mode 100644 index 0000000000000..292157c18591a --- /dev/null +++ b/packages/kbn-ecs/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts", + ] +} diff --git a/packages/kbn-guided-onboarding/src/components/landing_page/use_case_card.tsx b/packages/kbn-guided-onboarding/src/components/landing_page/use_case_card.tsx index 380ff3f15f9d7..d726bf624d6fe 100644 --- a/packages/kbn-guided-onboarding/src/components/landing_page/use_case_card.tsx +++ b/packages/kbn-guided-onboarding/src/components/landing_page/use_case_card.tsx @@ -38,7 +38,7 @@ const constants: UseCaseConstants = { defaultMessage: 'observe', } ), - imageUrlPrefix: '/plugins/home/assets/solution_logos/observability', + imageUrlPrefix: '/plugins/home/assets/solution_logos/kubernetes', }, infrastructure: { logAltText: i18n.translate('guidedOnboardingPackage.gettingStarted.infrastructure.iconName', { @@ -101,11 +101,14 @@ export const UseCaseCard = ({ } title={titleElement} description={description} footer={footer} + paddingSize="l" betaBadgeProps={{ label: constants[useCase].betaBadgeLabel, }} diff --git a/packages/kbn-logging/BUILD.bazel b/packages/kbn-logging/BUILD.bazel index 2bc2c6d05eb0e..d4938c14c8247 100644 --- a/packages/kbn-logging/BUILD.bazel +++ b/packages/kbn-logging/BUILD.bazel @@ -37,13 +37,15 @@ NPM_MODULE_EXTRA_FILES = [ ] RUNTIME_DEPS = [ - "//packages/kbn-std" + "//packages/kbn-std", + "//packages/kbn-ecs" ] TYPES_DEPS = [ "//packages/kbn-std:npm_module_types", "@npm//@types/jest", "@npm//@types/node", + "//packages/kbn-ecs:npm_module_types" ] jsts_transpiler( diff --git a/packages/kbn-logging/index.ts b/packages/kbn-logging/index.ts index 1f0e992f08a7a..b6915b73a26bc 100644 --- a/packages/kbn-logging/index.ts +++ b/packages/kbn-logging/index.ts @@ -14,11 +14,3 @@ export type { LogMeta } from './src/log_meta'; export type { LoggerFactory } from './src/logger_factory'; export type { Layout } from './src/layout'; export type { Appender, DisposableAppender } from './src/appenders'; -export type { - Ecs, - EcsEvent, - EcsEventCategory, - EcsEventKind, - EcsEventOutcome, - EcsEventType, -} from './src/ecs'; diff --git a/packages/kbn-logging/src/log_meta.ts b/packages/kbn-logging/src/log_meta.ts index 7822792c7fbeb..e17f841979cb2 100644 --- a/packages/kbn-logging/src/log_meta.ts +++ b/packages/kbn-logging/src/log_meta.ts @@ -6,40 +6,41 @@ * Side Public License, v 1. */ -import { EcsBase } from './ecs/base'; - -import { EcsAgent } from './ecs/agent'; -import { EcsAutonomousSystem } from './ecs/autonomous_system'; -import { EcsClient } from './ecs/client'; -import { EcsCloud } from './ecs/cloud'; -import { EcsContainer } from './ecs/container'; -import { EcsDestination } from './ecs/destination'; -import { EcsDns } from './ecs/dns'; -import { EcsError } from './ecs/error'; -import { EcsEvent } from './ecs/event'; -import { EcsFile } from './ecs/file'; -import { EcsGroup } from './ecs/group'; -import { EcsHost } from './ecs/host'; -import { EcsHttp } from './ecs/http'; -import { EcsLog } from './ecs/log'; -import { EcsNetwork } from './ecs/network'; -import { EcsObserver } from './ecs/observer'; -import { EcsOrganization } from './ecs/organization'; -import { EcsPackage } from './ecs/package'; -import { EcsProcess } from './ecs/process'; -import { EcsRegistry } from './ecs/registry'; -import { EcsRelated } from './ecs/related'; -import { EcsRule } from './ecs/rule'; -import { EcsServer } from './ecs/server'; -import { EcsService } from './ecs/service'; -import { EcsSource } from './ecs/source'; -import { EcsThreat } from './ecs/threat'; -import { EcsTls } from './ecs/tls'; -import { EcsTracing } from './ecs/tracing'; -import { EcsUrl } from './ecs/url'; -import { EcsUser } from './ecs/user'; -import { EcsUserAgent } from './ecs/user_agent'; -import { EcsVulnerability } from './ecs/vulnerability'; +import { + EcsBase, + EcsAgent, + EcsAutonomousSystem, + EcsClient, + EcsCloud, + EcsContainer, + EcsDestination, + EcsDns, + EcsError, + EcsEvent, + EcsFile, + EcsGroup, + EcsHost, + EcsHttp, + EcsLog, + EcsNetwork, + EcsObserver, + EcsOrganization, + EcsPackage, + EcsProcess, + EcsRegistry, + EcsRelated, + EcsRule, + EcsServer, + EcsService, + EcsSource, + EcsThreat, + EcsTls, + EcsTracing, + EcsUrl, + EcsUser, + EcsUserAgent, + EcsVulnerability, +} from '@kbn/ecs'; /** * Represents the ECS schema with the following reserved keys excluded: diff --git a/packages/kbn-rule-data-utils/src/technical_field_names.ts b/packages/kbn-rule-data-utils/src/technical_field_names.ts index 6b51906cca1ef..b5c4516c6c2c7 100644 --- a/packages/kbn-rule-data-utils/src/technical_field_names.ts +++ b/packages/kbn-rule-data-utils/src/technical_field_names.ts @@ -51,6 +51,9 @@ const ALERT_SUPPRESSION_START = `${ALERT_SUPPRESSION_META}.start` as const; const ALERT_SUPPRESSION_END = `${ALERT_SUPPRESSION_META}.end` as const; const ALERT_SUPPRESSION_DOCS_COUNT = `${ALERT_SUPPRESSION_META}.docs_count` as const; +// Fields pertaining to the cases associated with the alert +const ALERT_CASE_IDS = `${ALERT_NAMESPACE}.case_ids` as const; + // Fields pertaining to the rule associated with the alert const ALERT_RULE_AUTHOR = `${ALERT_RULE_NAMESPACE}.author` as const; const ALERT_RULE_CREATED_AT = `${ALERT_RULE_NAMESPACE}.created_at` as const; @@ -129,6 +132,7 @@ const fields = { ALERT_RULE_PRODUCER, ALERT_REASON, ALERT_RISK_SCORE, + ALERT_CASE_IDS, ALERT_RULE_AUTHOR, ALERT_RULE_CREATED_AT, ALERT_RULE_CREATED_BY, @@ -203,6 +207,7 @@ export { ALERT_WORKFLOW_REASON, ALERT_WORKFLOW_STATUS, ALERT_WORKFLOW_USER, + ALERT_CASE_IDS, ALERT_RULE_AUTHOR, ALERT_RULE_CREATED_AT, ALERT_RULE_CREATED_BY, diff --git a/src/core/server/index.ts b/src/core/server/index.ts index 8de4ccda2f022..054887bed7b86 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -212,18 +212,8 @@ export type { LoggerConfigType, AppenderConfigType, } from '@kbn/core-logging-server'; -export type { - Logger, - LoggerFactory, - Ecs, - EcsEventCategory, - EcsEventKind, - EcsEventOutcome, - EcsEventType, - LogMeta, - LogRecord, - LogLevel, -} from '@kbn/logging'; +export type { Logger, LoggerFactory, LogMeta, LogRecord, LogLevel } from '@kbn/logging'; +export type { Ecs, EcsEventCategory, EcsEventKind, EcsEventOutcome, EcsEventType } from '@kbn/ecs'; export type { NodeInfo, NodeRoles } from '@kbn/core-node-server'; diff --git a/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts b/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts index a5fd8d40912bf..ebb018f0d1e32 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts @@ -66,9 +66,9 @@ describe('checking migration metadata changes on all registered SO types', () => "app_search_telemetry": "7fc4fc08852bf0924ee29942bb394fda9aa8954d", "application_usage_daily": "6e645e0b60ef3af2e8fde80963c2a4f09a190d61", "application_usage_totals": "b2af3577dcd50bfae492b166a7804f69e2cc41dc", - "canvas-element": "c27505dcf2970760bea8a0fe1d000253f0c40f08", - "canvas-workpad": "eb7b28a3b1c24af615edbf29becddf2e750a4bb5", - "canvas-workpad-template": "34454b811e32993eaa55c6ec85a7aecca00c4cfc", + "canvas-element": "e2e312fc499c1a81e628b88baba492fb24f4e82d", + "canvas-workpad": "4b05f7829bc805bbaa07eb9fc0d2a2bbbd6bbf39", + "canvas-workpad-template": "d4bb65aa9c4a2b25029d3272fd9c715d8e4247d7", "cases": "17af08c8b3550b3e57ba1a7f3b89d85f271712c0", "cases-comments": "d7c4c1d24e97620cd415e27e5eb7d5b5f2c5b461", "cases-configure": "1afc414f5563a36e4612fa269193d3ed7277c7bd", @@ -81,7 +81,7 @@ describe('checking migration metadata changes on all registered SO types', () => "core-usage-stats": "f40a213da2c597b0de94e364a4326a5a1baa4ca9", "csp-rule-template": "3679c5f2431da8153878db79c78a4e695357fb61", "csp_rule": "d2bb53ea5d2bdfba1a835ad8956dfcd2b2c32e19", - "dashboard": "742f2d9f110709fd8599b14f7766f38efc30de61", + "dashboard": "7e37790f802b39c852f905c010e13674e893105a", "endpoint:user-artifact": "f94c250a52b30d0a2d32635f8b4c5bdabd1e25c0", "endpoint:user-artifact-manifest": "8c14d49a385d5d1307d956aa743ec78de0b2be88", "enterprise_search_telemetry": "fafcc8318528d34f721c42d1270787c52565bad5", diff --git a/src/plugins/controls/common/control_group/control_group_migrations.test.ts b/src/plugins/controls/common/control_group/control_group_migrations.test.ts new file mode 100644 index 0000000000000..62de5c315d572 --- /dev/null +++ b/src/plugins/controls/common/control_group/control_group_migrations.test.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 { + ControlWidth, + ControlPanelState, + OPTIONS_LIST_CONTROL, + RANGE_SLIDER_CONTROL, + OptionsListEmbeddableInput, + RangeSliderEmbeddableInput, + getDefaultControlGroupInput, + ControlGroupInput, +} from '..'; +import { mockOptionsListEmbeddableInput, mockRangeSliderEmbeddableInput } from '../mocks'; +import { removeHideExcludeAndHideExists } from './control_group_migrations'; + +describe('migrate control group', () => { + const getOptionsListControl = (order: number, input?: Partial) => { + return { + type: OPTIONS_LIST_CONTROL, + order, + width: 'small' as ControlWidth, + grow: true, + explicitInput: { ...mockOptionsListEmbeddableInput, ...input }, + } as ControlPanelState; + }; + + const getRangeSliderControl = (order: number, input?: Partial) => { + return { + type: RANGE_SLIDER_CONTROL, + order, + width: 'medium' as ControlWidth, + grow: false, + explicitInput: { ...mockRangeSliderEmbeddableInput, ...input }, + } as ControlPanelState; + }; + + const getControlGroupInput = (panels: ControlPanelState[]): ControlGroupInput => { + const panelsObjects = panels.reduce((acc, panel) => { + return { ...acc, [panel.explicitInput.id]: panel }; + }, {}); + + return { + id: 'testControlGroupMigration', + ...getDefaultControlGroupInput(), + panels: panelsObjects, + }; + }; + + describe('remove hideExclude and hideExists', () => { + test('should migrate single options list control', () => { + const migratedControlGroupInput: ControlGroupInput = removeHideExcludeAndHideExists( + getControlGroupInput([getOptionsListControl(0, { id: 'testPanelId', hideExclude: true })]) + ); + expect(migratedControlGroupInput.panels).toEqual({ + testPanelId: getOptionsListControl(0, { id: 'testPanelId' }), + }); + }); + test('should migrate multiple options list controls', () => { + const migratedControlGroupInput: ControlGroupInput = removeHideExcludeAndHideExists( + getControlGroupInput([ + getOptionsListControl(0, { id: 'testPanelId1' }), + getOptionsListControl(1, { id: 'testPanelId2', hideExclude: false }), + getOptionsListControl(2, { id: 'testPanelId3', hideExists: true }), + getOptionsListControl(3, { + id: 'testPanelId4', + hideExclude: true, + hideExists: false, + }), + getOptionsListControl(4, { + id: 'testPanelId5', + hideExists: true, + hideExclude: false, + singleSelect: true, + runPastTimeout: true, + selectedOptions: ['test'], + }), + ]) + ); + expect(migratedControlGroupInput.panels).toEqual({ + testPanelId1: getOptionsListControl(0, { id: 'testPanelId1' }), + testPanelId2: getOptionsListControl(1, { id: 'testPanelId2' }), + testPanelId3: getOptionsListControl(2, { id: 'testPanelId3' }), + testPanelId4: getOptionsListControl(3, { + id: 'testPanelId4', + }), + testPanelId5: getOptionsListControl(4, { + id: 'testPanelId5', + singleSelect: true, + runPastTimeout: true, + selectedOptions: ['test'], + }), + }); + }); + + test('should migrate multiple different types of controls', () => { + const migratedControlGroupInput: ControlGroupInput = removeHideExcludeAndHideExists( + getControlGroupInput([ + getOptionsListControl(0, { + id: 'testPanelId1', + hideExists: true, + hideExclude: true, + runPastTimeout: true, + }), + getRangeSliderControl(1, { id: 'testPanelId2' }), + ]) + ); + expect(migratedControlGroupInput.panels).toEqual({ + testPanelId1: getOptionsListControl(0, { id: 'testPanelId1', runPastTimeout: true }), + testPanelId2: getRangeSliderControl(1, { id: 'testPanelId2' }), + }); + }); + }); +}); diff --git a/src/plugins/controls/common/control_group/control_group_migrations.ts b/src/plugins/controls/common/control_group/control_group_migrations.ts index 0060bda8b8cc0..4f119ebeae4d6 100644 --- a/src/plugins/controls/common/control_group/control_group_migrations.ts +++ b/src/plugins/controls/common/control_group/control_group_migrations.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import { ControlGroupInput, ControlsPanels } from '..'; +import { ControlGroupInput, ControlPanelState, ControlsPanels } from '..'; +import { OptionsListEmbeddableInput, OPTIONS_LIST_CONTROL } from '../options_list/types'; export const makeControlOrdersZeroBased = (input: ControlGroupInput) => { if ( @@ -30,3 +31,31 @@ export const makeControlOrdersZeroBased = (input: ControlGroupInput) => { } return input; }; + +/** + * The UX for the "Allow include/exclude" and "Allow exists query" toggles was removed in 8.7.0 so, to + * prevent users from getting stuck when migrating from 8.6.0 (when the toggles were introduced) to 8.7.0 + * we must set both the `hideExclude` and `hideExists` keys to `undefined` for all existing options + * list controls. + */ +export const removeHideExcludeAndHideExists = (input: ControlGroupInput) => { + if (input.panels && typeof input.panels === 'object' && Object.keys(input.panels).length > 0) { + const newPanels = Object.keys(input.panels).reduce( + (panelAccumulator, panelId) => { + const panel: ControlPanelState = input.panels[panelId]; + if (panel.type === OPTIONS_LIST_CONTROL) { + const explicitInput = panel.explicitInput as OptionsListEmbeddableInput; + delete explicitInput.hideExclude; + delete explicitInput.hideExists; + } + return { + ...panelAccumulator, + [panelId]: panel, + }; + }, + {} + ); + input.panels = newPanels; + } + return input; +}; diff --git a/src/plugins/controls/common/control_group/control_group_persistable_state.ts b/src/plugins/controls/common/control_group/control_group_persistable_state.ts index 3826a32e0a039..bab32401bd65e 100644 --- a/src/plugins/controls/common/control_group/control_group_persistable_state.ts +++ b/src/plugins/controls/common/control_group/control_group_persistable_state.ts @@ -14,7 +14,10 @@ import { import { SavedObjectReference } from '@kbn/core/types'; import { MigrateFunctionsObject } from '@kbn/kibana-utils-plugin/common'; import { ControlGroupInput, ControlPanelState } from './types'; -import { makeControlOrdersZeroBased } from './control_group_migrations'; +import { + makeControlOrdersZeroBased, + removeHideExcludeAndHideExists, +} from './control_group_migrations'; type ControlGroupInputWithType = Partial & { type: string }; @@ -92,4 +95,9 @@ export const migrations: MigrateFunctionsObject = { // for hierarchical chaining it is required that all control orders start at 0. return makeControlOrdersZeroBased(controlInput); }, + '8.7.0': (state) => { + const controlInput = state as unknown as ControlGroupInput; + // need to set `hideExclude` and `hideExists` to `undefined` for all options list controls. + return removeHideExcludeAndHideExists(controlInput); + }, }; diff --git a/src/plugins/controls/common/mocks.tsx b/src/plugins/controls/common/mocks.tsx index 70a4b31395b97..29ef04f50de36 100644 --- a/src/plugins/controls/common/mocks.tsx +++ b/src/plugins/controls/common/mocks.tsx @@ -8,3 +8,4 @@ export * from './control_group/mocks'; export * from './options_list/mocks'; +export * from './range_slider/mocks'; diff --git a/src/plugins/controls/common/options_list/mocks.tsx b/src/plugins/controls/common/options_list/mocks.tsx index 551347b0e1058..ac80ac3873968 100644 --- a/src/plugins/controls/common/options_list/mocks.tsx +++ b/src/plugins/controls/common/options_list/mocks.tsx @@ -26,14 +26,13 @@ const mockOptionsListComponentState = { validSelections: [], } as OptionsListComponentState; -const mockOptionsListEmbeddableInput = { +export const mockOptionsListEmbeddableInput = { id: 'sample options list', fieldName: 'sample field', dataViewId: 'sample id', selectedOptions: [], runPastTimeout: false, singleSelect: false, - allowExclude: false, exclude: false, } as OptionsListEmbeddableInput; diff --git a/src/plugins/controls/common/range_slider/mocks.tsx b/src/plugins/controls/common/range_slider/mocks.tsx new file mode 100644 index 0000000000000..049e882a32681 --- /dev/null +++ b/src/plugins/controls/common/range_slider/mocks.tsx @@ -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 { RangeSliderEmbeddableInput } from '..'; + +export const mockRangeSliderEmbeddableInput = { + id: 'sample options list', + fieldName: 'sample field', + dataViewId: 'sample id', + value: ['0', '10'], +} as RangeSliderEmbeddableInput; diff --git a/src/plugins/controls/public/options_list/components/options_list_editor_options.tsx b/src/plugins/controls/public/options_list/components/options_list_editor_options.tsx index 80775e4550816..dcfd98eedf395 100644 --- a/src/plugins/controls/public/options_list/components/options_list_editor_options.tsx +++ b/src/plugins/controls/public/options_list/components/options_list_editor_options.tsx @@ -6,28 +6,21 @@ * Side Public License, v 1. */ -import React, { useEffect, useMemo, useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { EuiFlexGroup, EuiFlexItem, - EuiForm, EuiFormRow, EuiIconTip, - EuiSuperSelectOption, - EuiSpacer, - EuiSuperSelect, EuiSwitch, EuiSwitchEvent, - EuiButtonGroup, - toSentenceCase, Direction, } from '@elastic/eui'; import { css } from '@emotion/react'; import { getCompatibleSortingTypes, - sortDirections, DEFAULT_SORT, OptionsListSortBy, } from '../../../common/options_list/suggestions_sorting'; @@ -49,8 +42,6 @@ interface SwitchProps { onChange: (event: EuiSwitchEvent) => void; } -type SortItem = EuiSuperSelectOption; - export const OptionsListEditorOptions = ({ initialInput, onChange, @@ -74,28 +65,6 @@ export const OptionsListEditorOptions = ({ } }, [fieldType, onChange, state.sortBy]); - const sortByOptions: SortItem[] = useMemo(() => { - return getCompatibleSortingTypes(fieldType).map((key: OptionsListSortBy) => { - return { - value: key, - inputDisplay: OptionsListStrings.editorAndPopover.sortBy[key].getSortByLabel(), - 'data-test-subj': `optionsListEditor__sortBy_${key}`, - }; - }); - }, [fieldType]); - - const sortOrderOptions = useMemo(() => { - return sortDirections.map((key) => { - return { - id: key, - value: key, - iconType: `sort${toSentenceCase(key)}ending`, - 'data-test-subj': `optionsListEditor__sortOrder_${key}`, - label: OptionsListStrings.editorAndPopover.sortOrder[key].getSortOrderLabel(), - }; - }); - }, []); - const SwitchWithTooltip = ({ switchProps, label, @@ -133,98 +102,6 @@ export const OptionsListEditorOptions = ({ data-test-subj={'optionsListControl__allowMultipleAdditionalSetting'} /> - - { - onChange({ hideExclude: !state.hideExclude }); - setState((s) => ({ ...s, hideExclude: !s.hideExclude })); - if (initialInput?.exclude) onChange({ exclude: false }); - }} - data-test-subj={'optionsListControl__hideExcludeAdditionalSetting'} - /> - - - { - onChange({ hideExists: !state.hideExists }); - setState((s) => ({ ...s, hideExists: !s.hideExists })); - if (initialInput?.existsSelected) onChange({ existsSelected: false }); - }, - }} - data-test-subj={'optionsListControl__hideExistsAdditionalSetting'} - /> - - - <> - { - onChange({ hideSort: !state.hideSort }); - setState((s) => ({ ...s, hideSort: !s.hideSort })); - }} - data-test-subj={'optionsListControl__hideSortAdditionalSetting'} - /> - {state.hideSort && ( - - <> - - - { - onChange({ - sort: { - direction: value as Direction, - by: state.sortBy, - }, - }); - setState((s) => ({ ...s, sortDirection: value as Direction })); - }} - legend={OptionsListStrings.editorAndPopover.getSortDirectionLegend()} - /> - - - { - onChange({ - sort: { - direction: state.sortDirection, - by: value, - }, - }); - setState((s) => ({ ...s, sortBy: value })); - }} - options={sortByOptions} - valueOfSelected={state.sortBy} - data-test-subj={'optionsListControl__chooseSortBy'} - compressed={true} - /> - - - - - - )} - - - i18n.translate('controls.optionsList.editor.hideExclude', { - defaultMessage: 'Allow selections to be excluded', - }), - getHideExistsQueryTitle: () => - i18n.translate('controls.optionsList.editor.hideExistsQuery', { - defaultMessage: 'Allow exists query', - }), - getHideExistsQueryTooltip: () => - i18n.translate('controls.optionsList.editor.hideExistsQueryTooltip', { - defaultMessage: - 'Allows you to create an exists query, which returns all documents that contain an indexed value for the field.', - }), - getHideSortingTitle: () => - i18n.translate('controls.optionsList.editor.hideSort', { - defaultMessage: 'Allow dynamic sorting of suggestions', - }), - getSuggestionsSortingTitle: () => - i18n.translate('controls.optionsList.editor.suggestionsSorting', { - defaultMessage: 'Default sort order', - }), }, popover: { getAriaLabel: (fieldName: string) => diff --git a/src/plugins/data_view_field_editor/__jest__/client_integration/field_editor_flyout_preview.test.ts b/src/plugins/data_view_field_editor/__jest__/client_integration/field_editor_flyout_preview.test.ts index d6dd2cd0ccef5..0e7e993a3b498 100644 --- a/src/plugins/data_view_field_editor/__jest__/client_integration/field_editor_flyout_preview.test.ts +++ b/src/plugins/data_view_field_editor/__jest__/client_integration/field_editor_flyout_preview.test.ts @@ -745,7 +745,13 @@ describe('Field editor Preview panel', () => { } = testBed; const expectedParamsToFetchClusterData = { - params: { index: indexPatternNameForTest, body: { size: 50 } }, + params: { + index: indexPatternNameForTest, + body: { + fields: ['*'], + size: 50, + }, + }, }; // Initial state @@ -770,6 +776,7 @@ describe('Field editor Preview panel', () => { expect(searchMeta.lastCallParams).toEqual({ params: { body: { + fields: ['*'], query: { ids: { values: [nextId], diff --git a/src/plugins/data_view_field_editor/public/components/preview/field_preview_context.tsx b/src/plugins/data_view_field_editor/public/components/preview/field_preview_context.tsx index a971d502643ce..90ac74d0ace7b 100644 --- a/src/plugins/data_view_field_editor/public/components/preview/field_preview_context.tsx +++ b/src/plugins/data_view_field_editor/public/components/preview/field_preview_context.tsx @@ -219,6 +219,7 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => { params: { index: dataView.getIndexPattern(), body: { + fields: ['*'], size: limit, }, }, @@ -272,6 +273,7 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => { index: dataView.getIndexPattern(), body: { size: 1, + fields: ['*'], query: { ids: { values: [id], @@ -408,7 +410,7 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => { const response = await getFieldPreview({ index: currentDocIndex, - document: document!, + document: document?._source!, context: (parentName ? 'composite_field' : `${type!}_field`) as PainlessExecuteContext, script: previewScript, }); @@ -615,7 +617,7 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => { */ useEffect(() => { updateParams({ - document: currentDocument?._source, + document: currentDocument, index: currentDocument?._index, }); }, [currentDocument, updateParams]); @@ -669,7 +671,7 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => { fields: fields.map((field) => { const nextValue = script === null && Boolean(document) - ? get(document, name ?? '') // When there is no script we try to read the value from _source + ? get(document?._source, name ?? '') ?? get(document?.fields, name ?? '') // When there is no script we try to read the value from _source/fields : field?.value; const formattedValue = valueFormatter(nextValue); diff --git a/src/plugins/data_view_field_editor/public/components/preview/types.ts b/src/plugins/data_view_field_editor/public/components/preview/types.ts index 881d512159516..a2916a275cf52 100644 --- a/src/plugins/data_view_field_editor/public/components/preview/types.ts +++ b/src/plugins/data_view_field_editor/public/components/preview/types.ts @@ -24,6 +24,9 @@ export interface EsDocument { _source: { [key: string]: unknown; }; + fields: { + [key: string]: unknown; + }; [key: string]: unknown; } @@ -61,7 +64,7 @@ export interface Params { type: RuntimeType | null; script: Required['script'] | null; format: SerializedFieldFormat | null; - document: { [key: string]: unknown } | null; + document: EsDocument | null; // used for composite subfields parentName: string | null; } diff --git a/src/plugins/data_view_management/public/components/index_pattern_table/data_view_table_controller.ts b/src/plugins/data_view_management/public/components/index_pattern_table/data_view_table_controller.ts new file mode 100644 index 0000000000000..864680f2eb515 --- /dev/null +++ b/src/plugins/data_view_management/public/components/index_pattern_table/data_view_table_controller.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 { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; +import { BehaviorSubject, Observable } from 'rxjs'; +import { isEqual } from 'lodash'; +import { getIndexPatterns } from '../utils'; +import { IndexPatternTableItem } from '../types'; +import { stateSelectorFactory } from '../state_helpers'; + +export interface DataViewTableControllerState { + isLoadingDataViews: boolean; + isLoadingHasData: boolean; + hasDataView: boolean; + hasEsData: boolean; + dataViews: IndexPatternTableItem[]; +} + +export interface DataViewTableControllerConstructorArgs { + services: { + dataViews: DataViewsPublicPluginStart; + }; + config: { + defaultDataView: string; + }; +} + +export const dataViewTableControllerStateDefaults = { + isLoadingDataViews: false, + isLoadingHasData: true, + hasDataView: false, + hasEsData: false, + dataViews: [], +}; + +const selectIndexPattern = (state: DataViewTableControllerState) => state.dataViews; +const selectHasDataView = (state: DataViewTableControllerState) => state.hasDataView; +const selectHasEsData = (state: DataViewTableControllerState) => state.hasEsData; +const selectIsLoadingIndexPatterns = (state: DataViewTableControllerState) => + state.isLoadingDataViews; +const selectIsLoadingDataState = (state: DataViewTableControllerState) => state.isLoadingHasData; + +export class DataViewTableController { + constructor({ + services: { dataViews }, + config: { defaultDataView }, + }: DataViewTableControllerConstructorArgs) { + this.dataViews = dataViews; + this.defaultDataView = defaultDataView; + + const stateSelector = stateSelectorFactory(this.state$); + + this.isLoadingIndexPatterns$ = stateSelector(selectIsLoadingIndexPatterns); + this.indexPatterns$ = stateSelector(selectIndexPattern, isEqual); + this.isLoadingDataState$ = stateSelector(selectIsLoadingDataState); + this.hasDataView$ = stateSelector(selectHasDataView); + this.hasESData$ = stateSelector(selectHasEsData); + + this.loadDataViews(); + } + + private state: DataViewTableControllerState = { + ...dataViewTableControllerStateDefaults, + }; + + private state$ = new BehaviorSubject(this.state); + + private dataViews: DataViewsPublicPluginStart; + private defaultDataView: string; + + isLoadingIndexPatterns$: Observable; + indexPatterns$: Observable; + isLoadingDataState$: Observable; + hasDataView$: Observable; + hasESData$: Observable; + + private updateState = (newState: Partial) => { + this.state = { ...this.state, ...newState }; + this.state$.next(this.state); + }; + + private loadHasData = async () => { + const hasDataViewPromise = this.dataViews.hasData.hasDataView().then((hasDataView) => { + this.updateState({ hasDataView }); + }); + + const hasESDataPromise = this.dataViews.hasData.hasESData().then((hasEsData) => { + this.updateState({ hasEsData }); + }); + + return Promise.all([hasDataViewPromise, hasESDataPromise]).then(() => { + this.updateState({ isLoadingHasData: false }); + }); + }; + + private getDataViews = async () => { + this.updateState({ isLoadingDataViews: true }); + const dataViews = await getIndexPatterns(this.defaultDataView, this.dataViews); + this.updateState({ dataViews, isLoadingDataViews: false }); + }; + + loadDataViews = async () => { + const loadHasDataPromise = this.loadHasData(); + const getDataViewsPromise = this.getDataViews(); + return Promise.all([loadHasDataPromise, getDataViewsPromise]); + }; +} diff --git a/src/plugins/data_view_management/public/components/index_pattern_table/index_pattern_table.tsx b/src/plugins/data_view_management/public/components/index_pattern_table/index_pattern_table.tsx index 20dd75aff49c7..6797100de9ddb 100644 --- a/src/plugins/data_view_management/public/components/index_pattern_table/index_pattern_table.tsx +++ b/src/plugins/data_view_management/public/components/index_pattern_table/index_pattern_table.tsx @@ -19,7 +19,8 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { RouteComponentProps, withRouter, useLocation } from 'react-router-dom'; -import React, { useEffect, useState, useCallback, useMemo } from 'react'; +import useObservable from 'react-use/lib/useObservable'; +import React, { useState, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { reactRouterNavigate, useKibana } from '@kbn/kibana-react-plugin/public'; import type { SpacesContextProps } from '@kbn/spaces-plugin/public'; @@ -27,11 +28,14 @@ import { NoDataViewsPromptComponent } from '@kbn/shared-ux-prompt-no-data-views' import { EmptyIndexListPrompt } from '../empty_index_list_prompt'; import { IndexPatternManagmentContext } from '../../types'; import { IndexPatternTableItem } from '../types'; -import { getIndexPatterns } from '../utils'; import { getListBreadcrumbs } from '../breadcrumbs'; import { SpacesList } from './spaces_list'; import { removeDataView, RemoveDataViewProps } from '../edit_index_pattern'; import { deleteModalMsg } from './delete_modal_msg'; +import { + DataViewTableController, + dataViewTableControllerStateDefaults as defaults, +} from './data_view_table_controller'; const pagination = { initialPageSize: 10, @@ -63,11 +67,6 @@ interface Props extends RouteComponentProps { showCreateDialog?: boolean; } -interface DataState { - hasDataView?: boolean; - hasESData?: boolean; -} - const getEmptyFunctionComponent: React.FC = ({ children }) => <>{children}; export const IndexPatternTable = ({ @@ -78,7 +77,6 @@ export const IndexPatternTable = ({ const { setBreadcrumbs, uiSettings, - indexPatternManagementStart, application, chrome, dataViews, @@ -88,12 +86,27 @@ export const IndexPatternTable = ({ docLinks, } = useKibana().services; const [query, setQuery] = useState(''); - const [indexPatterns, setIndexPatterns] = useState([]); - const [isLoadingIndexPatterns, setIsLoadingIndexPatterns] = useState(true); const [showCreateDialog, setShowCreateDialog] = useState(showCreateDialogProp); const [selectedItems, setSelectedItems] = useState([]); - const [isLoadingDataState, setIsLoadingDataState] = useState(true); - const [dataState, setDataState] = useState({}); + const [dataViewController] = useState( + () => + new DataViewTableController({ + services: { dataViews }, + config: { defaultDataView: uiSettings.get('defaultIndex') }, + }) + ); + + const isLoadingIndexPatterns = useObservable( + dataViewController.isLoadingIndexPatterns$, + defaults.isLoadingDataViews + ); + const indexPatterns = useObservable(dataViewController.indexPatterns$, defaults.dataViews); + const isLoadingDataState = useObservable( + dataViewController.isLoadingDataState$, + defaults.isLoadingHasData + ); + const hasDataView = useObservable(dataViewController.hasDataView$, defaults.hasDataView); + const hasESData = useObservable(dataViewController.hasESData$, defaults.hasEsData); const handleOnChange = ({ queryText, error }: { queryText: string; error: unknown }) => { if (!error) { @@ -101,8 +114,6 @@ export const IndexPatternTable = ({ } }; - const { hasDataView, hasESData } = dataState; - const renderDeleteButton = () => { const clickHandler = removeDataView({ dataViews, @@ -110,7 +121,7 @@ export const IndexPatternTable = ({ uiSettings, onDelete: () => { setSelectedItems([]); - loadDataViews(); + dataViewController.loadDataViews(); }, }); if (selectedItems.length === 0) { @@ -148,30 +159,8 @@ export const IndexPatternTable = ({ }, }; - const loadDataViews = useCallback(async () => { - setIsLoadingIndexPatterns(true); - setDataState({ - hasDataView: await dataViews.hasData.hasDataView(), - hasESData: await dataViews.hasData.hasESData(), - }); - setIsLoadingDataState(false); - const gettedIndexPatterns: IndexPatternTableItem[] = await getIndexPatterns( - uiSettings.get('defaultIndex'), - dataViews - ); - setIndexPatterns(gettedIndexPatterns); - setIsLoadingIndexPatterns(false); - return gettedIndexPatterns; - }, [dataViews, uiSettings]); - setBreadcrumbs(getListBreadcrumbs()); - useEffect(() => { - (async function () { - await loadDataViews(); - })(); - }, [indexPatternManagementStart, uiSettings, loadDataViews]); - chrome.docTitle.change(title); const isRollup = new URLSearchParams(useLocation().search).get('type') === 'rollup'; @@ -185,7 +174,7 @@ export const IndexPatternTable = ({ dataViews, uiSettings, overlays, - onDelete: () => loadDataViews(), + onDelete: () => dataViewController.loadDataViews(), }); const alertColumn = { @@ -268,7 +257,7 @@ export const IndexPatternTable = ({ title={dataView.title} refresh={() => { dataViews.clearInstanceCache(dataView.id); - loadDataViews(); + dataViewController.loadDataViews(); }} /> ) : ( @@ -365,7 +354,7 @@ export const IndexPatternTable = ({ <> setShowCreateDialog(true)} canSaveIndexPattern={!!application.capabilities.indexPatterns.save} navigateToApp={application.navigateToApp} diff --git a/src/plugins/data_view_management/public/components/state_helpers.ts b/src/plugins/data_view_management/public/components/state_helpers.ts new file mode 100644 index 0000000000000..e8a3c455d3d3e --- /dev/null +++ b/src/plugins/data_view_management/public/components/state_helpers.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. + */ + +import { map, distinctUntilChanged, Observable } from 'rxjs'; + +export const stateSelectorFactory = + (state$: Observable) => + (selector: (state: S) => R, equalityFn?: (arg0: R, arg1: R) => boolean) => + state$.pipe(map(selector), distinctUntilChanged(equalityFn)); diff --git a/src/plugins/data_views/common/data_views/data_views.ts b/src/plugins/data_views/common/data_views/data_views.ts index 7bc8b3cee7826..2a5f8b8171bac 100644 --- a/src/plugins/data_views/common/data_views/data_views.ts +++ b/src/plugins/data_views/common/data_views/data_views.ts @@ -502,7 +502,7 @@ export class DataViewsService { type: options.type, rollupIndex: options.rollupIndex, allowNoIndex: options.allowNoIndex, - filter: options.filter, + indexFilter: options.indexFilter, }); return fields; }; @@ -543,7 +543,7 @@ export class DataViewsService { type: options.type, rollupIndex: options.rollupIndex, allowNoIndex: options.allowNoIndex, - filter: options.filter, + indexFilter: options.indexFilter, }); }; diff --git a/src/plugins/data_views/common/types.ts b/src/plugins/data_views/common/types.ts index 44158e5e560c2..b622280020060 100644 --- a/src/plugins/data_views/common/types.ts +++ b/src/plugins/data_views/common/types.ts @@ -313,7 +313,7 @@ export interface GetFieldsOptions { metaFields?: string[]; rollupIndex?: string; allowNoIndex?: boolean; - filter?: QueryDslQueryContainer; + indexFilter?: QueryDslQueryContainer; includeUnmapped?: boolean; } diff --git a/src/plugins/data_views/public/data_views/data_views_api_client.ts b/src/plugins/data_views/public/data_views/data_views_api_client.ts index 66f1c05b224fd..87fa8abe8f260 100644 --- a/src/plugins/data_views/public/data_views/data_views_api_client.ts +++ b/src/plugins/data_views/public/data_views/data_views_api_client.ts @@ -49,7 +49,7 @@ export class DataViewsApiClient implements IDataViewsApiClient { * @param options options for fields request */ getFieldsForWildcard(options: GetFieldsOptions) { - const { pattern, metaFields, type, rollupIndex, allowNoIndex, filter, includeUnmapped } = + const { pattern, metaFields, type, rollupIndex, allowNoIndex, indexFilter, includeUnmapped } = options; return this._request( this._getUrl(['_fields_for_wildcard']), @@ -61,7 +61,7 @@ export class DataViewsApiClient implements IDataViewsApiClient { allow_no_index: allowNoIndex, include_unmapped: includeUnmapped, }, - filter ? JSON.stringify({ index_filter: filter }) : undefined + indexFilter ? JSON.stringify({ index_filter: indexFilter }) : undefined ).then((response) => { return response || { fields: [], indices: [] }; }); diff --git a/src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts b/src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts index a24783123a74b..406581981b3e4 100644 --- a/src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts +++ b/src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts @@ -60,9 +60,9 @@ export class IndexPatternsFetcher { fieldCapsOptions?: { allow_no_indices: boolean; includeUnmapped?: boolean }; type?: string; rollupIndex?: string; - filter?: QueryDslQueryContainer; + indexFilter?: QueryDslQueryContainer; }): Promise<{ fields: FieldDescriptor[]; indices: string[] }> { - const { pattern, metaFields = [], fieldCapsOptions, type, rollupIndex, filter } = options; + const { pattern, metaFields = [], fieldCapsOptions, type, rollupIndex, indexFilter } = options; const patternList = Array.isArray(pattern) ? pattern : pattern.split(','); const allowNoIndices = fieldCapsOptions ? fieldCapsOptions.allow_no_indices @@ -80,7 +80,7 @@ export class IndexPatternsFetcher { allow_no_indices: allowNoIndices, include_unmapped: fieldCapsOptions?.includeUnmapped, }, - filter, + indexFilter, }); if (type === 'rollup' && rollupIndex) { const rollupFields: FieldDescriptor[] = []; diff --git a/src/plugins/data_views/server/fetcher/lib/es_api.ts b/src/plugins/data_views/server/fetcher/lib/es_api.ts index 74cc43cc5a20e..1c5c4fdb6e86c 100644 --- a/src/plugins/data_views/server/fetcher/lib/es_api.ts +++ b/src/plugins/data_views/server/fetcher/lib/es_api.ts @@ -43,7 +43,7 @@ interface FieldCapsApiParams { callCluster: ElasticsearchClient; indices: string[] | string; fieldCapsOptions?: { allow_no_indices: boolean; include_unmapped?: boolean }; - filter?: QueryDslQueryContainer; + indexFilter?: QueryDslQueryContainer; } /** @@ -62,7 +62,7 @@ export async function callFieldCapsApi(params: FieldCapsApiParams) { const { callCluster, indices, - filter, + indexFilter, fieldCapsOptions = { allow_no_indices: false, include_unmapped: false, @@ -74,7 +74,7 @@ export async function callFieldCapsApi(params: FieldCapsApiParams) { index: indices, fields: '*', ignore_unavailable: true, - index_filter: filter, + index_filter: indexFilter, ...fieldCapsOptions, }, { meta: true } diff --git a/src/plugins/data_views/server/fetcher/lib/field_capabilities/field_capabilities.test.js b/src/plugins/data_views/server/fetcher/lib/field_capabilities/field_capabilities.test.js index 422364a67dd96..c2677ef37a2b0 100644 --- a/src/plugins/data_views/server/fetcher/lib/field_capabilities/field_capabilities.test.js +++ b/src/plugins/data_views/server/fetcher/lib/field_capabilities/field_capabilities.test.js @@ -35,7 +35,7 @@ describe('index_patterns/field_capabilities/field_capabilities', () => { callCluster: undefined, indices: undefined, fieldCapsOptions: undefined, - filter: undefined, + indexFilter: undefined, ...args, }); diff --git a/src/plugins/data_views/server/fetcher/lib/field_capabilities/field_capabilities.ts b/src/plugins/data_views/server/fetcher/lib/field_capabilities/field_capabilities.ts index 0511801a65688..2867dd34aea0a 100644 --- a/src/plugins/data_views/server/fetcher/lib/field_capabilities/field_capabilities.ts +++ b/src/plugins/data_views/server/fetcher/lib/field_capabilities/field_capabilities.ts @@ -20,7 +20,7 @@ interface FieldCapabilitiesParams { indices: string | string[]; metaFields: string[]; fieldCapsOptions?: { allow_no_indices: boolean; include_unmapped?: boolean }; - filter?: QueryDslQueryContainer; + indexFilter?: QueryDslQueryContainer; } /** @@ -34,8 +34,13 @@ interface FieldCapabilitiesParams { * @return {Promise<{ fields: Array, indices: Array>}>} */ export async function getFieldCapabilities(params: FieldCapabilitiesParams) { - const { callCluster, indices = [], fieldCapsOptions, filter, metaFields = [] } = params; - const esFieldCaps = await callFieldCapsApi({ callCluster, indices, fieldCapsOptions, filter }); + const { callCluster, indices = [], fieldCapsOptions, indexFilter, metaFields = [] } = params; + const esFieldCaps = await callFieldCapsApi({ + callCluster, + indices, + fieldCapsOptions, + indexFilter, + }); const fieldsFromFieldCapsByName = keyBy(readFieldCapsResponse(esFieldCaps.body), 'name'); const allFieldsUnsorted = Object.keys(fieldsFromFieldCapsByName) diff --git a/src/plugins/data_views/server/index_patterns_api_client.ts b/src/plugins/data_views/server/index_patterns_api_client.ts index 787d3330b6285..b57352d7cacbd 100644 --- a/src/plugins/data_views/server/index_patterns_api_client.ts +++ b/src/plugins/data_views/server/index_patterns_api_client.ts @@ -26,7 +26,7 @@ export class IndexPatternsApiServer implements IDataViewsApiClient { type, rollupIndex, allowNoIndex, - filter, + indexFilter: indexFilter, }: GetFieldsOptions) { const indexPatterns = new IndexPatternsFetcher(this.esClient, allowNoIndex); return await indexPatterns @@ -35,7 +35,7 @@ export class IndexPatternsApiServer implements IDataViewsApiClient { metaFields, type, rollupIndex, - filter, + indexFilter, }) .catch((err) => { if ( diff --git a/src/plugins/data_views/server/routes/fields_for.ts b/src/plugins/data_views/server/routes/fields_for.ts index 096f0f40b06ff..69738373044a7 100644 --- a/src/plugins/data_views/server/routes/fields_for.ts +++ b/src/plugins/data_views/server/routes/fields_for.ts @@ -66,7 +66,7 @@ const handler: RequestHandler<{}, IQuery, IBody> = async (context, request, resp } = request.query; // not available to get request - const filter = request.body?.index_filter; + const indexFilter = request.body?.index_filter; let parsedFields: string[] = []; try { @@ -85,7 +85,7 @@ const handler: RequestHandler<{}, IQuery, IBody> = async (context, request, resp allow_no_indices: allowNoIndex || false, includeUnmapped, }, - filter, + indexFilter, }); return response.ok({ diff --git a/src/plugins/files/server/audit_events.ts b/src/plugins/files/server/audit_events.ts index aea5b6b199fd9..98affff3c0082 100644 --- a/src/plugins/files/server/audit_events.ts +++ b/src/plugins/files/server/audit_events.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { EcsEventOutcome } from '@kbn/logging'; +import { EcsEventOutcome } from '@kbn/ecs'; import { AuditEvent } from '@kbn/security-plugin/server'; export type AuditAction = 'create' | 'delete'; diff --git a/src/plugins/guided_onboarding/README.md b/src/plugins/guided_onboarding/README.md index ce54f42c358ed..5e4b80cafae06 100755 --- a/src/plugins/guided_onboarding/README.md +++ b/src/plugins/guided_onboarding/README.md @@ -62,6 +62,10 @@ useEffect(() => { }, [guidedOnboardingApi]); ``` +### isGuideStepReadyToComplete$(guideID: string, stepID: string): Observable\ +Similar to `isGuideStepActive$`, the observable `isGuideStepReadyToComplete$` can be used to track the state of a step that is configured for manual completion. The observable broadcasts `true` when the manual completion popover is displayed and the user can mark the step "done". In this state the step is not in progress anymore but is not yet fully completed. + + ### completeGuideStep(guideID: string, stepID: string): Promise\<{ state: GuidedOnboardingState } | undefined\> The API service exposes an async function to mark a guide step as completed. If the specified guide step is not currently active, the function is a noop. The return value is `undefined` in that case, diff --git a/src/plugins/guided_onboarding/public/mocks.ts b/src/plugins/guided_onboarding/public/mocks.ts index 7e5a66fa00046..f463d0c4ca858 100644 --- a/src/plugins/guided_onboarding/public/mocks.ts +++ b/src/plugins/guided_onboarding/public/mocks.ts @@ -19,6 +19,7 @@ const apiServiceMock: jest.Mocked = { deactivateGuide: jest.fn(), completeGuide: jest.fn(), isGuideStepActive$: () => new BehaviorSubject(false), + isGuideStepReadyToComplete$: () => new BehaviorSubject(false), startGuideStep: jest.fn(), completeGuideStep: jest.fn(), isGuidedOnboardingActiveForIntegration$: () => new BehaviorSubject(false), diff --git a/src/plugins/guided_onboarding/public/services/api.test.ts b/src/plugins/guided_onboarding/public/services/api.test.ts index 09e6082d6889b..048fcec8eab98 100644 --- a/src/plugins/guided_onboarding/public/services/api.test.ts +++ b/src/plugins/guided_onboarding/public/services/api.test.ts @@ -28,6 +28,7 @@ import { mockPluginStateInProgress, mockPluginStateNotStarted, testGuideStep3ActiveState, + testGuideStep2ReadyToCompleteState, } from './api.mocks'; describe('GuidedOnboarding ApiService', () => { @@ -250,6 +251,7 @@ describe('GuidedOnboarding ApiService', () => { pluginState: { ...mockPluginStateInProgress, activeGuide: testGuideStep1InProgressState }, }); + apiService.setup(httpClient, true); subscription = apiService .isGuideStepActive$(testGuideId, testGuideFirstStep) .subscribe((isStepActive) => { @@ -272,6 +274,65 @@ describe('GuidedOnboarding ApiService', () => { }); }); + describe('isGuideStepReadyToComplete$', () => { + it('returns true if the step is ready to complete', (done) => { + httpClient.get.mockResolvedValueOnce({ + pluginState: { + ...mockPluginStateInProgress, + activeGuide: testGuideStep2ReadyToCompleteState, + }, + }); + apiService.setup(httpClient, true); + + subscription = apiService + .isGuideStepReadyToComplete$(testGuideId, testGuideManualCompletionStep) + .subscribe((isStepReadyToComplete) => { + if (isStepReadyToComplete) { + subscription.unsubscribe(); + done(); + } + }); + }); + + it('returns false if the step has not been started', (done) => { + httpClient.get.mockResolvedValueOnce({ + pluginState: { + ...mockPluginStateInProgress, + activeGuide: testGuideStep2ActiveState, + }, + }); + apiService.setup(httpClient, true); + + subscription = apiService + .isGuideStepReadyToComplete$(testGuideId, testGuideManualCompletionStep) + .subscribe((isStepActive) => { + if (!isStepActive) { + subscription.unsubscribe(); + done(); + } + }); + }); + + it('returns false if the step has been completed', (done) => { + httpClient.get.mockResolvedValueOnce({ + pluginState: { + ...mockPluginStateInProgress, + activeGuide: testGuideStep3ActiveState, + }, + }); + apiService.setup(httpClient, true); + + subscription = apiService + .isGuideStepReadyToComplete$(testGuideId, testGuideManualCompletionStep) + .subscribe((isStepActive) => { + if (!isStepActive) { + subscription.unsubscribe(); + done(); + } + }); + }); + }); + describe('startGuideStep', () => { it('updates the selected step and marks it as in_progress', async () => { await apiService.startGuideStep(testGuideId, testGuideFirstStep); diff --git a/src/plugins/guided_onboarding/public/services/api.ts b/src/plugins/guided_onboarding/public/services/api.ts index 4bf9cd5b55cc6..a43a2fac23cda 100644 --- a/src/plugins/guided_onboarding/public/services/api.ts +++ b/src/plugins/guided_onboarding/public/services/api.ts @@ -282,6 +282,23 @@ export class ApiService implements GuidedOnboardingApi { ); } + /** + * An observable with the boolean value if the step is ready_to_complete (i.e., user needs to click the "Mark done" button). + * Returns true, if the passed params identify the guide step that is currently ready_to_complete. + * Returns false otherwise. + * @param {GuideId} guideId the id of the guide (one of search, observability, security) + * @param {GuideStepIds} stepId the id of the step in the guide + * @return {Observable} an observable with the boolean value + */ + public isGuideStepReadyToComplete$(guideId: GuideId, stepId: GuideStepIds): Observable { + return this.fetchPluginState$().pipe( + map((pluginState) => { + if (!isGuideActive(pluginState, guideId)) return false; + return isStepReadyToComplete(pluginState!.activeGuide, guideId, stepId); + }) + ); + } + /** * Updates the selected step to 'in_progress' state. * This is useful for the dropdown panel, when the user clicks the "Start" button for the active step. diff --git a/src/plugins/guided_onboarding/public/types.ts b/src/plugins/guided_onboarding/public/types.ts index 034c0337f3cb3..0c34b56e82284 100755 --- a/src/plugins/guided_onboarding/public/types.ts +++ b/src/plugins/guided_onboarding/public/types.ts @@ -38,6 +38,7 @@ export interface GuidedOnboardingApi { deactivateGuide: (guide: GuideState) => Promise<{ pluginState: PluginState } | undefined>; completeGuide: (guideId: GuideId) => Promise<{ pluginState: PluginState } | undefined>; isGuideStepActive$: (guideId: GuideId, stepId: GuideStepIds) => Observable; + isGuideStepReadyToComplete$: (guideId: GuideId, stepId: GuideStepIds) => Observable; startGuideStep: ( guideId: GuideId, stepId: GuideStepIds diff --git a/src/plugins/home/public/assets/solution_logos/kubernetes.png b/src/plugins/home/public/assets/solution_logos/kubernetes.png new file mode 100644 index 0000000000000..a856f526e4458 Binary files /dev/null and b/src/plugins/home/public/assets/solution_logos/kubernetes.png differ diff --git a/src/plugins/home/public/assets/solution_logos/kubernetes_dark.png b/src/plugins/home/public/assets/solution_logos/kubernetes_dark.png new file mode 100644 index 0000000000000..6d68043ed9258 Binary files /dev/null and b/src/plugins/home/public/assets/solution_logos/kubernetes_dark.png differ diff --git a/src/plugins/home/public/assets/solution_logos/observability.png b/src/plugins/home/public/assets/solution_logos/observability.png index b72753a98ce11..2bedbff681059 100644 Binary files a/src/plugins/home/public/assets/solution_logos/observability.png and b/src/plugins/home/public/assets/solution_logos/observability.png differ diff --git a/src/plugins/home/public/assets/solution_logos/observability_dark.png b/src/plugins/home/public/assets/solution_logos/observability_dark.png index 721c88befe2df..a508b53e84c0c 100644 Binary files a/src/plugins/home/public/assets/solution_logos/observability_dark.png and b/src/plugins/home/public/assets/solution_logos/observability_dark.png differ diff --git a/src/plugins/home/public/assets/solution_logos/search.png b/src/plugins/home/public/assets/solution_logos/search.png index 94d8ed4578ec5..d5e2e1ab0e98a 100644 Binary files a/src/plugins/home/public/assets/solution_logos/search.png and b/src/plugins/home/public/assets/solution_logos/search.png differ diff --git a/src/plugins/home/public/assets/solution_logos/search_dark.png b/src/plugins/home/public/assets/solution_logos/search_dark.png index 8dcc5ae3882aa..0a3171696558d 100644 Binary files a/src/plugins/home/public/assets/solution_logos/search_dark.png and b/src/plugins/home/public/assets/solution_logos/search_dark.png differ diff --git a/src/plugins/home/public/assets/solution_logos/security.png b/src/plugins/home/public/assets/solution_logos/security.png index 10fea25c9db83..12c0e4267c072 100644 Binary files a/src/plugins/home/public/assets/solution_logos/security.png and b/src/plugins/home/public/assets/solution_logos/security.png differ diff --git a/src/plugins/home/public/assets/solution_logos/security_dark.png b/src/plugins/home/public/assets/solution_logos/security_dark.png index a96743cc3f0d5..2918debc597ec 100644 Binary files a/src/plugins/home/public/assets/solution_logos/security_dark.png and b/src/plugins/home/public/assets/solution_logos/security_dark.png differ diff --git a/src/plugins/home/server/services/sample_data/data_sets/logs/field_mappings.ts b/src/plugins/home/server/services/sample_data/data_sets/logs/field_mappings.ts index 2498523bcb70d..67398c241ceaf 100644 --- a/src/plugins/home/server/services/sample_data/data_sets/logs/field_mappings.ts +++ b/src/plugins/home/server/services/sample_data/data_sets/logs/field_mappings.ts @@ -12,7 +12,7 @@ export const fieldMappings = { fields: { keyword: { type: 'keyword', - ignore_above: 256, + time_series_dimension: true, }, }, }, @@ -101,6 +101,7 @@ export const fieldMappings = { }, bytes: { type: 'long', + time_series_metric: 'gauge', }, tags: { type: 'text', @@ -120,21 +121,23 @@ export const fieldMappings = { ip_range: { type: 'ip_range', }, - timestamp: { + '@timestamp': { type: 'date', }, - '@timestamp': { + timestamp: { type: 'alias', - path: 'timestamp', + path: '@timestamp', }, timestamp_range: { type: 'date_range', }, phpmemory: { type: 'long', + time_series_metric: 'counter', }, memory: { type: 'double', + time_series_metric: 'gauge', }, extension: { type: 'text', diff --git a/src/plugins/home/server/services/sample_data/data_sets/logs/index.ts b/src/plugins/home/server/services/sample_data/data_sets/logs/index.ts index e33d49e3f9a83..219b7ea2cc9d0 100644 --- a/src/plugins/home/server/services/sample_data/data_sets/logs/index.ts +++ b/src/plugins/home/server/services/sample_data/data_sets/logs/index.ts @@ -35,9 +35,10 @@ export const logsSpecProvider = function (): SampleDatasetSchema { id: 'logs', dataPath: path.join(__dirname, './logs.json.gz'), fields: fieldMappings, - timeFields: ['timestamp', 'utc_time'], + timeFields: ['@timestamp', 'utc_time'], currentTimeMarker: '2018-08-01T00:00:00', preserveDayOfWeekTimeOfDay: true, + isDataStream: true, }, ], status: 'not_installed', diff --git a/src/plugins/home/server/services/sample_data/data_sets/logs/logs.json.gz b/src/plugins/home/server/services/sample_data/data_sets/logs/logs.json.gz index 241b5cecb71c9..000e9c7d23a9c 100644 Binary files a/src/plugins/home/server/services/sample_data/data_sets/logs/logs.json.gz and b/src/plugins/home/server/services/sample_data/data_sets/logs/logs.json.gz differ diff --git a/src/plugins/home/server/services/sample_data/lib/insert_data_into_index.ts b/src/plugins/home/server/services/sample_data/lib/insert_data_into_index.ts index 47772f925dd3b..3b45253a9ea40 100644 --- a/src/plugins/home/server/services/sample_data/lib/insert_data_into_index.ts +++ b/src/plugins/home/server/services/sample_data/lib/insert_data_into_index.ts @@ -47,7 +47,7 @@ export const insertDataIntoIndex = ({ }; const bulkInsert = async (docs: unknown[]) => { - const insertCmd = { index: { _index: index } }; + const insertCmd = { create: { _index: index } }; const bulk: unknown[] = []; docs.forEach((doc: unknown) => { bulk.push(insertCmd); diff --git a/src/plugins/home/server/services/sample_data/lib/sample_dataset_schema.ts b/src/plugins/home/server/services/sample_data/lib/sample_dataset_schema.ts index 66f69abca3f18..852c27bb7ba26 100644 --- a/src/plugins/home/server/services/sample_data/lib/sample_dataset_schema.ts +++ b/src/plugins/home/server/services/sample_data/lib/sample_dataset_schema.ts @@ -27,6 +27,9 @@ const dataIndexSchema = schema.object({ // times fields that will be updated relative to now when data is installed timeFields: schema.arrayOf(schema.string()), + // should index be created as data stream + isDataStream: schema.maybe(schema.boolean({ defaultValue: false })), + // Reference to now in your test data set. // When data is installed, timestamps are converted to the present time. // The distance between a timestamp and currentTimeMarker is preserved but the date and time will change. diff --git a/src/plugins/home/server/services/sample_data/sample_data_installer.test.ts b/src/plugins/home/server/services/sample_data/sample_data_installer.test.ts index d103bdb18f779..af3108ddafce9 100644 --- a/src/plugins/home/server/services/sample_data/sample_data_installer.test.ts +++ b/src/plugins/home/server/services/sample_data/sample_data_installer.test.ts @@ -57,6 +57,44 @@ const testDatasets: SampleDatasetSchema[] = [ }, ], }, + { + id: 'test_tsdb_data_index', + name: 'Test with a tsdb data index', + description: 'See name', + previewImagePath: 'previewImagePath', + darkPreviewImagePath: 'darkPreviewImagePath', + overviewDashboard: 'overviewDashboard', + defaultIndex: 'defaultIndex', + savedObjects: [ + { + id: 'some-dashboard', + type: 'dashboard', + attributes: { + hello: 'dolly', + }, + references: [], + }, + { + id: 'another-dashboard', + type: 'dashboard', + attributes: { + foo: 'bar', + }, + references: [], + }, + ], + dataIndices: [ + { + id: 'test_tsdb_data_index', + dataPath: '/dataPath', + fields: { someField: { type: 'keyword' } }, + currentTimeMarker: '2018-01-09T00:00:00', + timeFields: ['@timestamp'], + isDataStream: true, + preserveDayOfWeekTimeOfDay: true, + }, + ], + }, ]; describe('SampleDataInstaller', () => { @@ -105,6 +143,8 @@ describe('SampleDataInstaller', () => { it('cleanups the data index before installing', async () => { await installer.install('test_single_data_index'); + expect(esClient.asCurrentUser.indices.deleteIndexTemplate).toHaveBeenCalledTimes(1); + expect(esClient.asCurrentUser.indices.deleteDataStream).toHaveBeenCalledTimes(1); expect(esClient.asCurrentUser.indices.delete).toHaveBeenCalledTimes(1); expect(esClient.asCurrentUser.indices.delete).toHaveBeenCalledWith({ index: 'kibana_sample_data_test_single_data_index', @@ -114,6 +154,7 @@ describe('SampleDataInstaller', () => { it('creates the data index', async () => { await installer.install('test_single_data_index'); + expect(esClient.asCurrentUser.indices.putIndexTemplate).toHaveBeenCalledTimes(0); expect(esClient.asCurrentUser.indices.create).toHaveBeenCalledTimes(1); expect(esClient.asCurrentUser.indices.create).toHaveBeenCalledWith({ index: 'kibana_sample_data_test_single_data_index', @@ -124,6 +165,13 @@ describe('SampleDataInstaller', () => { }); }); + it('creates index template and datastream in datastream mode', async () => { + await installer.install('test_tsdb_data_index'); + expect(esClient.asCurrentUser.indices.putIndexTemplate).toHaveBeenCalledTimes(1); + expect(esClient.asCurrentUser.indices.createDataStream).toHaveBeenCalledTimes(1); + expect(esClient.asCurrentUser.indices.create).toHaveBeenCalledTimes(0); + }); + it('inserts the data into the index', async () => { await installer.install('test_single_data_index'); diff --git a/src/plugins/home/server/services/sample_data/sample_data_installer.ts b/src/plugins/home/server/services/sample_data/sample_data_installer.ts index 048924ef3aba3..443f2b5635e33 100644 --- a/src/plugins/home/server/services/sample_data/sample_data_installer.ts +++ b/src/plugins/home/server/services/sample_data/sample_data_installer.ts @@ -135,18 +135,53 @@ export class SampleDataInstaller { } catch (err) { // ignore delete errors } + + try { + await this.esClient.asCurrentUser.indices.deleteDataStream({ + name: index, + }); + } catch (err) { + // ignore delete errors + } + + try { + await this.esClient.asCurrentUser.indices.deleteIndexTemplate({ + name: index, + }); + } catch (err) { + // ignore error + } } private async installDataIndex(dataset: SampleDatasetSchema, dataIndex: DataIndexSchema) { const index = createIndexName(dataset.id, dataIndex.id); try { - await this.esClient.asCurrentUser.indices.create({ - index, - body: { - settings: { index: { number_of_shards: 1, auto_expand_replicas: '0-1' } }, - mappings: { properties: dataIndex.fields }, - }, - }); + if (dataIndex.isDataStream) { + const request = { + name: index, + body: { + template: { + settings: { number_of_shards: 1, auto_expand_replicas: '0-1' }, + mappings: { properties: dataIndex.fields }, + }, + index_patterns: [index], + data_stream: {}, + }, + }; + await this.esClient.asCurrentUser.indices.putIndexTemplate(request); + + await this.esClient.asCurrentUser.indices.createDataStream({ + name: index, + }); + } else { + await this.esClient.asCurrentUser.indices.create({ + index, + body: { + settings: { index: { number_of_shards: 1, auto_expand_replicas: '0-1' } }, + mappings: { properties: dataIndex.fields }, + }, + }); + } } catch (err) { const errMsg = `Unable to create sample data index "${index}", error: ${err.message}`; this.logger.warn(errMsg); diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/__snapshots__/saved_objects_table.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/__snapshots__/saved_objects_table.test.tsx.snap index 61501ed45b47d..e0a7bada5c432 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/__snapshots__/saved_objects_table.test.tsx.snap +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/__snapshots__/saved_objects_table.test.tsx.snap @@ -228,7 +228,7 @@ exports[`SavedObjectsTable should render normally 1`] = ` } goInspectObject={[Function]} isSearching={false} - itemId="id" + itemId={[Function]} items={ Array [ Object { diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.tsx index d51c7461d684d..3e0352f613d7e 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.tsx +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.tsx @@ -39,6 +39,8 @@ import { SavedObjectsManagementColumnServiceStart, } from '../../../services'; +export type ItemId = string | number | ((item: T) => string); + export interface TableProps { taggingApi?: SavedObjectsTaggingApi; basePath: IBasePath; @@ -59,7 +61,7 @@ export interface TableProps { pageSize: number; sort: CriteriaWithPagination['sort']; items: SavedObjectWithMetadata[]; - itemId: string | (() => string); + itemId: ItemId; totalItemCount: number; onQueryChange: (query: any) => void; onTableChange: (table: any) => void; diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx index e1fd031596855..e548391b53b5d 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx @@ -691,7 +691,7 @@ export class SavedObjectsTable extends Component `${item.type}:${item.id}`} actionRegistry={this.props.actionRegistry} columnRegistry={this.props.columnRegistry} selectionConfig={selectionConfig} diff --git a/src/plugins/telemetry_management_section/public/components/index.ts b/src/plugins/telemetry_management_section/public/components/index.ts index 16059e2ae2b59..f01bcf354804f 100644 --- a/src/plugins/telemetry_management_section/public/components/index.ts +++ b/src/plugins/telemetry_management_section/public/components/index.ts @@ -6,5 +6,8 @@ * Side Public License, v 1. */ -export { LazyOptInExampleFlyout } from './lazy_opt_in_example_flyout'; +export { + LazyOptInExampleFlyout, + type LazyOptInExampleFlyoutProps, +} from './lazy_opt_in_example_flyout'; export { telemetryManagementSectionWrapper } from './telemetry_management_section_wrapper'; diff --git a/src/plugins/telemetry_management_section/public/components/lazy_opt_in_example_flyout.tsx b/src/plugins/telemetry_management_section/public/components/lazy_opt_in_example_flyout.tsx index 58c4a6f692cb3..774451252f3c4 100644 --- a/src/plugins/telemetry_management_section/public/components/lazy_opt_in_example_flyout.tsx +++ b/src/plugins/telemetry_management_section/public/components/lazy_opt_in_example_flyout.tsx @@ -6,9 +6,16 @@ * Side Public License, v 1. */ -import { lazy } from 'react'; +import { ComponentType, lazy, LazyExoticComponent } from 'react'; +import { Props as LazyOptInExampleFlyoutProps } from './opt_in_example_flyout'; -export const LazyOptInExampleFlyout = lazy(() => +export type { LazyOptInExampleFlyoutProps }; +/** + * Lazy-loaded {@link OptInExampleFlyout} + */ +export const LazyOptInExampleFlyout: LazyExoticComponent< + ComponentType +> = lazy(() => import('./opt_in_example_flyout').then(({ OptInExampleFlyout }) => ({ default: OptInExampleFlyout, })) diff --git a/src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx b/src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx index 37a9cd4e9e696..7246f4cb3f1a2 100644 --- a/src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx +++ b/src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx @@ -23,8 +23,17 @@ import { import { FormattedMessage } from '@kbn/i18n-react'; import { loadingSpinner } from './loading_spinner'; -interface Props { +/** + * OptInExampleFlyout props + */ +export interface Props { + /** + * Method that provides the sample payload to show in the flyout + */ fetchExample: () => Promise; + /** + * Hook called when the flyout is closed + */ onClose: () => void; } @@ -38,7 +47,7 @@ interface State { * React component for displaying the example data associated with the Telemetry opt-in banner. */ export class OptInExampleFlyout extends React.PureComponent { - _isMounted = false; + private _isMounted = false; public readonly state: State = { data: null, @@ -71,7 +80,7 @@ export class OptInExampleFlyout extends React.PureComponent { this._isMounted = false; } - renderBody({ data, isLoading, hasPrivilegeToRead }: State) { + private renderBody({ data, isLoading, hasPrivilegeToRead }: State) { if (isLoading) { return loadingSpinner; } diff --git a/src/plugins/telemetry_management_section/public/index.ts b/src/plugins/telemetry_management_section/public/index.ts index 9536d9f1598df..6fa16fea1e6fa 100644 --- a/src/plugins/telemetry_management_section/public/index.ts +++ b/src/plugins/telemetry_management_section/public/index.ts @@ -8,7 +8,7 @@ import { TelemetryManagementSectionPlugin } from './plugin'; -export { LazyOptInExampleFlyout } from './components'; +export { LazyOptInExampleFlyout, type LazyOptInExampleFlyoutProps } from './components'; export function plugin() { return new TelemetryManagementSectionPlugin(); diff --git a/src/plugins/unified_field_list/common/utils/field_existing_utils.ts b/src/plugins/unified_field_list/common/utils/field_existing_utils.ts index 006568bf37f2e..334de4aca95df 100644 --- a/src/plugins/unified_field_list/common/utils/field_existing_utils.ts +++ b/src/plugins/unified_field_list/common/utils/field_existing_utils.ts @@ -71,7 +71,7 @@ export async function fetchFieldExistence({ const existingFieldList = await dataViewsService.getFieldsForIndexPattern(dataView, { // filled in by data views service pattern: '', - filter: toQuery(timeFieldName, fromDate, toDate, dslQuery), + indexFilter: toQuery(timeFieldName, fromDate, toDate, dslQuery), }); return { indexPatternTitle: dataView.title, diff --git a/test/functional/apps/dashboard_elements/controls/options_list.ts b/test/functional/apps/dashboard_elements/controls/options_list.ts index 578fc9b5e40dd..6bc6ec5b482ef 100644 --- a/test/functional/apps/dashboard_elements/controls/options_list.ts +++ b/test/functional/apps/dashboard_elements/controls/options_list.ts @@ -221,48 +221,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dashboardControls.controlEditorCancel(true); }); - it('can create control with non-default sorting', async () => { - await dashboardControls.createControl({ - controlType: OPTIONS_LIST_CONTROL, - dataViewTitle: 'animals-*', - fieldName: 'sound.keyword', - additionalSettings: { - hideSort: true, - defaultSortType: { by: '_key', direction: 'asc' }, - }, - }); - controlId = (await dashboardControls.getAllControlIds())[1]; - expect(await dashboardControls.getControlsCount()).to.be(2); - - await dashboardControls.optionsListOpenPopover(controlId); - await ensureAvailableOptionsEql([...animalSoundAvailableOptions].sort(), true); - await dashboardControls.optionsListEnsurePopoverIsClosed(controlId); - }); - - it('can edit default sorting method', async () => { - await dashboardControls.editExistingControl(controlId); - expect(await testSubjects.getVisibleText('optionsListControl__chooseSortBy')).to.equal( - 'Alphabetically' - ); - const ascendingButtonSelected = await ( - await testSubjects.find('optionsListEditor__sortOrder_asc') - ).elementHasClass('uiButtonGroupButton-isSelected'); - expect(ascendingButtonSelected).to.be(true); - const descendingButtonSelected = await ( - await testSubjects.find('optionsListEditor__sortOrder_desc') - ).elementHasClass('uiButtonGroupButton-isSelected'); - expect(descendingButtonSelected).to.be(false); - - await dashboardControls.optionsListSetAdditionalSettings({ - defaultSortType: { by: '_key', direction: 'desc' }, - }); - await dashboardControls.controlEditorSave(); - - await dashboardControls.optionsListOpenPopover(controlId); - await ensureAvailableOptionsEql([...animalSoundAvailableOptions].sort().reverse(), true); - await dashboardControls.optionsListEnsurePopoverIsClosed(controlId); - }); - after(async () => { await dashboardControls.clearAllControls(); }); diff --git a/test/functional/apps/management/_edit_field.ts b/test/functional/apps/management/_edit_field.ts new file mode 100644 index 0000000000000..f7ee986067196 --- /dev/null +++ b/test/functional/apps/management/_edit_field.ts @@ -0,0 +1,61 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const kibanaServer = getService('kibanaServer'); + const retry = getService('retry'); + const PageObjects = getPageObjects(['settings']); + const testSubjects = getService('testSubjects'); + + describe('edit field', function () { + before(async function () { + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); + }); + + after(async function afterAll() { + await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); + }); + + describe('field preview', function fieldPreview() { + before(async () => { + await PageObjects.settings.navigateTo(); + await PageObjects.settings.clickKibanaIndexPatterns(); + await PageObjects.settings.clickIndexPatternLogstash(); + }); + + it('should show preview for fields in _source', async function () { + await PageObjects.settings.filterField('extension'); + await testSubjects.click('editFieldFormat'); + await testSubjects.find('value'); + let previewText = ''; + await retry.waitForWithTimeout('get preview value', 1000, async () => { + previewText = await testSubjects.getVisibleText('value'); + return previewText !== 'Value not set'; + }); + expect(previewText).to.be('css'); + await PageObjects.settings.closeIndexPatternFieldEditor(); + }); + + it('should show preview for fields not in _source', async function () { + await PageObjects.settings.filterField('extension.raw'); + await testSubjects.click('editFieldFormat'); + await testSubjects.find('value'); + let previewText = ''; + await retry.waitForWithTimeout('get preview value', 1000, async () => { + previewText = await testSubjects.getVisibleText('value'); + return previewText !== 'Value not set'; + }); + expect(previewText).to.be('css'); + await PageObjects.settings.closeIndexPatternFieldEditor(); + }); + }); + }); +} diff --git a/test/functional/apps/management/index.ts b/test/functional/apps/management/index.ts index 9b905b5a01074..d38a94d1ab1ca 100644 --- a/test/functional/apps/management/index.ts +++ b/test/functional/apps/management/index.ts @@ -44,5 +44,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./_handle_version_conflict')); loadTestFile(require.resolve('./_handle_not_found')); loadTestFile(require.resolve('./_data_view_relationships')); + loadTestFile(require.resolve('./_edit_field')); }); } diff --git a/test/functional/page_objects/dashboard_page_controls.ts b/test/functional/page_objects/dashboard_page_controls.ts index 87fa16a408907..e2b91346d15ee 100644 --- a/test/functional/page_objects/dashboard_page_controls.ts +++ b/test/functional/page_objects/dashboard_page_controls.ts @@ -331,25 +331,13 @@ export class DashboardPageControls extends FtrService { // Options list functions public async optionsListSetAdditionalSettings({ - defaultSortType, ignoreTimeout, allowMultiple, - hideExclude, - hideExists, - hideSort, }: OptionsListAdditionalSettings) { const getSettingTestSubject = (setting: string) => `optionsListControl__${setting}AdditionalSetting`; if (allowMultiple) await this.testSubjects.click(getSettingTestSubject('allowMultiple')); - if (hideExclude) await this.testSubjects.click(getSettingTestSubject('hideExclude')); - if (hideExists) await this.testSubjects.click(getSettingTestSubject('hideExists')); - if (hideSort) await this.testSubjects.click(getSettingTestSubject('hideSort')); - if (defaultSortType) { - await this.testSubjects.click(`optionsListEditor__sortOrder_${defaultSortType.direction}`); - await this.testSubjects.click('optionsListControl__chooseSortBy'); - await this.testSubjects.click(`optionsListEditor__sortBy_${defaultSortType.by}`); - } if (ignoreTimeout) await this.testSubjects.click(getSettingTestSubject('runPastTimeout')); } diff --git a/test/functional/page_objects/home_page.ts b/test/functional/page_objects/home_page.ts index f85c106b9986c..e3e14645f2b9a 100644 --- a/test/functional/page_objects/home_page.ts +++ b/test/functional/page_objects/home_page.ts @@ -13,6 +13,7 @@ export class HomePageObject extends FtrService { private readonly retry = this.ctx.getService('retry'); private readonly find = this.ctx.getService('find'); private readonly common = this.ctx.getPageObject('common'); + public readonly log = this.ctx.getService('log'); async clickSynopsis(title: string) { await this.testSubjects.click(`homeSynopsisLink${title}`); @@ -27,17 +28,27 @@ export class HomePageObject extends FtrService { } async openSampleDataAccordion() { - const accordion = await this.testSubjects.find('showSampleDataAccordion'); - const className = await accordion.getAttribute('class'); - - if (!className.includes('euiAccordion-isOpen')) { - await this.testSubjects.click('showSampleDataButton'); + const accordionButton = await this.testSubjects.find('showSampleDataButton'); + let expandedAttribute = await accordionButton.getAttribute('aria-expanded'); + let expanded = expandedAttribute.toLocaleLowerCase().includes('true'); + this.log.debug(`Sample data accordion expanded: ${expanded}`); + + if (!expanded) { + await this.retry.waitFor('sample data according to be expanded', async () => { + this.log.debug(`Opening sample data accordion`); + await accordionButton.click(); + expandedAttribute = await accordionButton.getAttribute('aria-expanded'); + expanded = expandedAttribute.toLocaleLowerCase().includes('true'); + return expanded; + }); + this.log.debug(`Sample data accordion expanded: ${expanded}`); } } async isSampleDataSetInstalled(id: string) { const sampleDataCard = await this.testSubjects.find(`sampleDataSetCard${id}`); const deleteButton = await sampleDataCard.findAllByTestSubject(`removeSampleDataSet${id}`); + this.log.debug(`Sample data installed: ${deleteButton.length > 0}`); return deleteButton.length > 0; } @@ -66,8 +77,14 @@ export class HomePageObject extends FtrService { await this.openSampleDataAccordion(); const isInstalled = await this.isSampleDataSetInstalled(id); if (!isInstalled) { - await this.retry.waitFor('wait until sample data is installed', async () => { + this.log.debug(`Attempting to add sample data: ${id}`); + await this.retry.waitFor('sample data to be installed', async () => { + // Echoing the adjustments made to 'removeSampleDataSet', as we are seeing flaky test cases here as well + // https://github.com/elastic/kibana/issues/52714 + await this.testSubjects.waitForEnabled(`addSampleDataSet${id}`); + await this.common.sleep(1010); await this.testSubjects.click(`addSampleDataSet${id}`); + await this.common.sleep(1010); await this._waitForSampleDataLoadingAction(id); return await this.isSampleDataSetInstalled(id); }); @@ -76,15 +93,22 @@ export class HomePageObject extends FtrService { async removeSampleDataSet(id: string) { await this.openSampleDataAccordion(); - // looks like overkill but we're hitting flaky cases where we click but it doesn't remove - await this.testSubjects.waitForEnabled(`removeSampleDataSet${id}`); - // https://github.com/elastic/kibana/issues/65949 - // Even after waiting for the "Remove" button to be enabled we still have failures - // where it appears the click just didn't work. - await this.common.sleep(1010); - await this.testSubjects.click(`removeSampleDataSet${id}`); - await this.common.sleep(1010); - await this._waitForSampleDataLoadingAction(id); + const isInstalled = await this.isSampleDataSetInstalled(id); + if (isInstalled) { + this.log.debug(`Attempting to remove sample data: ${id}`); + await this.retry.waitFor('sample data to be removed', async () => { + // looks like overkill but we're hitting flaky cases where we click but it doesn't remove + await this.testSubjects.waitForEnabled(`removeSampleDataSet${id}`); + // https://github.com/elastic/kibana/issues/65949 + // Even after waiting for the "Remove" button to be enabled we still have failures + // where it appears the click just didn't work. + await this.common.sleep(1010); + await this.testSubjects.click(`removeSampleDataSet${id}`); + await this.common.sleep(1010); + await this._waitForSampleDataLoadingAction(id); + return !(await this.isSampleDataSetInstalled(id)); + }); + } } // loading action is either uninstall and install @@ -93,6 +117,7 @@ export class HomePageObject extends FtrService { await this.retry.try(async () => { // waitForDeletedByCssSelector needs to be inside retry because it will timeout at least once // before action is complete + this.log.debug(`Waiting for loading spinner to be deleted for sampleDataSetCard${id}`); await sampleDataCard.waitForDeletedByCssSelector('.euiLoadingSpinner'); }); } diff --git a/tsconfig.base.json b/tsconfig.base.json index b715c0dc154ac..b233c23db2285 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -442,6 +442,8 @@ "@kbn/docs-utils/*": ["packages/kbn-docs-utils/*"], "@kbn/ebt-tools": ["packages/kbn-ebt-tools"], "@kbn/ebt-tools/*": ["packages/kbn-ebt-tools/*"], + "@kbn/ecs": ["packages/kbn-ecs"], + "@kbn/ecs/*": ["packages/kbn-ecs/*"], "@kbn/es": ["packages/kbn-es"], "@kbn/es/*": ["packages/kbn-es/*"], "@kbn/es-archiver": ["packages/kbn-es-archiver"], diff --git a/x-pack/plugins/alerting/server/task_runner/execution_handler.ts b/x-pack/plugins/alerting/server/task_runner/execution_handler.ts index 67083ebbb2ce8..2cae6707c4d28 100644 --- a/x-pack/plugins/alerting/server/task_runner/execution_handler.ts +++ b/x-pack/plugins/alerting/server/task_runner/execution_handler.ts @@ -208,6 +208,7 @@ export class ExecutionHandler< alertParams: this.rule.params, actionParams: action.params, ruleUrl: this.buildRuleUrl(spaceId), + flapping: alert.getFlapping(), }), }), }; diff --git a/x-pack/plugins/alerting/server/task_runner/transform_action_params.test.ts b/x-pack/plugins/alerting/server/task_runner/transform_action_params.test.ts index ababe16dea378..4374c0f69389e 100644 --- a/x-pack/plugins/alerting/server/task_runner/transform_action_params.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/transform_action_params.test.ts @@ -48,6 +48,7 @@ test('skips non string parameters', () => { alertParams: { foo: 'test', }, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -82,6 +83,7 @@ test('missing parameters get emptied out', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -111,6 +113,7 @@ test('context parameters are passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -139,6 +142,7 @@ test('state parameters are passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -167,6 +171,7 @@ test('alertId is passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -195,6 +200,7 @@ test('alertName is passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -223,6 +229,7 @@ test('tags is passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -250,6 +257,7 @@ test('undefined tags is passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -278,6 +286,7 @@ test('empty tags is passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -306,6 +315,7 @@ test('spaceId is passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -334,6 +344,7 @@ test('alertInstanceId is passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -362,6 +373,7 @@ test('alertActionGroup is passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -390,6 +402,7 @@ test('alertActionGroupName is passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -418,6 +431,7 @@ test('rule variables are passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -446,6 +460,7 @@ test('rule alert variables are passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -475,6 +490,7 @@ test('date is passed to templates', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); const dateAfter = Date.now(); const dateVariable = new Date(`${result.message}`).valueOf(); @@ -505,6 +521,7 @@ test('works recursively', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -537,6 +554,7 @@ test('works recursively with arrays', () => { alertActionGroup: 'action-group', alertActionGroupName: 'Action Group', alertParams: {}, + flapping: false, }); expect(result).toMatchInlineSnapshot(` Object { @@ -548,3 +566,32 @@ test('works recursively with arrays', () => { } `); }); + +test('flapping is passed to templates', () => { + const actionParams = { + message: 'Value "{{alert.flapping}}" exists', + }; + const result = transformActionParams({ + actionsPlugin, + actionTypeId, + actionParams, + state: {}, + context: {}, + alertId: '1', + alertType: 'rule-type-id', + actionId: 'action-id', + alertName: 'alert-name', + tags: ['tag-A', 'tag-B'], + spaceId: 'spaceId-A', + alertInstanceId: '2', + alertActionGroup: 'action-group', + alertActionGroupName: 'Action Group', + alertParams: {}, + flapping: true, + }); + expect(result).toMatchInlineSnapshot(` + Object { + "message": "Value \\"true\\" exists", + } + `); +}); diff --git a/x-pack/plugins/alerting/server/task_runner/transform_action_params.ts b/x-pack/plugins/alerting/server/task_runner/transform_action_params.ts index 1b44b534a4271..ea87a0dd49604 100644 --- a/x-pack/plugins/alerting/server/task_runner/transform_action_params.ts +++ b/x-pack/plugins/alerting/server/task_runner/transform_action_params.ts @@ -31,6 +31,7 @@ interface TransformActionParamsOptions { kibanaBaseUrl?: string; context: AlertInstanceContext; ruleUrl?: string; + flapping: boolean; } export function transformActionParams({ @@ -51,6 +52,7 @@ export function transformActionParams({ kibanaBaseUrl, alertParams, ruleUrl, + flapping, }: TransformActionParamsOptions): RuleActionParams { // when the list of variables we pass in here changes, // the UI will need to be updated as well; see: @@ -80,6 +82,7 @@ export function transformActionParams({ id: alertInstanceId, actionGroup: alertActionGroup, actionGroupName: alertActionGroupName, + flapping, }, }; return actionsPlugin.renderActionParameterTemplates( diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/generate_data.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/generate_data.ts new file mode 100644 index 0000000000000..ab6921b45ea95 --- /dev/null +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/generate_data.ts @@ -0,0 +1,54 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { apm, timerange } from '@kbn/apm-synthtrace'; + +export function generateData({ from, to }: { from: number; to: number }) { + const range = timerange(from, to); + const synthGo1 = apm + .service({ + name: 'synth-go-1', + environment: 'production', + agentName: 'go', + }) + .instance('my-instance'); + + const synthIOS = apm + .service({ + name: 'synth-ios', + environment: 'production', + agentName: 'iOS/swift', + }) + .instance('my-instance'); + + const synthAndroid = apm + .service({ + name: 'synth-android', + environment: 'production', + agentName: 'android/java', + }) + .instance('my-instance'); + + return range.interval('1m').generator((timestamp) => { + return [ + synthGo1 + .transaction({ transactionName: 'GET /apple 🍎' }) + .timestamp(timestamp) + .duration(1000) + .success(), + synthIOS + .transaction({ transactionName: 'GET /banana 🍌' }) + .timestamp(timestamp) + .duration(1000) + .success(), + synthAndroid + .transaction({ transactionName: 'GET /apple 🍎' }) + .timestamp(timestamp) + .duration(1000) + .success(), + ]; + }); +} diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/service_and_mobile_overview.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/service_and_mobile_overview.cy.ts new file mode 100644 index 0000000000000..ccede29d7e3e9 --- /dev/null +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/service_and_mobile_overview.cy.ts @@ -0,0 +1,138 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import url from 'url'; +import { synthtrace } from '../../../../synthtrace'; +import { generateData } from './generate_data'; + +const start = Date.now() - 1000; +const end = Date.now(); + +const rangeFrom = new Date(start).toISOString(); +const rangeTo = new Date(end).toISOString(); + +const serviceInventory = url.format({ + pathname: 'app/apm/services', + query: { + rangeFrom, + rangeTo, + }, +}); + +describe('Service overview page', () => { + before(() => { + synthtrace.index( + generateData({ + from: new Date(start).getTime(), + to: new Date(end).getTime(), + }) + ); + }); + + after(() => { + synthtrace.clean(); + }); + + describe('When navigating to service inventory', () => { + beforeEach(() => { + cy.loginAsEditorUser(); + cy.visitKibana(serviceInventory); + }); + + describe('when click on apm service', () => { + it('shows the service overview page', () => { + cy.contains('synth-go-1').click(); + cy.url().should('include', '/services/synth-go-1/overview'); // => true + }); + }); + + describe('when click on android service', () => { + it('shows the mobile service overview page', () => { + cy.contains('synth-android').click(); + cy.url().should('include', '/mobile-services/synth-android/overview'); // => true + }); + }); + + describe('when click on iOS service', () => { + it('shows the mobile service overview page', () => { + cy.contains('synth-ios').click(); + cy.url().should('include', '/mobile-services/synth-ios/overview'); // => true + }); + }); + }); + + describe('accessing service overview from URL', () => { + beforeEach(() => { + cy.loginAsEditorUser(); + }); + + describe('accessing apm service', () => { + it('shows the service overview page with default params', () => { + const apmServiceOverview = url.format({ + pathname: 'app/apm/services/synth-go-1', + query: { + rangeFrom, + rangeTo, + }, + }); + + cy.visitKibana(apmServiceOverview); + cy.location().should((loc) => { + expect(loc.pathname).to.eq('/app/apm/services/synth-go-1/overview'); + expect(loc.search).to.eq( + `?comparisonEnabled=true&environment=ENVIRONMENT_ALL&kuery=&latencyAggregationType=avg&rangeFrom=${rangeFrom}&rangeTo=${rangeTo}&serviceGroup=&offset=1d&transactionType=request` + ); + }); + }); + }); + + describe('accessing iOS service', () => { + it('shows the service overview page with default params', () => { + const apmMobileServiceOverview = url.format({ + pathname: 'app/apm/mobile-services/synth-ios', + query: { + rangeFrom, + rangeTo, + }, + }); + + cy.visitKibana(apmMobileServiceOverview); + + cy.location().should((loc) => { + expect(loc.pathname).to.eq( + '/app/apm/mobile-services/synth-ios/overview' + ); + expect(loc.search).to.eq( + `?comparisonEnabled=true&environment=ENVIRONMENT_ALL&kuery=&latencyAggregationType=avg&rangeFrom=${rangeFrom}&rangeTo=${rangeTo}&serviceGroup=&offset=1d&transactionType=request` + ); + }); + }); + }); + + describe('accessing mobile service from apm service route', () => { + it('redirects to mobile service route with default params', () => { + const apmMobileServiceOverview = url.format({ + pathname: 'app/apm/services/synth-android', + query: { + rangeFrom, + rangeTo, + }, + }); + + cy.visitKibana(apmMobileServiceOverview); + + cy.location().should((loc) => { + expect(loc.pathname).to.eq( + '/app/apm/mobile-services/synth-android/overview' + ); + expect(loc.search).to.eq( + `?comparisonEnabled=true&environment=ENVIRONMENT_ALL&kuery=&latencyAggregationType=avg&rangeFrom=${rangeFrom}&rangeTo=${rangeTo}&serviceGroup=&offset=1d&transactionType=request` + ); + }); + }); + }); + }); +}); diff --git a/x-pack/plugins/apm/public/components/app/alerts_overview/index.test.tsx b/x-pack/plugins/apm/public/components/app/alerts_overview/index.test.tsx index 711b7ff389fe3..270d0ba8c4561 100644 --- a/x-pack/plugins/apm/public/components/app/alerts_overview/index.test.tsx +++ b/x-pack/plugins/apm/public/components/app/alerts_overview/index.test.tsx @@ -27,7 +27,11 @@ function Wrapper({ children }: { children?: ReactNode }) { } as Partial); return ( - + {children} @@ -52,7 +56,7 @@ describe('AlertsTable', () => { jest.clearAllMocks(); }); - it('renders alerts table', async () => { + it('renders alerts table in service overview', async () => { const { getByTestId } = render(, renderOptions); await waitFor(async () => { diff --git a/x-pack/plugins/apm/public/components/app/alerts_overview/index.tsx b/x-pack/plugins/apm/public/components/app/alerts_overview/index.tsx index 826f7b809715c..ad885bed46fa1 100644 --- a/x-pack/plugins/apm/public/components/app/alerts_overview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/alerts_overview/index.tsx @@ -11,7 +11,7 @@ import { ALERT_STATUS } from '@kbn/rule-data-utils'; import { AlertConsumers } from '@kbn/rule-data-utils'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { ApmPluginStartDeps } from '../../../plugin'; -import { useApmParams } from '../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { SERVICE_NAME } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { @@ -24,7 +24,10 @@ export function AlertsOverview() { const { path: { serviceName }, query: { environment }, - } = useApmParams('/services/{serviceName}/alerts'); + } = useAnyOfApmParams( + '/services/{serviceName}/alerts', + '/mobile-services/{serviceName}/alerts' + ); const { services } = useKibana(); const [alertStatusFilter, setAlertStatusFilter] = useState(ALL_ALERTS_FILTER); diff --git a/x-pack/plugins/apm/public/components/app/correlations/use_fetch_params.ts b/x-pack/plugins/apm/public/components/app/correlations/use_fetch_params.ts index 827604f776c5a..cb4594f1aefb2 100644 --- a/x-pack/plugins/apm/public/components/app/correlations/use_fetch_params.ts +++ b/x-pack/plugins/apm/public/components/app/correlations/use_fetch_params.ts @@ -9,7 +9,7 @@ import { useMemo } from 'react'; import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context'; -import { useApmParams } from '../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { useTimeRange } from '../../../hooks/use_time_range'; export const useFetchParams = () => { @@ -24,7 +24,10 @@ export const useFetchParams = () => { transactionName, transactionType, }, - } = useApmParams('/services/{serviceName}/transactions/view'); + } = useAnyOfApmParams( + '/services/{serviceName}/transactions/view', + '/mobile-services/{serviceName}/transactions/view' + ); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/filters/index.tsx b/x-pack/plugins/apm/public/components/app/mobile/service_overview/filters/index.tsx similarity index 100% rename from x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/filters/index.tsx rename to x-pack/plugins/apm/public/components/app/mobile/service_overview/filters/index.tsx diff --git a/x-pack/plugins/apm/public/components/app/mobile/service_overview/index.tsx b/x-pack/plugins/apm/public/components/app/mobile/service_overview/index.tsx new file mode 100644 index 0000000000000..525e695a4922f --- /dev/null +++ b/x-pack/plugins/apm/public/components/app/mobile/service_overview/index.tsx @@ -0,0 +1,321 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { + EuiFlexGroupProps, + EuiFlexGroup, + EuiHorizontalRule, + EuiFlexItem, + EuiLink, + EuiPanel, + EuiSpacer, + EuiTitle, + EuiCallOut, +} from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { i18n } from '@kbn/i18n'; +import { AnnotationsContextProvider } from '../../../../context/annotations/annotations_context'; +import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; +import { ChartPointerEventContextProvider } from '../../../../context/chart_pointer_event/chart_pointer_event_context'; +import { useBreakpoints } from '../../../../hooks/use_breakpoints'; +import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useTimeRange } from '../../../../hooks/use_time_range'; +import { useApmRouter } from '../../../../hooks/use_apm_router'; +import { useFiltersForMobileCharts } from './use_filters_for_mobile_charts'; +import { ServiceOverviewThroughputChart } from '../../service_overview/service_overview_throughput_chart'; +import { TransactionsTable } from '../../../shared/transactions_table'; +import { + DEVICE_MODEL_NAME, + HOST_OS_VERSION, + NETWORK_CONNECTION_TYPE, + SERVICE_VERSION, +} from '../../../../../common/es_fields/apm'; +import { MostUsedChart } from './most_used_chart'; +import { MobileFilters } from './filters'; +import { LatencyMap } from './latency_map'; +import { FailedTransactionRateChart } from '../../../shared/charts/failed_transaction_rate_chart'; +import { ServiceOverviewDependenciesTable } from '../../service_overview/service_overview_dependencies_table'; +import { AggregatedTransactionsBadge } from '../../../shared/aggregated_transactions_badge'; +import { LatencyChart } from '../../../shared/charts/latency_chart'; + +/** + * The height a chart should be if it's next to a table with 5 rows and a title. + * Add the height of the pagination row. + */ +export const chartHeight = 288; + +export function MobileServiceOverview() { + const { serviceName, fallbackToTransactions } = useApmServiceContext(); + const router = useApmRouter(); + const filters = useFiltersForMobileCharts(); + + const { + query, + query: { + environment, + kuery, + rangeFrom, + rangeTo, + netConnectionType, + device, + osVersion, + appVersion, + transactionType, + }, + } = useApmParams('/mobile-services/{serviceName}/overview'); + + const { start, end } = useTimeRange({ rangeFrom, rangeTo }); + const dependenciesLink = router.link('/services/{serviceName}/dependencies', { + path: { + serviceName, + }, + query, + }); + + // The default EuiFlexGroup breaks at 768, but we want to break at 1200, so we + // observe the window width and set the flex directions of rows accordingly + const { isLarge } = useBreakpoints(); + const isSingleColumn = isLarge; + + const latencyChartHeight = 200; + const nonLatencyChartHeight = isSingleColumn + ? latencyChartHeight + : chartHeight; + + const rowDirection: EuiFlexGroupProps['direction'] = isSingleColumn + ? 'column' + : 'row'; + + return ( + + + + + + + {fallbackToTransactions && ( + + + + )} + + + + + +

+ + {i18n.translate( + 'xpack.apm.serviceOverview.mobileCallOutLink', + { + defaultMessage: 'Give feedback', + } + )} + + ), + }} + /> +

+
+ +
+ + + + + + + + + + + + +

+ {i18n.translate( + 'xpack.apm.serviceOverview.mostUsedTitle', + { + defaultMessage: 'Most used', + } + )} +

+
+
+ + {/* Device */} + + + + {/* NCT */} + + + + + + {/* OS version */} + + + + {/* App version */} + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + {i18n.translate( + 'xpack.apm.serviceOverview.dependenciesTableTabLink', + { defaultMessage: 'View dependencies' } + )} + + } + /> + + + + +
+
+
+ ); +} diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/embedded_map.test.tsx b/x-pack/plugins/apm/public/components/app/mobile/service_overview/latency_map/embedded_map.test.tsx similarity index 95% rename from x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/embedded_map.test.tsx rename to x-pack/plugins/apm/public/components/app/mobile/service_overview/latency_map/embedded_map.test.tsx index 9718bb2afc370..5b1b2d1e74462 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/embedded_map.test.tsx +++ b/x-pack/plugins/apm/public/components/app/mobile/service_overview/latency_map/embedded_map.test.tsx @@ -31,7 +31,7 @@ describe('Embedded Map', () => { const { findByTestId } = render( diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/embedded_map.tsx b/x-pack/plugins/apm/public/components/app/mobile/service_overview/latency_map/embedded_map.tsx similarity index 98% rename from x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/embedded_map.tsx rename to x-pack/plugins/apm/public/components/app/mobile/service_overview/latency_map/embedded_map.tsx index 8e30430a6e21d..3760d146de326 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/embedded_map.tsx +++ b/x-pack/plugins/apm/public/components/app/mobile/service_overview/latency_map/embedded_map.tsx @@ -31,7 +31,7 @@ import { useTimeRange } from '../../../../../hooks/use_time_range'; function EmbeddedMapComponent({ filters }: { filters: Filter[] }) { const { query: { rangeFrom, rangeTo, kuery }, - } = useApmParams('/services/{serviceName}/overview'); + } = useApmParams('/mobile-services/{serviceName}/overview'); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); const [error, setError] = useState(); diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/get_layer_list.ts b/x-pack/plugins/apm/public/components/app/mobile/service_overview/latency_map/get_layer_list.ts similarity index 100% rename from x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/get_layer_list.ts rename to x-pack/plugins/apm/public/components/app/mobile/service_overview/latency_map/get_layer_list.ts diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/index.tsx b/x-pack/plugins/apm/public/components/app/mobile/service_overview/latency_map/index.tsx similarity index 100% rename from x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/index.tsx rename to x-pack/plugins/apm/public/components/app/mobile/service_overview/latency_map/index.tsx diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/__snapshots__/most_used_chart.test.tsx.snap b/x-pack/plugins/apm/public/components/app/mobile/service_overview/most_used_chart/__snapshots__/most_used_chart.test.tsx.snap similarity index 100% rename from x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/__snapshots__/most_used_chart.test.tsx.snap rename to x-pack/plugins/apm/public/components/app/mobile/service_overview/most_used_chart/__snapshots__/most_used_chart.test.tsx.snap diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/get_lens_attributes.ts b/x-pack/plugins/apm/public/components/app/mobile/service_overview/most_used_chart/get_lens_attributes.ts similarity index 100% rename from x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/get_lens_attributes.ts rename to x-pack/plugins/apm/public/components/app/mobile/service_overview/most_used_chart/get_lens_attributes.ts diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/index.tsx b/x-pack/plugins/apm/public/components/app/mobile/service_overview/most_used_chart/index.tsx similarity index 100% rename from x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/index.tsx rename to x-pack/plugins/apm/public/components/app/mobile/service_overview/most_used_chart/index.tsx diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/most_used_chart.test.tsx b/x-pack/plugins/apm/public/components/app/mobile/service_overview/most_used_chart/most_used_chart.test.tsx similarity index 100% rename from x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/most_used_chart.test.tsx rename to x-pack/plugins/apm/public/components/app/mobile/service_overview/most_used_chart/most_used_chart.test.tsx diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/use_filters_for_mobile_charts.ts b/x-pack/plugins/apm/public/components/app/mobile/service_overview/use_filters_for_mobile_charts.ts similarity index 96% rename from x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/use_filters_for_mobile_charts.ts rename to x-pack/plugins/apm/public/components/app/mobile/service_overview/use_filters_for_mobile_charts.ts index c642dfe33116d..3c7dda1e43223 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/use_filters_for_mobile_charts.ts +++ b/x-pack/plugins/apm/public/components/app/mobile/service_overview/use_filters_for_mobile_charts.ts @@ -29,7 +29,7 @@ export function useFiltersForMobileCharts() { appVersion, netConnectionType, }, - } = useApmParams('/services/{serviceName}/overview'); + } = useApmParams('/mobile-services/{serviceName}/overview'); return useMemo( () => diff --git a/x-pack/plugins/apm/public/components/app/mobile/transaction_overview/index.tsx b/x-pack/plugins/apm/public/components/app/mobile/transaction_overview/index.tsx new file mode 100644 index 0000000000000..19bfe14ff90e2 --- /dev/null +++ b/x-pack/plugins/apm/public/components/app/mobile/transaction_overview/index.tsx @@ -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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiSpacer } from '@elastic/eui'; +import React from 'react'; +import { useHistory } from 'react-router-dom'; +import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; +import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useTimeRange } from '../../../../hooks/use_time_range'; +import { AggregatedTransactionsBadge } from '../../../shared/aggregated_transactions_badge'; +import { MobileTransactionCharts } from '../../../shared/charts/transaction_charts/mobile_transaction_charts'; +import { TransactionsTable } from '../../../shared/transactions_table'; +import { replace } from '../../../shared/links/url_helpers'; + +export function MobileTransactionOverview() { + const { + query: { + environment, + kuery, + rangeFrom, + rangeTo, + transactionType: transactionTypeFromUrl, + }, + } = useApmParams('/mobile-services/{serviceName}/transactions'); + + const { start, end } = useTimeRange({ rangeFrom, rangeTo }); + + const { transactionType, fallbackToTransactions } = useApmServiceContext(); + + const history = useHistory(); + + // redirect to first transaction type + if (!transactionTypeFromUrl && transactionType) { + replace(history, { query: { transactionType } }); + } + + return ( + <> + {fallbackToTransactions && ( + <> + + + + + + + + )} + + + + + + + ); +} diff --git a/x-pack/plugins/apm/public/components/app/service_map/controls.tsx b/x-pack/plugins/apm/public/components/app/service_map/controls.tsx index f562f2b0fd75e..f73f798cbe942 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/controls.tsx +++ b/x-pack/plugins/apm/public/components/app/service_map/controls.tsx @@ -107,7 +107,11 @@ export function Controls() { const { query: { kuery }, - } = useAnyOfApmParams('/service-map', '/services/{serviceName}/service-map'); + } = useAnyOfApmParams( + '/service-map', + '/services/{serviceName}/service-map', + '/mobile-services/{serviceName}/service-map' + ); const [zoom, setZoom] = useState((cy && cy.zoom()) || 1); const duration = parseInt(theme.eui.euiAnimSpeedFast, 10); diff --git a/x-pack/plugins/apm/public/components/app/service_map/index.tsx b/x-pack/plugins/apm/public/components/app/service_map/index.tsx index b7975d31afaba..44072c4ec88ea 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_map/index.tsx @@ -31,7 +31,7 @@ import { TimeoutPrompt } from './timeout_prompt'; import { useRefDimensions } from './use_ref_dimensions'; import { SearchBar } from '../../shared/search_bar'; import { useServiceName } from '../../../hooks/use_service_name'; -import { useApmParams } from '../../../hooks/use_apm_params'; +import { useApmParams, useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { Environment } from '../../../../common/environment_rt'; import { useTimeRange } from '../../../hooks/use_time_range'; @@ -84,7 +84,10 @@ export function ServiceMapHome() { export function ServiceMapServiceDetail() { const { query: { environment, kuery, rangeFrom, rangeTo }, - } = useApmParams('/services/{serviceName}/service-map'); + } = useAnyOfApmParams( + '/services/{serviceName}/service-map', + '/mobile-services/{serviceName}/service-map' + ); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); return ( - {isPendingServiceAgent ? ( - - - - + + {fallbackToTransactions && ( + + + + )} + + + + + + + + + + + + + + + + + + + + {!isRumAgent && ( + + + + )} + + + + + + + + + + {isServerless ? ( + + + + ) : ( + + + + )} + {!isRumAgent && ( + + + + {i18n.translate( + 'xpack.apm.serviceOverview.dependenciesTableTabLink', + { defaultMessage: 'View dependencies' } + )} + + } + /> + + + )} + + + {!isRumAgent && !isServerless && ( + + + + - - ) : ( - <> - {isMobileAgent ? ( - - ) : ( - - )} - - )} + )} + ); diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/service_overview_charts.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/service_overview_charts.tsx deleted file mode 100644 index 802fc161cefd8..0000000000000 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/service_overview_charts.tsx +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiPanel } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import { useApmRouter } from '../../../../hooks/use_apm_router'; -import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; -import { LatencyChart } from '../../../shared/charts/latency_chart'; -import { TransactionBreakdownChart } from '../../../shared/charts/transaction_breakdown_chart'; -import { TransactionColdstartRateChart } from '../../../shared/charts/transaction_coldstart_rate_chart'; -import { FailedTransactionRateChart } from '../../../shared/charts/failed_transaction_rate_chart'; -import { ServiceOverviewDependenciesTable } from '../service_overview_dependencies_table'; -import { ServiceOverviewErrorsTable } from '../service_overview_errors_table'; -import { ServiceOverviewInstancesChartAndTable } from '../service_overview_instances_chart_and_table'; -import { ServiceOverviewThroughputChart } from '../service_overview_throughput_chart'; -import { TransactionsTable } from '../../../shared/transactions_table'; -import { AggregatedTransactionsBadge } from '../../../shared/aggregated_transactions_badge'; -import { - isRumAgentName, - isServerlessAgent, -} from '../../../../../common/agent_name'; -import { useApmParams } from '../../../../hooks/use_apm_params'; -import { useTimeRange } from '../../../../hooks/use_time_range'; - -interface Props { - latencyChartHeight: number; - rowDirection: 'column' | 'row'; - nonLatencyChartHeight: number; - isSingleColumn: boolean; -} - -export function ServiceOverviewCharts({ - latencyChartHeight, - rowDirection, - nonLatencyChartHeight, - isSingleColumn, -}: Props) { - const router = useApmRouter(); - const { agentName, serviceName, fallbackToTransactions, runtimeName } = - useApmServiceContext(); - - const { - query, - query: { environment, kuery, rangeFrom, rangeTo }, - } = useApmParams('/services/{serviceName}/overview'); - - const { start, end } = useTimeRange({ rangeFrom, rangeTo }); - - const isRumAgent = isRumAgentName(agentName); - const isServerless = isServerlessAgent(runtimeName); - - const dependenciesLink = router.link('/services/{serviceName}/dependencies', { - path: { - serviceName, - }, - query, - }); - - return ( - - {fallbackToTransactions && ( - - - - )} - - - - - - - - - - - - - - - - - - - - {!isRumAgent && ( - - - - )} - - - - - - - - - - {isServerless ? ( - - - - ) : ( - - - - )} - {!isRumAgent && ( - - - - {i18n.translate( - 'xpack.apm.serviceOverview.dependenciesTableTabLink', - { defaultMessage: 'View dependencies' } - )} - - } - /> - - - )} - - - {!isRumAgent && !isServerless && ( - - - - - - )} - - ); -} diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/service_oveview_mobile_charts.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/service_oveview_mobile_charts.tsx deleted file mode 100644 index cf2feb2ad4d8c..0000000000000 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/service_oveview_mobile_charts.tsx +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiLink, - EuiPanel, - EuiSpacer, -} from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { i18n } from '@kbn/i18n'; -import { EuiTitle } from '@elastic/eui'; -import { EuiHorizontalRule } from '@elastic/eui'; -import { EuiCallOut } from '@elastic/eui'; -import { useApmRouter } from '../../../../hooks/use_apm_router'; -import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; -import { LatencyChart } from '../../../shared/charts/latency_chart'; -import { FailedTransactionRateChart } from '../../../shared/charts/failed_transaction_rate_chart'; -import { ServiceOverviewDependenciesTable } from '../service_overview_dependencies_table'; -import { ServiceOverviewThroughputChart } from '../service_overview_throughput_chart'; -import { TransactionsTable } from '../../../shared/transactions_table'; -import { AggregatedTransactionsBadge } from '../../../shared/aggregated_transactions_badge'; -import { useApmParams } from '../../../../hooks/use_apm_params'; -import { useTimeRange } from '../../../../hooks/use_time_range'; -import { MostUsedChart } from './most_used_chart'; -import { LatencyMap } from './latency_map'; -import { MobileFilters } from './filters'; -import { useFiltersForMobileCharts } from './use_filters_for_mobile_charts'; -import { - DEVICE_MODEL_NAME, - HOST_OS_VERSION, - NETWORK_CONNECTION_TYPE, - SERVICE_VERSION, -} from '../../../../../common/es_fields/apm'; -interface Props { - latencyChartHeight: number; - rowDirection: 'column' | 'row'; - nonLatencyChartHeight: number; - isSingleColumn: boolean; -} - -export function ServiceOverviewMobileCharts({ - latencyChartHeight, - rowDirection, - nonLatencyChartHeight, - isSingleColumn, -}: Props) { - const { fallbackToTransactions, serviceName } = useApmServiceContext(); - const router = useApmRouter(); - const filters = useFiltersForMobileCharts(); - - const { - query, - query: { - environment, - kuery, - rangeFrom, - rangeTo, - netConnectionType, - device, - osVersion, - appVersion, - transactionType, - }, - } = useApmParams('/services/{serviceName}/overview'); - - const { start, end } = useTimeRange({ rangeFrom, rangeTo }); - - const dependenciesLink = router.link('/services/{serviceName}/dependencies', { - path: { - serviceName, - }, - query, - }); - - return ( - - - - - {fallbackToTransactions && ( - - - - )} - - - - - -

- - {i18n.translate( - 'xpack.apm.serviceOverview.mobileCallOutLink', - { - defaultMessage: 'Give feedback', - } - )} - - ), - }} - /> -

-
- -
- - - - - - - - - - - - -

- {i18n.translate('xpack.apm.serviceOverview.mostUsedTitle', { - defaultMessage: 'Most used', - })} -

-
-
- - {/* Device */} - - - - {/* NCT */} - - - - - - {/* OS version */} - - - - {/* App version */} - - - - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - {i18n.translate( - 'xpack.apm.serviceOverview.dependenciesTableTabLink', - { defaultMessage: 'View dependencies' } - )} - - } - /> - - - - -
- ); -} diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx index 5e7c02610d7c8..fcc4f3a97cd5c 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx @@ -20,7 +20,7 @@ import { ApmMlDetectorType } from '../../../../common/anomaly_detection/apm_ml_d import { asExactTransactionRate } from '../../../../common/utils/formatters'; import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context'; import { useEnvironmentsContext } from '../../../context/environments_context/use_environments_context'; -import { useApmParams } from '../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { useFetcher } from '../../../hooks/use_fetcher'; import { usePreferredServiceAnomalyTimeseries } from '../../../hooks/use_preferred_service_anomaly_timeseries'; import { useTimeRange } from '../../../hooks/use_time_range'; @@ -47,7 +47,10 @@ export function ServiceOverviewThroughputChart({ }) { const { query: { rangeFrom, rangeTo, comparisonEnabled, offset }, - } = useApmParams('/services/{serviceName}'); + } = useAnyOfApmParams( + '/services/{serviceName}', + '/mobile-services/{serviceName}' + ); const { environment } = useEnvironmentsContext(); diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/aggregated_critical_path_tab.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/aggregated_critical_path_tab.tsx index 3a6f479a61254..1ebf48427a5fd 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/aggregated_critical_path_tab.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/aggregated_critical_path_tab.tsx @@ -8,7 +8,7 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useMemo } from 'react'; -import { useApmParams } from '../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { useTimeRange } from '../../../hooks/use_time_range'; import { CriticalPathFlamegraph } from '../../shared/critical_path_flamegraph'; import { TechnicalPreviewBadge } from '../../shared/technical_preview_badge'; @@ -20,7 +20,10 @@ function TransactionDetailAggregatedCriticalPath({ const { path: { serviceName }, query: { rangeFrom, rangeTo, transactionName }, - } = useApmParams('/services/{serviceName}/transactions/view'); + } = useAnyOfApmParams( + '/services/{serviceName}/transactions/view', + '/mobile-services/{serviceName}/transactions/view' + ); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/distribution/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/distribution/index.tsx index 72bf5a048e9e7..0c05b945c1b70 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/distribution/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/distribution/index.tsx @@ -7,7 +7,7 @@ import { XYBrushEvent } from '@elastic/charts'; import { EuiSpacer } from '@elastic/eui'; -import React from 'react'; +import React, { useCallback } from 'react'; import { useHistory } from 'react-router-dom'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; @@ -17,7 +17,7 @@ import { useWaterfallFetcher } from '../use_waterfall_fetcher'; import { WaterfallWithSummary } from '../waterfall_with_summary'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; -import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { useTimeRange } from '../../../../hooks/use_time_range'; import { DurationDistributionChartWithScrubber } from '../../../shared/charts/duration_distribution_chart_with_scrubber'; import { HeightRetainer } from '../../../shared/height_retainer'; @@ -43,8 +43,11 @@ export function TransactionDistribution({ const { traceId, transactionId } = urlParams; const { - query: { rangeFrom, rangeTo, showCriticalPath }, - } = useApmParams('/services/{serviceName}/transactions/view'); + query: { rangeFrom, rangeTo, showCriticalPath, environment }, + } = useAnyOfApmParams( + '/services/{serviceName}/transactions/view', + '/mobile-services/{serviceName}/transactions/view' + ); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); @@ -57,10 +60,6 @@ export function TransactionDistribution({ }); const { waterfallItemId, detailTab } = urlParams; - const { - query: { environment }, - } = useApmParams('/services/{serviceName}/transactions/view'); - const { serviceName } = useApmServiceContext(); const markerCurrentEvent = @@ -75,6 +74,30 @@ export function TransactionDistribution({ totalDocCount, } = useTransactionDistributionChartData(); + const onShowCriticalPathChange = useCallback( + (nextShowCriticalPath: boolean) => { + push(history, { + query: { + showCriticalPath: nextShowCriticalPath ? 'true' : 'false', + }, + }); + }, + [history] + ); + + const onTabClick = useCallback( + (tab: TransactionTab) => { + history.replace({ + ...history.location, + search: fromQuery({ + ...toQuery(history.location.search), + detailTab: tab, + }), + }); + }, + [history] + ); + return (
@@ -104,15 +127,7 @@ export function TransactionDistribution({ }), }); }} - onTabClick={(tab) => { - history.replace({ - ...history.location, - search: fromQuery({ - ...toQuery(history.location.search), - detailTab: tab, - }), - }); - }} + onTabClick={onTabClick} serviceName={serviceName} waterfallItemId={waterfallItemId} detailTab={detailTab as TransactionTab | undefined} @@ -120,13 +135,7 @@ export function TransactionDistribution({ traceSamplesFetchStatus={traceSamplesFetchResult.status} traceSamples={traceSamplesFetchResult.data?.traceSamples} showCriticalPath={showCriticalPath} - onShowCriticalPathChange={(nextShowCriticalPath) => { - push(history, { - query: { - showCriticalPath: nextShowCriticalPath ? 'true' : 'false', - }, - }); - }} + onShowCriticalPathChange={onShowCriticalPathChange} />
diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/index.tsx index 41d6b2c7bf96a..a28db35f25227 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/index.tsx @@ -11,22 +11,19 @@ import { useHistory } from 'react-router-dom'; import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context'; import { useBreadcrumb } from '../../../context/breadcrumbs/use_breadcrumb'; import { ChartPointerEventContextProvider } from '../../../context/chart_pointer_event/chart_pointer_event_context'; -import { useApmParams } from '../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { useApmRouter } from '../../../hooks/use_apm_router'; import { useTimeRange } from '../../../hooks/use_time_range'; import { AggregatedTransactionsBadge } from '../../shared/aggregated_transactions_badge'; import { TransactionCharts } from '../../shared/charts/transaction_charts'; import { replace } from '../../shared/links/url_helpers'; import { TransactionDetailsTabs } from './transaction_details_tabs'; -import { - isMobileAgentName, - isServerlessAgent, -} from '../../../../common/agent_name'; -import { MobileTransactionCharts } from '../../shared/charts/transaction_charts/mobile_transaction_charts'; +import { isServerlessAgent } from '../../../../common/agent_name'; export function TransactionDetails() { - const { path, query } = useApmParams( - '/services/{serviceName}/transactions/view' + const { path, query } = useAnyOfApmParams( + '/services/{serviceName}/transactions/view', + '/mobile-services/{serviceName}/transactions/view' ); const { transactionName, @@ -38,7 +35,7 @@ export function TransactionDetails() { } = query; const { start, end } = useTimeRange({ rangeFrom, rangeTo }); const apmRouter = useApmRouter(); - const { transactionType, fallbackToTransactions, runtimeName, agentName } = + const { transactionType, fallbackToTransactions, runtimeName } = useApmServiceContext(); const history = useHistory(); @@ -60,7 +57,6 @@ export function TransactionDetails() { ); const isServerless = isServerlessAgent(runtimeName); - const isMobileAgent = isMobileAgentName(agentName); return ( <> @@ -74,25 +70,16 @@ export function TransactionDetails() { - {isMobileAgent ? ( - - ) : ( - - )} + diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx index a2413277c1d13..237580e253949 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx @@ -18,7 +18,7 @@ import { isTimeComparison } from '../../../shared/time_comparison/get_comparison import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { getColumns } from '../../../shared/errors_table/get_columns'; -import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { useTimeRange } from '../../../../hooks/use_time_range'; type ErrorGroupMainStatisticsByTransactionName = @@ -44,7 +44,10 @@ export function TopErrors() { const { query, path: { serviceName }, - } = useApmParams('/services/{serviceName}/transactions/view'); + } = useAnyOfApmParams( + '/services/{serviceName}/transactions/view', + '/mobile-services/{serviceName}/transactions/view' + ); const { environment, diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/transaction_details_tabs.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/transaction_details_tabs.tsx index 866c94702fb00..7c7a057f0fc43 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/transaction_details_tabs.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/transaction_details_tabs.tsx @@ -13,7 +13,7 @@ import { EuiPanel, EuiSpacer, EuiTabs, EuiTab } from '@elastic/eui'; import { XYBrushEvent } from '@elastic/charts'; import { useLegacyUrlParams } from '../../../context/url_params_context/use_url_params'; -import { useApmParams } from '../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { TraceSamplesFetchResult, useTransactionTraceSamplesFetcher, @@ -46,7 +46,10 @@ const tabs = [ ]; export function TransactionDetailsTabs() { - const { query } = useApmParams('/services/{serviceName}/transactions/view'); + const { query } = useAnyOfApmParams( + '/services/{serviceName}/transactions/view', + '/mobile-services/{serviceName}/transactions/view' + ); const isCriticalPathFeatureEnabled = useCriticalPathFeatureEnabledSetting(); diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/maybe_view_trace_link.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/maybe_view_trace_link.tsx index 10d7dadba4609..af9365b14be00 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/maybe_view_trace_link.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/maybe_view_trace_link.tsx @@ -53,6 +53,7 @@ export function MaybeViewTraceLink({ query: { comparisonEnabled, offset }, } = useAnyOfApmParams( '/services/{serviceName}/transactions/view', + '/mobile-services/{serviceName}/transactions/view', '/traces/explorer', '/dependencies/operation' ); diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/transaction_tabs.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/transaction_tabs.tsx index 16dfb2d8fdc7e..3a3194bc5879c 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/transaction_tabs.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/transaction_tabs.tsx @@ -8,12 +8,18 @@ import { EuiSpacer, EuiTab, EuiTabs, EuiLoadingContent } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { LogStream } from '@kbn/infra-plugin/public'; -import React from 'react'; +import React, { useMemo } from 'react'; import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; import { TransactionMetadata } from '../../../shared/metadata_table/transaction_metadata'; import { WaterfallContainer } from './waterfall_container'; import { IWaterfall } from './waterfall_container/waterfall/waterfall_helpers/waterfall_helpers'; +export enum TransactionTab { + timeline = 'timeline', + metadata = 'metadata', + logs = 'logs', +} + interface Props { transaction?: Transaction; isLoading: boolean; @@ -30,27 +36,81 @@ export function TransactionTabs({ transaction, waterfall, isLoading, - detailTab, + detailTab = TransactionTab.timeline, waterfallItemId, serviceName, onTabClick, showCriticalPath, onShowCriticalPathChange, }: Props) { - const tabs = [timelineTab, metadataTab, logsTab]; - const currentTab = tabs.find(({ key }) => key === detailTab) ?? timelineTab; + const tabs: Record< + TransactionTab, + { label: string; component: React.ReactNode } + > = useMemo( + () => ({ + [TransactionTab.timeline]: { + label: i18n.translate('xpack.apm.propertiesTable.tabs.timelineLabel', { + defaultMessage: 'Timeline', + }), + component: ( + + ), + }, + [TransactionTab.metadata]: { + label: i18n.translate('xpack.apm.propertiesTable.tabs.metadataLabel', { + defaultMessage: 'Metadata', + }), + component: ( + <>{transaction && } + ), + }, + [TransactionTab.logs]: { + label: i18n.translate('xpack.apm.propertiesTable.tabs.logsLabel', { + defaultMessage: 'Logs', + }), + component: ( + <> + {transaction && ( + + )} + + ), + }, + }), + [ + onShowCriticalPathChange, + serviceName, + showCriticalPath, + transaction, + waterfall, + waterfallItemId, + ] + ); + + const currentTab = tabs[detailTab]; const TabContent = currentTab.component; return ( <> - {tabs.map(({ key, label }) => { + {(Object.keys(TransactionTab) as TransactionTab[]).map((key) => { + const { label } = tabs[key]; return ( { onTabClick(key); }} - isSelected={currentTab.key === key} + isSelected={detailTab === key} key={key} > {label} @@ -63,49 +123,12 @@ export function TransactionTabs({ {isLoading || !transaction ? ( ) : ( - + <> {TabContent} )} ); } -export enum TransactionTab { - timeline = 'timeline', - metadata = 'metadata', - logs = 'logs', -} - -const timelineTab = { - key: TransactionTab.timeline, - label: i18n.translate('xpack.apm.propertiesTable.tabs.timelineLabel', { - defaultMessage: 'Timeline', - }), - component: TimelineTabContent, -}; - -const metadataTab = { - key: TransactionTab.metadata, - label: i18n.translate('xpack.apm.propertiesTable.tabs.metadataLabel', { - defaultMessage: 'Metadata', - }), - component: MetadataTabContent, -}; - -const logsTab = { - key: TransactionTab.logs, - label: i18n.translate('xpack.apm.propertiesTable.tabs.logsLabel', { - defaultMessage: 'Logs', - }), - component: LogsTabContent, -}; - function TimelineTabContent({ waterfall, waterfallItemId, @@ -134,18 +157,24 @@ function MetadataTabContent({ transaction }: { transaction: Transaction }) { return ; } -function LogsTabContent({ transaction }: { transaction: Transaction }) { - const startTimestamp = Math.floor(transaction.timestamp.us / 1000); - const endTimestamp = Math.ceil( - startTimestamp + transaction.transaction.duration.us / 1000 - ); +function LogsTabContent({ + timestamp, + duration, + traceId, +}: { + timestamp: number; + duration: number; + traceId: string; +}) { + const startTimestamp = Math.floor(timestamp / 1000); + const endTimestamp = Math.ceil(startTimestamp + duration / 1000); const framePaddingMs = 1000 * 60 * 60 * 24; // 24 hours return ( >; waterfall: IWaterfall; timelineMargins: Margins; onClickWaterfallItem: (item: IWaterfallSpanOrTransaction) => void; @@ -87,20 +86,13 @@ export function AccordionWaterfall(props: AccordionWaterfallProps) { duration, waterfall, waterfallItemId, - setMaxLevel, timelineMargins, onClickWaterfallItem, showCriticalPath, } = props; - const theme = useTheme(); const [isOpen, setIsOpen] = useState(props.isOpen); - const [nextLevel] = useState(level + 1); - - useEffect(() => { - setMaxLevel(nextLevel); - }, [nextLevel, setMaxLevel]); let children = waterfall.childrenByParentId[item.id] || []; @@ -190,7 +182,7 @@ export function AccordionWaterfall(props: AccordionWaterfallProps) { {...props} key={child.id} isOpen={isOpen} - level={nextLevel} + level={level + 1} item={child} /> ))} diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/flyout_top_level_properties.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/flyout_top_level_properties.tsx index 5b766a9cf04a9..23c06c586defb 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/flyout_top_level_properties.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/flyout_top_level_properties.tsx @@ -26,6 +26,7 @@ interface Props { export function FlyoutTopLevelProperties({ transaction }: Props) { const { query } = useAnyOfApmParams( '/services/{serviceName}/transactions/view', + '/mobile-services/{serviceName}/transactions/view', '/traces/explorer' ); diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx index 16cd08dbc01b7..c60c4ee5015a2 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx @@ -8,7 +8,7 @@ import { EuiButtonEmpty, EuiCallOut } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { History } from 'history'; -import React, { useState } from 'react'; +import React, { useMemo, useState } from 'react'; import { useHistory } from 'react-router-dom'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { Timeline } from '../../../../../shared/charts/timeline'; @@ -55,6 +55,29 @@ interface Props { showCriticalPath: boolean; } +function getWaterfallMaxLevel(waterfall: IWaterfall) { + const entryId = waterfall.entryWaterfallTransaction?.id; + if (!entryId) { + return 0; + } + let maxLevel = 1; + function countLevels(id: string, currentLevel: number) { + const children = waterfall.childrenByParentId[id] || []; + if (children.length) { + children.forEach((child) => { + countLevels(child.id, currentLevel + 1); + }); + } else { + if (maxLevel < currentLevel) { + maxLevel = currentLevel; + } + } + } + + countLevels(entryId, 1); + return maxLevel; +} + export function Waterfall({ waterfall, waterfallItemId, @@ -70,15 +93,17 @@ export function Waterfall({ const agentMarks = getAgentMarks(waterfall.entryTransaction); const errorMarks = getErrorMarks(waterfall.errorItems); - // Calculate the left margin relative to the deepest level, or 100px, whichever - // is more. - const [maxLevel, setMaxLevel] = useState(0); - const timelineMargins = { - top: 40, - left: Math.max(100, maxLevel * 10), - right: 50, - bottom: 0, - }; + const timelineMargins = useMemo(() => { + // Calculate the left margin relative to the deepest level, or 100px, whichever + // is more. + const maxLevel = getWaterfallMaxLevel(waterfall); + return { + top: 40, + left: Math.max(100, maxLevel * 10), + right: 50, + bottom: 0, + }; + }, [waterfall]); return ( @@ -117,7 +142,6 @@ export function Waterfall({ isOpen={isAccordionOpen} item={waterfall.entryWaterfallTransaction} level={0} - setMaxLevel={setMaxLevel} waterfallItemId={waterfallItemId} duration={duration} waterfall={waterfall} diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx index 30ff2a8945d7c..0b6e1e846e24b 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx @@ -33,6 +33,7 @@ interface Props { export function StickySpanProperties({ span, transaction }: Props) { const { query } = useAnyOfApmParams( '/services/{serviceName}/transactions/view', + '/mobile-services/{serviceName}/transactions/view', '/traces/explorer', '/dependencies/operation' ); diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx index e2e4ea1fb00f4..416e46a6101aa 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx @@ -322,6 +322,7 @@ function RelatedErrors({ const theme = useTheme(); const { query } = useAnyOfApmParams( '/services/{serviceName}/transactions/view', + '/mobile-services/{serviceName}/transactions/view', '/traces/explorer', '/dependencies/operation' ); diff --git a/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx index d0355b201e858..a5284982e8a65 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx @@ -15,11 +15,7 @@ import { AggregatedTransactionsBadge } from '../../shared/aggregated_transaction import { TransactionCharts } from '../../shared/charts/transaction_charts'; import { replace } from '../../shared/links/url_helpers'; import { TransactionsTable } from '../../shared/transactions_table'; -import { - isMobileAgentName, - isServerlessAgent, -} from '../../../../common/agent_name'; -import { MobileTransactionCharts } from '../../shared/charts/transaction_charts/mobile_transaction_charts'; +import { isServerlessAgent } from '../../../../common/agent_name'; export function TransactionOverview() { const { @@ -36,13 +32,8 @@ export function TransactionOverview() { const { start, end } = useTimeRange({ rangeFrom, rangeTo }); - const { - transactionType, - serviceName, - fallbackToTransactions, - runtimeName, - agentName, - } = useApmServiceContext(); + const { transactionType, fallbackToTransactions, runtimeName } = + useApmServiceContext(); const history = useHistory(); @@ -51,14 +42,7 @@ export function TransactionOverview() { replace(history, { query: { transactionType } }); } - // TODO: improve urlParams typings. - // `serviceName` or `transactionType` will never be undefined here, and this check should not be needed - if (!serviceName) { - return null; - } - const isServerless = isServerlessAgent(runtimeName); - const isMobileAgent = isMobileAgentName(agentName); return ( <> @@ -72,24 +56,15 @@ export function TransactionOverview() { )} - {isMobileAgent ? ( - - ) : ( - - )} + ['selectedTab']; + element: React.ReactElement; + searchBarOptions?: { + showKueryBar?: boolean; + showTransactionTypeSelector?: boolean; + showTimeComparison?: boolean; + hidden?: boolean; + }; +}): { + element: React.ReactElement; +} { + return { + element: ( + + {element} + + ), + }; +} + +export const mobileServiceDetail = { + '/mobile-services/{serviceName}': { + element: ( + + + + ), + params: t.intersection([ + t.type({ + path: t.type({ + serviceName: t.string, + }), + }), + t.type({ + query: t.intersection([ + environmentRt, + t.type({ + rangeFrom: t.string, + rangeTo: t.string, + kuery: t.string, + serviceGroup: t.string, + comparisonEnabled: toBooleanRt, + }), + t.partial({ + latencyAggregationType: t.string, + transactionType: t.string, + refreshPaused: t.union([t.literal('true'), t.literal('false')]), + refreshInterval: t.string, + }), + offsetRt, + ]), + }), + ]), + defaults: { + query: { + kuery: '', + environment: ENVIRONMENT_ALL.value, + serviceGroup: '', + latencyAggregationType: LatencyAggregationType.avg, + }, + }, + children: { + '/mobile-services/{serviceName}/overview': { + ...page({ + element: , + tab: 'overview', + title: i18n.translate('xpack.apm.views.overview.title', { + defaultMessage: 'Overview', + }), + searchBarOptions: { + showTransactionTypeSelector: true, + showTimeComparison: true, + }, + }), + params: t.partial({ + query: t.partial({ + page: toNumberRt, + pageSize: toNumberRt, + sortField: t.string, + sortDirection: t.union([t.literal('asc'), t.literal('desc')]), + device: t.string, + osVersion: t.string, + appVersion: t.string, + netConnectionType: t.string, + }), + }), + }, + '/mobile-services/{serviceName}/transactions': { + ...page({ + tab: 'transactions', + title: i18n.translate('xpack.apm.views.transactions.title', { + defaultMessage: 'Transactions', + }), + element: , + searchBarOptions: { + showTransactionTypeSelector: true, + showTimeComparison: true, + }, + }), + params: t.partial({ + query: t.partial({ + page: toNumberRt, + pageSize: toNumberRt, + sortField: t.string, + sortDirection: t.union([t.literal('asc'), t.literal('desc')]), + }), + }), + children: { + '/mobile-services/{serviceName}/transactions/view': { + element: , + params: t.type({ + query: t.intersection([ + t.type({ + transactionName: t.string, + comparisonEnabled: toBooleanRt, + showCriticalPath: toBooleanRt, + }), + t.partial({ + traceId: t.string, + transactionId: t.string, + }), + offsetRt, + ]), + }), + defaults: { + query: { + showCriticalPath: '', + }, + }, + }, + '/mobile-services/{serviceName}/transactions': { + element: , + }, + }, + }, + '/mobile-services/{serviceName}/service-map': page({ + tab: 'service-map', + title: i18n.translate('xpack.apm.views.serviceMap.title', { + defaultMessage: 'Service Map', + }), + element: , + searchBarOptions: { + hidden: true, + }, + }), + '/mobile-services/{serviceName}/alerts': page({ + tab: 'alerts', + title: i18n.translate('xpack.apm.views.alerts.title', { + defaultMessage: 'Alerts', + }), + element: , + searchBarOptions: { + hidden: true, + }, + }), + '/mobile-services/{serviceName}/': { + element: , + }, + }, + }, +}; diff --git a/x-pack/plugins/apm/public/components/routing/service_detail/index.tsx b/x-pack/plugins/apm/public/components/routing/service_detail/index.tsx index bfff8509b3ab3..2964cd7b7934c 100644 --- a/x-pack/plugins/apm/public/components/routing/service_detail/index.tsx +++ b/x-pack/plugins/apm/public/components/routing/service_detail/index.tsx @@ -150,10 +150,6 @@ export const serviceDetail = { pageSize: toNumberRt, sortField: t.string, sortDirection: t.union([t.literal('asc'), t.literal('desc')]), - device: t.string, - osVersion: t.string, - appVersion: t.string, - netConnectionType: t.string, }), }), }, diff --git a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.tsx b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.tsx index 7a3ab4639d986..d1c1cfba9f737 100644 --- a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.tsx +++ b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.tsx @@ -25,7 +25,7 @@ import { ENVIRONMENT_NOT_DEFINED, } from '../../../../../common/environment_filter_values'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; -import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; function getEnvironmentDefinition(environment: string) { switch (environment) { @@ -43,7 +43,10 @@ export function AnalyzeDataButton() { const { query: { rangeFrom, rangeTo, environment }, - } = useApmParams('/services/{serviceName}'); + } = useAnyOfApmParams( + '/services/{serviceName}', + '/mobile-services/{serviceName}' + ); const basepath = services.http?.basePath.get(); const canShowDashboard = services.application?.capabilities.dashboard.show; diff --git a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.test.tsx b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.test.tsx index 37271e32c67e3..88c398c3e16e6 100644 --- a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.test.tsx +++ b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.test.tsx @@ -14,7 +14,6 @@ describe('APM service template', () => { { agentName: 'js-base' }, { agentName: 'rum-js' }, { agentName: 'opentelemetry/webjs' }, - { agentName: 'ios/swift' }, { runtimeName: 'aws_lambda' }, ].map((input) => { it(`when input ${JSON.stringify(input)}`, () => { @@ -48,7 +47,7 @@ describe('APM service template', () => { { agentName: 'js-base' }, { agentName: 'rum-js' }, { agentName: 'opentelemetry/webjs' }, - { agentName: 'ios/swift' }, + { runtimeName: 'aws_lambda' }, ].map((input) => { it(`when input ${JSON.stringify(input)}`, () => { diff --git a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx index a29360bc103e0..7303b18d5b2c3 100644 --- a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx +++ b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx @@ -8,13 +8,18 @@ import { EuiFlexGroup, EuiFlexItem, + EuiLoadingLogo, EuiPageHeaderProps, + EuiSpacer, EuiTitle, } from '@elastic/eui'; +import { useLocation } from 'react-router-dom'; + import { i18n } from '@kbn/i18n'; import { omit } from 'lodash'; import React from 'react'; import { enableAwsLambdaMetrics } from '@kbn/observability-plugin/common'; +import { useHistory } from 'react-router-dom'; import { isMobileAgentName, isRumAgentName, @@ -35,6 +40,8 @@ import { BetaBadge } from '../../../shared/beta_badge'; import { TechnicalPreviewBadge } from '../../../shared/technical_preview_badge'; import { ApmMainTemplate } from '../apm_main_template'; import { AnalyzeDataButton } from './analyze_data_button'; +import { replace } from '../../../shared/links/url_helpers'; +import { isPending } from '../../../../hooks/use_fetcher'; type Tab = NonNullable[0] & { key: @@ -77,6 +84,8 @@ function TemplateWithContext({ query, query: { rangeFrom, rangeTo }, } = useApmParams('/services/{serviceName}/*'); + const history = useHistory(); + const location = useLocation(); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); @@ -84,7 +93,9 @@ function TemplateWithContext({ const tabs = useTabs({ selectedTab }); - const { agentName } = useApmServiceContext(); + const { agentName, serviceAgentStatus } = useApmServiceContext(); + + const isPendingServiceAgent = !agentName && isPending(serviceAgentStatus); useBreadcrumb( () => ({ @@ -97,6 +108,12 @@ function TemplateWithContext({ [query, router, selectedTab, serviceName, title] ); + if (isMobileAgentName(agentName)) { + replace(history, { + pathname: location.pathname.replace('/services/', '/mobile-services/'), + }); + } + return ( - {isMobileAgentName(agentName) && ( - - - - )} @@ -134,10 +146,21 @@ function TemplateWithContext({ ), }} > - - - {children} - + {isPendingServiceAgent ? ( + + + + + + + ) : ( + <> + + + {children} + + + )} ); } @@ -154,9 +177,7 @@ export function isMetricsTabHidden({ if (isServerlessAgent(runtimeName)) { return !isAwsLambdaEnabled; } - return ( - !agentName || isRumAgentName(agentName) || isMobileAgentName(agentName) - ); + return !agentName || isRumAgentName(agentName); } export function isInfraTabHidden({ @@ -167,10 +188,7 @@ export function isInfraTabHidden({ runtimeName?: string; }) { return ( - !agentName || - isRumAgentName(agentName) || - isMobileAgentName(agentName) || - isServerlessAgent(runtimeName) + !agentName || isRumAgentName(agentName) || isServerlessAgent(runtimeName) ); } @@ -244,7 +262,6 @@ function useTabs({ selectedTab }: { selectedTab: Tab['key'] }) { label: i18n.translate('xpack.apm.serviceDetails.errorsTabLabel', { defaultMessage: 'Errors', }), - hidden: isMobileAgentName(agentName), }, { key: 'metrics', @@ -298,8 +315,7 @@ function useTabs({ selectedTab }: { selectedTab: Tab['key'] }) { append: isServerlessAgent(runtimeName) && ( ), - hidden: - !agentName || isRumAgentName(agentName) || isMobileAgentName(agentName), + hidden: !agentName || isRumAgentName(agentName), }, { key: 'alerts', diff --git a/x-pack/plugins/apm/public/components/routing/templates/mobile_service_template/index.tsx b/x-pack/plugins/apm/public/components/routing/templates/mobile_service_template/index.tsx new file mode 100644 index 0000000000000..7d31a7b49718e --- /dev/null +++ b/x-pack/plugins/apm/public/components/routing/templates/mobile_service_template/index.tsx @@ -0,0 +1,209 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + EuiFlexGroup, + EuiFlexItem, + EuiPageHeaderProps, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { omit } from 'lodash'; +import React from 'react'; +import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; +import { ApmServiceContextProvider } from '../../../../context/apm_service/apm_service_context'; +// import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; +import { useBreadcrumb } from '../../../../context/breadcrumbs/use_breadcrumb'; +import { ServiceAnomalyTimeseriesContextProvider } from '../../../../context/service_anomaly_timeseries/service_anomaly_timeseries_context'; +import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useApmRouter } from '../../../../hooks/use_apm_router'; +import { useTimeRange } from '../../../../hooks/use_time_range'; +import { getAlertingCapabilities } from '../../../alerting/utils/get_alerting_capabilities'; +import { SearchBar } from '../../../shared/search_bar'; +import { ServiceIcons } from '../../../shared/service_icons'; +import { TechnicalPreviewBadge } from '../../../shared/technical_preview_badge'; +import { ApmMainTemplate } from '../apm_main_template'; +import { AnalyzeDataButton } from '../apm_service_template/analyze_data_button'; + +type Tab = NonNullable[0] & { + key: 'overview' | 'transactions' | 'service-map' | 'alerts'; + hidden?: boolean; +}; + +interface Props { + title: string; + children: React.ReactChild; + selectedTab: Tab['key']; + searchBarOptions?: React.ComponentProps; +} + +export function MobileServiceTemplate(props: Props) { + return ( + + + + ); +} + +function TemplateWithContext({ + title, + children, + selectedTab, + searchBarOptions, +}: Props) { + const { + path: { serviceName }, + query, + query: { rangeFrom, rangeTo }, + } = useApmParams('/mobile-services/{serviceName}/*'); + + const { start, end } = useTimeRange({ rangeFrom, rangeTo }); + + const router = useApmRouter(); + + const tabs = useTabs({ selectedTab }); + + useBreadcrumb( + () => ({ + title, + href: router.link( + `/mobile-services/{serviceName}/${selectedTab}` as const, + { + path: { serviceName }, + query, + } + ), + }), + [query, router, selectedTab, serviceName, title] + ); + + return ( + + + + + +

+ {serviceName} +

+
+
+ + + + + + +
+
+ + + + + + ), + }} + > + + + {children} + +
+ ); +} + +function useTabs({ selectedTab }: { selectedTab: Tab['key'] }) { + const { core, plugins } = useApmPluginContext(); + const { capabilities } = core.application; + const { isAlertingAvailable, canReadAlerts } = getAlertingCapabilities( + plugins, + capabilities + ); + + const router = useApmRouter(); + + const { + path: { serviceName }, + query: queryFromUrl, + } = useApmParams(`/mobile-services/{serviceName}/${selectedTab}` as const); + + const query = omit( + queryFromUrl, + 'page', + 'pageSize', + 'sortField', + 'sortDirection' + ); + + const tabs: Tab[] = [ + { + key: 'overview', + href: router.link('/mobile-services/{serviceName}/overview', { + path: { serviceName }, + query, + }), + label: i18n.translate('xpack.apm.mobileServiceDetails.overviewTabLabel', { + defaultMessage: 'Overview', + }), + }, + { + key: 'transactions', + href: router.link('/mobile-services/{serviceName}/transactions', { + path: { serviceName }, + query, + }), + label: i18n.translate( + 'xpack.apm.mobileServiceDetails.transactionsTabLabel', + { + defaultMessage: 'Transactions', + } + ), + }, + { + key: 'service-map', + href: router.link('/mobile-services/{serviceName}/service-map', { + path: { serviceName }, + query, + }), + label: i18n.translate( + 'xpack.apm.mobileServiceDetails.serviceMapTabLabel', + { + defaultMessage: 'Service Map', + } + ), + }, + { + key: 'alerts', + href: router.link('/mobile-services/{serviceName}/alerts', { + path: { serviceName }, + query, + }), + append: , + label: i18n.translate('xpack.apm.mobileServiceDetails.alertsTabLabel', { + defaultMessage: 'Alerts', + }), + hidden: !(isAlertingAvailable && canReadAlerts), + }, + ]; + + return tabs + .filter((t) => !t.hidden) + .map(({ href, key, label, append }) => ({ + href, + label, + append, + isSelected: key === selectedTab, + })); +} diff --git a/x-pack/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx index 30353516b6222..17bb9210356b6 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx @@ -38,7 +38,7 @@ import { useTheme } from '../../../../hooks/use_theme'; import { unit } from '../../../../utils/style'; import { ChartContainer } from '../chart_container'; import { isTimeseriesEmpty, onBrushEnd } from '../helper/helper'; -import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { useTimeRange } from '../../../../hooks/use_time_range'; import { getMaxY, @@ -74,7 +74,10 @@ export function BreakdownChart({ const { chartRef, updatePointerEvent } = useChartPointerEventContext(); const { query: { rangeFrom, rangeTo }, - } = useApmParams('/services/{serviceName}'); + } = useAnyOfApmParams( + '/services/{serviceName}', + '/mobile-services/{serviceName}' + ); const theme = useTheme(); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); diff --git a/x-pack/plugins/apm/public/components/shared/charts/failed_transaction_rate_chart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/failed_transaction_rate_chart/index.tsx index 508d3d0f0ed68..4a80c75638616 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/failed_transaction_rate_chart/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/failed_transaction_rate_chart/index.tsx @@ -18,7 +18,7 @@ import { useLegacyUrlParams } from '../../../../context/url_params_context/use_u import { TimeseriesChartWithContext } from '../timeseries_chart_with_context'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; import { getComparisonChartTheme } from '../../time_comparison/get_comparison_chart_theme'; -import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { useTimeRange } from '../../../../hooks/use_time_range'; import { useEnvironmentsContext } from '../../../../context/environments_context/use_environments_context'; import { ApmMlDetectorType } from '../../../../../common/anomaly_detection/apm_ml_detectors'; @@ -64,7 +64,10 @@ export function FailedTransactionRateChart({ const { query: { rangeFrom, rangeTo, comparisonEnabled, offset }, - } = useApmParams('/services/{serviceName}'); + } = useAnyOfApmParams( + '/services/{serviceName}', + '/mobile-services/{serviceName}' + ); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); diff --git a/x-pack/plugins/apm/public/components/shared/charts/latency_chart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/latency_chart/index.tsx index 7dba41b6dfc10..65285ea4fbe69 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/latency_chart/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/latency_chart/index.tsx @@ -53,7 +53,10 @@ export function LatencyChart({ height, kuery }: Props) { } = useAnyOfApmParams( '/services/{serviceName}/overview', '/services/{serviceName}/transactions', - '/services/{serviceName}/transactions/view' + '/services/{serviceName}/transactions/view', + '/mobile-services/{serviceName}/overview', + '/mobile-services/{serviceName}/transactions', + '/mobile-services/{serviceName}/transactions/view' ); const { environment } = useEnvironmentsContext(); diff --git a/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/use_transaction_breakdown.ts b/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/use_transaction_breakdown.ts index bbade4435be64..742bef523a143 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/use_transaction_breakdown.ts +++ b/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/use_transaction_breakdown.ts @@ -8,7 +8,7 @@ import { useFetcher } from '../../../../hooks/use_fetcher'; import { useLegacyUrlParams } from '../../../../context/url_params_context/use_url_params'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; -import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { useTimeRange } from '../../../../hooks/use_time_range'; export function useTransactionBreakdown({ @@ -24,7 +24,10 @@ export function useTransactionBreakdown({ const { query: { rangeFrom, rangeTo }, - } = useApmParams('/services/{serviceName}'); + } = useAnyOfApmParams( + '/services/{serviceName}', + '/mobile-services/{serviceName}' + ); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); diff --git a/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/ml_header.tsx b/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/ml_header.tsx index 98ff3a16ec519..90fa118e2acb3 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/ml_header.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/ml_header.tsx @@ -11,7 +11,7 @@ import { isEmpty } from 'lodash'; import React from 'react'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; -import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { MLSingleMetricLink } from '../../links/machine_learning_links/mlsingle_metric_link'; interface Props { @@ -36,7 +36,10 @@ export function MLHeader({ hasValidMlLicense, mlJobId }: Props) { const { query: { kuery }, - } = useApmParams('/services/{serviceName}'); + } = useAnyOfApmParams( + '/services/{serviceName}', + '/mobile-services/{serviceName}' + ); if (!hasValidMlLicense || !mlJobId) { return null; diff --git a/x-pack/plugins/apm/public/components/shared/is_route_with_time_range.ts b/x-pack/plugins/apm/public/components/shared/is_route_with_time_range.ts index 64a17493e3305..20edf6e15c360 100644 --- a/x-pack/plugins/apm/public/components/shared/is_route_with_time_range.ts +++ b/x-pack/plugins/apm/public/components/shared/is_route_with_time_range.ts @@ -23,6 +23,7 @@ export function isRouteWithTimeRange({ route.path === '/dependencies' || route.path === '/dependencies/inventory' || route.path === '/services/{serviceName}' || + route.path === '/mobile-services/{serviceName}' || route.path === '/service-groups' || route.path === '/storage-explorer' || location.pathname === '/' || @@ -48,6 +49,7 @@ export function isRouteWithComparison({ route.path === '/dependencies' || route.path === '/dependencies/inventory' || route.path === '/services/{serviceName}' || + route.path === '/mobile-services/{serviceName}' || route.path === '/service-groups' || location.pathname === '/' || location.pathname === '' diff --git a/x-pack/plugins/apm/public/components/shared/service_link.stories.tsx b/x-pack/plugins/apm/public/components/shared/service_link.stories.tsx index 25985becfa620..77db4fa9e5d1e 100644 --- a/x-pack/plugins/apm/public/components/shared/service_link.stories.tsx +++ b/x-pack/plugins/apm/public/components/shared/service_link.stories.tsx @@ -41,3 +41,35 @@ Example.args = { }, serviceName: 'opbeans-java', }; + +export const AndroidAgent: Story = (args) => { + return ; +}; +AndroidAgent.args = { + agentName: 'android/java', + query: { + environment: 'ENVIRONMENT_ALL', + kuery: '', + rangeFrom: 'now-15m', + rangeTo: 'now', + serviceGroup: '', + comparisonEnabled: false, + }, + serviceName: 'opbeans-android', +}; + +export const IOSAgent: Story = (args) => { + return ; +}; +IOSAgent.args = { + agentName: 'iOS/swift', + query: { + environment: 'ENVIRONMENT_ALL', + kuery: '', + rangeFrom: 'now-15m', + rangeTo: 'now', + serviceGroup: '', + comparisonEnabled: false, + }, + serviceName: 'opbeans-swift', +}; diff --git a/x-pack/plugins/apm/public/components/shared/service_link.test.tsx b/x-pack/plugins/apm/public/components/shared/service_link.test.tsx index 63311b306e6bb..afa3c1cc31d58 100644 --- a/x-pack/plugins/apm/public/components/shared/service_link.test.tsx +++ b/x-pack/plugins/apm/public/components/shared/service_link.test.tsx @@ -6,14 +6,38 @@ */ import { composeStories } from '@storybook/testing-react'; -import { render } from '@testing-library/react'; +import { render, screen } from '@testing-library/react'; import React from 'react'; import * as stories from './service_link.stories'; -const { Example } = composeStories(stories); +const { Example, AndroidAgent, IOSAgent } = composeStories(stories); +const params = + 'comparisonEnabled=false&environment=ENVIRONMENT_ALL&kuery=&latencyAggregationType=avg&rangeFrom=now-15m&rangeTo=now&serviceGroup='; describe('ServiceLink', () => { - it('renders', () => { + it('links to service details', async () => { expect(() => render()).not.toThrowError(); + + expect(await screen.findByTestId('serviceLink_java')).toHaveAttribute( + 'href', + `/basepath/app/apm/services/opbeans-java/overview?${params}` + ); + }); + + it('links to mobile service details', async () => { + expect(() => render()).not.toThrowError(); + expect(() => render()).not.toThrowError(); + + expect( + await screen.findByTestId('serviceLink_android/java') + ).toHaveAttribute( + 'href', + `/basepath/app/apm/mobile-services/opbeans-android/overview?${params}` + ); + + expect(await screen.findByTestId('serviceLink_iOS/swift')).toHaveAttribute( + 'href', + `/basepath/app/apm/mobile-services/opbeans-swift/overview?${params}` + ); }); }); diff --git a/x-pack/plugins/apm/public/components/shared/service_link.tsx b/x-pack/plugins/apm/public/components/shared/service_link.tsx index 00a360f3fdebb..d01b75e4f49ad 100644 --- a/x-pack/plugins/apm/public/components/shared/service_link.tsx +++ b/x-pack/plugins/apm/public/components/shared/service_link.tsx @@ -14,6 +14,7 @@ import { useApmRouter } from '../../hooks/use_apm_router'; import { AgentIcon } from './agent_icon'; import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; import { ApmRoutes } from '../routing/apm_route_config'; +import { isMobileAgentName } from '../../../common/agent_name'; const StyledLink = euiStyled(EuiLink)`${truncate('100%')};`; @@ -30,10 +31,14 @@ export function ServiceLink({ }: ServiceLinkProps) { const { link } = useApmRouter(); + const serviceLink = isMobileAgentName(agentName) + ? '/mobile-services/{serviceName}/overview' + : '/services/{serviceName}/overview'; + return ( ( diff --git a/x-pack/plugins/apm/public/components/shared/span_links/span_links_table.tsx b/x-pack/plugins/apm/public/components/shared/span_links/span_links_table.tsx index f14cfd3e086d7..36c5372cc591b 100644 --- a/x-pack/plugins/apm/public/components/shared/span_links/span_links_table.tsx +++ b/x-pack/plugins/apm/public/components/shared/span_links/span_links_table.tsx @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; import { SpanLinkDetails } from '../../../../common/span_links'; import { asDuration } from '../../../../common/utils/formatters'; -import { useApmParams } from '../../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { useApmRouter } from '../../../hooks/use_apm_router'; import { ServiceLink } from '../service_link'; import { getSpanIcon } from '../span_icon/get_span_icon'; @@ -34,7 +34,10 @@ export function SpanLinksTable({ items }: Props) { const router = useApmRouter(); const { query: { rangeFrom, rangeTo, comparisonEnabled }, - } = useApmParams('/services/{serviceName}/transactions/view'); + } = useAnyOfApmParams( + '/services/{serviceName}/transactions/view', + '/mobile-services/{serviceName}/transactions/view' + ); const [idActionMenuOpen, setIdActionMenuOpen] = useState< string | undefined >(); diff --git a/x-pack/plugins/apm/public/components/shared/transactions_table/index.tsx b/x-pack/plugins/apm/public/components/shared/transactions_table/index.tsx index 5b3ec70bf7af4..4b4ce0f784243 100644 --- a/x-pack/plugins/apm/public/components/shared/transactions_table/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/transactions_table/index.tsx @@ -104,7 +104,9 @@ export function TransactionsTable({ }, } = useAnyOfApmParams( '/services/{serviceName}/transactions', - '/services/{serviceName}/overview' + '/services/{serviceName}/overview', + '/mobile-services/{serviceName}/transactions', + '/mobile-services/{serviceName}/overview' ); const [tableOptions, setTableOptions] = useState<{ diff --git a/x-pack/plugins/apm/public/context/apm_service/apm_service_context.tsx b/x-pack/plugins/apm/public/context/apm_service/apm_service_context.tsx index ce74feab48102..d9c47603e9edc 100644 --- a/x-pack/plugins/apm/public/context/apm_service/apm_service_context.tsx +++ b/x-pack/plugins/apm/public/context/apm_service/apm_service_context.tsx @@ -15,7 +15,7 @@ import { } from '../../../common/transaction_types'; import { useServiceTransactionTypesFetcher } from './use_service_transaction_types_fetcher'; import { useServiceAgentFetcher } from './use_service_agent_fetcher'; -import { useApmParams } from '../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../hooks/use_apm_params'; import { useTimeRange } from '../../hooks/use_time_range'; import { useFallbackToTransactionsFetcher } from '../../hooks/use_fallback_to_transactions_fetcher'; import { replace } from '../../components/shared/links/url_helpers'; @@ -49,7 +49,10 @@ export function ApmServiceContextProvider({ path: { serviceName }, query, query: { kuery, rangeFrom, rangeTo }, - } = useApmParams('/services/{serviceName}'); + } = useAnyOfApmParams( + '/services/{serviceName}', + '/mobile-services/{serviceName}' + ); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); diff --git a/x-pack/plugins/apm/public/context/service_anomaly_timeseries/service_anomaly_timeseries_context.tsx b/x-pack/plugins/apm/public/context/service_anomaly_timeseries/service_anomaly_timeseries_context.tsx index 478b06104bd63..15b63df7d9efb 100644 --- a/x-pack/plugins/apm/public/context/service_anomaly_timeseries/service_anomaly_timeseries_context.tsx +++ b/x-pack/plugins/apm/public/context/service_anomaly_timeseries/service_anomaly_timeseries_context.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { useEnvironmentsContext } from '../environments_context/use_environments_context'; import { ServiceAnomalyTimeseries } from '../../../common/anomaly_detection/service_anomaly_timeseries'; -import { useApmParams } from '../../hooks/use_apm_params'; +import { useAnyOfApmParams } from '../../hooks/use_apm_params'; import { FETCH_STATUS, useFetcher } from '../../hooks/use_fetcher'; import { useTimeRange } from '../../hooks/use_time_range'; import { useApmPluginContext } from '../apm_plugin/use_apm_plugin_context'; @@ -44,7 +44,10 @@ export function ServiceAnomalyTimeseriesContextProvider({ const { query: { rangeFrom, rangeTo }, - } = useApmParams('/services/{serviceName}'); + } = useAnyOfApmParams( + '/services/{serviceName}', + '/mobile-services/{serviceName}' + ); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); const { preferredEnvironment } = useEnvironmentsContext(); diff --git a/x-pack/plugins/apm/public/hooks/use_transaction_latency_chart_fetcher.ts b/x-pack/plugins/apm/public/hooks/use_transaction_latency_chart_fetcher.ts index 2c27536ef37a0..32b0c06e99198 100644 --- a/x-pack/plugins/apm/public/hooks/use_transaction_latency_chart_fetcher.ts +++ b/x-pack/plugins/apm/public/hooks/use_transaction_latency_chart_fetcher.ts @@ -13,7 +13,7 @@ import { useLegacyUrlParams } from '../context/url_params_context/use_url_params import { useApmServiceContext } from '../context/apm_service/use_apm_service_context'; import { getLatencyChartSelector } from '../selectors/latency_chart_selectors'; import { useTimeRange } from './use_time_range'; -import { useApmParams } from './use_apm_params'; +import { useAnyOfApmParams } from './use_apm_params'; export function useTransactionLatencyChartsFetcher({ kuery, @@ -29,7 +29,10 @@ export function useTransactionLatencyChartsFetcher({ const { query: { rangeFrom, rangeTo, offset, comparisonEnabled }, - } = useApmParams('/services/{serviceName}'); + } = useAnyOfApmParams( + '/services/{serviceName}', + '/mobile-services/{serviceName}' + ); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); diff --git a/x-pack/plugins/apm/public/hooks/use_transaction_trace_samples_fetcher.ts b/x-pack/plugins/apm/public/hooks/use_transaction_trace_samples_fetcher.ts index 510118b6a191c..a871c5af40850 100644 --- a/x-pack/plugins/apm/public/hooks/use_transaction_trace_samples_fetcher.ts +++ b/x-pack/plugins/apm/public/hooks/use_transaction_trace_samples_fetcher.ts @@ -9,7 +9,7 @@ import { useMemo } from 'react'; import { useFetcher } from './use_fetcher'; import { useLegacyUrlParams } from '../context/url_params_context/use_url_params'; import { useApmServiceContext } from '../context/apm_service/use_apm_service_context'; -import { useApmParams } from './use_apm_params'; +import { useAnyOfApmParams } from './use_apm_params'; import { useTimeRange } from './use_time_range'; export type TraceSamplesFetchResult = ReturnType< @@ -29,7 +29,10 @@ export function useTransactionTraceSamplesFetcher({ const { query: { rangeFrom, rangeTo }, - } = useApmParams('/services/{serviceName}'); + } = useAnyOfApmParams( + '/services/{serviceName}', + '/mobile-services/{serviceName}' + ); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); diff --git a/x-pack/plugins/apm/server/lib/anomaly_detection/get_ml_jobs_with_apm_group.ts b/x-pack/plugins/apm/server/lib/anomaly_detection/get_ml_jobs_with_apm_group.ts index 6fe7d36363280..3bc6d351ad241 100644 --- a/x-pack/plugins/apm/server/lib/anomaly_detection/get_ml_jobs_with_apm_group.ts +++ b/x-pack/plugins/apm/server/lib/anomaly_detection/get_ml_jobs_with_apm_group.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { MlPluginSetup } from '@kbn/ml-plugin/server'; +import { DATAFEED_STATE, JOB_STATE } from '@kbn/ml-plugin/common'; +import { MlAnomalyDetectors } from '@kbn/ml-plugin/server'; import { ApmMlJob } from '../../../common/anomaly_detection/apm_ml_job'; import { Environment } from '../../../common/environment_rt'; import { withApmSpan } from '../../utils/with_apm_span'; @@ -23,11 +24,11 @@ function catch404(e: any) { } export function getMlJobsWithAPMGroup( - anomalyDetectors: ReturnType + anomalyDetectors: MlAnomalyDetectors ): Promise { return withApmSpan('get_ml_jobs_with_apm_group', async () => { try { - const [jobs, allJobStats, allDatafeedStats] = await Promise.all([ + const [jobs, jobStats, datafeedStats] = await Promise.all([ anomalyDetectors .jobs(APM_ML_JOB_GROUP) .then((response) => response.jobs), @@ -41,26 +42,27 @@ export function getMlJobsWithAPMGroup( .catch(catch404), ]); - return jobs.map((job): ApmMlJob => { - const jobStats = allJobStats.find( - (stats) => stats.job_id === job.job_id - ); + const datafeedStateMap = Object.fromEntries( + datafeedStats.map((d) => [d.datafeed_id, d.state as DATAFEED_STATE]) + ); - const datafeedStats = allDatafeedStats.find( - (stats) => stats.datafeed_id === job.datafeed_config?.datafeed_id - ); + const jobStateMap = Object.fromEntries( + jobStats.map((j) => [j.job_id, j.state as JOB_STATE]) + ); + return jobs.map((job): ApmMlJob => { + const jobId = job.job_id; + const datafeedId = job.datafeed_config?.datafeed_id; return { + jobId, + jobState: jobStateMap[jobId], + datafeedId, + datafeedState: datafeedId ? datafeedStateMap[datafeedId] : undefined, + version: Number(job?.custom_settings?.job_tags?.apm_ml_version ?? 1), environment: String( - job.custom_settings?.job_tags?.environment + job?.custom_settings?.job_tags?.environment ) as Environment, - jobId: job.job_id, - jobState: jobStats?.state as ApmMlJob['jobState'], - version: Number(job.custom_settings?.job_tags?.apm_ml_version ?? 1), - datafeedId: datafeedStats?.datafeed_id, - datafeedState: datafeedStats?.state as ApmMlJob['datafeedState'], - // @ts-expect-error bucket_span is of type `estypes.Duration` - bucketSpan: job.analysis_config?.bucket_span, + bucketSpan: job?.analysis_config.bucket_span as string, }; }); } catch (e) { diff --git a/x-pack/plugins/apm/server/lib/helpers/get_ml_client.ts b/x-pack/plugins/apm/server/lib/helpers/get_ml_client.ts index 372df50be6d4d..37f17833ed9da 100644 --- a/x-pack/plugins/apm/server/lib/helpers/get_ml_client.ts +++ b/x-pack/plugins/apm/server/lib/helpers/get_ml_client.ts @@ -5,13 +5,18 @@ * 2.0. */ +import { + MlAnomalyDetectors, + MlMlSystem, + MlModules, +} from '@kbn/ml-plugin/server'; import { isActivePlatinumLicense } from '../../../common/license_check'; import { APMRouteHandlerResources } from '../../routes/typings'; export interface MlClient { - mlSystem: any; - anomalyDetectors: any; - modules: any; + mlSystem: MlMlSystem; + anomalyDetectors: MlAnomalyDetectors; + modules: MlModules; } export async function getMlClient({ diff --git a/x-pack/plugins/apm/server/routes/service_map/get_service_anomalies.ts b/x-pack/plugins/apm/server/routes/service_map/get_service_anomalies.ts index f03ada8b0e81b..6a887b21fde74 100644 --- a/x-pack/plugins/apm/server/routes/service_map/get_service_anomalies.ts +++ b/x-pack/plugins/apm/server/routes/service_map/get_service_anomalies.ts @@ -9,7 +9,7 @@ import Boom from '@hapi/boom'; import { sortBy, uniqBy } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { ESSearchResponse } from '@kbn/es-types'; -import { MlPluginSetup } from '@kbn/ml-plugin/server'; +import type { MlAnomalyDetectors } from '@kbn/ml-plugin/server'; import { rangeQuery } from '@kbn/observability-plugin/server'; import { getSeverity, ML_ERRORS } from '../../../common/anomaly_detection'; import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values'; @@ -154,7 +154,7 @@ export async function getServiceAnomalies({ } export async function getMLJobs( - anomalyDetectors: ReturnType, + anomalyDetectors: MlAnomalyDetectors, environment?: string ) { const jobs = await getMlJobsWithAPMGroup(anomalyDetectors); @@ -173,7 +173,7 @@ export async function getMLJobs( } export async function getMLJobIds( - anomalyDetectors: ReturnType, + anomalyDetectors: MlAnomalyDetectors, environment?: string ) { const mlJobs = await getMLJobs(anomalyDetectors, environment); diff --git a/x-pack/plugins/cases/server/services/user_actions/audit_logger.ts b/x-pack/plugins/cases/server/services/user_actions/audit_logger.ts index adbe29901b9fd..63158e8a3d39e 100644 --- a/x-pack/plugins/cases/server/services/user_actions/audit_logger.ts +++ b/x-pack/plugins/cases/server/services/user_actions/audit_logger.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { EcsEventType } from '@kbn/logging'; +import type { EcsEventType } from '@kbn/ecs'; import type { AuditLogger } from '@kbn/security-plugin/server'; import type { UserAction as Action } from '../../../common/api'; import type { EventDetails } from './types'; diff --git a/x-pack/plugins/cloud_security_posture/common/schemas/csp_finding.ts b/x-pack/plugins/cloud_security_posture/common/schemas/csp_finding.ts index 4ef4a2c0ebb0f..af99c609832d6 100644 --- a/x-pack/plugins/cloud_security_posture/common/schemas/csp_finding.ts +++ b/x-pack/plugins/cloud_security_posture/common/schemas/csp_finding.ts @@ -6,7 +6,7 @@ */ // TODO: this needs to be defined in a versioned schema -import type { EcsEvent } from '@kbn/logging'; +import type { EcsEvent } from '@kbn/ecs'; import type { CspRuleMetadata } from './csp_rule_metadata'; export interface CspFinding { diff --git a/x-pack/plugins/cloud_security_posture/public/pages/findings/latest_findings/latest_findings_table.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/findings/latest_findings/latest_findings_table.test.tsx index 362a9ed19484a..56b7c624287e9 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/findings/latest_findings/latest_findings_table.test.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/findings/latest_findings/latest_findings_table.test.tsx @@ -11,7 +11,7 @@ import * as TEST_SUBJECTS from '../test_subjects'; import { FindingsTable } from './latest_findings_table'; import type { PropsOf } from '@elastic/eui'; import Chance from 'chance'; -import type { EcsEvent } from '@kbn/logging'; +import type { EcsEvent } from '@kbn/ecs'; import { TestProvider } from '../../../test/test_provider'; import { CspFinding } from '../../../../common/schemas/csp_finding'; diff --git a/x-pack/plugins/enterprise_search/common/constants.ts b/x-pack/plugins/enterprise_search/common/constants.ts index b0801ee654d6f..7ce736360524e 100644 --- a/x-pack/plugins/enterprise_search/common/constants.ts +++ b/x-pack/plugins/enterprise_search/common/constants.ts @@ -44,7 +44,7 @@ export const ENTERPRISE_SEARCH_CONTENT_PLUGIN = { export const ANALYTICS_PLUGIN = { ID: 'enterpriseSearchAnalytics', NAME: i18n.translate('xpack.enterpriseSearch.analytics.productName', { - defaultMessage: 'Analytics', + defaultMessage: 'Behavorial Analytics', }), DESCRIPTION: i18n.translate('xpack.enterpriseSearch.analytics.productDescription', { defaultMessage: diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_javascript_client_embed.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_javascript_client_embed.tsx index 4aa2b6865cd6b..3d9988fef12ea 100644 --- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_javascript_client_embed.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_javascript_client_embed.tsx @@ -97,7 +97,7 @@ trackEvent,

{`createTracker({ -dsn: "${analyticsDNSUrl}", + dsn: "${analyticsDNSUrl}", });`} @@ -136,16 +136,15 @@ dsn: "${analyticsDNSUrl}", {`// track a page view in React const SearchPage = (props) => { -useEffect(() => { -trackPageView(); -}, []); + useEffect(() => { + trackPageView(); + }, []); -return ( -
-

Search Page

- < -
-); + return ( +
+

Search Page

+
+ ); };`} @@ -164,20 +163,21 @@ import { trackEvent } from '@elastic/behavioural-analytics-javascript-tracker'; const ProductDetailPage = (props) => { -return ( -
-

Product detail page

- { - trackEvent("click", { - category: "product", - action: "add_to_cart", - label: "product_id", - value: "123" - }) - }} /> - }}>Add to Basket -
-) + return ( +
+

Product detail page

+ { + trackEvent("click", { + category: "product", + action: "add_to_cart", + label: "product_id", + value: "123" + }) + }} /> + }}>Add to Basket +
+ ) + } }`} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/__mocks__/ml_inference_logic.mock.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/__mocks__/ml_inference_logic.mock.ts new file mode 100644 index 0000000000000..65e3685ec9b42 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/__mocks__/ml_inference_logic.mock.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const mockMlInferenceValues: any = { + addInferencePipelineModal: { + configuration: { + destinationField: '', + modelID: '', + pipelineName: '', + sourceField: '', + }, + indexName: '', + step: 0, + }, + mlInferncePipeline: undefined, +}; +jest.mock('../ml_inference_logic', () => ({ + MLInferenceLogic: () => mockMlInferenceValues, +})); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_inference_pipeline_flyout.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_inference_pipeline_flyout.test.tsx index fc82c7f3b78b0..9d5205df63534 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_inference_pipeline_flyout.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_inference_pipeline_flyout.test.tsx @@ -27,10 +27,11 @@ import { AddInferencePipelineFooter, } from './add_inference_pipeline_flyout'; import { ConfigurePipeline } from './configure_pipeline'; -import { AddInferencePipelineSteps, EMPTY_PIPELINE_CONFIGURATION } from './ml_inference_logic'; +import { EMPTY_PIPELINE_CONFIGURATION } from './ml_inference_logic'; import { NoModelsPanel } from './no_models'; import { ReviewPipeline } from './review_pipeline'; import { TestPipeline } from './test_pipeline'; +import { AddInferencePipelineSteps } from './types'; const supportedMLModels: TrainedModelConfigResponse[] = [ { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_inference_pipeline_flyout.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_inference_pipeline_flyout.tsx index b3fae4d20e72d..fa397b1b7033a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_inference_pipeline_flyout.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_inference_pipeline_flyout.tsx @@ -38,10 +38,11 @@ import { IndexNameLogic } from '../../index_name_logic'; import { IndexViewLogic } from '../../index_view_logic'; import { ConfigurePipeline } from './configure_pipeline'; -import { AddInferencePipelineSteps, MLInferenceLogic } from './ml_inference_logic'; +import { MLInferenceLogic } from './ml_inference_logic'; import { NoModelsPanel } from './no_models'; import { ReviewPipeline } from './review_pipeline'; import { TestPipeline } from './test_pipeline'; +import { AddInferencePipelineSteps } from './types'; import './add_inference_pipeline_flyout.scss'; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/ml_inference_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/ml_inference_logic.test.ts index a5c7ff4b67e14..171fe0e3a53fc 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/ml_inference_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/ml_inference_logic.test.ts @@ -9,9 +9,8 @@ import { LogicMounter } from '../../../../../__mocks__/kea_logic'; import { nerModel } from '../../../../__mocks__/ml_models.mock'; import { HttpResponse } from '@kbn/core/public'; -import { TrainedModelConfigResponse } from '@kbn/ml-plugin/common/types/trained_models'; -import { ErrorResponse, HttpError, Status } from '../../../../../../../common/types/api'; +import { ErrorResponse } from '../../../../../../../common/types/api'; import { TrainedModelState } from '../../../../../../../common/types/pipelines'; import { GetDocumentsApiLogic } from '../../../../api/documents/get_document_logic'; @@ -27,9 +26,9 @@ import { SimulateMlInterfacePipelineApiLogic } from '../../../../api/pipelines/s import { MLInferenceLogic, EMPTY_PIPELINE_CONFIGURATION, - AddInferencePipelineSteps, MLInferenceProcessorsValues, } from './ml_inference_logic'; +import { AddInferencePipelineSteps } from './types'; const DEFAULT_VALUES: MLInferenceProcessorsValues = { addInferencePipelineModal: { @@ -37,9 +36,6 @@ const DEFAULT_VALUES: MLInferenceProcessorsValues = { ...EMPTY_PIPELINE_CONFIGURATION, }, indexName: '', - simulateBody: `[ - -]`, step: AddInferencePipelineSteps.Configuration, }, createErrors: [], @@ -49,12 +45,7 @@ const DEFAULT_VALUES: MLInferenceProcessorsValues = { pipelineName: 'Field is required.', sourceField: 'Field is required.', }, - getDocumentApiErrorMessage: undefined, - getDocumentApiStatus: Status.IDLE, - getDocumentData: undefined, - getDocumentsErr: '', index: null, - isGetDocumentsLoading: false, isLoading: true, isPipelineDataValid: false, mappingData: undefined, @@ -64,13 +55,6 @@ const DEFAULT_VALUES: MLInferenceProcessorsValues = { mlInferencePipelinesData: undefined, mlModelsData: null, mlModelsStatus: 0, - showGetDocumentErrors: false, - simulateExistingPipelineData: undefined, - simulateExistingPipelineStatus: 0, - simulatePipelineData: undefined, - simulatePipelineErrors: [], - simulatePipelineResult: undefined, - simulatePipelineStatus: 0, sourceFields: undefined, supportedMLModels: [], }; @@ -118,24 +102,6 @@ describe('MlInferenceLogic', () => { }); describe('actions', () => { - describe('setSimulatePipelineErrors', () => { - it('sets simulatePipelineErrors to passed payload', () => { - expect(MLInferenceLogic.values).toEqual(DEFAULT_VALUES); - - MLInferenceLogic.actions.setSimulatePipelineErrors([ - 'I would be an error coming from Backend', - 'I would be another one', - ]); - - expect(MLInferenceLogic.values).toEqual({ - ...DEFAULT_VALUES, - simulatePipelineErrors: [ - 'I would be an error coming from Backend', - 'I would be another one', - ], - }); - }); - }); describe('attachApiError', () => { it('updates create errors', () => { MLInferenceLogic.actions.attachApiError({ @@ -200,118 +166,9 @@ describe('MlInferenceLogic', () => { expect(MLInferenceLogic.values.createErrors).toHaveLength(0); }); }); - describe('getDocumentApiSuccess', () => { - it('sets simulateBody text to the returned document', () => { - GetDocumentsApiLogic.actions.apiSuccess({ - _id: 'test-index-123', - _index: 'test-index', - found: true, - }); - expect(MLInferenceLogic.values.addInferencePipelineModal.simulateBody).toEqual( - JSON.stringify( - [ - { - _id: 'test-index-123', - _index: 'test-index', - found: true, - }, - ], - undefined, - 2 - ) - ); - }); - }); }); describe('selectors', () => { - describe('simulatePipelineResult', () => { - it('returns undefined if simulatePipelineStatus is not success', () => { - SimulateMlInterfacePipelineApiLogic.actions.apiError({} as HttpError); - expect(MLInferenceLogic.values).toEqual({ - ...DEFAULT_VALUES, - simulatePipelineErrors: ['An unexpected error occurred'], - simulatePipelineResult: undefined, - simulatePipelineStatus: Status.ERROR, - }); - }); - it('returns simulation result when API is successful', () => { - const simulateResponse = { - docs: [ - { - doc: { - _id: 'id', - _index: 'index', - _ingest: { timestamp: '2022-10-06T10:28:54.3326245Z' }, - _source: { - _ingest: { - inference_errors: [ - { - message: - "Processor 'inference' in pipeline 'test' failed with message 'Input field [text_field] does not exist in the source document'", - pipeline: 'guy', - timestamp: '2022-10-06T10:28:54.332624500Z', - }, - ], - processors: [ - { - model_version: '8.6.0', - pipeline: 'guy', - processed_timestamp: '2022-10-06T10:28:54.332624500Z', - types: ['pytorch', 'ner'], - }, - ], - }, - _version: '-3', - foo: 'bar', - }, - }, - }, - ], - }; - SimulateMlInterfacePipelineApiLogic.actions.apiSuccess(simulateResponse); - - expect(MLInferenceLogic.values.simulatePipelineResult).toEqual(simulateResponse); - }); - it('returns existing simulation result when API is successful', () => { - const simulateResponse = { - docs: [ - { - doc: { - _id: 'id', - _index: 'index', - _ingest: { timestamp: '2022-10-06T10:28:54.3326245Z' }, - _source: { - _ingest: { - inference_errors: [ - { - message: - "Processor 'inference' in pipeline 'test' failed with message 'Input field [text_field] does not exist in the source document'", - pipeline: 'guy', - timestamp: '2022-10-06T10:28:54.332624500Z', - }, - ], - processors: [ - { - model_version: '8.6.0', - pipeline: 'guy', - processed_timestamp: '2022-10-06T10:28:54.332624500Z', - types: ['pytorch', 'ner'], - }, - ], - }, - _version: '-3', - foo: 'bar', - }, - }, - }, - ], - }; - SimulateExistingMlInterfacePipelineApiLogic.actions.apiSuccess(simulateResponse); - - expect(MLInferenceLogic.values.simulatePipelineResult).toEqual(simulateResponse); - }); - }); describe('existingInferencePipelines', () => { beforeEach(() => { MappingsApiLogic.actions.apiSuccess({ @@ -507,46 +364,6 @@ describe('MlInferenceLogic', () => { expect(MLInferenceLogic.values.mlInferencePipeline).toEqual(existingPipeline); }); }); - describe('getDocumentsErr', () => { - it('returns empty string when no error is present', () => { - GetDocumentsApiLogic.actions.apiSuccess({ - _id: 'test-123', - _index: 'test', - found: true, - }); - expect(MLInferenceLogic.values.getDocumentsErr).toEqual(''); - }); - it('returns extracted error message from the http response', () => { - GetDocumentsApiLogic.actions.apiError({ - body: { - error: 'document-not-found', - message: 'not-found', - statusCode: 404, - }, - } as HttpError); - expect(MLInferenceLogic.values.getDocumentsErr).toEqual('not-found'); - }); - }); - describe('showGetDocumentErrors', () => { - it('returns false when no error is present', () => { - GetDocumentsApiLogic.actions.apiSuccess({ - _id: 'test-123', - _index: 'test', - found: true, - }); - expect(MLInferenceLogic.values.showGetDocumentErrors).toEqual(false); - }); - it('returns true when an error message is present', () => { - GetDocumentsApiLogic.actions.apiError({ - body: { - error: 'document-not-found', - message: 'not-found', - statusCode: 404, - }, - } as HttpError); - expect(MLInferenceLogic.values.showGetDocumentErrors).toEqual(true); - }); - }); }); describe('listeners', () => { @@ -603,114 +420,5 @@ describe('MlInferenceLogic', () => { }); }); }); - describe('simulatePipeline', () => { - const mockModelConfiguration = { - ...DEFAULT_VALUES.addInferencePipelineModal, - configuration: { - destinationField: '', - modelID: nerModel.model_id, - pipelineName: 'mock-pipeline-name', - sourceField: 'mock_text_field', - }, - indexName: 'my-index-123', - }; - const mlModelsData: TrainedModelConfigResponse[] = [nerModel]; - it('does nothing if mlInferencePipeline is undefined', () => { - mount({ - ...DEFAULT_VALUES, - }); - - jest.spyOn(MLInferenceLogic.actions, 'setSimulatePipelineErrors'); - jest.spyOn(MLInferenceLogic.actions, 'simulateExistingPipelineApiReset'); - jest.spyOn(MLInferenceLogic.actions, 'simulatePipelineApiReset'); - jest.spyOn(MLInferenceLogic.actions, 'makeSimulateExistingPipelineRequest'); - jest.spyOn(MLInferenceLogic.actions, 'makeSimulatePipelineRequest'); - - MLInferenceLogic.actions.simulatePipeline(); - - expect(MLInferenceLogic.actions.setSimulatePipelineErrors).toHaveBeenCalledTimes(0); - expect(MLInferenceLogic.actions.simulateExistingPipelineApiReset).toHaveBeenCalledTimes(0); - expect(MLInferenceLogic.actions.simulatePipelineApiReset).toHaveBeenCalledTimes(0); - expect(MLInferenceLogic.actions.makeSimulateExistingPipelineRequest).toHaveBeenCalledTimes( - 0 - ); - expect(MLInferenceLogic.actions.makeSimulatePipelineRequest).toHaveBeenCalledTimes(0); - }); - it('clears simulate errors', () => { - mount({ - ...DEFAULT_VALUES, - addInferencePipelineModal: { - ...mockModelConfiguration, - }, - }); - MLModelsApiLogic.actions.apiSuccess(mlModelsData); - jest.spyOn(MLInferenceLogic.actions, 'setSimulatePipelineErrors'); - MLInferenceLogic.actions.simulatePipeline(); - expect(MLInferenceLogic.actions.setSimulatePipelineErrors).toHaveBeenCalledWith([]); - }); - it('resets API logics', () => { - mount({ - ...DEFAULT_VALUES, - addInferencePipelineModal: { - ...mockModelConfiguration, - }, - }); - MLModelsApiLogic.actions.apiSuccess(mlModelsData); - - jest.spyOn(MLInferenceLogic.actions, 'simulateExistingPipelineApiReset'); - jest.spyOn(MLInferenceLogic.actions, 'simulatePipelineApiReset'); - - MLInferenceLogic.actions.simulatePipeline(); - - expect(MLInferenceLogic.actions.simulateExistingPipelineApiReset).toHaveBeenCalledTimes(1); - expect(MLInferenceLogic.actions.simulatePipelineApiReset).toHaveBeenCalledTimes(1); - }); - it('calls simulate with new pipeline', () => { - mount({ - ...DEFAULT_VALUES, - addInferencePipelineModal: { - ...mockModelConfiguration, - }, - }); - MLModelsApiLogic.actions.apiSuccess(mlModelsData); - - jest.spyOn(MLInferenceLogic.actions, 'makeSimulateExistingPipelineRequest'); - jest.spyOn(MLInferenceLogic.actions, 'makeSimulatePipelineRequest'); - - MLInferenceLogic.actions.simulatePipeline(); - - expect(MLInferenceLogic.actions.makeSimulatePipelineRequest).toHaveBeenCalledTimes(1); - expect(MLInferenceLogic.actions.makeSimulateExistingPipelineRequest).toHaveBeenCalledTimes( - 0 - ); - }); - it('calls simulate existing with existing pipeline', () => { - mount({ - ...DEFAULT_VALUES, - addInferencePipelineModal: { - ...mockModelConfiguration, - configuration: { - ...mockModelConfiguration.configuration, - existingPipeline: true, - pipelineName: 'my-test-pipeline', - }, - }, - }); - MLModelsApiLogic.actions.apiSuccess(mlModelsData); - FetchMlInferencePipelinesApiLogic.actions.apiSuccess({ - 'my-test-pipeline': {}, - }); - - jest.spyOn(MLInferenceLogic.actions, 'makeSimulateExistingPipelineRequest'); - jest.spyOn(MLInferenceLogic.actions, 'makeSimulatePipelineRequest'); - - MLInferenceLogic.actions.simulatePipeline(); - - expect(MLInferenceLogic.actions.makeSimulateExistingPipelineRequest).toHaveBeenCalledTimes( - 1 - ); - expect(MLInferenceLogic.actions.makeSimulatePipelineRequest).toHaveBeenCalledTimes(0); - }); - }); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/ml_inference_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/ml_inference_logic.ts index c897ee8007738..9a6737d90da4b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/ml_inference_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/ml_inference_logic.ts @@ -8,7 +8,6 @@ import { kea, MakeLogicType } from 'kea'; import { IndicesGetMappingIndexMappingRecord } from '@elastic/elasticsearch/lib/api/types'; -import { IngestSimulateResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { formatPipelineName, @@ -16,17 +15,12 @@ import { getMlModelTypesForModelConfig, parseMlInferenceParametersFromPipeline, } from '../../../../../../../common/ml_inference_pipeline'; -import { Status, HttpError } from '../../../../../../../common/types/api'; +import { Status } from '../../../../../../../common/types/api'; import { MlInferencePipeline } from '../../../../../../../common/types/pipelines'; import { Actions } from '../../../../../shared/api_logic/create_api_logic'; import { getErrorsFromHttpResponse } from '../../../../../shared/flash_messages/handle_api_errors'; -import { - GetDocumentsApiLogic, - GetDocumentsArgs, - GetDocumentsResponse, -} from '../../../../api/documents/get_document_logic'; import { CachedFetchIndexApiLogic, CachedFetchIndexApiLogicValues, @@ -60,16 +54,6 @@ import { FetchMlInferencePipelinesArgs, FetchMlInferencePipelinesResponse, } from '../../../../api/pipelines/fetch_ml_inference_pipelines'; -import { - SimulateExistingMlInterfacePipelineApiLogic, - SimulateExistingMlInterfacePipelineArgs, - SimulateExistingMlInterfacePipelineResponse, -} from '../../../../api/pipelines/simulate_existing_ml_inference_pipeline'; -import { - SimulateMlInterfacePipelineApiLogic, - SimulateMlInterfacePipelineArgs, - SimulateMlInterfacePipelineResponse, -} from '../../../../api/pipelines/simulate_ml_inference_pipeline_processors'; import { isConnectorIndex } from '../../../../utils/indices'; import { @@ -78,7 +62,11 @@ import { sortSourceFields, } from '../../../shared/ml_inference/utils'; -import { AddInferencePipelineFormErrors, InferencePipelineConfiguration } from './types'; +import { + AddInferencePipelineFormErrors, + AddInferencePipelineSteps, + InferencePipelineConfiguration, +} from './types'; import { validateInferencePipelineConfiguration, @@ -93,12 +81,6 @@ export const EMPTY_PIPELINE_CONFIGURATION: InferencePipelineConfiguration = { sourceField: '', }; -export enum AddInferencePipelineSteps { - Configuration, - Test, - Review, -} - const API_REQUEST_COMPLETE_STATUSES = [Status.SUCCESS, Status.ERROR]; const DEFAULT_CONNECTOR_FIELDS = ['body', 'title', 'id', 'type', 'url']; @@ -131,8 +113,6 @@ interface MLInferenceProcessorsActions { CreateMlInferencePipelineResponse >['apiSuccess']; createPipeline: () => void; - getDocumentApiError: Actions['apiError']; - getDocumentApiSuccess: Actions['apiSuccess']; makeAttachPipelineRequest: Actions< AttachMlInferencePipelineApiLogicArgs, AttachMlInferencePipelineResponse @@ -141,21 +121,12 @@ interface MLInferenceProcessorsActions { CreateMlInferencePipelineApiLogicArgs, CreateMlInferencePipelineResponse >['makeRequest']; - makeGetDocumentRequest: Actions['makeRequest']; makeMLModelsRequest: TrainedModelsApiLogicActions['makeRequest']; makeMappingRequest: Actions['makeRequest']; makeMlInferencePipelinesRequest: Actions< FetchMlInferencePipelinesArgs, FetchMlInferencePipelinesResponse >['makeRequest']; - makeSimulateExistingPipelineRequest: Actions< - SimulateExistingMlInterfacePipelineArgs, - SimulateExistingMlInterfacePipelineResponse - >['makeRequest']; - makeSimulatePipelineRequest: Actions< - SimulateMlInterfacePipelineArgs, - SimulateMlInterfacePipelineResponse - >['makeRequest']; mappingsApiError: Actions['apiError']; mlModelsApiError: TrainedModelsApiLogicActions['apiError']; selectExistingPipeline: (pipelineName: string) => { @@ -168,41 +139,11 @@ interface MLInferenceProcessorsActions { setInferencePipelineConfiguration: (configuration: InferencePipelineConfiguration) => { configuration: InferencePipelineConfiguration; }; - setPipelineSimulateBody: (simulateBody: string) => { - simulateBody: string; - }; - setSimulatePipelineErrors(errors: string[]): { errors: string[] }; - simulateExistingPipelineApiError: Actions< - SimulateExistingMlInterfacePipelineArgs, - SimulateExistingMlInterfacePipelineResponse - >['apiError']; - simulateExistingPipelineApiReset: Actions< - SimulateExistingMlInterfacePipelineArgs, - SimulateExistingMlInterfacePipelineResponse - >['apiReset']; - simulateExistingPipelineApiSuccess: Actions< - SimulateExistingMlInterfacePipelineArgs, - SimulateExistingMlInterfacePipelineResponse - >['apiSuccess']; - simulatePipeline: () => void; - simulatePipelineApiError: Actions< - SimulateMlInterfacePipelineArgs, - SimulateMlInterfacePipelineResponse - >['apiError']; - simulatePipelineApiReset: Actions< - SimulateMlInterfacePipelineArgs, - SimulateMlInterfacePipelineResponse - >['apiReset']; - simulatePipelineApiSuccess: Actions< - SimulateMlInterfacePipelineArgs, - SimulateMlInterfacePipelineResponse - >['apiSuccess']; } export interface AddInferencePipelineModal { configuration: InferencePipelineConfiguration; indexName: string; - simulateBody: string; step: AddInferencePipelineSteps; } @@ -211,12 +152,7 @@ export interface MLInferenceProcessorsValues { createErrors: string[]; existingInferencePipelines: MLInferencePipelineOption[]; formErrors: AddInferencePipelineFormErrors; - getDocumentApiErrorMessage: HttpError | undefined; - getDocumentApiStatus: Status; - getDocumentData: typeof GetDocumentsApiLogic.values.data; - getDocumentsErr: string; index: CachedFetchIndexApiLogicValues['indexData']; - isGetDocumentsLoading: boolean; isLoading: boolean; isPipelineDataValid: boolean; mappingData: typeof MappingsApiLogic.values.data; @@ -226,13 +162,6 @@ export interface MLInferenceProcessorsValues { mlInferencePipelinesData: FetchMlInferencePipelinesResponse | undefined; mlModelsData: TrainedModel[] | null; mlModelsStatus: Status; - showGetDocumentErrors: boolean; - simulateExistingPipelineData: typeof SimulateExistingMlInterfacePipelineApiLogic.values.data; - simulateExistingPipelineStatus: Status; - simulatePipelineData: typeof SimulateMlInterfacePipelineApiLogic.values.data; - simulatePipelineErrors: string[]; - simulatePipelineResult: IngestSimulateResponse | undefined; - simulatePipelineStatus: Status; sourceFields: string[] | undefined; supportedMLModels: TrainedModel[]; } @@ -251,11 +180,6 @@ export const MLInferenceLogic = kea< setInferencePipelineConfiguration: (configuration: InferencePipelineConfiguration) => ({ configuration, }), - setPipelineSimulateBody: (simulateBody: string) => ({ - simulateBody, - }), - setSimulatePipelineErrors: (errors: string[]) => ({ errors }), - simulatePipeline: true, }, connect: { actions: [ @@ -265,20 +189,6 @@ export const MLInferenceLogic = kea< ['makeRequest as makeMappingRequest', 'apiError as mappingsApiError'], TrainedModelsApiLogic, ['makeRequest as makeMLModelsRequest', 'apiError as mlModelsApiError'], - SimulateExistingMlInterfacePipelineApiLogic, - [ - 'makeRequest as makeSimulateExistingPipelineRequest', - 'apiSuccess as simulateExistingPipelineApiSuccess', - 'apiError as simulateExistingPipelineApiError', - 'apiReset as simulateExistingPipelineApiReset', - ], - SimulateMlInterfacePipelineApiLogic, - [ - 'makeRequest as makeSimulatePipelineRequest', - 'apiSuccess as simulatePipelineApiSuccess', - 'apiError as simulatePipelineApiError', - 'apiReset as simulatePipelineApiReset', - ], CreateMlInferencePipelineApiLogic, [ 'apiError as createApiError', @@ -291,12 +201,6 @@ export const MLInferenceLogic = kea< 'apiSuccess as attachApiSuccess', 'makeRequest as makeAttachPipelineRequest', ], - GetDocumentsApiLogic, - [ - 'apiError as getDocumentApiError', - 'apiSuccess as getDocumentApiSuccess', - 'makeRequest as makeGetDocumentRequest', - ], ], values: [ CachedFetchIndexApiLogic, @@ -307,18 +211,8 @@ export const MLInferenceLogic = kea< ['data as mappingData', 'status as mappingStatus'], TrainedModelsApiLogic, ['data as mlModelsData', 'status as mlModelsStatus'], - SimulateExistingMlInterfacePipelineApiLogic, - ['data as simulateExistingPipelineData', 'status as simulateExistingPipelineStatus'], - SimulateMlInterfacePipelineApiLogic, - ['data as simulatePipelineData', 'status as simulatePipelineStatus'], FetchMlInferencePipelineProcessorsApiLogic, ['data as mlInferencePipelineProcessors'], - GetDocumentsApiLogic, - [ - 'data as getDocumentData', - 'status as getDocumentApiStatus', - 'error as getDocumentApiErrorMessage', - ], ], }, events: {}, @@ -370,27 +264,6 @@ export const MLInferenceLogic = kea< actions.makeMLModelsRequest(undefined); actions.makeMappingRequest({ indexName }); }, - simulatePipeline: () => { - if (values.mlInferencePipeline) { - actions.setSimulatePipelineErrors([]); - actions.simulateExistingPipelineApiReset(); - actions.simulatePipelineApiReset(); - const { configuration } = values.addInferencePipelineModal; - if (configuration.existingPipeline) { - actions.makeSimulateExistingPipelineRequest({ - docs: values.addInferencePipelineModal.simulateBody, - indexName: values.addInferencePipelineModal.indexName, - pipelineName: configuration.pipelineName, - }); - } else { - actions.makeSimulatePipelineRequest({ - docs: values.addInferencePipelineModal.simulateBody, - indexName: values.addInferencePipelineModal.indexName, - pipeline: values.mlInferencePipeline, - }); - } - } - }, }), path: ['enterprise_search', 'content', 'pipelines_add_ml_inference_pipeline'], reducers: { @@ -400,26 +273,15 @@ export const MLInferenceLogic = kea< ...EMPTY_PIPELINE_CONFIGURATION, }, indexName: '', - simulateBody: `[ - -]`, step: AddInferencePipelineSteps.Configuration, }, { - getDocumentApiSuccess: (modal, doc) => ({ - ...modal, - simulateBody: JSON.stringify([doc], undefined, 2), - }), setAddInferencePipelineStep: (modal, { step }) => ({ ...modal, step }), setIndexName: (modal, { indexName }) => ({ ...modal, indexName }), setInferencePipelineConfiguration: (modal, { configuration }) => ({ ...modal, configuration, }), - setPipelineSimulateBody: (modal, { simulateBody }) => ({ - ...modal, - simulateBody, - }), }, ], createErrors: [ @@ -431,14 +293,6 @@ export const MLInferenceLogic = kea< makeCreatePipelineRequest: () => [], }, ], - simulatePipelineErrors: [ - [], - { - setSimulatePipelineErrors: (_, { errors }) => errors, - simulateExistingPipelineApiError: (_, error) => getErrorsFromHttpResponse(error), - simulatePipelineApiError: (_, error) => getErrorsFromHttpResponse(error), - }, - ], }, selectors: ({ selectors }) => ({ formErrors: [ @@ -446,19 +300,6 @@ export const MLInferenceLogic = kea< (modal: AddInferencePipelineModal) => validateInferencePipelineConfiguration(modal.configuration), ], - getDocumentsErr: [ - () => [selectors.getDocumentApiErrorMessage], - (err: MLInferenceProcessorsValues['getDocumentApiErrorMessage']) => { - if (!err) return ''; - return getErrorsFromHttpResponse(err)[0]; - }, - ], - isGetDocumentsLoading: [ - () => [selectors.getDocumentApiStatus], - (status) => { - return status === Status.LOADING; - }, - ], isLoading: [ () => [selectors.mlModelsStatus, selectors.mappingStatus], (mlModelsStatus, mappingStatus) => @@ -469,12 +310,6 @@ export const MLInferenceLogic = kea< () => [selectors.formErrors], (errors: AddInferencePipelineFormErrors) => Object.keys(errors).length === 0, ], - showGetDocumentErrors: [ - () => [selectors.getDocumentApiStatus], - (status: MLInferenceProcessorsValues['getDocumentApiStatus']) => { - return status === Status.ERROR; - }, - ], mlInferencePipeline: [ () => [ selectors.isPipelineDataValid, @@ -511,24 +346,6 @@ export const MLInferenceLogic = kea< }); }, ], - simulatePipelineResult: [ - () => [ - selectors.simulatePipelineStatus, - selectors.simulatePipelineData, - selectors.simulateExistingPipelineStatus, - selectors.simulateExistingPipelineData, - ], - ( - status: Status, - simulateResult: IngestSimulateResponse | undefined, - exStatus: Status, - exSimulateResult: IngestSimulateResponse | undefined - ) => { - if (exStatus === Status.SUCCESS) return exSimulateResult; - if (status === Status.SUCCESS) return simulateResult; - return undefined; - }, - ], sourceFields: [ () => [selectors.mappingStatus, selectors.mappingData, selectors.index], ( diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline.tsx index 60e23af596c09..b2a50fbe5cf65 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline.tsx @@ -27,7 +27,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { CodeEditor } from '@kbn/kibana-react-plugin/public'; -import { MLInferenceLogic } from './ml_inference_logic'; +import { TestPipelineLogic } from './test_pipeline_logic'; import './add_inference_pipeline_flyout.scss'; @@ -36,16 +36,16 @@ export const TestPipeline: React.FC = () => { addInferencePipelineModal: { configuration: { sourceField }, indexName, - simulateBody, }, getDocumentsErr, isGetDocumentsLoading, showGetDocumentErrors, + simulateBody, simulatePipelineResult, simulatePipelineErrors, - } = useValues(MLInferenceLogic); + } = useValues(TestPipelineLogic); const { simulatePipeline, setPipelineSimulateBody, makeGetDocumentRequest } = - useActions(MLInferenceLogic); + useActions(TestPipelineLogic); const isSmallerViewport = useIsWithinMaxBreakpoint('s'); const inputRef = useRef(); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline_logic.test.ts new file mode 100644 index 0000000000000..fcec6868e1b49 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline_logic.test.ts @@ -0,0 +1,341 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { LogicMounter } from '../../../../../__mocks__/kea_logic'; +import { nerModel } from '../../../../__mocks__/ml_models.mock'; +import { mockMlInferenceValues } from './__mocks__/ml_inference_logic.mock'; + +import { HttpError, Status } from '../../../../../../../common/types/api'; +import { MlInferencePipeline } from '../../../../../../../common/types/pipelines'; +import { GetDocumentsApiLogic } from '../../../../api/documents/get_document_logic'; +import { SimulateExistingMlInterfacePipelineApiLogic } from '../../../../api/pipelines/simulate_existing_ml_inference_pipeline'; +import { SimulateMlInterfacePipelineApiLogic } from '../../../../api/pipelines/simulate_ml_inference_pipeline_processors'; + +import { TestPipelineLogic, TestPipelineValues } from './test_pipeline_logic'; +import { AddInferencePipelineSteps } from './types'; + +const DEFAULT_VALUES: TestPipelineValues = { + addInferencePipelineModal: { + configuration: { + destinationField: '', + modelID: '', + pipelineName: '', + sourceField: '', + }, + indexName: '', + step: AddInferencePipelineSteps.Configuration, + }, + getDocumentApiErrorMessage: undefined, + getDocumentApiStatus: 0, + getDocumentData: undefined, + getDocumentsErr: '', + isGetDocumentsLoading: false, + mlInferencePipeline: undefined, + showGetDocumentErrors: false, + simulateBody: `[ + +]`, + simulateExistingPipelineData: undefined, + simulateExistingPipelineStatus: 0, + simulatePipelineData: undefined, + simulatePipelineErrors: [], + simulatePipelineResult: undefined, + simulatePipelineStatus: 0, +}; + +const mockInferencePipeline: MlInferencePipeline = { + processors: [], + version: 1, +}; + +describe('TestPipelineLogic', () => { + const { mount } = new LogicMounter(TestPipelineLogic); + const { mount: mountSimulateExistingMlInterfacePipelineApiLogic } = new LogicMounter( + SimulateExistingMlInterfacePipelineApiLogic + ); + const { mount: mountSimulateMlInterfacePipelineApiLogic } = new LogicMounter( + SimulateMlInterfacePipelineApiLogic + ); + const { mount: mountGetDocumentsApiLogic } = new LogicMounter(GetDocumentsApiLogic); + + beforeEach(() => { + jest.clearAllMocks(); + mockMlInferenceValues.addInferencePipelineModal = { + configuration: { + destinationField: '', + modelID: '', + pipelineName: '', + sourceField: '', + }, + indexName: '', + step: AddInferencePipelineSteps.Configuration, + }; + mockMlInferenceValues.mlInferencePipeline = undefined; + + mountSimulateExistingMlInterfacePipelineApiLogic(); + mountSimulateMlInterfacePipelineApiLogic(); + mountGetDocumentsApiLogic(); + mount(); + }); + + describe('actions', () => { + describe('setSimulatePipelineErrors', () => { + it('sets simulatePipelineErrors to passed payload', () => { + expect(TestPipelineLogic.values.simulatePipelineErrors).toEqual( + DEFAULT_VALUES.simulatePipelineErrors + ); + + TestPipelineLogic.actions.setSimulatePipelineErrors([ + 'I would be an error coming from Backend', + 'I would be another one', + ]); + + expect(TestPipelineLogic.values.simulatePipelineErrors).toEqual([ + 'I would be an error coming from Backend', + 'I would be another one', + ]); + }); + }); + describe('getDocumentApiSuccess', () => { + it('sets simulateBody text to the returned document', () => { + const document = { + _id: 'test-index-123', + _index: 'test-index', + _source: { + foo: 'bar', + }, + found: true, + }; + GetDocumentsApiLogic.actions.apiSuccess(document); + expect(TestPipelineLogic.values.simulateBody).toEqual( + JSON.stringify([document], undefined, 2) + ); + }); + }); + }); + describe('listeners', () => { + describe('simulatePipeline', () => { + const mockModelConfiguration = { + configuration: { + destinationField: '', + modelID: nerModel.model_id, + pipelineName: 'mock-pipeline-name', + sourceField: 'mock_text_field', + }, + indexName: 'my-index-123', + }; + + it('does nothing if mlInferencePipeline is undefined', () => { + jest.spyOn(TestPipelineLogic.actions, 'setSimulatePipelineErrors'); + jest.spyOn(TestPipelineLogic.actions, 'simulateExistingPipelineApiReset'); + jest.spyOn(TestPipelineLogic.actions, 'simulatePipelineApiReset'); + jest.spyOn(TestPipelineLogic.actions, 'makeSimulateExistingPipelineRequest'); + jest.spyOn(TestPipelineLogic.actions, 'makeSimulatePipelineRequest'); + + TestPipelineLogic.actions.simulatePipeline(); + + expect(TestPipelineLogic.actions.setSimulatePipelineErrors).toHaveBeenCalledTimes(0); + expect(TestPipelineLogic.actions.simulateExistingPipelineApiReset).toHaveBeenCalledTimes(0); + expect(TestPipelineLogic.actions.simulatePipelineApiReset).toHaveBeenCalledTimes(0); + expect(TestPipelineLogic.actions.makeSimulateExistingPipelineRequest).toHaveBeenCalledTimes( + 0 + ); + expect(TestPipelineLogic.actions.makeSimulatePipelineRequest).toHaveBeenCalledTimes(0); + }); + it('clears simulate errors', () => { + mockMlInferenceValues.addInferencePipelineModal = { + ...mockModelConfiguration, + }; + mockMlInferenceValues.mlInferencePipeline = mockInferencePipeline; + + jest.spyOn(TestPipelineLogic.actions, 'setSimulatePipelineErrors'); + TestPipelineLogic.actions.simulatePipeline(); + expect(TestPipelineLogic.actions.setSimulatePipelineErrors).toHaveBeenCalledWith([]); + }); + it('resets API logics', () => { + mockMlInferenceValues.addInferencePipelineModal = { + ...mockModelConfiguration, + }; + mockMlInferenceValues.mlInferencePipeline = mockInferencePipeline; + + jest.spyOn(TestPipelineLogic.actions, 'simulateExistingPipelineApiReset'); + jest.spyOn(TestPipelineLogic.actions, 'simulatePipelineApiReset'); + + TestPipelineLogic.actions.simulatePipeline(); + + expect(TestPipelineLogic.actions.simulateExistingPipelineApiReset).toHaveBeenCalledTimes(1); + expect(TestPipelineLogic.actions.simulatePipelineApiReset).toHaveBeenCalledTimes(1); + }); + it('calls simulate with new pipeline', () => { + mockMlInferenceValues.addInferencePipelineModal = { + ...mockModelConfiguration, + }; + mockMlInferenceValues.mlInferencePipeline = mockInferencePipeline; + + jest.spyOn(TestPipelineLogic.actions, 'makeSimulateExistingPipelineRequest'); + jest.spyOn(TestPipelineLogic.actions, 'makeSimulatePipelineRequest'); + + TestPipelineLogic.actions.simulatePipeline(); + + expect(TestPipelineLogic.actions.makeSimulatePipelineRequest).toHaveBeenCalledTimes(1); + expect(TestPipelineLogic.actions.makeSimulateExistingPipelineRequest).toHaveBeenCalledTimes( + 0 + ); + }); + it('calls simulate existing with existing pipeline', () => { + mockMlInferenceValues.addInferencePipelineModal = { + ...mockModelConfiguration, + configuration: { + ...mockModelConfiguration.configuration, + existingPipeline: true, + pipelineName: 'my-test-pipeline', + }, + }; + mockMlInferenceValues.mlInferencePipeline = mockInferencePipeline; + + jest.spyOn(TestPipelineLogic.actions, 'makeSimulateExistingPipelineRequest'); + jest.spyOn(TestPipelineLogic.actions, 'makeSimulatePipelineRequest'); + + TestPipelineLogic.actions.simulatePipeline(); + + expect(TestPipelineLogic.actions.makeSimulateExistingPipelineRequest).toHaveBeenCalledTimes( + 1 + ); + expect(TestPipelineLogic.actions.makeSimulatePipelineRequest).toHaveBeenCalledTimes(0); + }); + }); + }); + describe('selectors', () => { + describe('simulatePipelineResult', () => { + it('returns undefined if simulatePipelineStatus is not success', () => { + SimulateMlInterfacePipelineApiLogic.actions.apiError({} as HttpError); + expect(TestPipelineLogic.values).toEqual({ + ...DEFAULT_VALUES, + simulatePipelineErrors: ['An unexpected error occurred'], + simulatePipelineResult: undefined, + simulatePipelineStatus: Status.ERROR, + }); + }); + it('returns simulation result when API is successful', () => { + const simulateResponse = { + docs: [ + { + doc: { + _id: 'id', + _index: 'index', + _ingest: { timestamp: '2022-10-06T10:28:54.3326245Z' }, + _source: { + _ingest: { + inference_errors: [ + { + message: + "Processor 'inference' in pipeline 'test' failed with message 'Input field [text_field] does not exist in the source document'", + pipeline: 'guy', + timestamp: '2022-10-06T10:28:54.332624500Z', + }, + ], + processors: [ + { + model_version: '8.6.0', + pipeline: 'guy', + processed_timestamp: '2022-10-06T10:28:54.332624500Z', + types: ['pytorch', 'ner'], + }, + ], + }, + _version: '-3', + foo: 'bar', + }, + }, + }, + ], + }; + SimulateMlInterfacePipelineApiLogic.actions.apiSuccess(simulateResponse); + + expect(TestPipelineLogic.values.simulatePipelineResult).toEqual(simulateResponse); + }); + it('returns existing simulation result when API is successful', () => { + const simulateResponse = { + docs: [ + { + doc: { + _id: 'id', + _index: 'index', + _ingest: { timestamp: '2022-10-06T10:28:54.3326245Z' }, + _source: { + _ingest: { + inference_errors: [ + { + message: + "Processor 'inference' in pipeline 'test' failed with message 'Input field [text_field] does not exist in the source document'", + pipeline: 'guy', + timestamp: '2022-10-06T10:28:54.332624500Z', + }, + ], + processors: [ + { + model_version: '8.6.0', + pipeline: 'guy', + processed_timestamp: '2022-10-06T10:28:54.332624500Z', + types: ['pytorch', 'ner'], + }, + ], + }, + _version: '-3', + foo: 'bar', + }, + }, + }, + ], + }; + SimulateExistingMlInterfacePipelineApiLogic.actions.apiSuccess(simulateResponse); + + expect(TestPipelineLogic.values.simulatePipelineResult).toEqual(simulateResponse); + }); + }); + describe('getDocumentsErr', () => { + it('returns empty string when no error is present', () => { + GetDocumentsApiLogic.actions.apiSuccess({ + _id: 'test-123', + _index: 'test', + found: true, + }); + expect(TestPipelineLogic.values.getDocumentsErr).toEqual(''); + }); + it('returns extracted error message from the http response', () => { + GetDocumentsApiLogic.actions.apiError({ + body: { + error: 'document-not-found', + message: 'not-found', + statusCode: 404, + }, + } as HttpError); + expect(TestPipelineLogic.values.getDocumentsErr).toEqual('not-found'); + }); + }); + describe('showGetDocumentErrors', () => { + it('returns false when no error is present', () => { + GetDocumentsApiLogic.actions.apiSuccess({ + _id: 'test-123', + _index: 'test', + found: true, + }); + expect(TestPipelineLogic.values.showGetDocumentErrors).toEqual(false); + }); + it('returns true when an error message is present', () => { + GetDocumentsApiLogic.actions.apiError({ + body: { + error: 'document-not-found', + message: 'not-found', + statusCode: 404, + }, + } as HttpError); + expect(TestPipelineLogic.values.showGetDocumentErrors).toEqual(true); + }); + }); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline_logic.ts new file mode 100644 index 0000000000000..eb477ad574756 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline_logic.ts @@ -0,0 +1,226 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { kea, MakeLogicType } from 'kea'; + +import { IngestSimulateResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; + +import { Status, HttpError } from '../../../../../../../common/types/api'; +import { MlInferencePipeline } from '../../../../../../../common/types/pipelines'; + +import { Actions } from '../../../../../shared/api_logic/create_api_logic'; +import { getErrorsFromHttpResponse } from '../../../../../shared/flash_messages/handle_api_errors'; +import { + GetDocumentsApiLogic, + GetDocumentsArgs, + GetDocumentsResponse, +} from '../../../../api/documents/get_document_logic'; +import { + SimulateExistingMlInterfacePipelineApiLogic, + SimulateExistingMlInterfacePipelineArgs, + SimulateExistingMlInterfacePipelineResponse, +} from '../../../../api/pipelines/simulate_existing_ml_inference_pipeline'; +import { + SimulateMlInterfacePipelineApiLogic, + SimulateMlInterfacePipelineArgs, + SimulateMlInterfacePipelineResponse, +} from '../../../../api/pipelines/simulate_ml_inference_pipeline_processors'; + +import { AddInferencePipelineModal, MLInferenceLogic } from './ml_inference_logic'; + +export interface TestPipelineActions { + getDocumentApiError: Actions['apiError']; + getDocumentApiSuccess: Actions['apiSuccess']; + makeGetDocumentRequest: Actions['makeRequest']; + makeSimulateExistingPipelineRequest: Actions< + SimulateExistingMlInterfacePipelineArgs, + SimulateExistingMlInterfacePipelineResponse + >['makeRequest']; + makeSimulatePipelineRequest: Actions< + SimulateMlInterfacePipelineArgs, + SimulateMlInterfacePipelineResponse + >['makeRequest']; + setPipelineSimulateBody: (simulateBody: string) => { + simulateBody: string; + }; + setSimulatePipelineErrors(errors: string[]): { errors: string[] }; + simulateExistingPipelineApiError: Actions< + SimulateExistingMlInterfacePipelineArgs, + SimulateExistingMlInterfacePipelineResponse + >['apiError']; + simulateExistingPipelineApiReset: Actions< + SimulateExistingMlInterfacePipelineArgs, + SimulateExistingMlInterfacePipelineResponse + >['apiReset']; + simulateExistingPipelineApiSuccess: Actions< + SimulateExistingMlInterfacePipelineArgs, + SimulateExistingMlInterfacePipelineResponse + >['apiSuccess']; + simulatePipeline: () => void; + simulatePipelineApiError: Actions< + SimulateMlInterfacePipelineArgs, + SimulateMlInterfacePipelineResponse + >['apiError']; + simulatePipelineApiReset: Actions< + SimulateMlInterfacePipelineArgs, + SimulateMlInterfacePipelineResponse + >['apiReset']; + simulatePipelineApiSuccess: Actions< + SimulateMlInterfacePipelineArgs, + SimulateMlInterfacePipelineResponse + >['apiSuccess']; +} + +export interface TestPipelineValues { + addInferencePipelineModal: AddInferencePipelineModal; + getDocumentApiErrorMessage: HttpError | undefined; + getDocumentApiStatus: Status; + getDocumentData: typeof GetDocumentsApiLogic.values.data; + getDocumentsErr: string; + isGetDocumentsLoading: boolean; + mlInferencePipeline: MlInferencePipeline | undefined; + showGetDocumentErrors: boolean; + simulateBody: string; + simulateExistingPipelineData: typeof SimulateExistingMlInterfacePipelineApiLogic.values.data; + simulateExistingPipelineStatus: Status; + simulatePipelineData: typeof SimulateMlInterfacePipelineApiLogic.values.data; + simulatePipelineErrors: string[]; + simulatePipelineResult: IngestSimulateResponse | undefined; + simulatePipelineStatus: Status; +} + +export const TestPipelineLogic = kea>({ + actions: { + setPipelineSimulateBody: (simulateBody: string) => ({ + simulateBody, + }), + setSimulatePipelineErrors: (errors: string[]) => ({ errors }), + simulatePipeline: true, + }, + connect: { + actions: [ + GetDocumentsApiLogic, + [ + 'apiError as getDocumentApiError', + 'apiSuccess as getDocumentApiSuccess', + 'makeRequest as makeGetDocumentRequest', + ], + SimulateExistingMlInterfacePipelineApiLogic, + [ + 'makeRequest as makeSimulateExistingPipelineRequest', + 'apiSuccess as simulateExistingPipelineApiSuccess', + 'apiError as simulateExistingPipelineApiError', + 'apiReset as simulateExistingPipelineApiReset', + ], + SimulateMlInterfacePipelineApiLogic, + [ + 'makeRequest as makeSimulatePipelineRequest', + 'apiSuccess as simulatePipelineApiSuccess', + 'apiError as simulatePipelineApiError', + 'apiReset as simulatePipelineApiReset', + ], + ], + values: [ + GetDocumentsApiLogic, + [ + 'data as getDocumentData', + 'status as getDocumentApiStatus', + 'error as getDocumentApiErrorMessage', + ], + SimulateExistingMlInterfacePipelineApiLogic, + ['data as simulateExistingPipelineData', 'status as simulateExistingPipelineStatus'], + SimulateMlInterfacePipelineApiLogic, + ['data as simulatePipelineData', 'status as simulatePipelineStatus'], + MLInferenceLogic, + ['addInferencePipelineModal', 'mlInferencePipeline'], + ], + }, + listeners: ({ values, actions }) => ({ + getDocumentApiSuccess: (document) => { + actions.setPipelineSimulateBody(JSON.stringify([document], undefined, 2)); + }, + simulatePipeline: () => { + if (values.mlInferencePipeline) { + actions.setSimulatePipelineErrors([]); + actions.simulateExistingPipelineApiReset(); + actions.simulatePipelineApiReset(); + const { configuration } = values.addInferencePipelineModal; + if (configuration.existingPipeline) { + actions.makeSimulateExistingPipelineRequest({ + docs: values.simulateBody, + indexName: values.addInferencePipelineModal.indexName, + pipelineName: configuration.pipelineName, + }); + } else { + actions.makeSimulatePipelineRequest({ + docs: values.simulateBody, + indexName: values.addInferencePipelineModal.indexName, + pipeline: values.mlInferencePipeline, + }); + } + } + }, + }), + path: ['enterprise_search', 'content', 'pipelines_test_inference_pipeline'], + reducers: { + simulateBody: [ + `[ + +]`, + { + setPipelineSimulateBody: (_, { simulateBody }) => simulateBody, + }, + ], + simulatePipelineErrors: [ + [], + { + setSimulatePipelineErrors: (_, { errors }) => errors, + simulateExistingPipelineApiError: (_, error) => getErrorsFromHttpResponse(error), + simulatePipelineApiError: (_, error) => getErrorsFromHttpResponse(error), + }, + ], + }, + selectors: ({ selectors }) => ({ + getDocumentsErr: [ + () => [selectors.getDocumentApiErrorMessage], + (err: TestPipelineValues['getDocumentApiErrorMessage']) => { + if (!err) return ''; + return getErrorsFromHttpResponse(err)[0]; + }, + ], + isGetDocumentsLoading: [ + () => [selectors.getDocumentApiStatus], + (status) => { + return status === Status.LOADING; + }, + ], + showGetDocumentErrors: [ + () => [selectors.getDocumentApiStatus], + (status: TestPipelineValues['getDocumentApiStatus']) => { + return status === Status.ERROR; + }, + ], + simulatePipelineResult: [ + () => [ + selectors.simulatePipelineStatus, + selectors.simulatePipelineData, + selectors.simulateExistingPipelineStatus, + selectors.simulateExistingPipelineData, + ], + ( + status: Status, + simulateResult: IngestSimulateResponse | undefined, + exStatus: Status, + exSimulateResult: IngestSimulateResponse | undefined + ) => { + if (exStatus === Status.SUCCESS) return exSimulateResult; + if (status === Status.SUCCESS) return simulateResult; + return undefined; + }, + ], + }), +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/types.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/types.ts index 9ad288c4b84f5..db8970fa62759 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/types.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/types.ts @@ -19,3 +19,9 @@ export interface AddInferencePipelineFormErrors { pipelineName?: string; sourceField?: string; } + +export enum AddInferencePipelineSteps { + Configuration, + Test, + Review, +} diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx index 2df0c2de2abdb..a995b5e4b6f45 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx @@ -67,7 +67,7 @@ describe('useEnterpriseSearchContentNav', () => { name: 'Collections', }, ], - name: 'Analytics', + name: 'Behavorial Analytics', }, { id: 'search', diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx index 6060fc13f85d4..f37b61662558c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx @@ -106,7 +106,7 @@ export const useEnterpriseSearchNav = () => { }, ], name: i18n.translate('xpack.enterpriseSearch.nav.analyticsTitle', { - defaultMessage: 'Analytics', + defaultMessage: 'Behavorial Analytics', }), }, { diff --git a/x-pack/plugins/file_upload/public/importer/geo/abstract_geo_file_importer.tsx b/x-pack/plugins/file_upload/public/importer/geo/abstract_geo_file_importer.tsx index 14c47eea70359..07a0d4acfb4c6 100644 --- a/x-pack/plugins/file_upload/public/importer/geo/abstract_geo_file_importer.tsx +++ b/x-pack/plugins/file_upload/public/importer/geo/abstract_geo_file_importer.tsx @@ -57,6 +57,7 @@ export class AbstractGeoFileImporter extends Importer implements GeoFileImporter await this._readUntil(rowLimit, sizeLimit); return { features: [...this._features], + invalidFeatures: [...this._invalidFeatures], previewCoverage: this._hasNext ? Math.round(this._getProgress(this._features.length, this._blockSizeInBytes)) : 100, diff --git a/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js index f5846432161cc..d05212223ef3d 100644 --- a/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js +++ b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js @@ -68,6 +68,7 @@ describe('previewFile', () => { previewCoverage: 0, hasPoints: false, hasShapes: false, + invalidFeatures: [], }); }); @@ -79,6 +80,67 @@ describe('previewFile', () => { hasPoints: true, hasShapes: false, features: FEATURE_COLLECTION.features, + invalidFeatures: [], + }); + }); + + test('should read single feature from feature collection', async () => { + const file = new File( + [ + JSON.stringify({ + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + properties: { + population: 200, + }, + geometry: { + type: 'Point', + coordinates: [-112.0372, 46.608058], + }, + }, + ], + }), + ], + 'testfile.json', + { type: 'text/json' } + ); + + const importer = new GeoJsonImporter(file); + const results = await importer.previewFile(); + + expect(results.features.length).toBe(1); + expect(results.invalidFeatures.length).toBe(0); + }); + + test('should read feature when file contains single feature not wrapped in feature collection', async () => { + const fileWithSingleFeature = new File( + [ + JSON.stringify({ + type: 'Feature', + properties: { + population: 200, + }, + geometry: { + type: 'Point', + coordinates: [-112.0372, 46.608058], + }, + }), + ], + 'testfile.json', + { type: 'text/json' } + ); + + const importer = new GeoJsonImporter(fileWithSingleFeature); + const results = await importer.previewFile(); + + expect(results).toEqual({ + previewCoverage: 100, + hasPoints: true, + hasShapes: false, + features: FEATURE_COLLECTION.features, + invalidFeatures: [], }); }); @@ -100,6 +162,7 @@ describe('previewFile', () => { hasPoints: false, hasShapes: true, features: [GEOMETRY_COLLECTION_FEATURE], + invalidFeatures: [], }); }); @@ -131,12 +194,11 @@ describe('previewFile', () => { const importer = new GeoJsonImporter(fileWithFeaturesWithoutGeometry); const results = await importer.previewFile(); - expect(results).toEqual({ - previewCoverage: 100, - hasPoints: true, - hasShapes: false, - features: FEATURE_COLLECTION.features, - }); + expect(results.previewCoverage).toBe(100); + expect(results.hasPoints).toBe(true); + expect(results.hasShapes).toBe(false); + expect(results.features).toEqual(FEATURE_COLLECTION.features); + expect(results.invalidFeatures.length).toBe(2); }); test('should read unwrapped feature', async () => { @@ -165,6 +227,7 @@ describe('previewFile', () => { hasPoints: true, hasShapes: false, features: FEATURE_COLLECTION.features, + invalidFeatures: [], }); }); @@ -183,12 +246,10 @@ describe('previewFile', () => { const importer = new GeoJsonImporter(fileWithNoFeatures); const results = await importer.previewFile(); - expect(results).toEqual({ - previewCoverage: 100, - hasPoints: false, - hasShapes: false, - features: [], - }); + expect(results.previewCoverage).toBe(100); + expect(results.hasPoints).toBe(false); + expect(results.hasShapes).toBe(false); + expect(results.features).toEqual([]); }); test('should return empty feature collection if no features with geometry', async () => { @@ -211,11 +272,10 @@ describe('previewFile', () => { const importer = new GeoJsonImporter(fileWithFeaturesWithNoGeometry); const results = await importer.previewFile(); - expect(results).toEqual({ - previewCoverage: 100, - hasPoints: false, - hasShapes: false, - features: [], - }); + expect(results.previewCoverage).toBe(100); + expect(results.hasPoints).toBe(false); + expect(results.hasShapes).toBe(false); + expect(results.features).toEqual([]); + expect(results.invalidFeatures.length).toBe(2); }); }); diff --git a/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts index 20b73a9ef2acc..cc2f387e5bff4 100644 --- a/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts +++ b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts @@ -65,7 +65,7 @@ export class GeoJsonImporter extends AbstractGeoFileImporter { const isLastBatch = batch.batchType === 'root-object-batch-complete'; if (isLastBatch) { // Handle single feature geoJson - if (featureIndex === 0) { + if (featureIndex === 0 && features.length === 0) { if (batch.container) { features.push(batch.container); } diff --git a/x-pack/plugins/file_upload/public/importer/geo/types.ts b/x-pack/plugins/file_upload/public/importer/geo/types.ts index 1fbd5e3c515b7..ac49edc5f0238 100644 --- a/x-pack/plugins/file_upload/public/importer/geo/types.ts +++ b/x-pack/plugins/file_upload/public/importer/geo/types.ts @@ -9,11 +9,13 @@ import { Feature } from 'geojson'; import { ReactNode } from 'react'; import { ES_FIELD_TYPES } from '@kbn/data-plugin/public'; import { IImporter } from '../types'; +import type { ImportFailure } from '../../../common/types'; export interface GeoFilePreview { features: Feature[]; hasPoints: boolean; hasShapes: boolean; + invalidFeatures: ImportFailure[]; previewCoverage: number; } diff --git a/x-pack/plugins/fleet/.storybook/context/index.tsx b/x-pack/plugins/fleet/.storybook/context/index.tsx index 411f0030ccb6c..1a28c7ee5ad0d 100644 --- a/x-pack/plugins/fleet/.storybook/context/index.tsx +++ b/x-pack/plugins/fleet/.storybook/context/index.tsx @@ -28,7 +28,7 @@ import { setCustomIntegrations } from '../../public/services/custom_integrations import { getApplication } from './application'; import { getChrome } from './chrome'; import { getHttp } from './http'; -import { getUiSettings } from './ui_settings'; +import { getUiSettings, getSettings } from './ui_settings'; import { getNotifications } from './notifications'; import { stubbedStartServices } from './stubs'; import { getDocLinks } from './doc_links'; @@ -88,6 +88,7 @@ export const StorybookContext: React.FC<{ storyContext?: Parameters notifications: getNotifications(), share: getShare(), uiSettings: getUiSettings(), + settings: getSettings(), theme: { theme$: EMPTY, }, diff --git a/x-pack/plugins/fleet/.storybook/context/ui_settings.ts b/x-pack/plugins/fleet/.storybook/context/ui_settings.ts index f2ad92b545cf7..b5757c84875f7 100644 --- a/x-pack/plugins/fleet/.storybook/context/ui_settings.ts +++ b/x-pack/plugins/fleet/.storybook/context/ui_settings.ts @@ -29,3 +29,9 @@ const uiSettings: IUiSettingsClient = { }; export const getUiSettings = () => uiSettings; +export const getSettings = () => { + return { + client: uiSettings, + globalClient: uiSettings, + }; +}; diff --git a/x-pack/plugins/fleet/common/services/routes.ts b/x-pack/plugins/fleet/common/services/routes.ts index 59c158fe4dee1..17b193fd8624f 100644 --- a/x-pack/plugins/fleet/common/services/routes.ts +++ b/x-pack/plugins/fleet/common/services/routes.ts @@ -257,7 +257,7 @@ export const settingsRoutesService = { }; export const appRoutesService = { - getCheckPermissionsPath: (fleetServerSetup?: boolean) => APP_API_ROUTES.CHECK_PERMISSIONS_PATTERN, + getCheckPermissionsPath: () => APP_API_ROUTES.CHECK_PERMISSIONS_PATTERN, getRegenerateServiceTokenPath: () => APP_API_ROUTES.GENERATE_SERVICE_TOKEN_PATTERN, postHealthCheckPath: () => APP_API_ROUTES.HEALTH_CHECK_PATTERN, }; diff --git a/x-pack/plugins/fleet/server/mocks/index.ts b/x-pack/plugins/fleet/server/mocks/index.ts index eb98d0e68eca8..01d92b8c8f28b 100644 --- a/x-pack/plugins/fleet/server/mocks/index.ts +++ b/x-pack/plugins/fleet/server/mocks/index.ts @@ -90,10 +90,9 @@ export const createFleetRequestHandlerContextMock = (): jest.Mocked< asCurrentUser: createPackagePolicyServiceMock(), asInternalUser: createPackagePolicyServiceMock(), }, - epm: { - internalSoClient: savedObjectsClientMock.create(), - }, + internalSoClient: savedObjectsClientMock.create(), spaceId: 'default', + limitedToPackages: undefined, }; }; diff --git a/x-pack/plugins/fleet/server/plugin.ts b/x-pack/plugins/fleet/server/plugin.ts index cadb7859cc2e5..7bcf9502d59b5 100644 --- a/x-pack/plugins/fleet/server/plugin.ts +++ b/x-pack/plugins/fleet/server/plugin.ts @@ -57,6 +57,13 @@ import type { ExperimentalFeatures } from '../common/experimental_features'; import { INTEGRATIONS_PLUGIN_ID } from '../common'; import { parseExperimentalConfigValue } from '../common/experimental_features'; +import { + getRouteRequiredAuthz, + makeRouterWithFleetAuthz, + calculateRouteAuthz, + getAuthzFromRequest, +} from './services/security'; + import { PLUGIN_ID, OUTPUT_SAVED_OBJECT_TYPE, @@ -93,7 +100,6 @@ import { fetchAgentsUsage, fetchFleetUsage, } from './collectors/register'; -import { getAuthzFromRequest, makeRouterWithFleetAuthz } from './routes/security'; import { FleetArtifactsClient } from './services/artifacts'; import type { FleetRouter } from './types/request_context'; import { TelemetryEventsSender } from './telemetry/sender'; @@ -337,7 +343,19 @@ export class FleetPlugin PLUGIN_ID, async (context, request) => { const plugin = this; - const esClient = (await context.core).elasticsearch.client; + const coreContext = await context.core; + const authz = await getAuthzFromRequest(request); + const esClient = coreContext.elasticsearch.client; + + const routeRequiredAuthz = getRouteRequiredAuthz(request.route.method, request.route.path); + const routeAuthz = routeRequiredAuthz + ? calculateRouteAuthz(authz, routeRequiredAuthz) + : undefined; + + const getInternalSoClient = (): SavedObjectsClientContract => + appContextService + .getSavedObjects() + .getScopedClient(request, { excludedExtensions: [SECURITY_EXTENSION_ID] }); return { get agentClient() { @@ -356,18 +374,21 @@ export class FleetPlugin asInternalUser: service.asInternalUser, }; }, - authz: await getAuthzFromRequest(request), - epm: { + authz, + + get internalSoClient() { // Use a lazy getter to avoid constructing this client when not used by a request handler - get internalSoClient() { - return appContextService - .getSavedObjects() - .getScopedClient(request, { excludedExtensions: [SECURITY_EXTENSION_ID] }); - }, + return getInternalSoClient(); }, get spaceId() { return deps.spaces.spacesService.getSpaceId(request); }, + + get limitedToPackages() { + if (routeAuthz && routeAuthz.granted) { + return routeAuthz.scopeDataToPackages; + } + }, }; } ); @@ -384,10 +405,11 @@ export class FleetPlugin // Only some endpoints require superuser so we pass a raw IRouter here // For all the routes we enforce the user to have role superuser - const { router: fleetAuthzRouter, onPostAuthHandler: fleetAuthzOnPostAuthHandler } = - makeRouterWithFleetAuthz(router); + const fleetAuthzRouter = makeRouterWithFleetAuthz( + router, + this.initializerContext.logger.get('fleet_authz_router') + ); - core.http.registerOnPostAuth(fleetAuthzOnPostAuthHandler); registerRoutes(fleetAuthzRouter, config); this.telemetryEventsSender.setup(deps.telemetry); diff --git a/x-pack/plugins/fleet/server/routes/agent/index.ts b/x-pack/plugins/fleet/server/routes/agent/index.ts index e8ac9a2de6749..fd75c7a7020a6 100644 --- a/x-pack/plugins/fleet/server/routes/agent/index.ts +++ b/x-pack/plugins/fleet/server/routes/agent/index.ts @@ -5,6 +5,8 @@ * 2.0. */ +import type { FleetAuthzRouter } from '../../services/security'; + import { AGENT_API_ROUTES } from '../../constants'; import { GetAgentsRequestSchema, @@ -30,7 +32,6 @@ import { } from '../../types'; import * as AgentService from '../../services/agents'; import type { FleetConfigType } from '../..'; -import type { FleetAuthzRouter } from '../security'; import { PostBulkUpdateAgentTagsRequestSchema } from '../../types/rest_spec/agent'; diff --git a/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts b/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts index 42f4560f736bc..9d0fe813a03ab 100644 --- a/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts @@ -67,7 +67,7 @@ export const getAgentPoliciesHandler: FleetRequestHandler< > = async (context, request, response) => { const coreContext = await context.core; const fleetContext = await context.fleet; - const soClient = fleetContext.epm.internalSoClient; + const soClient = fleetContext.internalSoClient; const esClient = coreContext.elasticsearch.client.asInternalUser; const { full: withPackagePolicies = false, ...restOfQuery } = request.query; try { @@ -98,7 +98,7 @@ export const bulkGetAgentPoliciesHandler: FleetRequestHandler< > = async (context, request, response) => { const coreContext = await context.core; const fleetContext = await context.fleet; - const soClient = fleetContext.epm.internalSoClient; + const soClient = fleetContext.internalSoClient; const esClient = coreContext.elasticsearch.client.asInternalUser; const { full: withPackagePolicies = false, ignoreMissing = false, ids } = request.body; try { @@ -158,7 +158,7 @@ export const createAgentPolicyHandler: FleetRequestHandler< > = async (context, request, response) => { const coreContext = await context.core; const fleetContext = await context.fleet; - const soClient = fleetContext.epm.internalSoClient; + const soClient = fleetContext.internalSoClient; const esClient = coreContext.elasticsearch.client.asInternalUser; const user = (await appContextService.getSecurity()?.authc.getCurrentUser(request)) || undefined; const withSysMonitoring = request.query.sys_monitoring ?? false; @@ -276,7 +276,7 @@ export const getFullAgentPolicy: FleetRequestHandler< TypeOf > = async (context, request, response) => { const fleetContext = await context.fleet; - const soClient = fleetContext.epm.internalSoClient; + const soClient = fleetContext.internalSoClient; if (request.query.kubernetes === true) { try { @@ -332,7 +332,7 @@ export const downloadFullAgentPolicy: FleetRequestHandler< TypeOf > = async (context, request, response) => { const fleetContext = await context.fleet; - const soClient = fleetContext.epm.internalSoClient; + const soClient = fleetContext.internalSoClient; const { params: { agentPolicyId }, } = request; diff --git a/x-pack/plugins/fleet/server/routes/agent_policy/index.ts b/x-pack/plugins/fleet/server/routes/agent_policy/index.ts index 938d8b3332b71..7c9726227f437 100644 --- a/x-pack/plugins/fleet/server/routes/agent_policy/index.ts +++ b/x-pack/plugins/fleet/server/routes/agent_policy/index.ts @@ -5,6 +5,8 @@ * 2.0. */ +import type { FleetAuthzRouter } from '../../services/security'; + import { AGENT_POLICY_API_ROUTES } from '../../constants'; import { GetAgentPoliciesRequestSchema, @@ -17,7 +19,6 @@ import { GetK8sManifestRequestSchema, BulkGetAgentPoliciesRequestSchema, } from '../../types'; -import type { FleetAuthzRouter } from '../security'; import { K8S_API_ROUTES } from '../../../common/constants'; diff --git a/x-pack/plugins/fleet/server/routes/app/index.ts b/x-pack/plugins/fleet/server/routes/app/index.ts index dd16c34ede805..cb0c12f9211aa 100644 --- a/x-pack/plugins/fleet/server/routes/app/index.ts +++ b/x-pack/plugins/fleet/server/routes/app/index.ts @@ -8,11 +8,12 @@ import type { RequestHandler } from '@kbn/core/server'; import type { TypeOf } from '@kbn/config-schema'; +import type { FleetAuthzRouter } from '../../services/security'; + import { APP_API_ROUTES } from '../../constants'; import { appContextService } from '../../services'; import type { CheckPermissionsResponse, GenerateServiceTokenResponse } from '../../../common/types'; import { defaultFleetErrorHandler, GenerateServiceTokenError } from '../../errors'; -import type { FleetAuthzRouter } from '../security'; import type { FleetRequestHandler } from '../../types'; import { CheckPermissionsRequestSchema } from '../../types'; @@ -90,7 +91,6 @@ export const registerRoutes = (router: FleetAuthzRouter) => { { path: APP_API_ROUTES.CHECK_PERMISSIONS_PATTERN, validate: CheckPermissionsRequestSchema, - options: { tags: [] }, }, getCheckPermissionsHandler ); diff --git a/x-pack/plugins/fleet/server/routes/data_streams/index.ts b/x-pack/plugins/fleet/server/routes/data_streams/index.ts index ddefc537ba207..861ade8771922 100644 --- a/x-pack/plugins/fleet/server/routes/data_streams/index.ts +++ b/x-pack/plugins/fleet/server/routes/data_streams/index.ts @@ -5,8 +5,9 @@ * 2.0. */ +import type { FleetAuthzRouter } from '../../services/security'; + import { DATA_STREAM_API_ROUTES } from '../../constants'; -import type { FleetAuthzRouter } from '../security'; import { getListHandler } from './handlers'; diff --git a/x-pack/plugins/fleet/server/routes/download_source/index.tsx b/x-pack/plugins/fleet/server/routes/download_source/index.tsx index 1c670bdf2b018..135cbf5700784 100644 --- a/x-pack/plugins/fleet/server/routes/download_source/index.tsx +++ b/x-pack/plugins/fleet/server/routes/download_source/index.tsx @@ -5,6 +5,8 @@ * 2.0. */ +import type { FleetAuthzRouter } from '../../services/security'; + import { DOWNLOAD_SOURCE_API_ROUTES } from '../../constants'; import { getDownloadSourcesRequestSchema, @@ -13,7 +15,6 @@ import { PostDownloadSourcesRequestSchema, DeleteDownloadSourcesRequestSchema, } from '../../types'; -import type { FleetAuthzRouter } from '../security'; import { getDownloadSourcesHandler, diff --git a/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts b/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts index d904ab60e19ec..496ec7ae705ce 100644 --- a/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts +++ b/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts @@ -5,6 +5,8 @@ * 2.0. */ +import type { FleetAuthzRouter } from '../../services/security'; + import { ENROLLMENT_API_KEY_ROUTES } from '../../constants'; import { GetEnrollmentAPIKeysRequestSchema, @@ -12,7 +14,6 @@ import { DeleteEnrollmentAPIKeyRequestSchema, PostEnrollmentAPIKeyRequestSchema, } from '../../types'; -import type { FleetAuthzRouter } from '../security'; import { getEnrollmentApiKeysHandler, diff --git a/x-pack/plugins/fleet/server/routes/epm/handlers.ts b/x-pack/plugins/fleet/server/routes/epm/handlers.ts index e66bfa473edbb..b4b189d3ad2bb 100644 --- a/x-pack/plugins/fleet/server/routes/epm/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/epm/handlers.ts @@ -86,7 +86,7 @@ export const getListHandler: FleetRequestHandler< TypeOf > = async (context, request, response) => { try { - const savedObjectsClient = (await context.fleet).epm.internalSoClient; + const savedObjectsClient = (await context.fleet).internalSoClient; const res = await getPackages({ savedObjectsClient, ...request.query, @@ -112,7 +112,7 @@ export const getLimitedListHandler: FleetRequestHandler< undefined > = async (context, request, response) => { try { - const savedObjectsClient = (await context.fleet).epm.internalSoClient; + const savedObjectsClient = (await context.fleet).internalSoClient; const res = await getLimitedPackages({ savedObjectsClient, prerelease: request.query.prerelease, @@ -134,7 +134,7 @@ export const getFileHandler: FleetRequestHandler< > = async (context, request, response) => { try { const { pkgName, pkgVersion, filePath } = request.params; - const savedObjectsClient = (await context.fleet).epm.internalSoClient; + const savedObjectsClient = (await context.fleet).internalSoClient; const installation = await getInstallation({ savedObjectsClient, pkgName }); const useLocalFile = pkgVersion === installation?.version; @@ -208,7 +208,7 @@ export const getInfoHandler: FleetRequestHandler< TypeOf > = async (context, request, response) => { try { - const savedObjectsClient = (await context.fleet).epm.internalSoClient; + const savedObjectsClient = (await context.fleet).internalSoClient; const { pkgName, pkgVersion } = request.params; const { ignoreUnverified = false, full = false, prerelease } = request.query; if (pkgVersion && !semverValid(pkgVersion)) { @@ -237,7 +237,7 @@ export const updatePackageHandler: FleetRequestHandler< TypeOf > = async (context, request, response) => { try { - const savedObjectsClient = (await context.fleet).epm.internalSoClient; + const savedObjectsClient = (await context.fleet).internalSoClient; const { pkgName } = request.params; const res = await updatePackage({ savedObjectsClient, pkgName, ...request.body }); @@ -256,7 +256,7 @@ export const getStatsHandler: FleetRequestHandler< > = async (context, request, response) => { try { const { pkgName } = request.params; - const savedObjectsClient = (await context.fleet).epm.internalSoClient; + const savedObjectsClient = (await context.fleet).internalSoClient; const body: GetStatsResponse = { response: await getPackageUsageStats({ savedObjectsClient, pkgName }), }; @@ -273,7 +273,7 @@ export const installPackageFromRegistryHandler: FleetRequestHandler< > = async (context, request, response) => { const coreContext = await context.core; const fleetContext = await context.fleet; - const savedObjectsClient = fleetContext.epm.internalSoClient; + const savedObjectsClient = fleetContext.internalSoClient; const esClient = coreContext.elasticsearch.client.asInternalUser; const { pkgName, pkgVersion } = request.params; @@ -323,7 +323,7 @@ export const bulkInstallPackagesFromRegistryHandler: FleetRequestHandler< > = async (context, request, response) => { const coreContext = await context.core; const fleetContext = await context.fleet; - const savedObjectsClient = fleetContext.epm.internalSoClient; + const savedObjectsClient = fleetContext.internalSoClient; const esClient = coreContext.elasticsearch.client.asInternalUser; const spaceId = fleetContext.spaceId; const bulkInstalledResponses = await bulkInstallPackages({ @@ -354,7 +354,7 @@ export const installPackageByUploadHandler: FleetRequestHandler< } const coreContext = await context.core; const fleetContext = await context.fleet; - const savedObjectsClient = fleetContext.epm.internalSoClient; + const savedObjectsClient = fleetContext.internalSoClient; const esClient = coreContext.elasticsearch.client.asInternalUser; const contentType = request.headers['content-type'] as string; // from types it could also be string[] or undefined but this is checked later const archiveBuffer = Buffer.from(request.body); @@ -390,7 +390,7 @@ export const deletePackageHandler: FleetRequestHandler< const { pkgName, pkgVersion } = request.params; const coreContext = await context.core; const fleetContext = await context.fleet; - const savedObjectsClient = fleetContext.epm.internalSoClient; + const savedObjectsClient = fleetContext.internalSoClient; const esClient = coreContext.elasticsearch.client.asInternalUser; const res = await removeInstallation({ savedObjectsClient, diff --git a/x-pack/plugins/fleet/server/routes/epm/index.ts b/x-pack/plugins/fleet/server/routes/epm/index.ts index cab94b37f398f..383f9c3116d8d 100644 --- a/x-pack/plugins/fleet/server/routes/epm/index.ts +++ b/x-pack/plugins/fleet/server/routes/epm/index.ts @@ -7,6 +7,8 @@ import type { IKibanaResponse } from '@kbn/core/server'; +import type { FleetAuthzRouter } from '../../services/security'; + import type { DeletePackageResponse, GetInfoResponse, @@ -32,7 +34,6 @@ import { UpdatePackageRequestSchema, UpdatePackageRequestSchemaDeprecated, } from '../../types'; -import type { FleetAuthzRouter } from '../security'; import { getCategoriesHandler, diff --git a/x-pack/plugins/fleet/server/routes/fleet_proxies/index.ts b/x-pack/plugins/fleet/server/routes/fleet_proxies/index.ts index bca9d465a2fd6..079b475e4f533 100644 --- a/x-pack/plugins/fleet/server/routes/fleet_proxies/index.ts +++ b/x-pack/plugins/fleet/server/routes/fleet_proxies/index.ts @@ -4,6 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import type { FleetAuthzRouter } from '../../services/security'; + import { FLEET_PROXY_API_ROUTES } from '../../../common/constants'; import { GetOneFleetProxyRequestSchema, @@ -11,8 +13,6 @@ import { PutFleetProxyRequestSchema, } from '../../types'; -import type { FleetAuthzRouter } from '../security'; - import { getAllFleetProxyHandler, postFleetProxyHandler, diff --git a/x-pack/plugins/fleet/server/routes/fleet_server_policy_config/index.ts b/x-pack/plugins/fleet/server/routes/fleet_server_policy_config/index.ts index 48607c5df7a72..f4f4837554d81 100644 --- a/x-pack/plugins/fleet/server/routes/fleet_server_policy_config/index.ts +++ b/x-pack/plugins/fleet/server/routes/fleet_server_policy_config/index.ts @@ -5,6 +5,8 @@ * 2.0. */ +import type { FleetAuthzRouter } from '../../services/security'; + import { FLEET_SERVER_HOST_API_ROUTES } from '../../../common/constants'; import { GetAllFleetServerHostRequestSchema, @@ -13,8 +15,6 @@ import { PutFleetServerHostRequestSchema, } from '../../types'; -import type { FleetAuthzRouter } from '../security'; - import { deleteFleetServerPolicyHandler, getAllFleetServerPolicyHandler, diff --git a/x-pack/plugins/fleet/server/routes/health_check/index.ts b/x-pack/plugins/fleet/server/routes/health_check/index.ts index 61b42b3bc2aa2..55bd4bf7029ee 100644 --- a/x-pack/plugins/fleet/server/routes/health_check/index.ts +++ b/x-pack/plugins/fleet/server/routes/health_check/index.ts @@ -9,9 +9,10 @@ import https from 'https'; import type { TypeOf } from '@kbn/config-schema'; import fetch from 'node-fetch'; +import type { FleetAuthzRouter } from '../../services/security'; + import { APP_API_ROUTES } from '../../constants'; import type { FleetRequestHandler } from '../../types'; -import type { FleetAuthzRouter } from '../security'; import { defaultFleetErrorHandler } from '../../errors'; import { PostHealthCheckRequestSchema } from '../../types'; diff --git a/x-pack/plugins/fleet/server/routes/index.ts b/x-pack/plugins/fleet/server/routes/index.ts index 5ecbb3eaad801..b5f82f9923535 100644 --- a/x-pack/plugins/fleet/server/routes/index.ts +++ b/x-pack/plugins/fleet/server/routes/index.ts @@ -5,6 +5,8 @@ * 2.0. */ +import type { FleetAuthzRouter } from '../services/security'; + import type { FleetConfigType } from '../config'; import { registerRoutes as registerAgentPolicyRoutes } from './agent_policy'; @@ -22,7 +24,6 @@ import { registerRoutes as registerDownloadSourcesRoutes } from './download_sour import { registerRoutes as registerHealthCheckRoutes } from './health_check'; import { registerRoutes as registerFleetServerHostRoutes } from './fleet_server_policy_config'; import { registerRoutes as registerFleetProxiesRoutes } from './fleet_proxies'; -import type { FleetAuthzRouter } from './security'; export async function registerRoutes(fleetAuthzRouter: FleetAuthzRouter, config: FleetConfigType) { // Always register app routes for permissions checking diff --git a/x-pack/plugins/fleet/server/routes/output/index.ts b/x-pack/plugins/fleet/server/routes/output/index.ts index f74c1bb88aeb0..827fca7c9444a 100644 --- a/x-pack/plugins/fleet/server/routes/output/index.ts +++ b/x-pack/plugins/fleet/server/routes/output/index.ts @@ -5,6 +5,8 @@ * 2.0. */ +import type { FleetAuthzRouter } from '../../services/security'; + import { OUTPUT_API_ROUTES } from '../../constants'; import { DeleteOutputRequestSchema, @@ -13,7 +15,6 @@ import { PostOutputRequestSchema, PutOutputRequestSchema, } from '../../types'; -import type { FleetAuthzRouter } from '../security'; import { deleteOutputHandler, diff --git a/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts b/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts index 13beda40e8859..5ade3dd8e1699 100644 --- a/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts +++ b/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts @@ -9,6 +9,8 @@ import { httpServerMock, httpServiceMock } from '@kbn/core/server/mocks'; import type { KibanaRequest } from '@kbn/core/server'; import type { RouteConfig } from '@kbn/core/server'; +import type { FleetAuthzRouter } from '../../services/security'; + import { PACKAGE_POLICY_API_ROUTES } from '../../../common/constants'; import { appContextService, packagePolicyService } from '../../services'; import { createAppContextStartContractMock, xpackMocks } from '../../mocks'; @@ -22,7 +24,6 @@ import type { CreatePackagePolicyRequestSchema, UpdatePackagePolicyRequestSchema, } from '../../types/rest_spec'; -import type { FleetAuthzRouter } from '../security'; import type { FleetRequestHandler } from '../../types'; import type { PackagePolicy } from '../../types'; diff --git a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts index ee9caa4def673..ab3af0cb0a16c 100644 --- a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts @@ -43,16 +43,72 @@ import { simplifiedPackagePolicytoNewPackagePolicy } from '../../../common/servi import type { SimplifiedPackagePolicy } from '../../../common/services/simplified_package_policy_helper'; -export const getPackagePoliciesHandler: RequestHandler< +const getAllowedPackageNamesMessage = (allowedPackageNames: string[]): string => { + return `Allowed package.name's: ${allowedPackageNames.join(', ')}`; +}; + +/** + * Validates that Package Policy data only includes `package.name`'s that are in the list of + * `allowedPackageNames`. If an error is encountered, then a message is return, otherwise, undefined. + * + * @param data + * @param allowedPackageNames + */ +const validatePackagePolicyDataIsScopedToAllowedPackageNames = ( + data: PackagePolicy[], + allowedPackageNames: string[] | undefined +): string | undefined => { + if (!data.length || typeof allowedPackageNames === 'undefined') { + return; + } + + if (!allowedPackageNames.length) { + return 'Authorization denied due to lack of integration package privileges'; + } + + // Because List type of APIs have an un-bounded `perPage` query param, we only validate the + // data up to the first package.name that we find is not authorized. + for (const packagePolicy of data) { + if (!packagePolicy.package) { + return `Authorization denied. ${getAllowedPackageNamesMessage(allowedPackageNames)}`; + } + + if (!allowedPackageNames.includes(packagePolicy.package.name)) { + return `Authorization denied to [package.name=${ + packagePolicy.package.name + }]. ${getAllowedPackageNamesMessage(allowedPackageNames)}`; + } + } +}; + +export const getPackagePoliciesHandler: FleetRequestHandler< undefined, TypeOf > = async (context, request, response) => { - const soClient = (await context.core).savedObjects.client; + const fleetContext = await context.fleet; + const soClient = fleetContext.internalSoClient; + const limitedToPackages = fleetContext.limitedToPackages; + try { const { items, total, page, perPage } = await packagePolicyService.list( soClient, request.query ); + + // specific to package-level RBAC + const validationResult = validatePackagePolicyDataIsScopedToAllowedPackageNames( + items, + limitedToPackages + ); + if (validationResult) { + return response.forbidden({ + body: { + message: validationResult, + }, + }); + } + + // agnostic to package-level RBAC return response.ok({ body: { items, @@ -66,13 +122,16 @@ export const getPackagePoliciesHandler: RequestHandler< } }; -export const bulkGetPackagePoliciesHandler: RequestHandler< +export const bulkGetPackagePoliciesHandler: FleetRequestHandler< undefined, undefined, TypeOf > = async (context, request, response) => { - const soClient = (await context.core).savedObjects.client; + const fleetContext = await context.fleet; + const soClient = fleetContext.internalSoClient; + const limitedToPackages = fleetContext.limitedToPackages; const { ids, ignoreMissing } = request.body; + try { const items = await packagePolicyService.getByIDs(soClient, ids, { ignoreMissing, @@ -80,6 +139,18 @@ export const bulkGetPackagePoliciesHandler: RequestHandler< const body: BulkGetPackagePoliciesResponse = { items: items ?? [] }; + const validationResult = validatePackagePolicyDataIsScopedToAllowedPackageNames( + body.items, + limitedToPackages + ); + if (validationResult) { + return response.forbidden({ + body: { + message: validationResult, + }, + }); + } + return response.ok({ body, }); @@ -94,17 +165,32 @@ export const bulkGetPackagePoliciesHandler: RequestHandler< } }; -export const getOnePackagePolicyHandler: RequestHandler< +export const getOnePackagePolicyHandler: FleetRequestHandler< TypeOf > = async (context, request, response) => { - const soClient = (await context.core).savedObjects.client; + const fleetContext = await context.fleet; + const soClient = fleetContext.internalSoClient; + const limitedToPackages = fleetContext.limitedToPackages; const { packagePolicyId } = request.params; const notFoundResponse = () => response.notFound({ body: { message: `Package policy ${packagePolicyId} not found` } }); try { const packagePolicy = await packagePolicyService.get(soClient, packagePolicyId); + if (packagePolicy) { + const validationResult = validatePackagePolicyDataIsScopedToAllowedPackageNames( + [packagePolicy], + limitedToPackages + ); + if (validationResult) { + return response.forbidden({ + body: { + message: validationResult, + }, + }); + } + return response.ok({ body: { item: packagePolicy, @@ -184,7 +270,7 @@ export const createPackagePolicyHandler: FleetRequestHandler< > = async (context, request, response) => { const coreContext = await context.core; const fleetContext = await context.fleet; - const soClient = fleetContext.epm.internalSoClient; + const soClient = fleetContext.internalSoClient; const esClient = coreContext.elasticsearch.client.asInternalUser; const user = appContextService.getSecurity()?.authc.getCurrentUser(request) || undefined; const { force, package: pkg, ...newPolicy } = request.body; @@ -258,13 +344,15 @@ export const createPackagePolicyHandler: FleetRequestHandler< } }; -export const updatePackagePolicyHandler: RequestHandler< +export const updatePackagePolicyHandler: FleetRequestHandler< TypeOf, unknown, TypeOf > = async (context, request, response) => { const coreContext = await context.core; - const soClient = coreContext.savedObjects.client; + const fleetContext = await context.fleet; + const soClient = fleetContext.internalSoClient; + const limitedToPackages = fleetContext.limitedToPackages; const esClient = coreContext.elasticsearch.client.asInternalUser; const user = appContextService.getSecurity()?.authc.getCurrentUser(request) || undefined; const packagePolicy = await packagePolicyService.get(soClient, request.params.packagePolicyId); @@ -273,6 +361,15 @@ export const updatePackagePolicyHandler: RequestHandler< throw Boom.notFound('Package policy not found'); } + if (limitedToPackages && limitedToPackages.length) { + const packageName = packagePolicy?.package?.name; + if (packageName && !limitedToPackages.includes(packageName)) { + return response.forbidden({ + body: { message: `Update for package name ${packageName} is not authorized.` }, + }); + } + } + try { const { force, package: pkg, ...body } = request.body; // TODO Remove deprecated APIs https://github.com/elastic/kibana/issues/121485 diff --git a/x-pack/plugins/fleet/server/routes/package_policy/index.ts b/x-pack/plugins/fleet/server/routes/package_policy/index.ts index 00d06363968f4..393bbb2fd982b 100644 --- a/x-pack/plugins/fleet/server/routes/package_policy/index.ts +++ b/x-pack/plugins/fleet/server/routes/package_policy/index.ts @@ -5,6 +5,11 @@ * 2.0. */ +import { getRouteRequiredAuthz } from '../../services/security'; + +import type { FleetAuthzRouter } from '../../services/security'; + +import type { FleetAuthz } from '../../../common'; import { PACKAGE_POLICY_API_ROUTES } from '../../constants'; import { GetPackagePoliciesRequestSchema, @@ -17,7 +22,7 @@ import { DeleteOnePackagePolicyRequestSchema, BulkGetPackagePoliciesRequestSchema, } from '../../types'; -import type { FleetAuthzRouter } from '../security'; +import { calculateRouteAuthz } from '../../services/security/security'; import { getPackagePoliciesHandler, @@ -38,20 +43,25 @@ export const registerRoutes = (router: FleetAuthzRouter) => { { path: PACKAGE_POLICY_API_ROUTES.LIST_PATTERN, validate: GetPackagePoliciesRequestSchema, - fleetAuthz: { - integrations: { readIntegrationPolicies: true }, - }, + fleetAuthz: (fleetAuthz: FleetAuthz): boolean => + calculateRouteAuthz( + fleetAuthz, + getRouteRequiredAuthz('get', PACKAGE_POLICY_API_ROUTES.LIST_PATTERN) + ).granted, }, getPackagePoliciesHandler ); + // Get bulk router.post( { path: PACKAGE_POLICY_API_ROUTES.BULK_GET_PATTERN, validate: BulkGetPackagePoliciesRequestSchema, - fleetAuthz: { - integrations: { readIntegrationPolicies: true }, - }, + fleetAuthz: (fleetAuthz: FleetAuthz): boolean => + calculateRouteAuthz( + fleetAuthz, + getRouteRequiredAuthz('post', PACKAGE_POLICY_API_ROUTES.BULK_GET_PATTERN) + ).granted, }, bulkGetPackagePoliciesHandler ); @@ -61,9 +71,11 @@ export const registerRoutes = (router: FleetAuthzRouter) => { { path: PACKAGE_POLICY_API_ROUTES.INFO_PATTERN, validate: GetOnePackagePolicyRequestSchema, - fleetAuthz: { - integrations: { readIntegrationPolicies: true }, - }, + fleetAuthz: (fleetAuthz: FleetAuthz): boolean => + calculateRouteAuthz( + fleetAuthz, + getRouteRequiredAuthz('get', PACKAGE_POLICY_API_ROUTES.INFO_PATTERN) + ).granted, }, getOnePackagePolicyHandler ); @@ -93,14 +105,16 @@ export const registerRoutes = (router: FleetAuthzRouter) => { { path: PACKAGE_POLICY_API_ROUTES.UPDATE_PATTERN, validate: UpdatePackagePolicyRequestSchema, - fleetAuthz: { - integrations: { writeIntegrationPolicies: true }, - }, + fleetAuthz: (fleetAuthz: FleetAuthz): boolean => + calculateRouteAuthz( + fleetAuthz, + getRouteRequiredAuthz('put', PACKAGE_POLICY_API_ROUTES.UPDATE_PATTERN) + ).granted, }, updatePackagePolicyHandler ); - // Delete + // Delete (bulk) router.post( { path: PACKAGE_POLICY_API_ROUTES.DELETE_PATTERN, diff --git a/x-pack/plugins/fleet/server/routes/preconfiguration/index.ts b/x-pack/plugins/fleet/server/routes/preconfiguration/index.ts index 9f5f372298530..5d427b49bed69 100644 --- a/x-pack/plugins/fleet/server/routes/preconfiguration/index.ts +++ b/x-pack/plugins/fleet/server/routes/preconfiguration/index.ts @@ -5,9 +5,10 @@ * 2.0. */ +import type { FleetAuthzRouter } from '../../services/security'; + import { PRECONFIGURATION_API_ROUTES } from '../../constants'; import { PostResetOnePreconfiguredAgentPoliciesSchema } from '../../types'; -import type { FleetAuthzRouter } from '../security'; import { resetPreconfigurationHandler, resetOnePreconfigurationHandler } from './handler'; diff --git a/x-pack/plugins/fleet/server/routes/security.ts b/x-pack/plugins/fleet/server/routes/security.ts deleted file mode 100644 index 8914be58294ba..0000000000000 --- a/x-pack/plugins/fleet/server/routes/security.ts +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { DEFAULT_APP_CATEGORIES } from '@kbn/core-application-common'; -import type { - IRouter, - RouteConfig, - RouteMethod, - KibanaRequest, - RequestHandler, - RequestHandlerContext, - OnPostAuthHandler, -} from '@kbn/core/server'; - -import type { FleetAuthz } from '../../common'; -import { INTEGRATIONS_PLUGIN_ID } from '../../common'; -import { calculateAuthz, calculatePackagePrivilegesFromKibanaPrivileges } from '../../common/authz'; - -import { appContextService } from '../services'; -import type { FleetRequestHandlerContext } from '../types'; -import { PLUGIN_ID, ENDPOINT_PRIVILEGES } from '../constants'; - -function checkSecurityEnabled() { - return appContextService.getSecurityLicense().isEnabled(); -} - -export function checkSuperuser(req: KibanaRequest) { - if (!checkSecurityEnabled()) { - return false; - } - - const security = appContextService.getSecurity(); - const user = security.authc.getCurrentUser(req); - if (!user) { - return false; - } - - const userRoles = user.roles || []; - if (!userRoles.includes('superuser')) { - return false; - } - - return true; -} - -function getAuthorizationFromPrivileges( - kibanaPrivileges: Array<{ - resource?: string; - privilege: string; - authorized: boolean; - }>, - searchPrivilege: string -) { - const privilege = kibanaPrivileges.find((p) => p.privilege.includes(searchPrivilege)); - return privilege ? privilege.authorized : false; -} - -export async function getAuthzFromRequest(req: KibanaRequest): Promise { - const security = appContextService.getSecurity(); - - if (security.authz.mode.useRbacForRequest(req)) { - const checkPrivileges = security.authz.checkPrivilegesDynamicallyWithRequest(req); - const endpointPrivileges = ENDPOINT_PRIVILEGES.map((privilege) => - security.authz.actions.api.get(`${DEFAULT_APP_CATEGORIES.security.id}-${privilege}`) - ); - const { privileges } = await checkPrivileges({ - kibana: [ - security.authz.actions.api.get(`${PLUGIN_ID}-all`), - security.authz.actions.api.get(`${PLUGIN_ID}-setup`), - security.authz.actions.api.get(`${INTEGRATIONS_PLUGIN_ID}-all`), - security.authz.actions.api.get(`${INTEGRATIONS_PLUGIN_ID}-read`), - ...endpointPrivileges, - ], - }); - const fleetAllAuth = getAuthorizationFromPrivileges(privileges.kibana, `${PLUGIN_ID}-all`); - const intAllAuth = getAuthorizationFromPrivileges( - privileges.kibana, - `${INTEGRATIONS_PLUGIN_ID}-all` - ); - const intReadAuth = getAuthorizationFromPrivileges( - privileges.kibana, - `${INTEGRATIONS_PLUGIN_ID}-read` - ); - const fleetSetupAuth = getAuthorizationFromPrivileges(privileges.kibana, 'fleet-setup'); - - return { - ...calculateAuthz({ - fleet: { all: fleetAllAuth, setup: fleetSetupAuth }, - integrations: { - all: intAllAuth, - read: intReadAuth, - }, - isSuperuser: checkSuperuser(req), - }), - packagePrivileges: calculatePackagePrivilegesFromKibanaPrivileges(privileges.kibana), - }; - } - - return calculateAuthz({ - fleet: { all: false, setup: false }, - integrations: { - all: false, - read: false, - }, - isSuperuser: false, - }); -} - -interface Authz { - [k: string]: Authz | boolean; -} - -function containsRequirement(authz: Authz, requirements: DeepPartialTruthy) { - if (!authz) { - return false; - } - for (const key of Object.keys(requirements)) { - if (typeof requirements[key] !== 'undefined' && typeof requirements[key] === 'boolean') { - if (!authz[key]) { - return false; - } - } else if ( - !containsRequirement(authz[key] as Authz, requirements[key] as DeepPartialTruthy) - ) { - return false; - } - } - return true; -} - -export function hasRequiredFleetAuthzPrivilege( - authz: FleetAuthz, - { fleetAuthz }: { fleetAuthz?: FleetAuthzRequirements } -): boolean { - if (!checkSecurityEnabled()) { - return false; - } - if (fleetAuthz && !containsRequirement(authz as unknown as Authz, fleetAuthz)) { - return false; - } - - return true; -} - -type DeepPartialTruthy = { - [P in keyof T]?: T[P] extends boolean ? true : DeepPartialTruthy; -}; - -type FleetAuthzRequirements = DeepPartialTruthy; - -type FleetAuthzRouteRegistrar< - Method extends RouteMethod, - Context extends RequestHandlerContext = RequestHandlerContext -> = ( - route: FleetRouteConfig, - handler: RequestHandler -) => void; - -export interface FleetAuthzRouteConfig { - fleetAuthz?: FleetAuthzRequirements; -} - -type FleetRouteConfig = RouteConfig & - FleetAuthzRouteConfig; - -// Fleet router that allow to add required access when registering route -export interface FleetAuthzRouter< - TContext extends FleetRequestHandlerContext = FleetRequestHandlerContext -> extends IRouter { - get: FleetAuthzRouteRegistrar<'get', TContext>; - delete: FleetAuthzRouteRegistrar<'delete', TContext>; - post: FleetAuthzRouteRegistrar<'post', TContext>; - put: FleetAuthzRouteRegistrar<'put', TContext>; - patch: FleetAuthzRouteRegistrar<'patch', TContext>; -} - -function shouldHandlePostAuthRequest(req: KibanaRequest) { - if (req?.route?.options?.tags) { - return req.route.options.tags.some((tag) => tag.match(/^fleet:authz/)); - } - return false; -} -// Exported for test only -export function deserializeAuthzConfig(tags: readonly string[]): FleetAuthzRouteConfig { - let fleetAuthz: FleetAuthzRequirements | undefined; - for (const tag of tags) { - if (!tag.match(/^fleet:authz/)) { - continue; - } - - if (!fleetAuthz) { - fleetAuthz = {}; - } - - tag - .replace(/^fleet:authz:/, '') - .split(':') - .reduce((acc: any, key, idx, keys) => { - if (idx === keys.length - 1) { - acc[key] = true; - - return acc; - } - - if (!acc[key]) { - acc[key] = {}; - } - - return acc[key]; - }, fleetAuthz); - } - - return { fleetAuthz }; -} - -// Exported for test only -export function serializeAuthzConfig(config: FleetAuthzRouteConfig): string[] { - const tags: string[] = []; - - if (config.fleetAuthz) { - function fleetAuthzToTags(requirements: DeepPartialTruthy, prefix: string = '') { - for (const key of Object.keys(requirements)) { - if (typeof requirements[key] === 'boolean') { - tags.push(`fleet:authz:${prefix}${key}`); - } else if (typeof requirements[key] !== 'undefined') { - fleetAuthzToTags(requirements[key] as DeepPartialTruthy, `${prefix}${key}:`); - } - } - } - - fleetAuthzToTags(config.fleetAuthz); - } - - return tags; -} - -export function makeRouterWithFleetAuthz( - router: IRouter -): { router: FleetAuthzRouter; onPostAuthHandler: OnPostAuthHandler } { - function buildFleetAuthzRouteConfig({ - fleetAuthz, - ...routeConfig - }: FleetRouteConfig) { - return { - ...routeConfig, - options: { - ...routeConfig.options, - tags: [ - ...(routeConfig?.options?.tags ?? []), - ...serializeAuthzConfig({ - fleetAuthz, - }), - ], - }, - }; - } - - const fleetAuthzOnPostAuthHandler: OnPostAuthHandler = async (req, res, toolkit) => { - if (!shouldHandlePostAuthRequest(req)) { - return toolkit.next(); - } - - if (!checkSecurityEnabled()) { - return res.forbidden(); - } - - const fleetAuthzConfig = deserializeAuthzConfig(req.route.options.tags); - - if (!fleetAuthzConfig) { - return toolkit.next(); - } - const authz = await getAuthzFromRequest(req); - if (!hasRequiredFleetAuthzPrivilege(authz, fleetAuthzConfig)) { - return res.forbidden(); - } - - return toolkit.next(); - }; - - const fleetAuthzRouter: FleetAuthzRouter = { - get: (routeConfig, handler) => router.get(buildFleetAuthzRouteConfig(routeConfig), handler), - delete: (routeConfig, handler) => - router.delete(buildFleetAuthzRouteConfig(routeConfig), handler), - post: (routeConfig, handler) => router.post(buildFleetAuthzRouteConfig(routeConfig), handler), - put: (routeConfig, handler) => router.put(buildFleetAuthzRouteConfig(routeConfig), handler), - patch: (routeConfig, handler) => router.patch(buildFleetAuthzRouteConfig(routeConfig), handler), - handleLegacyErrors: (handler) => router.handleLegacyErrors(handler), - getRoutes: () => router.getRoutes(), - routerPath: router.routerPath, - }; - - return { router: fleetAuthzRouter, onPostAuthHandler: fleetAuthzOnPostAuthHandler }; -} diff --git a/x-pack/plugins/fleet/server/routes/settings/index.ts b/x-pack/plugins/fleet/server/routes/settings/index.ts index f11244d7b59ff..881541b569805 100644 --- a/x-pack/plugins/fleet/server/routes/settings/index.ts +++ b/x-pack/plugins/fleet/server/routes/settings/index.ts @@ -7,15 +7,16 @@ import type { TypeOf } from '@kbn/config-schema'; +import type { FleetAuthzRouter } from '../../services/security'; + import { SETTINGS_API_ROUTES } from '../../constants'; import type { FleetRequestHandler } from '../../types'; import { PutSettingsRequestSchema, GetSettingsRequestSchema } from '../../types'; import { defaultFleetErrorHandler } from '../../errors'; import { settingsService, agentPolicyService, appContextService } from '../../services'; -import type { FleetAuthzRouter } from '../security'; export const getSettingsHandler: FleetRequestHandler = async (context, request, response) => { - const soClient = (await context.fleet).epm.internalSoClient; + const soClient = (await context.fleet).internalSoClient; try { const settings = await settingsService.getSettings(soClient); @@ -39,7 +40,7 @@ export const putSettingsHandler: FleetRequestHandler< undefined, TypeOf > = async (context, request, response) => { - const soClient = (await context.fleet).epm.internalSoClient; + const soClient = (await context.fleet).internalSoClient; const esClient = (await context.core).elasticsearch.client.asInternalUser; const user = await appContextService.getSecurity()?.authc.getCurrentUser(request); diff --git a/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts b/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts index 0ecbca40132cb..f4b35508e52c8 100644 --- a/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts +++ b/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts @@ -51,10 +51,9 @@ describe('FleetSetupHandler', () => { asCurrentUser: createPackagePolicyServiceMock(), asInternalUser: createPackagePolicyServiceMock(), }, - epm: { - internalSoClient: savedObjectsClientMock.create(), - }, + internalSoClient: savedObjectsClientMock.create(), spaceId: 'default', + limitedToPackages: undefined, }, }; response = httpServerMock.createResponseFactory(); diff --git a/x-pack/plugins/fleet/server/routes/setup/handlers.ts b/x-pack/plugins/fleet/server/routes/setup/handlers.ts index cf2ff46cd1110..78daddf837ac1 100644 --- a/x-pack/plugins/fleet/server/routes/setup/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/setup/handlers.ts @@ -60,7 +60,7 @@ export const getFleetStatusHandler: FleetRequestHandler = async (context, reques export const fleetSetupHandler: FleetRequestHandler = async (context, request, response) => { try { - const soClient = (await context.fleet).epm.internalSoClient; + const soClient = (await context.fleet).internalSoClient; const esClient = (await context.core).elasticsearch.client.asInternalUser; const setupStatus = await setupFleet(soClient, esClient); const body: PostFleetSetupResponse = { diff --git a/x-pack/plugins/fleet/server/routes/setup/index.ts b/x-pack/plugins/fleet/server/routes/setup/index.ts index 8b2aa2bf8f573..b4470e648dcab 100644 --- a/x-pack/plugins/fleet/server/routes/setup/index.ts +++ b/x-pack/plugins/fleet/server/routes/setup/index.ts @@ -5,11 +5,11 @@ * 2.0. */ +import type { FleetAuthzRouter } from '../../services/security'; + import { AGENTS_SETUP_API_ROUTES, SETUP_API_ROUTE } from '../../constants'; import type { FleetConfigType } from '../../../common/types'; -import type { FleetAuthzRouter } from '../security'; - import { getFleetStatusHandler, fleetSetupHandler } from './handlers'; export const registerFleetSetupRoute = (router: FleetAuthzRouter) => { diff --git a/x-pack/plugins/fleet/server/services/agents/agent_service.test.ts b/x-pack/plugins/fleet/server/services/agents/agent_service.test.ts index be4ca37260b8a..fe43fa50b4317 100644 --- a/x-pack/plugins/fleet/server/services/agents/agent_service.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/agent_service.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -jest.mock('../../routes/security'); +jest.mock('../security'); jest.mock('./crud'); jest.mock('./status'); @@ -14,7 +14,7 @@ import { elasticsearchServiceMock, httpServerMock } from '@kbn/core/server/mocks import { FleetUnauthorizedError } from '../../errors'; -import { getAuthzFromRequest } from '../../routes/security'; +import { getAuthzFromRequest } from '../security'; import type { FleetAuthz } from '../../../common'; import type { AgentClient } from './agent_service'; diff --git a/x-pack/plugins/fleet/server/services/agents/agent_service.ts b/x-pack/plugins/fleet/server/services/agents/agent_service.ts index 576505e46bd2d..8f732809adf5f 100644 --- a/x-pack/plugins/fleet/server/services/agents/agent_service.ts +++ b/x-pack/plugins/fleet/server/services/agents/agent_service.ts @@ -12,7 +12,7 @@ import type { ElasticsearchClient, KibanaRequest } from '@kbn/core/server'; import type { AgentStatus, ListWithKuery } from '../../types'; import type { Agent, GetAgentStatusResponse } from '../../../common/types'; -import { getAuthzFromRequest } from '../../routes/security'; +import { getAuthzFromRequest } from '../security'; import { FleetUnauthorizedError } from '../../errors'; diff --git a/x-pack/plugins/fleet/server/services/epm/package_service.test.ts b/x-pack/plugins/fleet/server/services/epm/package_service.test.ts index 44d35f3e4c33c..779f0dad02c8c 100644 --- a/x-pack/plugins/fleet/server/services/epm/package_service.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/package_service.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -jest.mock('../../routes/security'); +jest.mock('../security'); import type { MockedLogger } from '@kbn/logging-mocks'; diff --git a/x-pack/plugins/fleet/server/services/epm/package_service.ts b/x-pack/plugins/fleet/server/services/epm/package_service.ts index f3d82f13d96ee..dfc02c4f68c57 100644 --- a/x-pack/plugins/fleet/server/services/epm/package_service.ts +++ b/x-pack/plugins/fleet/server/services/epm/package_service.ts @@ -22,7 +22,7 @@ import type { ArchivePackage, BundledPackage, } from '../../types'; -import { checkSuperuser } from '../../routes/security'; +import { checkSuperuser } from '../security'; import { FleetUnauthorizedError } from '../../errors'; import { installTransforms, isTransform } from './elasticsearch/transform/install'; diff --git a/x-pack/plugins/fleet/server/services/package_policy.ts b/x-pack/plugins/fleet/server/services/package_policy.ts index 7acd555380a68..a95cba87b39be 100644 --- a/x-pack/plugins/fleet/server/services/package_policy.ts +++ b/x-pack/plugins/fleet/server/services/package_policy.ts @@ -82,8 +82,9 @@ import type { } from '../types'; import type { ExternalCallback } from '..'; -import type { FleetAuthzRouteConfig } from '../routes/security'; -import { getAuthzFromRequest, hasRequiredFleetAuthzPrivilege } from '../routes/security'; +import type { FleetAuthzRouteConfig } from './security'; + +import { getAuthzFromRequest, doesNotHaveRequiredFleetAuthz } from './security'; import { storedPackagePolicyToAgentInputs } from './agent_policies'; import { agentPolicyService } from './agent_policy'; @@ -1294,12 +1295,14 @@ export class PackagePolicyServiceImpl implements PackagePolicyService { public asScoped(request: KibanaRequest): PackagePolicyClient { - const preflightCheck = async (fleetAuthzConfig: FleetAuthzRouteConfig) => { + const preflightCheck = async ({ fleetAuthz: fleetRequiredAuthz }: FleetAuthzRouteConfig) => { const authz = await getAuthzFromRequest(request); - if (!hasRequiredFleetAuthzPrivilege(authz, fleetAuthzConfig)) { + + if (doesNotHaveRequiredFleetAuthz(authz, fleetRequiredAuthz)) { throw new FleetUnauthorizedError('Not authorized to this action on integration policies'); } }; + return new PackagePolicyClientWithAuthz(preflightCheck); } diff --git a/x-pack/plugins/fleet/server/routes/security.test.ts b/x-pack/plugins/fleet/server/services/security/fleet_router.test.ts similarity index 66% rename from x-pack/plugins/fleet/server/routes/security.test.ts rename to x-pack/plugins/fleet/server/services/security/fleet_router.test.ts index 15e46529c8697..1f2b6c3fab22b 100644 --- a/x-pack/plugins/fleet/server/routes/security.test.ts +++ b/x-pack/plugins/fleet/server/services/security/fleet_router.test.ts @@ -5,17 +5,25 @@ * 2.0. */ +import type { CheckPrivilegesDynamically } from '@kbn/security-plugin/server/authorization/check_privileges_dynamically'; import type { IRouter, RequestHandler, RouteConfig } from '@kbn/core/server'; +import { loggingSystemMock } from '@kbn/core/server/mocks'; + +import type { AuthenticatedUser } from '@kbn/security-plugin/common'; + import { coreMock } from '@kbn/core/server/mocks'; -import type { AuthenticatedUser, CheckPrivilegesPayload } from '@kbn/security-plugin/server'; + +import type { CheckPrivilegesPayload } from '@kbn/security-plugin/server'; + import type { CheckPrivilegesResponse } from '@kbn/security-plugin/server/authorization/types'; -import type { CheckPrivilegesDynamically } from '@kbn/security-plugin/server/authorization/check_privileges_dynamically'; -import { createAppContextStartContractMock } from '../mocks'; -import { appContextService } from '../services'; -import type { FleetRequestHandlerContext } from '../types'; +import type { FleetRequestHandlerContext } from '../..'; +import { createAppContextStartContractMock } from '../../mocks'; +import { appContextService } from '..'; + +import { makeRouterWithFleetAuthz } from './fleet_router'; -import { deserializeAuthzConfig, makeRouterWithFleetAuthz, serializeAuthzConfig } from './security'; +const mockLogger = loggingSystemMock.createLogger(); function getCheckPrivilegesMockedImplementation(kibanaRoles: string[]) { return (checkPrivileges: CheckPrivilegesPayload) => { @@ -82,12 +90,11 @@ describe('FleetAuthzRouter', () => { appContextService.start(mockContext); - const { router: wrappedRouter, onPostAuthHandler } = makeRouterWithFleetAuthz(fakeRouter); - wrappedRouter.get({ ...routeConfig } as RouteConfig, fakeHandler); + const fleetAuthzRouter = makeRouterWithFleetAuthz(fakeRouter, mockLogger); + fleetAuthzRouter.get({ ...routeConfig } as RouteConfig, fakeHandler); const wrappedHandler = fakeRouter.get.mock.calls[0][1]; const wrappedRouteConfig = fakeRouter.get.mock.calls[0][0]; const resFactory = { forbidden: jest.fn(() => 'forbidden'), ok: jest.fn(() => 'ok') }; - const fakeToolkit = { next: jest.fn(() => 'next') }; const fakeReq = { route: { @@ -96,11 +103,6 @@ describe('FleetAuthzRouter', () => { options: wrappedRouteConfig.options, }, } as any; - const onPostRes = await onPostAuthHandler(fakeReq, resFactory as any, fakeToolkit as any); - - if ((onPostRes as unknown) !== 'next') { - return onPostRes; - } const res = await wrappedHandler( { @@ -198,79 +200,3 @@ describe('FleetAuthzRouter', () => { }); }); }); - -describe('serializeAuthzConfig', () => { - it('should serialize authz to tags', () => { - const res = serializeAuthzConfig({ - fleetAuthz: { - fleet: { - readEnrollmentTokens: true, - setup: true, - }, - integrations: { - readPackageInfo: true, - removePackages: true, - }, - packagePrivileges: { - endpoint: { - actions: { - readPolicyManagement: { - executePackageAction: true, - }, - readBlocklist: { - executePackageAction: true, - }, - }, - }, - }, - }, - }); - - expect(res).toEqual([ - 'fleet:authz:fleet:readEnrollmentTokens', - 'fleet:authz:fleet:setup', - 'fleet:authz:integrations:readPackageInfo', - 'fleet:authz:integrations:removePackages', - 'fleet:authz:packagePrivileges:endpoint:actions:readPolicyManagement:executePackageAction', - 'fleet:authz:packagePrivileges:endpoint:actions:readBlocklist:executePackageAction', - ]); - }); -}); - -describe('deserializeAuthzConfig', () => { - it('should deserialize tags to fleet authz', () => { - const res = deserializeAuthzConfig([ - 'fleet:authz:fleet:readEnrollmentTokens', - 'fleet:authz:fleet:setup', - 'fleet:authz:integrations:readPackageInfo', - 'fleet:authz:integrations:removePackages', - 'fleet:authz:packagePrivileges:endpoint:actions:readPolicyManagement:executePackageAction', - 'fleet:authz:packagePrivileges:endpoint:actions:readBlocklist:executePackageAction', - ]); - - expect(res).toEqual({ - fleetAuthz: { - fleet: { - readEnrollmentTokens: true, - setup: true, - }, - integrations: { - readPackageInfo: true, - removePackages: true, - }, - packagePrivileges: { - endpoint: { - actions: { - readPolicyManagement: { - executePackageAction: true, - }, - readBlocklist: { - executePackageAction: true, - }, - }, - }, - }, - }, - }); - }); -}); diff --git a/x-pack/plugins/fleet/server/services/security/fleet_router.ts b/x-pack/plugins/fleet/server/services/security/fleet_router.ts new file mode 100644 index 0000000000000..1b1d84d3aca40 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/security/fleet_router.ts @@ -0,0 +1,95 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { + IKibanaResponse, + IRouter, + KibanaRequest, + KibanaResponseFactory, + Logger, + RequestHandler, + RouteMethod, +} from '@kbn/core/server'; + +import type { FleetRequestHandlerContext } from '../..'; + +import type { FleetAuthzRouteConfig, FleetAuthzRouter } from './types'; +import { + checkSecurityEnabled, + getAuthzFromRequest, + doesNotHaveRequiredFleetAuthz, +} from './security'; + +export function makeRouterWithFleetAuthz( + router: IRouter, + logger: Logger +): FleetAuthzRouter { + const routerAuthzWrapper = async ({ + context, + request, + response, + handler, + hasRequiredAuthz, + }: { + context: TContext; + request: KibanaRequest; + response: KibanaResponseFactory; + handler: RequestHandler; + hasRequiredAuthz?: FleetAuthzRouteConfig['fleetAuthz']; + }): Promise> => { + if (!checkSecurityEnabled()) { + const securityEnabledInfo = 'Kibana security must be enabled to use Fleet'; + logger.info(securityEnabledInfo); + return response.forbidden({ + body: { + message: securityEnabledInfo, + }, + }); + } + + const requestedAuthz = await getAuthzFromRequest(request); + + if (doesNotHaveRequiredFleetAuthz(requestedAuthz, hasRequiredAuthz)) { + logger.info(`User does not have required fleet authz to access path: ${request.route.path}`); + return response.forbidden(); + } + return handler(context, request, response); + }; + + const fleetAuthzRouter: FleetAuthzRouter = { + get: ({ fleetAuthz: hasRequiredAuthz, ...options }, handler) => { + router.get(options, async (context, request, response) => + routerAuthzWrapper({ context, request, response, handler, hasRequiredAuthz }) + ); + }, + delete: ({ fleetAuthz: hasRequiredAuthz, ...options }, handler) => { + router.delete(options, async (context, request, response) => + routerAuthzWrapper({ context, request, response, handler, hasRequiredAuthz }) + ); + }, + post: ({ fleetAuthz: hasRequiredAuthz, ...options }, handler) => { + router.post(options, async (context, request, response) => + routerAuthzWrapper({ context, request, response, handler, hasRequiredAuthz }) + ); + }, + put: ({ fleetAuthz: hasRequiredAuthz, ...options }, handler) => { + router.put(options, async (context, request, response) => + routerAuthzWrapper({ context, request, response, handler, hasRequiredAuthz }) + ); + }, + patch: ({ fleetAuthz: hasRequiredAuthz, ...options }, handler) => { + router.patch(options, async (context, request, response) => + routerAuthzWrapper({ context, request, response, handler, hasRequiredAuthz }) + ); + }, + handleLegacyErrors: (handler) => router.handleLegacyErrors(handler), + getRoutes: () => router.getRoutes(), + routerPath: router.routerPath, + }; + + return fleetAuthzRouter; +} diff --git a/x-pack/plugins/fleet/server/services/security/index.ts b/x-pack/plugins/fleet/server/services/security/index.ts new file mode 100644 index 0000000000000..c41c769c58d8d --- /dev/null +++ b/x-pack/plugins/fleet/server/services/security/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export * from './types'; +export { makeRouterWithFleetAuthz } from './fleet_router'; +export { getRouteRequiredAuthz } from './route_required_authz'; +export { + checkSecurityEnabled, + checkSuperuser, + calculateRouteAuthz, + getAuthzFromRequest, + doesNotHaveRequiredFleetAuthz, +} from './security'; diff --git a/x-pack/plugins/fleet/server/services/security/route_required_authz.ts b/x-pack/plugins/fleet/server/services/security/route_required_authz.ts new file mode 100644 index 0000000000000..db0ea31eff7ae --- /dev/null +++ b/x-pack/plugins/fleet/server/services/security/route_required_authz.ts @@ -0,0 +1,175 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { deepFreeze } from '@kbn/std'; + +import type { RouteMethod } from '@kbn/core-http-server'; + +import { PACKAGE_POLICY_API_ROUTES } from '../../../common'; + +import type { FleetRouteRequiredAuthz } from './types'; + +/** + * The authorization requirements needed for an API route. Route authorization requirements are + * defined either via an `all` object, where all values must be `true` in order for access to be granted, + * or, by an `any` object, where any value defined that is set to `true` will grant access to the API. + * + * The `all` conditions are checked first and if those evaluate to `false`, then `any` conditions are evaluated. + */ +const ROUTE_AUTHZ_REQUIREMENTS = deepFreeze>({ + // Package Policy Update API + [`put:${PACKAGE_POLICY_API_ROUTES.UPDATE_PATTERN}`]: { + any: { + integrations: { writeIntegrationPolicies: true }, + packagePrivileges: { + endpoint: { + actions: { + writePolicyManagement: { + executePackageAction: true, + }, + }, + }, + }, + }, + }, + + // Package Policy GET one API + [`get:${PACKAGE_POLICY_API_ROUTES.INFO_PATTERN}`]: { + any: { + integrations: { + readIntegrationPolicies: true, + }, + packagePrivileges: { + endpoint: { + actions: { + readPolicyManagement: { + executePackageAction: true, + }, + readTrustedApplications: { + executePackageAction: true, + }, + readEventFilters: { + executePackageAction: true, + }, + readHostIsolationExceptions: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + }, + }, + }, + + // Package Policy Bulk GET API + [`post:${PACKAGE_POLICY_API_ROUTES.BULK_GET_PATTERN}`]: { + any: { + integrations: { + readIntegrationPolicies: true, + }, + packagePrivileges: { + endpoint: { + actions: { + readPolicyManagement: { + executePackageAction: true, + }, + readTrustedApplications: { + executePackageAction: true, + }, + readEventFilters: { + executePackageAction: true, + }, + readHostIsolationExceptions: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + }, + }, + }, + + // Package Policy List API + [`get:${PACKAGE_POLICY_API_ROUTES.LIST_PATTERN}`]: { + any: { + integrations: { + readIntegrationPolicies: true, + }, + packagePrivileges: { + endpoint: { + actions: { + readPolicyManagement: { + executePackageAction: true, + }, + readTrustedApplications: { + executePackageAction: true, + }, + readEventFilters: { + executePackageAction: true, + }, + readHostIsolationExceptions: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + }, + }, + }, +}); + +/** + * Retrieves the required fleet route authz + * in order to grant access to the given api route + * @param routeMethod + * @param routePath + */ +export const getRouteRequiredAuthz = ( + routeMethod: RouteMethod, + routePath: string +): FleetRouteRequiredAuthz | undefined => { + const key = `${routeMethod}:${routePath}`; + + if (typeof ROUTE_AUTHZ_REQUIREMENTS[key] !== 'undefined') { + return ROUTE_AUTHZ_REQUIREMENTS[key]; + } + + for (const k of Object.keys(ROUTE_AUTHZ_REQUIREMENTS)) { + if (pathMatchesPattern(k, key)) { + return ROUTE_AUTHZ_REQUIREMENTS[k]; + } + } +}; + +const pathMatchesPattern = (pathPattern: string, path: string): boolean => { + // No path params - pattern is single path + if (pathPattern === path) { + return true; + } + + // If pathPattern has params (`{value}`), then see if `path` matches it + if (/{.*?}/.test(pathPattern)) { + const pathParts = path.split(/\//); + const patternParts = pathPattern.split(/\//); + + if (pathParts.length !== patternParts.length) { + return false; + } + + return pathParts.every((part, index) => { + return part === patternParts[index] || /{.*?}/.test(patternParts[index]); + }); + } + + return false; +}; diff --git a/x-pack/plugins/fleet/server/services/security/security.test.ts b/x-pack/plugins/fleet/server/services/security/security.test.ts new file mode 100644 index 0000000000000..f99a708504d6c --- /dev/null +++ b/x-pack/plugins/fleet/server/services/security/security.test.ts @@ -0,0 +1,540 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { deepFreeze } from '@kbn/std'; + +import type { FleetAuthz } from '../../../common'; + +import { calculateRouteAuthz } from './security'; + +describe('When using calculateRouteAuthz()', () => { + const fleetAuthz = deepFreeze({ + fleet: { + all: false, + setup: false, + readEnrollmentTokens: false, + readAgentPolicies: false, + }, + integrations: { + readPackageInfo: false, + readInstalledPackages: false, + installPackages: false, + upgradePackages: false, + removePackages: false, + uploadPackages: false, + readPackageSettings: false, + writePackageSettings: false, + readIntegrationPolicies: false, + writeIntegrationPolicies: false, + }, + packagePrivileges: { + endpoint: { + actions: { + writeEndpointList: { + executePackageAction: false, + }, + readEndpointList: { + executePackageAction: false, + }, + writeTrustedApplications: { + executePackageAction: false, + }, + readTrustedApplications: { + executePackageAction: false, + }, + writeHostIsolationExceptions: { + executePackageAction: false, + }, + readHostIsolationExceptions: { + executePackageAction: false, + }, + writeBlocklist: { + executePackageAction: false, + }, + readBlocklist: { + executePackageAction: false, + }, + writeEventFilters: { + executePackageAction: false, + }, + readEventFilters: { + executePackageAction: false, + }, + writePolicyManagement: { + executePackageAction: false, + }, + readPolicyManagement: { + executePackageAction: false, + }, + writeActionsLogManagement: { + executePackageAction: false, + }, + readActionsLogManagement: { + executePackageAction: false, + }, + writeHostIsolation: { + executePackageAction: false, + }, + writeProcessOperations: { + executePackageAction: false, + }, + writeFileOperations: { + executePackageAction: false, + }, + }, + }, + + someOtherPackage: { + actions: { + readSomeThing: { + executePackageAction: false, + }, + }, + }, + }, + }); + + const getFleetAuthzMock = (authz: FleetAuthz = fleetAuthz) => authz; + + describe('with ANY object defined', () => { + it('should grant access if `any` are true', () => { + expect( + calculateRouteAuthz( + getFleetAuthzMock({ + ...fleetAuthz, + packagePrivileges: { + ...fleetAuthz.packagePrivileges, + endpoint: { + ...fleetAuthz.packagePrivileges.endpoint, + actions: { + ...fleetAuthz.packagePrivileges.endpoint.actions, + readPolicyManagement: { + executePackageAction: true, + }, + }, + }, + }, + }), + { + any: { + integrations: { + readPackageInfo: true, + removePackages: true, + }, + packagePrivileges: { + endpoint: { + actions: { + readPolicyManagement: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + }, + }, + } + ) + ).toEqual({ + granted: true, + grantedByFleetPrivileges: false, + scopeDataToPackages: ['endpoint'], + }); + }); + + it('should deny access if `any` are false', () => { + expect( + calculateRouteAuthz(getFleetAuthzMock(), { + any: { + integrations: { + readPackageInfo: true, + removePackages: true, + }, + packagePrivileges: { + endpoint: { + actions: { + readPolicyManagement: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + }, + }, + }) + ).toEqual({ + granted: false, + grantedByFleetPrivileges: false, + scopeDataToPackages: undefined, + }); + }); + }); + + describe('with ALL object defined', () => { + it('should grant access if `all` are true', () => { + expect( + calculateRouteAuthz( + getFleetAuthzMock({ + ...fleetAuthz, + integrations: { + ...fleetAuthz.integrations, + readPackageInfo: true, + removePackages: true, + }, + packagePrivileges: { + ...fleetAuthz.packagePrivileges, + endpoint: { + ...fleetAuthz.packagePrivileges.endpoint, + actions: { + ...fleetAuthz.packagePrivileges.endpoint.actions, + readPolicyManagement: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + }, + }), + { + all: { + integrations: { + readPackageInfo: true, + removePackages: true, + }, + packagePrivileges: { + endpoint: { + actions: { + readPolicyManagement: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + }, + }, + } + ) + ).toEqual({ granted: true, grantedByFleetPrivileges: true, scopeDataToPackages: undefined }); + }); + + it('should deny access if not `all` are true', () => { + expect( + calculateRouteAuthz( + getFleetAuthzMock({ + ...fleetAuthz, + packagePrivileges: { + ...fleetAuthz.packagePrivileges, + endpoint: { + ...fleetAuthz.packagePrivileges.endpoint, + actions: { + ...fleetAuthz.packagePrivileges.endpoint.actions, + readPolicyManagement: { + executePackageAction: true, + }, + }, + }, + }, + }), + { + all: { + integrations: { + readPackageInfo: true, + removePackages: true, + }, + packagePrivileges: { + endpoint: { + actions: { + readPolicyManagement: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + }, + }, + } + ) + ).toEqual({ + granted: false, + grantedByFleetPrivileges: false, + scopeDataToPackages: undefined, + }); + }); + }); + + describe('with ALL and ANY', () => { + it('should grant access if `all` are true', () => { + expect( + calculateRouteAuthz( + getFleetAuthzMock({ + ...fleetAuthz, + integrations: { + ...fleetAuthz.integrations, + readPackageInfo: true, + removePackages: true, + }, + packagePrivileges: { + ...fleetAuthz.packagePrivileges, + endpoint: { + ...fleetAuthz.packagePrivileges.endpoint, + actions: { + ...fleetAuthz.packagePrivileges.endpoint.actions, + readPolicyManagement: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + }, + }), + { + all: { + integrations: { + readPackageInfo: true, + removePackages: true, + }, + packagePrivileges: { + endpoint: { + actions: { + readPolicyManagement: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + }, + }, + } + ) + ).toEqual({ granted: true, grantedByFleetPrivileges: true, scopeDataToPackages: undefined }); + }); + + it('should grant access if all OR any are true', () => { + expect( + calculateRouteAuthz( + getFleetAuthzMock({ + ...fleetAuthz, + integrations: { + ...fleetAuthz.integrations, + readPackageInfo: true, + removePackages: true, + }, + packagePrivileges: { + ...fleetAuthz.packagePrivileges, + endpoint: { + ...fleetAuthz.packagePrivileges.endpoint, + actions: { + ...fleetAuthz.packagePrivileges.endpoint.actions, + readPolicyManagement: { + executePackageAction: true, + }, + }, + }, + }, + }), + { + all: { + integrations: { + readPackageInfo: true, + removePackages: true, + }, + }, + any: { + packagePrivileges: { + endpoint: { + actions: { + readPolicyManagement: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + }, + }, + } + ) + ).toEqual({ granted: true, grantedByFleetPrivileges: true, scopeDataToPackages: undefined }); + }); + + it('should grant access if `all` are not true but `any` are true ', () => { + expect( + calculateRouteAuthz( + getFleetAuthzMock({ + ...fleetAuthz, + integrations: { + ...fleetAuthz.integrations, + readPackageInfo: true, + }, + packagePrivileges: { + ...fleetAuthz.packagePrivileges, + endpoint: { + ...fleetAuthz.packagePrivileges.endpoint, + actions: { + ...fleetAuthz.packagePrivileges.endpoint.actions, + readPolicyManagement: { + executePackageAction: true, + }, + }, + }, + + someOtherPackage: { + actions: { + readSomeThing: { + executePackageAction: true, + }, + }, + }, + }, + }), + { + all: { + integrations: { + readPackageInfo: true, + removePackages: true, + }, + }, + any: { + packagePrivileges: { + endpoint: { + actions: { + readPolicyManagement: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + someOtherPackage: { + actions: { + readSomeThing: { + executePackageAction: true, + }, + }, + }, + }, + }, + } + ) + ).toEqual({ + granted: true, + grantedByFleetPrivileges: false, + scopeDataToPackages: ['endpoint', 'someOtherPackage'], + }); + }); + + it('should grant access if `all` are true but `any` are not true ', () => { + expect( + calculateRouteAuthz( + getFleetAuthzMock({ + ...fleetAuthz, + integrations: { + ...fleetAuthz.integrations, + readPackageInfo: true, + removePackages: true, + }, + }), + { + all: { + integrations: { + readPackageInfo: true, + removePackages: true, + }, + }, + any: { + packagePrivileges: { + endpoint: { + actions: { + readPolicyManagement: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + }, + }, + } + ) + ).toEqual({ granted: true, grantedByFleetPrivileges: true, scopeDataToPackages: undefined }); + }); + }); + + describe('and access is granted based on package privileges', () => { + it('should exclude package names for which there is no access allowed', () => { + expect( + calculateRouteAuthz( + getFleetAuthzMock({ + ...fleetAuthz, + packagePrivileges: { + ...fleetAuthz.packagePrivileges, + endpoint: { + ...fleetAuthz.packagePrivileges.endpoint, + actions: { + ...fleetAuthz.packagePrivileges.endpoint.actions, + readPolicyManagement: { + executePackageAction: true, + }, + }, + }, + }, + }), + { + all: { + integrations: { + readPackageInfo: true, + removePackages: true, + }, + }, + any: { + packagePrivileges: { + endpoint: { + actions: { + readPolicyManagement: { + executePackageAction: true, + }, + readBlocklist: { + executePackageAction: true, + }, + }, + }, + // This package Authz is not allowed, so it should not be listed in `scopeDataToPackages` + someOtherPackage: { + actions: { + readSomeThing: { + executePackageAction: true, + }, + }, + }, + }, + }, + } + ) + ).toEqual({ + granted: true, + grantedByFleetPrivileges: false, + scopeDataToPackages: ['endpoint'], + }); + }); + }); +}); diff --git a/x-pack/plugins/fleet/server/services/security/security.ts b/x-pack/plugins/fleet/server/services/security/security.ts new file mode 100644 index 0000000000000..c5dabecc8090e --- /dev/null +++ b/x-pack/plugins/fleet/server/services/security/security.ts @@ -0,0 +1,252 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { pick } from 'lodash'; + +import type { KibanaRequest } from '@kbn/core/server'; +import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; + +import type { FleetAuthz } from '../../../common'; +import { INTEGRATIONS_PLUGIN_ID } from '../../../common'; +import { + calculateAuthz, + calculatePackagePrivilegesFromKibanaPrivileges, +} from '../../../common/authz'; + +import { appContextService } from '..'; +import { ENDPOINT_PRIVILEGES, PLUGIN_ID } from '../../constants'; + +import type { + FleetAuthzRequirements, + FleetRouteRequiredAuthz, + FleetAuthzRouteConfig, +} from './types'; + +export function checkSecurityEnabled() { + return appContextService.getSecurityLicense().isEnabled(); +} + +export function checkSuperuser(req: KibanaRequest) { + if (!checkSecurityEnabled()) { + return false; + } + + const security = appContextService.getSecurity(); + const user = security.authc.getCurrentUser(req); + if (!user) { + return false; + } + + const userRoles = user.roles || []; + if (!userRoles.includes('superuser')) { + return false; + } + + return true; +} + +function getAuthorizationFromPrivileges( + kibanaPrivileges: Array<{ + resource?: string; + privilege: string; + authorized: boolean; + }>, + searchPrivilege: string +) { + const privilege = kibanaPrivileges.find((p) => p.privilege.includes(searchPrivilege)); + return privilege ? privilege.authorized : false; +} + +export async function getAuthzFromRequest(req: KibanaRequest): Promise { + const security = appContextService.getSecurity(); + + if (security.authz.mode.useRbacForRequest(req)) { + const checkPrivileges = security.authz.checkPrivilegesDynamicallyWithRequest(req); + const endpointPrivileges = ENDPOINT_PRIVILEGES.map((privilege) => + security.authz.actions.api.get(`${DEFAULT_APP_CATEGORIES.security.id}-${privilege}`) + ); + const { privileges } = await checkPrivileges({ + kibana: [ + security.authz.actions.api.get(`${PLUGIN_ID}-all`), + security.authz.actions.api.get(`${PLUGIN_ID}-setup`), + security.authz.actions.api.get(`${INTEGRATIONS_PLUGIN_ID}-all`), + security.authz.actions.api.get(`${INTEGRATIONS_PLUGIN_ID}-read`), + ...endpointPrivileges, + ], + }); + const fleetAllAuth = getAuthorizationFromPrivileges(privileges.kibana, `${PLUGIN_ID}-all`); + const intAllAuth = getAuthorizationFromPrivileges( + privileges.kibana, + `${INTEGRATIONS_PLUGIN_ID}-all` + ); + const intReadAuth = getAuthorizationFromPrivileges( + privileges.kibana, + `${INTEGRATIONS_PLUGIN_ID}-read` + ); + const fleetSetupAuth = getAuthorizationFromPrivileges(privileges.kibana, 'fleet-setup'); + + return { + ...calculateAuthz({ + fleet: { all: fleetAllAuth, setup: fleetSetupAuth }, + integrations: { + all: intAllAuth, + read: intReadAuth, + }, + isSuperuser: checkSuperuser(req), + }), + packagePrivileges: calculatePackagePrivilegesFromKibanaPrivileges(privileges.kibana), + }; + } + + return calculateAuthz({ + fleet: { all: false, setup: false }, + integrations: { + all: false, + read: false, + }, + isSuperuser: false, + }); +} + +interface RouteAuthz { + /** Is route access granted (based on authz) */ + granted: boolean; + + /** Was authorization to the api a result of Fleet (and Integrations) Privileges (as oposed to Package privileges) */ + grantedByFleetPrivileges: boolean; + + /** + * Set when `grantedByFleetPrivileges` is `false` and `granted` is true, which indicate access was granted + * via a Package Privileges. Array will hold the list of Package names that are allowed + */ + scopeDataToPackages: string[] | undefined; +} + +/** + * Calculates Authz information for a Route, including: + * 1. Is access granted + * 2. was access granted based on Fleet and/or Integration privileges, and + * 3. a list of package names for which access was granted (only set if access was granted by package privileges) + * + * @param fleetAuthz + * @param requiredAuthz + */ +export const calculateRouteAuthz = ( + fleetAuthz: FleetAuthz, + requiredAuthz: FleetRouteRequiredAuthz | undefined +): RouteAuthz => { + const response: RouteAuthz = { + granted: false, + grantedByFleetPrivileges: false, + scopeDataToPackages: undefined, + }; + const fleetAuthzFlatten = flatten(fleetAuthz); + + const isPrivilegeGranted = (flattenPrivilegeKey: string): boolean => + fleetAuthzFlatten[flattenPrivilegeKey] === true; + + if (typeof requiredAuthz === 'undefined') { + return response; + } + + if (requiredAuthz.all) { + response.granted = Object.keys(flatten(requiredAuthz.all)).every(isPrivilegeGranted); + + if (response.granted) { + if (requiredAuthz.all.fleet || requiredAuthz.all.integrations) { + response.grantedByFleetPrivileges = true; + } + + return response; + } + } + + if (requiredAuthz.any) { + response.granted = Object.keys(flatten(requiredAuthz.any)).some(isPrivilegeGranted); + + if (response.granted) { + // Figure out if authz was granted via Fleet privileges + if (requiredAuthz.any.fleet || requiredAuthz.any.integrations) { + const fleetAnyPrivileges = pick(requiredAuthz.any, ['fleet', 'integrations']); + + response.grantedByFleetPrivileges = Object.keys(flatten(fleetAnyPrivileges)).some( + isPrivilegeGranted + ); + } + + // If access was NOT granted via Fleet Authz, then retrieve a list of Package names that were + // granted access to their respective data. + if (!response.grantedByFleetPrivileges && requiredAuthz.any.packagePrivileges) { + for (const [packageName, packageRequiredAuthz] of Object.entries( + requiredAuthz.any.packagePrivileges + )) { + const packageRequiredAuthzKeys = Object.keys( + flatten({ packagePrivileges: { [packageName]: packageRequiredAuthz } }) + ); + + if (packageRequiredAuthzKeys.some(isPrivilegeGranted)) { + if (!response.scopeDataToPackages) { + response.scopeDataToPackages = []; + } + + response.scopeDataToPackages.push(packageName); + } + } + } + + return response; + } + } + + return response; +}; + +/** + * Utility to flatten an object's key all the way down to the last value. + * @param source + */ +function flatten(source: FleetAuthzRequirements | FleetAuthz): Record { + const response: Record = {}; + const processKeys = (prefix: string, value: unknown) => { + if (typeof value === 'object' && value !== null) { + const objectKeys = Object.keys(value); + + for (const key of objectKeys) { + processKeys(`${prefix}${prefix ? '.' : ''}${key}`, (value as Record)[key]); + } + } else if (Array.isArray(value)) { + value.forEach((subValue, key) => { + processKeys(`${prefix}${prefix ? '.' : ''}${key}`, subValue); + }); + } else { + response[prefix] = value as boolean; + } + }; + + processKeys('', source); + + return response; +} + +/** + * Utility to determine if a user has the required Fleet Authz based on user privileges + * and route required authz structure. + * @param authz + * @param fleetRequiredAuthz + * @returns boolean + */ +export const doesNotHaveRequiredFleetAuthz = ( + authz: FleetAuthz, + fleetRequiredAuthz: FleetAuthzRouteConfig['fleetAuthz'] +): boolean => { + return ( + !!fleetRequiredAuthz && + ((typeof fleetRequiredAuthz === 'function' && !fleetRequiredAuthz(authz)) || + (typeof fleetRequiredAuthz !== 'function' && + !calculateRouteAuthz(authz, { all: fleetRequiredAuthz }).granted)) + ); +}; diff --git a/x-pack/plugins/fleet/server/services/security/types.ts b/x-pack/plugins/fleet/server/services/security/types.ts new file mode 100644 index 0000000000000..8559ee57b35e8 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/security/types.ts @@ -0,0 +1,62 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { RouteConfig, RouteMethod } from '@kbn/core-http-server'; +import type { RequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; +import type { IRouter, RequestHandler } from '@kbn/core/server'; + +import type { FleetRequestHandlerContext } from '../..'; + +import type { FleetAuthz } from '../../../common'; + +/** The values allowed for the `fleetAuthz` property of the Fleet Router registration interface. */ +type FleetAuthzRouterConfigParam = FleetAuthzRequirements | ((userAuthz: FleetAuthz) => boolean); + +type FleetAuthzRouteRegistrar< + Method extends RouteMethod, + Context extends RequestHandlerContext = RequestHandlerContext +> = ( + route: FleetRouteConfig, + handler: RequestHandler +) => void; + +export interface FleetAuthzRouteConfig< + T extends FleetAuthzRouterConfigParam = FleetAuthzRouterConfigParam +> { + fleetAuthz?: T; +} + +export type FleetRouteConfig = RouteConfig & + FleetAuthzRouteConfig; + +// Fleet router that allow to add required access when registering route +export interface FleetAuthzRouter< + TContext extends FleetRequestHandlerContext = FleetRequestHandlerContext +> extends IRouter { + get: FleetAuthzRouteRegistrar<'get', TContext>; + delete: FleetAuthzRouteRegistrar<'delete', TContext>; + post: FleetAuthzRouteRegistrar<'post', TContext>; + put: FleetAuthzRouteRegistrar<'put', TContext>; + patch: FleetAuthzRouteRegistrar<'patch', TContext>; +} + +type DeepPartialTruthy = { + [P in keyof T]?: T[P] extends boolean ? true : DeepPartialTruthy; +}; + +/** + * The set of authz properties required to be granted access to an API route + */ +export type FleetAuthzRequirements = DeepPartialTruthy; + +/** + * Interface used for registering and calculating authorization for a Fleet API routes + */ +export type FleetRouteRequiredAuthz = Partial<{ + any: FleetAuthzRequirements; + all: FleetAuthzRequirements; +}>; diff --git a/x-pack/plugins/fleet/server/types/request_context.ts b/x-pack/plugins/fleet/server/types/request_context.ts index f803d1c0cd6b5..bc0e1c8886bff 100644 --- a/x-pack/plugins/fleet/server/types/request_context.ts +++ b/x-pack/plugins/fleet/server/types/request_context.ts @@ -32,14 +32,18 @@ export type FleetRequestHandlerContext = CustomRequestHandlerContext<{ asCurrentUser: PackagePolicyClient; asInternalUser: PackagePolicyClient; }; - epm: { - /** - * Saved Objects client configured to use kibana_system privileges instead of end-user privileges. Should only be - * used by routes that have additional privilege checks for authorization (such as requiring superuser). - */ - readonly internalSoClient: SavedObjectsClientContract; - }; + /** + * Saved Objects client configured to use kibana_system privileges instead of end-user privileges. Should only be + * used by routes that have additional privilege checks for authorization (such as requiring superuser). + */ + readonly internalSoClient: SavedObjectsClientContract; + spaceId: string; + /** + * If data is to be limited to the list of integration package names. This will be set when + * authz to the API was granted only based on Package Privileges. + */ + limitedToPackages: string[] | undefined; }; }>; diff --git a/x-pack/plugins/infra/common/http_api/snapshot_api.ts b/x-pack/plugins/infra/common/http_api/snapshot_api.ts index eb39f6a440a79..791b8079ba688 100644 --- a/x-pack/plugins/infra/common/http_api/snapshot_api.ts +++ b/x-pack/plugins/infra/common/http_api/snapshot_api.ts @@ -16,9 +16,14 @@ export const SnapshotNodePathRT = rt.intersection([ }), rt.partial({ ip: rt.union([rt.string, rt.null]), - }), - rt.partial({ os: rt.union([rt.string, rt.null]), + cloudProvider: rt.union([ + rt.literal('gcp'), + rt.literal('aws'), + rt.literal('azure'), + rt.literal('unknownProvider'), + rt.null, + ]), }), ]); diff --git a/x-pack/plugins/infra/common/inventory_models/host/index.ts b/x-pack/plugins/infra/common/inventory_models/host/index.ts index 7420ca3f15939..04aa00fbdf2be 100644 --- a/x-pack/plugins/infra/common/inventory_models/host/index.ts +++ b/x-pack/plugins/infra/common/inventory_models/host/index.ts @@ -35,6 +35,7 @@ export const host: InventoryModel = { name: 'host.name', os: 'host.os.name', ip: 'host.ip', + cloudProvider: 'cloud.provider', }, metrics, requiredMetrics: [ diff --git a/x-pack/plugins/infra/common/inventory_models/types.ts b/x-pack/plugins/infra/common/inventory_models/types.ts index 74c0a740319f1..13244bae57e69 100644 --- a/x-pack/plugins/infra/common/inventory_models/types.ts +++ b/x-pack/plugins/infra/common/inventory_models/types.ts @@ -387,6 +387,7 @@ export interface InventoryModel { name: string; os?: string; ip?: string; + cloudProvider?: string; }; crosslinkSupport: { details: boolean; diff --git a/x-pack/plugins/infra/public/pages/metrics/hosts/components/cloud_provider_icon_with_title.tsx b/x-pack/plugins/infra/public/pages/metrics/hosts/components/cloud_provider_icon_with_title.tsx new file mode 100644 index 0000000000000..dc96bceeb0ddc --- /dev/null +++ b/x-pack/plugins/infra/public/pages/metrics/hosts/components/cloud_provider_icon_with_title.tsx @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText } from '@elastic/eui'; +import React from 'react'; +import { SnapshotNodePath } from '../../../../../common/http_api'; + +export type CloudProviders = NonNullable; +const cloudIcons: Record = { + gcp: 'logoGCP', + aws: 'logoAWS', + azure: 'logoAzure', + unknownProvider: 'cloudSunny', +}; + +export const CloudProviderIconWithTitle = ({ + provider, + title, +}: { + provider?: CloudProviders | null; + title: string; +}) => { + return ( + + + + + + + {title} + + + + ); +}; diff --git a/x-pack/plugins/infra/public/pages/metrics/hosts/components/hosts_table_columns.tsx b/x-pack/plugins/infra/public/pages/metrics/hosts/components/hosts_table_columns.tsx index 03f0f243445ce..28b66fab83767 100644 --- a/x-pack/plugins/infra/public/pages/metrics/hosts/components/hosts_table_columns.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/hosts/components/hosts_table_columns.tsx @@ -11,10 +11,12 @@ import { i18n } from '@kbn/i18n'; import { EuiText } from '@elastic/eui'; import type { SnapshotMetricInput, SnapshotNodeMetric } from '../../../../../common/http_api'; import { createInventoryMetricFormatter } from '../../inventory_view/lib/create_inventory_metric_formatter'; +import { CloudProviderIconWithTitle, CloudProviders } from './cloud_provider_icon_with_title'; interface HostNodeRow extends HostMetics { os?: string | null; servicesOnHost?: number | null; + title: { name: string; cloudProvider?: CloudProviders | null }; name: string; } @@ -35,10 +37,12 @@ export const HostsTableColumns: Array> = [ name: i18n.translate('xpack.infra.hostsTable.nameColumnHeader', { defaultMessage: 'Name', }), - field: 'name', + field: 'title', sortable: true, truncateText: true, - textOnly: true, + render: (title: HostNodeRow['title']) => ( + + ), }, { name: i18n.translate('xpack.infra.hostsTable.operatingSystemColumnHeader', { diff --git a/x-pack/plugins/infra/public/pages/metrics/hosts/hooks/use_host_table.test.ts b/x-pack/plugins/infra/public/pages/metrics/hosts/hooks/use_host_table.test.ts index 81b0e93f10121..1b894eed7954a 100644 --- a/x-pack/plugins/infra/public/pages/metrics/hosts/hooks/use_host_table.test.ts +++ b/x-pack/plugins/infra/public/pages/metrics/hosts/hooks/use_host_table.test.ts @@ -7,10 +7,11 @@ import { useHostTable } from './use_host_table'; import { renderHook } from '@testing-library/react-hooks'; +import { SnapshotNode } from '../../../../../common/http_api'; describe('useHostTable hook', () => { it('it should map the nodes returned from the snapshot api to a format matching eui table items', () => { - const nodes = [ + const nodes: SnapshotNode[] = [ { metrics: [ { @@ -34,7 +35,7 @@ describe('useHostTable hook', () => { avg: 34359.738368, }, ], - path: [{ value: 'host-0', label: 'host-0', os: null }], + path: [{ value: 'host-0', label: 'host-0', os: null, cloudProvider: 'aws' }], name: 'host-0', }, { @@ -72,6 +73,10 @@ describe('useHostTable hook', () => { { name: 'host-0', os: '-', + title: { + cloudProvider: 'aws', + name: 'host-0', + }, rx: { name: 'rx', avg: 252456.92916666667, @@ -97,6 +102,10 @@ describe('useHostTable hook', () => { { name: 'host-1', os: 'macOS', + title: { + cloudProvider: null, + name: 'host-1', + }, rx: { name: 'rx', avg: 95.86339715321859, diff --git a/x-pack/plugins/infra/public/pages/metrics/hosts/hooks/use_host_table.ts b/x-pack/plugins/infra/public/pages/metrics/hosts/hooks/use_host_table.ts index 32eed5e54ce6b..043976237f73c 100644 --- a/x-pack/plugins/infra/public/pages/metrics/hosts/hooks/use_host_table.ts +++ b/x-pack/plugins/infra/public/pages/metrics/hosts/hooks/use_host_table.ts @@ -16,6 +16,10 @@ export const useHostTable = (nodes: SnapshotNode[]) => { return nodes.map(({ metrics, path, name }) => ({ name, os: path.at(-1)?.os ?? '-', + title: { + name, + cloudProvider: path.at(-1)?.cloudProvider ?? null, + }, ...metrics.reduce((data, metric) => { data[metric.name as keyof HostMetics] = metric; return data; diff --git a/x-pack/plugins/infra/server/routes/snapshot/lib/apply_metadata_to_last_path.ts b/x-pack/plugins/infra/server/routes/snapshot/lib/apply_metadata_to_last_path.ts index 07fa1ac9cd1cf..847aaf9b21a81 100644 --- a/x-pack/plugins/infra/server/routes/snapshot/lib/apply_metadata_to_last_path.ts +++ b/x-pack/plugins/infra/server/routes/snapshot/lib/apply_metadata_to_last_path.ts @@ -59,6 +59,12 @@ export const applyMetadataToLastPath = ( if (inventoryFields.os) { lastPath.os = get(firstMetaDoc, inventoryFields.os) as string; } + if (inventoryFields.cloudProvider) { + lastPath.cloudProvider = get( + firstMetaDoc, + inventoryFields.cloudProvider + ) as SnapshotNodePath['cloudProvider']; + } return [...node.path.slice(0, node.path.length - 1), lastPath]; } } diff --git a/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.ts b/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.ts index 87fbbdac9a701..c60f8a17c9c04 100644 --- a/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.ts +++ b/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.ts @@ -98,6 +98,12 @@ export const transformRequestToMetricsAPIRequest = async ({ metaAggregation.aggregations[META_KEY].top_metrics.metrics.push({ field: inventoryFields.os }); } + if (inventoryFields.cloudProvider) { + metaAggregation.aggregations[META_KEY].top_metrics.metrics.push({ + field: inventoryFields.cloudProvider, + }); + } + metricsApiRequest.metrics.push(metaAggregation); if (filters.length) { diff --git a/x-pack/plugins/kubernetes_security/common/constants.ts b/x-pack/plugins/kubernetes_security/common/constants.ts index 3de3ec6be69e3..cde3413d7e136 100644 --- a/x-pack/plugins/kubernetes_security/common/constants.ts +++ b/x-pack/plugins/kubernetes_security/common/constants.ts @@ -12,6 +12,7 @@ export const LOCAL_STORAGE_HIDE_WIDGETS_KEY = 'kubernetesSecurity:shouldHideWidg export const AGGREGATE_ROUTE = '/internal/kubernetes_security/aggregate'; export const COUNT_ROUTE = '/internal/kubernetes_security/count'; export const MULTI_TERMS_AGGREGATE_ROUTE = '/internal/kubernetes_security/multi_terms_aggregate'; +export const AGENT_ID_ROUTE = '/internal/kubernetes_security/agent_id'; export const AGGREGATE_PAGE_SIZE = 10; // so, bucket sort can only page through what we request at the top level agg, which means there is a ceiling to how many aggs we can page through. @@ -23,6 +24,7 @@ export const QUERY_KEY_PERCENT_WIDGET = 'kubernetesSecurityPercentWidget'; export const QUERY_KEY_COUNT_WIDGET = 'kubernetesSecurityCountWidget'; export const QUERY_KEY_CONTAINER_NAME_WIDGET = 'kubernetesSecurityContainerNameWidget'; export const QUERY_KEY_PROCESS_EVENTS = 'kubernetesSecurityProcessEvents'; +export const QUERY_KEY_AGENT_ID = 'kubernetesSecurityAgentId'; // ECS fields export const ENTRY_LEADER_INTERACTIVE = 'process.entry_leader.interactive'; diff --git a/x-pack/plugins/kubernetes_security/public/components/kubernetes_security_routes/index.test.tsx b/x-pack/plugins/kubernetes_security/public/components/kubernetes_security_routes/index.test.tsx index ea9b8b11da891..7f939d4cf4164 100644 --- a/x-pack/plugins/kubernetes_security/public/components/kubernetes_security_routes/index.test.tsx +++ b/x-pack/plugins/kubernetes_security/public/components/kubernetes_security_routes/index.test.tsx @@ -53,6 +53,11 @@ const renderWithRouter = ( }, }; }); + const responseActionButtonProps = { + tooltip: { content: 'test' }, + isDisabled: false, + canAccessResponseConsole: true, + }; const mockedContext = createAppRootMockRenderer(); return mockedContext.render( @@ -63,7 +68,10 @@ const renderWithRouter = ( startDate: '2022-03-08T18:52:15.532Z', endDate: '2022-06-09T17:52:15.532Z', }} + responseActionButtonProps={responseActionButtonProps} + responseActionClick={jest.fn()} renderSessionsView={jest.fn()} + handleTreeNavSelection={jest.fn()} /> ); diff --git a/x-pack/plugins/kubernetes_security/public/components/kubernetes_security_routes/index.tsx b/x-pack/plugins/kubernetes_security/public/components/kubernetes_security_routes/index.tsx index 629d200eae348..d51e9609c62b2 100644 --- a/x-pack/plugins/kubernetes_security/public/components/kubernetes_security_routes/index.tsx +++ b/x-pack/plugins/kubernetes_security/public/components/kubernetes_security_routes/index.tsx @@ -60,6 +60,9 @@ const KubernetesSecurityRoutesComponent = ({ indexPattern, globalFilter, renderSessionsView, + responseActionClick, + handleTreeNavSelection, + responseActionButtonProps, }: KubernetesSecurityDeps) => { const [shouldHideCharts, setShouldHideCharts] = useLocalStorage( LOCAL_STORAGE_HIDE_WIDGETS_KEY, @@ -296,6 +299,9 @@ const KubernetesSecurityRoutesComponent = ({ globalFilter={globalFilterForKubernetes} renderSessionsView={renderSessionsView} indexPattern={indexPattern} + responseActionButtonProps={responseActionButtonProps} + responseActionClick={responseActionClick} + handleTreeNavSelection={handleTreeNavSelection} /> diff --git a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/__snapshots__/index.test.tsx.snap b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/__snapshots__/index.test.tsx.snap index 6c29585bbaad6..683ff4c14cbea 100644 --- a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/__snapshots__/index.test.tsx.snap @@ -8,104 +8,135 @@ Object {
- - - - - - + - - - + + - - - - - + + - - - - + + + + +
+
- - selected image - + + + Respond + + + - - +
+ , @@ -113,104 +144,135 @@ Object {
- - - - - - + - - - + + - - - - - + + - - - - + + + + +
+
- - selected image - + + + Respond + + + - - +
+ , "debug": [Function], @@ -275,104 +337,135 @@ Object {
- - - - - - + - - - + + - - - - - + + - - - - + + + + +
+
- - selected image - + + + Respond + + + - - +
+ , @@ -380,104 +473,135 @@ Object {
- - - - - - + - - - + + - - - - - + + - - - - + + + + +
+
- - selected image - + + + Respond + + + - - +
+ , "debug": [Function], @@ -542,125 +666,156 @@ Object {
- - - - - - + - - - + + - - - - - + + - - - - - + + - - - - + + + + +
+
- - selected image - + + + Respond + + + - - +
+ , @@ -668,125 +823,156 @@ Object {
- - - - - - + - - - + + - - - - - + + - - - - - + + - - - - + + + + +
+
- - selected image - + + + Respond + + + - - +
+ , "debug": [Function], @@ -851,83 +1037,115 @@ Object {
- - - - - - + - - - + + - - - - + + + + +
+
- - selected image - + + + Respond + + + - - +
+ , @@ -935,83 +1153,115 @@ Object {
- - - - - - + - - - + + - - - - + + + + +
+
- - selected image - + + + Respond + + + - - +
+ , "debug": [Function], diff --git a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/index.test.tsx b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/index.test.tsx index c974d37f3f84c..e6cd0397808f1 100644 --- a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/index.test.tsx +++ b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/index.test.tsx @@ -24,17 +24,27 @@ describe('Tree view Breadcrumb component', () => { let renderResult: ReturnType; let mockedContext: AppContextTestRender; let onSelect: jest.Mock; + let onResponseActionButtonClick: jest.Mock; + const responseActionButtonProps = { + tooltip: { content: 'test' }, + isDisabled: false, + canAccessResponseConsole: true, + }; beforeEach(() => { mockedContext = createAppRootMockRenderer(); onSelect = jest.fn(); + onResponseActionButtonClick = jest.fn(); }); describe('When Breadcrumb is mounted', () => { it('renders Breadcrumb button content correctly', async () => { renderResult = mockedContext.render( ); @@ -50,9 +60,10 @@ describe('Tree view Breadcrumb component', () => { it('should render breadcrumb icons', async () => { renderResult = mockedContext.render( ); @@ -68,19 +79,29 @@ describe('Tree view Breadcrumb component', () => { expect(renderResult).toMatchSnapshot(); }); it('returns null when no selected collection', async () => { - renderResult = mockedContext.render(); - + renderResult = mockedContext.render( + + ); expect(renderResult.container).toBeEmptyDOMElement(); }); it('should display cluster icon button when no cluster name is provided', async () => { renderResult = mockedContext.render( ); @@ -96,7 +117,10 @@ describe('Tree view Breadcrumb component', () => { it('should return null when no cluster in selection', async () => { renderResult = mockedContext.render( ); @@ -105,25 +129,32 @@ describe('Tree view Breadcrumb component', () => { }); it('clicking on breadcrumb item triggers onSelect', async () => { - const treeNavSelection = { + const mockPodNavSelection = { clusterId: 'selected cluster id', clusterName: 'selected cluster name', namespace: 'selected namespace', node: 'selected node', pod: 'selected pod', }; - renderResult = mockedContext.render( - + ); - expect(renderResult.queryByText(MOCK_TREE_SELECTION.pod)).toBeVisible(); - renderResult.getByText(MOCK_TREE_SELECTION.pod).click(); + expect(renderResult.queryByText(mockPodNavSelection.pod)).toBeVisible(); + renderResult.getByText(mockPodNavSelection.pod).click(); expect(onSelect).toHaveBeenCalledTimes(1); }); it('should render last breadcrumb content only', async () => { renderResult = mockedContext.render( { containerImage: MOCK_TREE_SELECTION.containerImage, }} onSelect={onSelect} + responseActionButtonProps={responseActionButtonProps} /> ); diff --git a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/index.tsx b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/index.tsx index 9a9e6e6b54d01..d065a281aa0c5 100644 --- a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/index.tsx +++ b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/index.tsx @@ -6,24 +6,42 @@ */ import React, { useCallback } from 'react'; -import { EuiButtonEmpty, EuiButtonIcon, EuiIcon, EuiToolTip } from '@elastic/eui'; +import { + EuiButtonEmpty, + EuiButtonIcon, + EuiFlexGroup, + EuiFlexItem, + EuiIcon, + EuiToolTip, +} from '@elastic/eui'; import { useEuiTheme } from '../../../hooks'; import { KubernetesCollectionMap, KubernetesCollection, TreeViewIconProps, KubernetesTreeViewLevels, + ResponseActionButtonProps, } from '../../../types'; import { useStyles } from './styles'; import { KUBERNETES_COLLECTION_ICONS_PROPS } from '../helpers'; +import { RESPONSE_ACTION_BUTTON } from './translations'; import { showBreadcrumbDisplayText } from './helper'; import { BREADCRUMBS_CLUSTER_TREE_VIEW_LEVELS } from '../translations'; interface BreadcrumbDeps { treeNavSelection: Partial; onSelect: (selection: Partial) => void; + responseActionClick: () => void; + treeNavResponseActionDisabled: boolean; + responseActionButtonProps: ResponseActionButtonProps; } -export const Breadcrumb = ({ treeNavSelection, onSelect }: BreadcrumbDeps) => { +export const Breadcrumb = ({ + treeNavSelection, + onSelect, + treeNavResponseActionDisabled, + responseActionButtonProps, + responseActionClick, +}: BreadcrumbDeps) => { const styles = useStyles(); const { euiVars } = useEuiTheme(); const onBreadCrumbClick = useCallback( @@ -55,6 +73,8 @@ export const Breadcrumb = ({ treeNavSelection, onSelect }: BreadcrumbDeps) => { }, [onSelect, treeNavSelection] ); + const isResponseActionDisabled = + (responseActionButtonProps?.isDisabled ?? false) || treeNavResponseActionDisabled; const renderBreadcrumbLink = useCallback( ( @@ -108,36 +128,53 @@ export const Breadcrumb = ({ treeNavSelection, onSelect }: BreadcrumbDeps) => { return (
- {renderBreadcrumbLink( - KubernetesTreeViewLevels.clusterId, - KUBERNETES_COLLECTION_ICONS_PROPS.clusterId, - !(treeNavSelection.namespace || treeNavSelection.node), - false - )} - {treeNavSelection.namespace && - renderBreadcrumbLink( - KubernetesTreeViewLevels.namespace, - KUBERNETES_COLLECTION_ICONS_PROPS.namespace, - !treeNavSelection.pod - )} - {treeNavSelection.node && - renderBreadcrumbLink( - KubernetesTreeViewLevels.node, - KUBERNETES_COLLECTION_ICONS_PROPS.node, - !treeNavSelection.pod - )} - {treeNavSelection.pod && - renderBreadcrumbLink( - KubernetesTreeViewLevels.pod, - KUBERNETES_COLLECTION_ICONS_PROPS.pod, - !treeNavSelection.containerImage - )} - {treeNavSelection.containerImage && - renderBreadcrumbLink( - KubernetesTreeViewLevels.containerImage, - KUBERNETES_COLLECTION_ICONS_PROPS.containerImage, - true - )} + + + {renderBreadcrumbLink( + KubernetesTreeViewLevels.clusterId, + KUBERNETES_COLLECTION_ICONS_PROPS.clusterId, + !(treeNavSelection.namespace || treeNavSelection.node), + false + )} + {treeNavSelection.namespace && + renderBreadcrumbLink( + KubernetesTreeViewLevels.namespace, + KUBERNETES_COLLECTION_ICONS_PROPS.namespace, + !treeNavSelection.pod + )} + {treeNavSelection.node && + renderBreadcrumbLink( + KubernetesTreeViewLevels.node, + KUBERNETES_COLLECTION_ICONS_PROPS.node, + !treeNavSelection.pod + )} + {treeNavSelection.pod && + renderBreadcrumbLink( + KubernetesTreeViewLevels.pod, + KUBERNETES_COLLECTION_ICONS_PROPS.pod, + !treeNavSelection.containerImage + )} + {treeNavSelection.containerImage && + renderBreadcrumbLink( + KubernetesTreeViewLevels.containerImage, + KUBERNETES_COLLECTION_ICONS_PROPS.containerImage, + true + )} + + + {responseActionButtonProps?.canAccessResponseConsole && ( + + + {RESPONSE_ACTION_BUTTON} + + + )} + +
); }; diff --git a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/styles.ts b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/styles.ts index a3e91b22ea16d..1e8b63668b1d5 100644 --- a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/styles.ts +++ b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/styles.ts @@ -42,6 +42,8 @@ export const useStyles = () => { marginRight: size.xs, }; + const breadcrumbsWrapper: CSSObject = { flexDirection: 'row', alignItems: 'center' }; + const breadcrumbIconColor = (color: string): CSSObject => ({ color, }); @@ -51,6 +53,7 @@ export const useStyles = () => { breadcrumbButton, breadcrumbButtonBold, breadcrumbRightIcon, + breadcrumbsWrapper, breadcrumbIconColor, }; }, [euiTheme]); diff --git a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/translations.ts b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/translations.ts new file mode 100644 index 0000000000000..8c01d8f2fb43d --- /dev/null +++ b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/breadcrumb/translations.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { i18n } from '@kbn/i18n'; + +export const RESPONSE_ACTION_BUTTON = i18n.translate( + 'xpack.kubernetesSecurity.breadcrumb.responseActionButton', + { + defaultMessage: 'Respond', + } +); diff --git a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/hooks.tsx b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/hooks.tsx index 9c9f586791f54..0ff729d149e65 100644 --- a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/hooks.tsx +++ b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/hooks.tsx @@ -6,10 +6,15 @@ */ import { useCallback, useEffect, useMemo, useState } from 'react'; -import type { KubernetesCollectionMap } from '../../types'; +import { useQuery } from '@tanstack/react-query'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { CoreStart } from '@kbn/core/public'; +import type { KubernetesCollectionMap, QueryDslQueryContainerBool } from '../../types'; import { addTimerangeAndDefaultFilterToQuery } from '../../utils/add_timerange_and_default_filter_to_query'; import { addTreeNavSelectionToFilterQuery } from './helpers'; import { IndexPattern, GlobalFilter } from '../../types'; +import { QUERY_KEY_AGENT_ID, AGENT_ID_ROUTE } from '../../../common/constants'; +import { AgentIdResult } from './tree_nav/types'; export type UseTreeViewProps = { globalFilter: GlobalFilter; @@ -20,7 +25,7 @@ export const useTreeView = ({ globalFilter, indexPattern }: UseTreeViewProps) => const [noResults, setNoResults] = useState(false); const [treeNavSelection, setTreeNavSelection] = useState>({}); const [hasSelection, setHasSelection] = useState(false); - + const [treeNavResponseActionDisabled, setTreeNavResponseActionDisabled] = useState(false); const filterQueryWithTimeRange = useMemo(() => { return JSON.parse( addTimerangeAndDefaultFilterToQuery( @@ -32,6 +37,9 @@ export const useTreeView = ({ globalFilter, indexPattern }: UseTreeViewProps) => }, [globalFilter.filterQuery, globalFilter.startDate, globalFilter.endDate]); const onTreeNavSelect = useCallback((selection: Partial) => { + const isResponseActionEnabled = + !!selection?.node || !!selection?.pod || !!selection?.containerImage; + setTreeNavResponseActionDisabled(isResponseActionEnabled ? false : true); setHasSelection(false); setTreeNavSelection(selection); }, []); @@ -62,6 +70,27 @@ export const useTreeView = ({ globalFilter, indexPattern }: UseTreeViewProps) => onTreeNavSelect, hasSelection, treeNavSelection, + treeNavResponseActionDisabled, sessionViewFilter, }; }; + +export const useFetchAgentIdForResponder = ( + filterQuery: QueryDslQueryContainerBool, + index?: string +) => { + const { http } = useKibana().services; + const cachingKeys = [QUERY_KEY_AGENT_ID, filterQuery, index]; + const query = useQuery(cachingKeys, async (): Promise => { + const res = await http.get(AGENT_ID_ROUTE, { + query: { + query: JSON.stringify(filterQuery), + index, + }, + }); + + return res; + }); + + return query; +}; diff --git a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/index.tsx b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/index.tsx index 2bc90c5581e38..680f0f4dd94d2 100644 --- a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/index.tsx +++ b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/index.tsx @@ -8,15 +8,22 @@ import React from 'react'; import { EuiSplitPanel, EuiText } from '@elastic/eui'; import { useStyles } from './styles'; -import { IndexPattern, GlobalFilter } from '../../types'; +import { IndexPattern, GlobalFilter, ResponseActionButtonProps } from '../../types'; import { TreeNav } from './tree_nav'; import { Breadcrumb } from './breadcrumb'; import { TreeViewContextProvider, useTreeViewContext } from './contexts'; import { EmptyState } from './empty_state'; +import { addTreeNavSelectionToFilterQuery } from './helpers'; +import { useFetchAgentIdForResponder } from './hooks'; -export interface TreeViewContainerDeps { - globalFilter: GlobalFilter; +export interface TreeViewContainerComponentDeps { + responseActionButtonProps: ResponseActionButtonProps; + responseActionClick: () => void; + handleTreeNavSelection: (agentId: string) => void; renderSessionsView: (sessionsFilterQuery: string | undefined) => JSX.Element; +} +export interface TreeViewContainerDeps extends TreeViewContainerComponentDeps { + globalFilter: GlobalFilter; indexPattern?: IndexPattern; } @@ -24,21 +31,45 @@ export const TreeViewContainer = ({ globalFilter, renderSessionsView, indexPattern, + responseActionClick, + handleTreeNavSelection, + responseActionButtonProps, }: TreeViewContainerDeps) => { return ( - + ); }; const TreeViewContainerComponent = ({ renderSessionsView, -}: Pick) => { + responseActionButtonProps, + responseActionClick, + handleTreeNavSelection, +}: TreeViewContainerComponentDeps) => { const styles = useStyles(); - const { hasSelection, treeNavSelection, sessionViewFilter, onTreeNavSelect, noResults } = - useTreeViewContext(); + const { + hasSelection, + treeNavSelection, + sessionViewFilter, + indexPattern, + onTreeNavSelect, + noResults, + treeNavResponseActionDisabled, + } = useTreeViewContext(); + const query = JSON.parse(addTreeNavSelectionToFilterQuery(sessionViewFilter, treeNavSelection)); + const { data } = useFetchAgentIdForResponder(query, indexPattern); + + if (data?.agentId) { + handleTreeNavSelection(data.agentId); + } return ( @@ -52,7 +83,13 @@ const TreeViewContainerComponent = ({ - + {hasSelection && renderSessionsView(sessionViewFilter)} diff --git a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/tree_nav/types.ts b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/tree_nav/types.ts index 0643f84e26119..f382a118eb534 100644 --- a/x-pack/plugins/kubernetes_security/public/components/tree_view_container/tree_nav/types.ts +++ b/x-pack/plugins/kubernetes_security/public/components/tree_view_container/tree_nav/types.ts @@ -12,3 +12,7 @@ export interface TreeViewOptionsGroup { label: string; value: TreeViewKind; } + +export interface AgentIdResult { + agentId: string | null; +} diff --git a/x-pack/plugins/kubernetes_security/public/types.ts b/x-pack/plugins/kubernetes_security/public/types.ts index b6147dd6b5d8a..06fb44180d955 100644 --- a/x-pack/plugins/kubernetes_security/public/types.ts +++ b/x-pack/plugins/kubernetes_security/public/types.ts @@ -33,11 +33,19 @@ export interface GlobalFilter { endDate: string; } +export interface ResponseActionButtonProps { + tooltip: React.ReactNode; + canAccessResponseConsole: boolean; + isDisabled: boolean; +} export interface KubernetesSecurityDeps { filter: React.ReactNode; renderSessionsView: (sessionsFilterQuery: string | undefined) => JSX.Element; indexPattern?: IndexPattern; globalFilter: GlobalFilter; + responseActionClick: () => void; + handleTreeNavSelection: (agentId: string) => void; + responseActionButtonProps: ResponseActionButtonProps; } export interface KubernetesSecurityStart { diff --git a/x-pack/plugins/kubernetes_security/server/routes/agent_id.ts b/x-pack/plugins/kubernetes_security/server/routes/agent_id.ts new file mode 100644 index 0000000000000..2408d29d83228 --- /dev/null +++ b/x-pack/plugins/kubernetes_security/server/routes/agent_id.ts @@ -0,0 +1,49 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { schema } from '@kbn/config-schema'; +import { IRouter } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; +import { PROCESS_EVENTS_INDEX } from '@kbn/session-view-plugin/common/constants'; +import { AGENT_ID_ROUTE } from '../../common/constants'; + +export const registerAgentIdRoute = (router: IRouter) => { + router.get( + { + path: AGENT_ID_ROUTE, + validate: { + query: schema.object({ + query: schema.string(), + index: schema.string(), + }), + }, + }, + async (context, request, response) => { + const client = (await context.core).elasticsearch.client.asCurrentUser; + const { query, index } = request.query; + try { + const agentId = await getAgentId(client, query, index); + return response.ok({ body: { agentId } }); + } catch (err) { + return response.badRequest(err.message); + } + } + ); +}; + +export const getAgentId = async (client: ElasticsearchClient, query: string, index?: string) => { + const queryDSL = JSON.parse(query); + const search = await client.search({ + index: [index || PROCESS_EVENTS_INDEX], + body: { + query: queryDSL, + size: 1, + }, + }); + + const agentId = (search.hits.hits as any)?.[0]?._source?.agent?.id ?? null; + return agentId; +}; diff --git a/x-pack/plugins/kubernetes_security/server/routes/index.ts b/x-pack/plugins/kubernetes_security/server/routes/index.ts index 734215e54e275..5f6b8fe1ba89c 100644 --- a/x-pack/plugins/kubernetes_security/server/routes/index.ts +++ b/x-pack/plugins/kubernetes_security/server/routes/index.ts @@ -6,6 +6,7 @@ */ import { IRouter } from '@kbn/core/server'; import { RuleRegistryPluginStartContract } from '@kbn/rule-registry-plugin/server'; +import { registerAgentIdRoute } from './agent_id'; import { registerAggregateRoute } from './aggregate'; import { registerCountRoute } from './count'; import { registerMultiTermsAggregateRoute } from './multi_terms_aggregate'; @@ -13,5 +14,6 @@ import { registerMultiTermsAggregateRoute } from './multi_terms_aggregate'; export const registerRoutes = (router: IRouter, ruleRegistry: RuleRegistryPluginStartContract) => { registerAggregateRoute(router); registerCountRoute(router); + registerAgentIdRoute(router); registerMultiTermsAggregateRoute(router); }; diff --git a/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx b/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx index 54bae8b037847..6019389284fea 100644 --- a/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx +++ b/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx @@ -479,9 +479,14 @@ export const LensTopNavMenu = ({ if (!activeDatasourceId || !discoverLocator) { return; } + if (visualization.activeId == null) { + return; + } return getLayerMetaInfo( datasourceMap[activeDatasourceId], datasourceStates[activeDatasourceId].state, + visualizationMap[visualization.activeId], + visualization.state, activeData, dataViews.indexPatterns, data.query.timefilter.timefilter.getTime(), @@ -490,8 +495,10 @@ export const LensTopNavMenu = ({ }, [ activeDatasourceId, discoverLocator, + visualization, datasourceMap, datasourceStates, + visualizationMap, activeData, dataViews.indexPatterns, data.query.timefilter.timefilter, diff --git a/x-pack/plugins/lens/public/app_plugin/show_underlying_data.test.ts b/x-pack/plugins/lens/public/app_plugin/show_underlying_data.test.ts index 793064bd008fd..68059b293f2f9 100644 --- a/x-pack/plugins/lens/public/app_plugin/show_underlying_data.test.ts +++ b/x-pack/plugins/lens/public/app_plugin/show_underlying_data.test.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { createMockDatasource } from '../mocks'; +import { createMockDatasource, createMockVisualization } from '../mocks'; import { combineQueryAndFilters, getLayerMetaInfo } from './show_underlying_data'; import { Filter } from '@kbn/es-query'; -import { DatasourcePublicAPI } from '../types'; import { createMockedIndexPattern } from '../datasources/form_based/mocks'; +import { LayerType } from '..'; describe('getLayerMetaInfo', () => { const capabilities = { @@ -21,6 +21,8 @@ describe('getLayerMetaInfo', () => { getLayerMetaInfo( createMockDatasource('testDatasource'), {}, + createMockVisualization('testVisualization'), + {}, undefined, {}, undefined, @@ -29,14 +31,17 @@ describe('getLayerMetaInfo', () => { ).toBe('Visualization has no data available to show'); }); - it('should return error in case of multiple layers', () => { + it('should return error in case of multiple data layers', () => { + const mockDatasource = createMockDatasource('testDatasource'); + mockDatasource.getLayers.mockReturnValue(['layer1', 'layer2']); expect( getLayerMetaInfo( - createMockDatasource('testDatasource'), + mockDatasource, + {}, + createMockVisualization('testVisualization'), {}, { datatable1: { type: 'datatable', columns: [], rows: [] }, - datatable2: { type: 'datatable', columns: [], rows: [] }, }, {}, undefined, @@ -46,17 +51,43 @@ describe('getLayerMetaInfo', () => { }); it('should return error in case of missing activeDatasource', () => { - expect(getLayerMetaInfo(undefined, {}, undefined, {}, undefined, capabilities).error).toBe( - 'Visualization has no data available to show' - ); + expect( + getLayerMetaInfo( + undefined, + {}, + createMockVisualization('testVisualization'), + {}, + undefined, + {}, + undefined, + capabilities + ).error + ).toBe('Visualization has no data available to show'); + }); + + it('should return error in case of missing datasource configuration/state', () => { + expect( + getLayerMetaInfo( + createMockDatasource('testDatasource'), + undefined, + createMockVisualization('testVisualization'), + {}, + {}, + {}, + undefined, + capabilities + ).error + ).toBe('Visualization has no data available to show'); }); - it('should return error in case of missing configuration/state', () => { + it('should return error in case of missing activeVisualization', () => { expect( getLayerMetaInfo( createMockDatasource('testDatasource'), + {}, undefined, {}, + undefined, {}, undefined, capabilities @@ -64,10 +95,74 @@ describe('getLayerMetaInfo', () => { ).toBe('Visualization has no data available to show'); }); + it('should return error in case of missing visualization configuration/state', () => { + expect( + getLayerMetaInfo( + createMockDatasource('testDatasource'), + {}, + createMockVisualization('testVisualization'), + undefined, + {}, + {}, + undefined, + capabilities + ).error + ).toBe('Visualization has no data available to show'); + }); + + it('should ignore the number of datatables passed, rather check the datasource and visualization configuration', () => { + expect( + getLayerMetaInfo( + createMockDatasource('testDatasource', { + getFilters: jest.fn(() => ({ + enabled: { kuery: [], lucene: [] }, + disabled: { kuery: [], lucene: [] }, + })), + }), + {}, + createMockVisualization('testVisualization'), + {}, + { + datatable1: { type: 'datatable', columns: [], rows: [] }, + datatable2: { type: 'datatable', columns: [], rows: [] }, + }, + {}, + undefined, + capabilities + ).error + ).toBeUndefined(); + }); + + it('should return no multiple layers error when non-data layers are used together with a single data layer', () => { + const mockDatasource = createMockDatasource('testDatasource', { + getFilters: jest.fn(() => ({ + enabled: { kuery: [], lucene: [] }, + disabled: { kuery: [], lucene: [] }, + })), + }); + mockDatasource.getLayers.mockReturnValue(['layer1', 'layer2', 'layer3']); + const mockVisualization = createMockVisualization('testVisualization'); + let counter = 0; + const layerTypes: LayerType[] = ['data', 'annotations', 'referenceLine']; + mockVisualization.getLayerType.mockImplementation(() => layerTypes[counter++]); + expect( + getLayerMetaInfo( + mockDatasource, + {}, + mockVisualization, + {}, + { + datatable1: { type: 'datatable', columns: [], rows: [] }, + }, + {}, + undefined, + capabilities + ).error + ).toBeUndefined(); + }); + it('should return error in case of a timeshift declared in a column', () => { - const mockDatasource = createMockDatasource('testDatasource'); - const updatedPublicAPI: DatasourcePublicAPI = { - datasourceId: 'testDatasource', + const mockDatasource = createMockDatasource('testDatasource', { getOperationForColumnId: jest.fn(() => ({ dataType: 'number', isBucketed: false, @@ -78,39 +173,33 @@ describe('getLayerMetaInfo', () => { hasTimeShift: true, hasReducedTimeRange: true, })), - getTableSpec: jest.fn(), - getVisualDefaults: jest.fn(), - getSourceId: jest.fn(), - getMaxPossibleNumValues: jest.fn(), - getFilters: jest.fn(), - isTextBasedLanguage: jest.fn(() => false), - hasDefaultTimeField: jest.fn(() => true), - }; - mockDatasource.getPublicAPI.mockReturnValue(updatedPublicAPI); + }); expect( - getLayerMetaInfo(createMockDatasource('testDatasource'), {}, {}, {}, undefined, capabilities) - .error + getLayerMetaInfo( + mockDatasource, + {}, + createMockVisualization('testVisualization'), + {}, + {}, + {}, + undefined, + capabilities + ).error ).toBe('Visualization has no data available to show'); }); it('should return error in case of getFilters returning errors', () => { - const mockDatasource = createMockDatasource('testDatasource'); - const updatedPublicAPI: DatasourcePublicAPI = { + const mockDatasource = createMockDatasource('testDatasource', { datasourceId: 'formBased', - getOperationForColumnId: jest.fn(), getTableSpec: jest.fn(() => [{ columnId: 'col1', fields: ['bytes'] }]), - getVisualDefaults: jest.fn(), - getSourceId: jest.fn(), - getMaxPossibleNumValues: jest.fn(), getFilters: jest.fn(() => ({ error: 'filters error' })), - isTextBasedLanguage: jest.fn(() => false), - hasDefaultTimeField: jest.fn(() => true), - }; - mockDatasource.getPublicAPI.mockReturnValue(updatedPublicAPI); + }); expect( getLayerMetaInfo( mockDatasource, {}, // the publicAPI has been mocked, so no need for a state here + createMockVisualization('testVisualization'), + {}, { datatable1: { type: 'datatable', columns: [], rows: [] }, }, @@ -122,24 +211,18 @@ describe('getLayerMetaInfo', () => { }); it('should not be visible if discover is not available', () => { - const mockDatasource = createMockDatasource('testDatasource'); - const updatedPublicAPI: DatasourcePublicAPI = { + const mockDatasource = createMockDatasource('testDatasource', { datasourceId: 'indexpattern', - getOperationForColumnId: jest.fn(), getTableSpec: jest.fn(() => [{ columnId: 'col1', fields: ['bytes'] }]), - getVisualDefaults: jest.fn(), - getSourceId: jest.fn(), - getMaxPossibleNumValues: jest.fn(), getFilters: jest.fn(() => ({ error: 'filters error' })), - isTextBasedLanguage: jest.fn(() => false), - hasDefaultTimeField: jest.fn(() => true), - }; - mockDatasource.getPublicAPI.mockReturnValue(updatedPublicAPI); + }); // both capabilities should be enabled to enable discover expect( getLayerMetaInfo( mockDatasource, {}, + createMockVisualization('testVisualization'), + {}, { datatable1: { type: 'datatable', columns: [], rows: [] }, }, @@ -155,6 +238,8 @@ describe('getLayerMetaInfo', () => { getLayerMetaInfo( mockDatasource, {}, + createMockVisualization('testVisualization'), + {}, { datatable1: { type: 'datatable', columns: [], rows: [] }, }, @@ -169,15 +254,10 @@ describe('getLayerMetaInfo', () => { }); it('should basically work collecting fields and filters in the visualization', () => { - const mockDatasource = createMockDatasource('testDatasource'); - const updatedPublicAPI: DatasourcePublicAPI = { + const mockDatasource = createMockDatasource('testDatasource', { datasourceId: 'formBased', - getOperationForColumnId: jest.fn(), getTableSpec: jest.fn(() => [{ columnId: 'col1', fields: ['bytes'] }]), - getVisualDefaults: jest.fn(), getSourceId: jest.fn(() => '1'), - getMaxPossibleNumValues: jest.fn(), - isTextBasedLanguage: jest.fn(() => false), getFilters: jest.fn(() => ({ enabled: { kuery: [[{ language: 'kuery', query: 'memory > 40000' }]], @@ -185,15 +265,15 @@ describe('getLayerMetaInfo', () => { }, disabled: { kuery: [], lucene: [] }, })), - hasDefaultTimeField: jest.fn(() => true), - }; - mockDatasource.getPublicAPI.mockReturnValue(updatedPublicAPI); + }); const sampleIndexPatternsFromService = { '1': createMockedIndexPattern(), }; const { error, meta } = getLayerMetaInfo( mockDatasource, {}, // the publicAPI has been mocked, so no need for a state here + createMockVisualization('testVisualization'), + {}, { datatable1: { type: 'datatable', columns: [], rows: [] }, }, @@ -220,15 +300,10 @@ describe('getLayerMetaInfo', () => { }); it('should order date fields first', () => { - const mockDatasource = createMockDatasource('testDatasource'); - const updatedPublicAPI: DatasourcePublicAPI = { + const mockDatasource = createMockDatasource('testDatasource', { datasourceId: 'formBased', - getOperationForColumnId: jest.fn(), getTableSpec: jest.fn(() => [{ columnId: 'col1', fields: ['bytes', 'timestamp'] }]), - getVisualDefaults: jest.fn(), getSourceId: jest.fn(() => '1'), - getMaxPossibleNumValues: jest.fn(), - isTextBasedLanguage: jest.fn(() => false), getFilters: jest.fn(() => ({ enabled: { kuery: [[{ language: 'kuery', query: 'memory > 40000' }]], @@ -236,15 +311,15 @@ describe('getLayerMetaInfo', () => { }, disabled: { kuery: [], lucene: [] }, })), - hasDefaultTimeField: jest.fn(() => true), - }; - mockDatasource.getPublicAPI.mockReturnValue(updatedPublicAPI); + }); const sampleIndexPatternsFromService = { '1': createMockedIndexPattern(), }; const { meta } = getLayerMetaInfo( mockDatasource, {}, // the publicAPI has been mocked, so no need for a state here + createMockVisualization('testVisualization'), + {}, { datatable1: { type: 'datatable', columns: [], rows: [] }, }, diff --git a/x-pack/plugins/lens/public/app_plugin/show_underlying_data.ts b/x-pack/plugins/lens/public/app_plugin/show_underlying_data.ts index 9a0c4a9ed70eb..bc0e926e64589 100644 --- a/x-pack/plugins/lens/public/app_plugin/show_underlying_data.ts +++ b/x-pack/plugins/lens/public/app_plugin/show_underlying_data.ts @@ -20,9 +20,12 @@ import { i18n } from '@kbn/i18n'; import { RecursiveReadonly } from '@kbn/utility-types'; import { Capabilities } from '@kbn/core/public'; import { partition } from 'lodash'; +import { LayerTypes } from '@kbn/expression-xy-plugin/public'; import { showMemoizedErrorNotification } from '../lens_ui_errors'; import { TableInspectorAdapter } from '../editor_frame_service/types'; import { Datasource, DatasourcePublicAPI, IndexPatternMap } from '../types'; +import { Visualization } from '..'; +import { getLayerType } from '../editor_frame_service/editor_frame/config_panel/add_layer'; /** * Joins a series of queries. @@ -83,6 +86,8 @@ const sortByDateFieldsFirst = ( export function getLayerMetaInfo( currentDatasource: Datasource | undefined, datasourceState: unknown, + activeVisualization: Visualization | undefined, + visualizationState: unknown, activeData: TableInspectorAdapter | undefined, indexPatterns: IndexPatternMap, timeRange: TimeRange | undefined, @@ -94,8 +99,8 @@ export function getLayerMetaInfo( const isVisible = Boolean(capabilities.navLinks?.discover && capabilities.discover?.show); // If Multiple tables, return // If there are time shifts, return - const [datatable, ...otherTables] = Object.values(activeData || {}); - if (!datatable || !currentDatasource || !datasourceState) { + const datatables = Object.values(activeData || {}); + if (!datatables.length || !currentDatasource || !datasourceState || !activeVisualization) { return { meta: undefined, error: i18n.translate('xpack.lens.app.showUnderlyingDataNoData', { @@ -104,21 +109,25 @@ export function getLayerMetaInfo( isVisible, }; } - if (otherTables.length) { - return { - meta: undefined, - error: i18n.translate('xpack.lens.app.showUnderlyingDataMultipleLayers', { - defaultMessage: 'Cannot show underlying data for visualizations with multiple layers', - }), - isVisible, - }; - } let datasourceAPI: DatasourcePublicAPI; try { - const [firstLayerId] = currentDatasource.getLayers(datasourceState); + const layerIds = currentDatasource.getLayers(datasourceState); + const dataLayerIds = layerIds.filter( + (layerId) => + getLayerType(activeVisualization, visualizationState, layerId) === LayerTypes.DATA + ); + if (dataLayerIds.length > 1) { + return { + meta: undefined, + error: i18n.translate('xpack.lens.app.showUnderlyingDataMultipleLayers', { + defaultMessage: 'Cannot show underlying data for visualizations with multiple layers', + }), + isVisible, + }; + } datasourceAPI = currentDatasource.getPublicAPI({ - layerId: firstLayerId, + layerId: dataLayerIds[0], state: datasourceState, indexPatterns, }); diff --git a/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.test.ts b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.test.ts index 5b7e4bbac36b9..7c79fc16d2b6b 100644 --- a/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.test.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.test.ts @@ -473,6 +473,27 @@ describe('Textbased Data Source', () => { layerId: 'newid', }); }); + + it('should not return suggestions if no query is given', () => { + const state = { + layers: {}, + initialContext: { + contextualFields: ['bytes', 'dest'], + dataViewSpec: { + title: 'foo', + id: '1', + name: 'Foo', + }, + }, + } as unknown as TextBasedPrivateState; + const suggestions = TextBasedDatasource.getDatasourceSuggestionsForVisualizeField( + state, + '1', + '', + indexPatterns + ); + expect(suggestions).toEqual([]); + }); }); describe('#getErrorMessages', () => { diff --git a/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx index 54a358d2a547f..f422aa4a0ea64 100644 --- a/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx +++ b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx @@ -92,7 +92,9 @@ export function getTextBasedDatasource({ indexPatterns: IndexPatternMap ) => { const context = state.initialContext; - if (context && 'dataViewSpec' in context && context.dataViewSpec.title) { + // on text based mode we offer suggestions for the query and not for a specific field + if (fieldName) return []; + if (context && 'dataViewSpec' in context && context.dataViewSpec.title && context.query) { const newLayerId = generateId(); const indexPattern = indexPatterns[indexPatternId]; diff --git a/x-pack/plugins/lens/public/embeddable/embeddable.tsx b/x-pack/plugins/lens/public/embeddable/embeddable.tsx index 6605b27093035..637ce344bcaaf 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable.tsx +++ b/x-pack/plugins/lens/public/embeddable/embeddable.tsx @@ -92,6 +92,7 @@ import { getLensInspectorService, LensInspector } from '../lens_inspector_servic import { SharingSavedObjectProps, VisualizationDisplayOptions } from '../types'; import { getActiveDatasourceIdFromDoc, + getActiveVisualizationIdFromDoc, getIndexPatternsObjects, getSearchWarningMessages, inferTimeField, @@ -187,6 +188,8 @@ const getExpressionFromDocument = async ( function getViewUnderlyingDataArgs({ activeDatasource, activeDatasourceState, + activeVisualization, + activeVisualizationState, activeData, dataViews, capabilities, @@ -198,6 +201,8 @@ function getViewUnderlyingDataArgs({ }: { activeDatasource: Datasource; activeDatasourceState: unknown; + activeVisualization: Visualization; + activeVisualizationState: unknown; activeData: TableInspectorAdapter | undefined; dataViews: DataViewBase[] | undefined; capabilities: LensEmbeddableDeps['capabilities']; @@ -210,6 +215,8 @@ function getViewUnderlyingDataArgs({ const { error, meta } = getLayerMetaInfo( activeDatasource, activeDatasourceState, + activeVisualization, + activeVisualizationState, activeData, indexPatternsCache, timeRange, @@ -293,6 +300,8 @@ export class Embeddable activeData?: TableInspectorAdapter; activeDatasource?: Datasource; activeDatasourceState?: unknown; + activeVisualization?: Visualization; + activeVisualizationState?: unknown; } = {}; private indexPatterns: DataView[] = []; @@ -929,7 +938,14 @@ export class Embeddable return false; } + const activeVisualizationId = getActiveVisualizationIdFromDoc(this.savedVis); + if (!activeVisualizationId) { + return false; + } + this.activeDataInfo.activeDatasource = this.deps.datasourceMap[activeDatasourceId]; + this.activeDataInfo.activeVisualization = this.deps.visualizationMap[activeVisualizationId]; + const docDatasourceState = this.savedVis?.state.datasourceStates[activeDatasourceId]; const adHocDataviews = await Promise.all( Object.values(this.savedVis?.state.adHocDataViews || {}) @@ -962,9 +978,19 @@ export class Embeddable ); } + if (!this.activeDataInfo.activeVisualizationState) { + this.activeDataInfo.activeVisualizationState = + this.activeDataInfo.activeVisualization.initialize( + () => '', + this.savedVis?.state.visualization + ); + } + const viewUnderlyingDataArgs = getViewUnderlyingDataArgs({ activeDatasource: this.activeDataInfo.activeDatasource, activeDatasourceState: this.activeDataInfo.activeDatasourceState, + activeVisualization: this.activeDataInfo.activeVisualization, + activeVisualizationState: this.activeDataInfo.activeVisualizationState, activeData: this.activeDataInfo.activeData, dataViews: this.indexPatterns, capabilities: this.deps.capabilities, diff --git a/x-pack/plugins/lens/public/mocks/datasource_mock.ts b/x-pack/plugins/lens/public/mocks/datasource_mock.ts index a9936a90c764f..ab4a5fb519ab5 100644 --- a/x-pack/plugins/lens/public/mocks/datasource_mock.ts +++ b/x-pack/plugins/lens/public/mocks/datasource_mock.ts @@ -11,8 +11,11 @@ export type DatasourceMock = jest.Mocked & { publicAPIMock: jest.Mocked; }; -export function createMockDatasource(id: string): DatasourceMock { - const publicAPIMock: jest.Mocked = { +export function createMockDatasource( + id: string, + customPublicApi: Partial = {} +): DatasourceMock { + const publicAPIMock = { datasourceId: id, getTableSpec: jest.fn(() => []), getOperationForColumnId: jest.fn(), @@ -22,7 +25,8 @@ export function createMockDatasource(id: string): DatasourceMock { getMaxPossibleNumValues: jest.fn(), isTextBasedLanguage: jest.fn(() => false), hasDefaultTimeField: jest.fn(() => true), - }; + ...customPublicApi, + } as jest.Mocked; return { id: 'testDatasource', diff --git a/x-pack/plugins/lens/public/utils.ts b/x-pack/plugins/lens/public/utils.ts index 01591155c9dd0..16ad6a026851d 100644 --- a/x-pack/plugins/lens/public/utils.ts +++ b/x-pack/plugins/lens/public/utils.ts @@ -69,6 +69,13 @@ export function getActiveDatasourceIdFromDoc(doc?: Document) { return firstDatasourceFromDoc || null; } +export function getActiveVisualizationIdFromDoc(doc?: Document) { + if (!doc) { + return null; + } + return doc.visualizationType || null; +} + export const getInitialDatasourceId = (datasourceMap: DatasourceMap, doc?: Document) => { return (doc && getActiveDatasourceIdFromDoc(doc)) || Object.keys(datasourceMap)[0] || null; }; diff --git a/x-pack/plugins/ml/server/lib/capabilities/check_capabilities.ts b/x-pack/plugins/ml/server/lib/capabilities/check_capabilities.ts index 6334ca91bc947..f88297b5074cd 100644 --- a/x-pack/plugins/ml/server/lib/capabilities/check_capabilities.ts +++ b/x-pack/plugins/ml/server/lib/capabilities/check_capabilities.ts @@ -6,6 +6,7 @@ */ import { KibanaRequest } from '@kbn/core/server'; +import { once } from 'lodash'; import type { MlClient } from '../ml_client'; import { mlLog } from '../log'; import { @@ -60,24 +61,28 @@ function disableAdminPrivileges(capabilities: MlCapabilities) { export type HasMlCapabilities = (capabilities: MlCapabilitiesKey[]) => Promise; -export function hasMlCapabilitiesProvider(resolveMlCapabilities: ResolveMlCapabilities) { - return (request: KibanaRequest): HasMlCapabilities => { - let mlCapabilities: MlCapabilities | null = null; - return async (capabilities: MlCapabilitiesKey[]) => { - try { - mlCapabilities = await resolveMlCapabilities(request); - } catch (e) { - mlLog.error(e); - throw new UnknownMLCapabilitiesError(`Unable to perform ML capabilities check ${e}`); - } +export function hasMlCapabilitiesProvider( + resolveMlCapabilities: ResolveMlCapabilities, + request: KibanaRequest +) { + let mlCapabilities: MlCapabilities | null = null; - if (mlCapabilities === null) { - throw new MLPrivilegesUninitialized('ML capabilities have not been initialized'); - } + const resolveMlCapabilitiesOnce = once(resolveMlCapabilities); - if (capabilities.every((c) => mlCapabilities![c] === true) === false) { - throw new InsufficientMLCapabilities('Insufficient privileges to access feature'); - } - }; + return async (capabilities: MlCapabilitiesKey[]) => { + try { + mlCapabilities = await resolveMlCapabilitiesOnce(request); + } catch (e) { + mlLog.error(e); + throw new UnknownMLCapabilitiesError(`Unable to perform ML capabilities check ${e}`); + } + + if (mlCapabilities === null) { + throw new MLPrivilegesUninitialized('ML capabilities have not been initialized'); + } + + if (capabilities.every((c) => mlCapabilities![c] === true) === false) { + throw new InsufficientMLCapabilities('Insufficient privileges to access feature'); + } }; } diff --git a/x-pack/plugins/ml/server/saved_objects/service.ts b/x-pack/plugins/ml/server/saved_objects/service.ts index d660207e16b89..1c31b6d0d088d 100644 --- a/x-pack/plugins/ml/server/saved_objects/service.ts +++ b/x-pack/plugins/ml/server/saved_objects/service.ts @@ -6,6 +6,7 @@ */ import RE2 from 're2'; +import { memoize } from 'lodash'; import { KibanaRequest, SavedObjectsClientContract, @@ -57,6 +58,11 @@ export function mlSavedObjectServiceFactory( client: IScopedClusterClient, isMlReady: () => Promise ) { + const _savedObjectsClientFindMemo = memoize( + async (options: SavedObjectsFindOptions) => savedObjectsClient.find(options), + (options: SavedObjectsFindOptions) => JSON.stringify(options) + ); + async function _getJobObjects( jobType?: JobType, jobId?: string, @@ -87,8 +93,7 @@ export function mlSavedObjectServiceFactory( filter, }; - const jobs = await savedObjectsClient.find(options); - + const jobs = await _savedObjectsClientFindMemo(options); return jobs.saved_objects; } @@ -231,7 +236,8 @@ export function mlSavedObjectServiceFactory( filter, }; - return (await internalSavedObjectsClient.find(options)).saved_objects; + const jobs = await _savedObjectsClientFindMemo(options); + return jobs.saved_objects; } async function addDatafeed(datafeedId: string, jobId: string) { @@ -462,8 +468,7 @@ export function mlSavedObjectServiceFactory( filter, }; - const models = await savedObjectsClient.find(options); - + const models = await _savedObjectsClientFindMemo(options); return models.saved_objects; } @@ -677,7 +682,7 @@ export function mlSavedObjectServiceFactory( searchFields, filter, }; - return savedObjectsClient.find(options); + return _savedObjectsClientFindMemo(options); }); const finedResult = await Promise.all(searches); diff --git a/x-pack/plugins/ml/server/shared_services/providers/alerting_service.ts b/x-pack/plugins/ml/server/shared_services/providers/alerting_service.ts index 9ab631e0eda1a..8221734d14092 100644 --- a/x-pack/plugins/ml/server/shared_services/providers/alerting_service.ts +++ b/x-pack/plugins/ml/server/shared_services/providers/alerting_service.ts @@ -16,9 +16,10 @@ export function getAlertingServiceProvider(getGuards: GetGuards) { savedObjectsClient: SavedObjectsClientContract, request: KibanaRequest ) { + const guards = getGuards(request, savedObjectsClient); return { preview: async (...args: Parameters) => { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetJobs']) .ok(({ mlClient, scopedClient, getFieldsFormatRegistry, getDataViewsService }) => @@ -33,7 +34,7 @@ export function getAlertingServiceProvider(getGuards: GetGuards) { execute: async ( ...args: Parameters ): ReturnType => { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetJobs']) .ok(({ mlClient, scopedClient, getFieldsFormatRegistry, getDataViewsService }) => diff --git a/x-pack/plugins/ml/server/shared_services/providers/anomaly_detectors.ts b/x-pack/plugins/ml/server/shared_services/providers/anomaly_detectors.ts index 92c6dc8513aa7..8887a1dae5b31 100644 --- a/x-pack/plugins/ml/server/shared_services/providers/anomaly_detectors.ts +++ b/x-pack/plugins/ml/server/shared_services/providers/anomaly_detectors.ts @@ -32,9 +32,10 @@ export function getAnomalyDetectorsProvider(getGuards: GetGuards): AnomalyDetect request: KibanaRequest, savedObjectsClient: SavedObjectsClientContract ) { + const guards = getGuards(request, savedObjectsClient); return { async jobs(jobId?: string) { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetJobs']) .ok(async ({ mlClient }) => { @@ -45,7 +46,7 @@ export function getAnomalyDetectorsProvider(getGuards: GetGuards): AnomalyDetect }); }, async jobStats(jobId?: string) { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetJobs']) .ok(async ({ mlClient }) => { @@ -56,7 +57,7 @@ export function getAnomalyDetectorsProvider(getGuards: GetGuards): AnomalyDetect }); }, async datafeeds(datafeedId?: string) { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetDatafeeds']) .ok(async ({ mlClient }) => { @@ -67,7 +68,7 @@ export function getAnomalyDetectorsProvider(getGuards: GetGuards): AnomalyDetect }); }, async datafeedStats(datafeedId?: string) { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetDatafeeds']) .ok(async ({ mlClient }) => { diff --git a/x-pack/plugins/ml/server/shared_services/providers/index.ts b/x-pack/plugins/ml/server/shared_services/providers/index.ts new file mode 100644 index 0000000000000..df8feae265b84 --- /dev/null +++ b/x-pack/plugins/ml/server/shared_services/providers/index.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export type { MlSystemProvider } from './system'; +export type { JobServiceProvider } from './job_service'; +export type { ModuleSetupPayload, ModulesProvider } from './modules'; +export type { ResultsServiceProvider } from './results_service'; +export type { TrainedModelsProvider } from './trained_models'; +export type { AnomalyDetectorsProvider } from './anomaly_detectors'; + +export { getMlSystemProvider } from './system'; +export { getJobServiceProvider } from './job_service'; +export { getModulesProvider } from './modules'; +export { getResultsServiceProvider } from './results_service'; +export { getTrainedModelsProvider } from './trained_models'; +export { getAnomalyDetectorsProvider } from './anomaly_detectors'; diff --git a/x-pack/plugins/ml/server/shared_services/providers/job_service.ts b/x-pack/plugins/ml/server/shared_services/providers/job_service.ts index c9b4a5c0b0b13..c9d7a5d8d67c6 100644 --- a/x-pack/plugins/ml/server/shared_services/providers/job_service.ts +++ b/x-pack/plugins/ml/server/shared_services/providers/job_service.ts @@ -25,9 +25,10 @@ export interface JobServiceProvider { export function getJobServiceProvider(getGuards: GetGuards): JobServiceProvider { return { jobServiceProvider(request: KibanaRequest, savedObjectsClient: SavedObjectsClientContract) { + const guards = getGuards(request, savedObjectsClient); return { jobsSummary: async (...args) => { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetJobs']) .ok(({ scopedClient, mlClient }) => { @@ -36,7 +37,7 @@ export function getJobServiceProvider(getGuards: GetGuards): JobServiceProvider }); }, forceStartDatafeeds: async (...args) => { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canStartStopDatafeed']) .ok(({ scopedClient, mlClient }) => { @@ -45,7 +46,7 @@ export function getJobServiceProvider(getGuards: GetGuards): JobServiceProvider }); }, stopDatafeeds: async (...args) => { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canStartStopDatafeed']) .ok(({ scopedClient, mlClient }) => { diff --git a/x-pack/plugins/ml/server/shared_services/providers/modules.ts b/x-pack/plugins/ml/server/shared_services/providers/modules.ts index 282715e5e8c17..7180e0c0094e6 100644 --- a/x-pack/plugins/ml/server/shared_services/providers/modules.ts +++ b/x-pack/plugins/ml/server/shared_services/providers/modules.ts @@ -33,9 +33,10 @@ export function getModulesProvider( ): ModulesProvider { return { modulesProvider(request: KibanaRequest, savedObjectsClient: SavedObjectsClientContract) { + const guards = getGuards(request, savedObjectsClient); return { async recognize(...args) { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetJobs']) .ok(async ({ scopedClient, mlClient, mlSavedObjectService, getDataViewsService }) => { @@ -52,7 +53,7 @@ export function getModulesProvider( }); }, async getModule(moduleId: string) { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetJobs']) .ok(async ({ scopedClient, mlClient, mlSavedObjectService, getDataViewsService }) => { @@ -69,7 +70,7 @@ export function getModulesProvider( }); }, async listModules() { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetJobs']) .ok(async ({ scopedClient, mlClient, mlSavedObjectService, getDataViewsService }) => { @@ -86,7 +87,7 @@ export function getModulesProvider( }); }, async setup(payload: ModuleSetupPayload) { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canCreateJob']) .ok(async ({ scopedClient, mlClient, mlSavedObjectService, getDataViewsService }) => { diff --git a/x-pack/plugins/ml/server/shared_services/providers/results_service.ts b/x-pack/plugins/ml/server/shared_services/providers/results_service.ts index 496b6b6127bb1..0190410c81197 100644 --- a/x-pack/plugins/ml/server/shared_services/providers/results_service.ts +++ b/x-pack/plugins/ml/server/shared_services/providers/results_service.ts @@ -23,9 +23,10 @@ export interface ResultsServiceProvider { export function getResultsServiceProvider(getGuards: GetGuards): ResultsServiceProvider { return { resultsServiceProvider(request: KibanaRequest, savedObjectsClient: SavedObjectsClientContract) { + const guards = getGuards(request, savedObjectsClient); return { async getAnomaliesTableData(...args) { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetJobs']) .ok(async ({ mlClient }) => { diff --git a/x-pack/plugins/ml/server/shared_services/providers/system.ts b/x-pack/plugins/ml/server/shared_services/providers/system.ts index e205eca325c4c..2bcf76b707f24 100644 --- a/x-pack/plugins/ml/server/shared_services/providers/system.ts +++ b/x-pack/plugins/ml/server/shared_services/providers/system.ts @@ -40,44 +40,41 @@ export function getMlSystemProvider( ): MlSystemProvider { return { mlSystemProvider(request: KibanaRequest, savedObjectsClient: SavedObjectsClientContract) { + const guards = getGuards(request, savedObjectsClient); return { async mlCapabilities() { - return await getGuards(request, savedObjectsClient) - .isMinimumLicense() - .ok(async ({ mlClient }) => { - const { isMlEnabledInSpace } = spacesUtilsProvider(getSpaces, request); + return await guards.isMinimumLicense().ok(async ({ mlClient }) => { + const { isMlEnabledInSpace } = spacesUtilsProvider(getSpaces, request); - const mlCapabilities = await resolveMlCapabilities(request); - if (mlCapabilities === null) { - throw new Error('mlCapabilities is not defined'); - } + const mlCapabilities = await resolveMlCapabilities(request); + if (mlCapabilities === null) { + throw new Error('mlCapabilities is not defined'); + } - const { getCapabilities } = capabilitiesProvider( - mlClient, - mlCapabilities, - mlLicense, - isMlEnabledInSpace - ); - return getCapabilities(); - }); + const { getCapabilities } = capabilitiesProvider( + mlClient, + mlCapabilities, + mlLicense, + isMlEnabledInSpace + ); + return getCapabilities(); + }); }, async mlInfo(): Promise { - return await getGuards(request, savedObjectsClient) - .isMinimumLicense() - .ok(async ({ mlClient }) => { - const info = await mlClient.info(); - const cloudId = cloud && cloud.cloudId; - return { - ...info, - cloudId, - }; - }); + return await guards.isMinimumLicense().ok(async ({ mlClient }) => { + const info = await mlClient.info(); + const cloudId = cloud && cloud.cloudId; + return { + ...info, + cloudId, + }; + }); }, async mlAnomalySearch( searchParams: any, jobIds: string[] ): Promise> { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetJobs']) .ok(async ({ mlClient }) => { diff --git a/x-pack/plugins/ml/server/shared_services/providers/trained_models.ts b/x-pack/plugins/ml/server/shared_services/providers/trained_models.ts index 0a8d80c24ea40..b6a439970cbd7 100644 --- a/x-pack/plugins/ml/server/shared_services/providers/trained_models.ts +++ b/x-pack/plugins/ml/server/shared_services/providers/trained_models.ts @@ -26,9 +26,10 @@ export interface TrainedModelsProvider { export function getTrainedModelsProvider(getGuards: GetGuards): TrainedModelsProvider { return { trainedModelsProvider(request: KibanaRequest, savedObjectsClient: SavedObjectsClientContract) { + const guards = getGuards(request, savedObjectsClient); return { async getTrainedModels(params: estypes.MlGetTrainedModelsRequest) { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetTrainedModels']) .ok(async ({ mlClient }) => { @@ -36,7 +37,7 @@ export function getTrainedModelsProvider(getGuards: GetGuards): TrainedModelsPro }); }, async getTrainedModelsStats(params: estypes.MlGetTrainedModelsStatsRequest) { - return await getGuards(request, savedObjectsClient) + return await guards .isFullLicense() .hasMlCapabilities(['canGetTrainedModels']) .ok(async ({ mlClient }) => { diff --git a/x-pack/plugins/ml/server/shared_services/shared_services.ts b/x-pack/plugins/ml/server/shared_services/shared_services.ts index f665bc633825c..752820f57cf2a 100644 --- a/x-pack/plugins/ml/server/shared_services/shared_services.ts +++ b/x-pack/plugins/ml/server/shared_services/shared_services.ts @@ -10,9 +10,10 @@ import type { IScopedClusterClient, SavedObjectsClientContract, UiSettingsServiceStart, + KibanaRequest, } from '@kbn/core/server'; import type { SpacesPluginStart } from '@kbn/spaces-plugin/server'; -import { CoreKibanaRequest, KibanaRequest } from '@kbn/core/server'; +import { CoreKibanaRequest } from '@kbn/core/server'; import type { CloudSetup } from '@kbn/cloud-plugin/server'; import type { PluginStart as DataViewsPluginStart } from '@kbn/data-views-plugin/server'; import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; @@ -20,15 +21,24 @@ import type { FieldFormatsStart } from '@kbn/field-formats-plugin/server'; import { MlLicense } from '../../common/license'; import { licenseChecks } from './license_checks'; -import { MlSystemProvider, getMlSystemProvider } from './providers/system'; -import { JobServiceProvider, getJobServiceProvider } from './providers/job_service'; -import { ModulesProvider, getModulesProvider } from './providers/modules'; -import { ResultsServiceProvider, getResultsServiceProvider } from './providers/results_service'; -import { TrainedModelsProvider, getTrainedModelsProvider } from './providers/trained_models'; -import { +import type { + MlSystemProvider, + JobServiceProvider, + ResultsServiceProvider, + TrainedModelsProvider, AnomalyDetectorsProvider, + ModulesProvider, +} from './providers'; + +import { + getMlSystemProvider, + getJobServiceProvider, + getModulesProvider, + getResultsServiceProvider, + getTrainedModelsProvider, getAnomalyDetectorsProvider, -} from './providers/anomaly_detectors'; +} from './providers'; + import type { ResolveMlCapabilities, MlCapabilitiesKey } from '../../common/types/capabilities'; import { hasMlCapabilitiesProvider, HasMlCapabilities } from '../lib/capabilities'; import { @@ -200,8 +210,10 @@ function getRequestItemsProvider( getDataViews: () => DataViewsPluginStart ) { return (request: KibanaRequest) => { - const getHasMlCapabilities = hasMlCapabilitiesProvider(resolveMlCapabilities); - let hasMlCapabilities: HasMlCapabilities; + let hasMlCapabilities: HasMlCapabilities = hasMlCapabilitiesProvider( + resolveMlCapabilities, + request + ); let scopedClient: IScopedClusterClient; let mlClient: MlClient; // While https://github.com/elastic/kibana/issues/64588 exists we @@ -247,7 +259,6 @@ function getRequestItemsProvider( let mlSavedObjectService; if (request instanceof CoreKibanaRequest) { - hasMlCapabilities = getHasMlCapabilities(request); scopedClient = clusterClient.asScoped(request); mlSavedObjectService = getSobSavedObjectService(scopedClient); mlClient = getMlClient(scopedClient, mlSavedObjectService); diff --git a/x-pack/plugins/profiling/common/columnar_view_model.ts b/x-pack/plugins/profiling/common/columnar_view_model.ts index 21e520b1f9942..cc20bd9ca9a0e 100644 --- a/x-pack/plugins/profiling/common/columnar_view_model.ts +++ b/x-pack/plugins/profiling/common/columnar_view_model.ts @@ -22,6 +22,7 @@ import { ElasticFlameGraph } from './flamegraph'; * 6 = Ruby * 7 = Perl * 8 = JavaScript + * 9 = PHP JIT * * This is most easily achieved by mapping frame types to different color variations, using * the x-position we can use different colors for adjacent blocks while keeping a similar hue @@ -38,6 +39,7 @@ const frameTypeToColors = [ [0xd79ffc, 0xdfb2fd, 0xe7c5fd, 0xefd9fe], [0xf98bb9, 0xfaa2c7, 0xfbb9d5, 0xfdd1e3], [0xcbc3e3, 0xd5cfe8, 0xdfdbee, 0xeae7f3], + [0xccfc82, 0xd1fc8e, 0xd6fc9b, 0xdbfca7], ]; function frameTypeToRGB(frameType: number, x: number): number { diff --git a/x-pack/plugins/profiling/public/components/subchart.tsx b/x-pack/plugins/profiling/public/components/subchart.tsx index 0dc017bbdf5f3..106f0f53ad8e8 100644 --- a/x-pack/plugins/profiling/public/components/subchart.tsx +++ b/x-pack/plugins/profiling/public/components/subchart.tsx @@ -187,6 +187,8 @@ export const SubChart: React.FC = ({ onShowMoreClick?.()}> {label} + ) : category === OTHER_BUCKET_LABEL ? ( + {label} ) : ( {label} diff --git a/x-pack/plugins/rule_registry/common/assets/field_maps/technical_rule_field_map.test.ts b/x-pack/plugins/rule_registry/common/assets/field_maps/technical_rule_field_map.test.ts index e546f339d2b88..42c690e41604b 100644 --- a/x-pack/plugins/rule_registry/common/assets/field_maps/technical_rule_field_map.test.ts +++ b/x-pack/plugins/rule_registry/common/assets/field_maps/technical_rule_field_map.test.ts @@ -37,6 +37,11 @@ it('matches snapshot', () => { "required": false, "type": "keyword", }, + "kibana.alert.case_ids": Object { + "array": true, + "required": false, + "type": "keyword", + }, "kibana.alert.duration.us": Object { "type": "long", }, diff --git a/x-pack/plugins/rule_registry/common/assets/field_maps/technical_rule_field_map.ts b/x-pack/plugins/rule_registry/common/assets/field_maps/technical_rule_field_map.ts index aeebe987e20de..9f1ee0838c154 100644 --- a/x-pack/plugins/rule_registry/common/assets/field_maps/technical_rule_field_map.ts +++ b/x-pack/plugins/rule_registry/common/assets/field_maps/technical_rule_field_map.ts @@ -79,6 +79,11 @@ export const technicalRuleFieldMap = { array: false, required: false, }, + [Fields.ALERT_CASE_IDS]: { + type: 'keyword', + array: true, + required: false, + }, [Fields.ALERT_RULE_AUTHOR]: { type: 'keyword', array: false, diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule.cy.ts index 9511e96956979..43825c9c662fd 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule.cy.ts @@ -286,6 +286,13 @@ describe('Custom query rules', () => { selectNumberOfRules(numberOfRulesToBeDeleted); deleteSelectedRules(); + cy.get(RULES_TABLE) + .get(RULES_ROW) + .first() + .within(() => { + cy.get(RULE_SWITCH).should('not.exist'); + }); + cy.get(RULES_TABLE) .find(RULES_ROW) .should('have.length', expectedNumberOfRulesAfterDeletion); @@ -293,6 +300,12 @@ describe('Custom query rules', () => { const numberOfRules = body.data.length; expect(numberOfRules).to.eql(expectedNumberOfRulesAfterDeletion); }); + cy.get(RULES_TABLE) + .get(RULES_ROW) + .first() + .within(() => { + cy.get(RULE_SWITCH).should('exist'); + }); cy.get(CUSTOM_RULES_BTN).should( 'have.text', `Custom rules (${expectedNumberOfRulesAfterDeletion})` diff --git a/x-pack/plugins/security_solution/public/app/types.ts b/x-pack/plugins/security_solution/public/app/types.ts index d2b449d484089..a1314b27a0ab7 100644 --- a/x-pack/plugins/security_solution/public/app/types.ts +++ b/x-pack/plugins/security_solution/public/app/types.ts @@ -18,6 +18,7 @@ import type { import type { RouteProps } from 'react-router-dom'; import type { AppMountParameters } from '@kbn/core/public'; import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; +import type { ExploreReducer, ExploreState } from '../explore'; import type { StartServices } from '../types'; /** @@ -38,8 +39,8 @@ import type { TableState } from '../common/store/data_table/types'; export { SecurityPageName } from '../../common/constants'; export interface SecuritySubPluginStore { - initialState: Record; - reducer: Record>; + initialState: K extends 'explore' ? ExploreState : Record; + reducer: K extends 'explore' ? ExploreReducer : Record>; middleware?: Array>>>; } @@ -48,12 +49,15 @@ export type SecuritySubPluginRoutes = RouteProps[]; export interface SecuritySubPlugin { routes: SecuritySubPluginRoutes; storageDataTables?: Pick; + exploreDataTables?: { + network: Pick; + hosts: Pick; + users: Pick; + }; } export type SecuritySubPluginKeyStore = - | 'hosts' - | 'users' - | 'network' + | 'explore' | 'timeline' | 'hostList' | 'alertList' diff --git a/x-pack/plugins/security_solution/public/common/store/store.ts b/x-pack/plugins/security_solution/public/common/store/store.ts index af2797697f067..7a00dafedcd20 100644 --- a/x-pack/plugins/security_solution/public/common/store/store.ts +++ b/x-pack/plugins/security_solution/public/common/store/store.ts @@ -110,16 +110,14 @@ export const createStoreFactory = async ( const dataTableInitialState = { dataTable: { tableById: { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + /* eslint-disable @typescript-eslint/no-non-null-assertion */ ...subPlugins.alerts.storageDataTables!.tableById, - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion ...subPlugins.rules.storageDataTables!.tableById, - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion ...subPlugins.exceptions.storageDataTables!.tableById, - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - ...subPlugins.hosts.storageDataTables!.tableById, - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - ...subPlugins.network.storageDataTables!.tableById, + ...subPlugins.explore.exploreDataTables!.hosts.tableById, + ...subPlugins.explore.exploreDataTables!.network.tableById, + ...subPlugins.explore.exploreDataTables!.users.tableById, + /* eslint-enable @typescript-eslint/no-non-null-assertion */ }, }, }; @@ -132,9 +130,7 @@ export const createStoreFactory = async ( const initialState = createInitialState( { - ...subPlugins.hosts.store.initialState, - ...subPlugins.users.store.initialState, - ...subPlugins.network.store.initialState, + ...subPlugins.explore.store.initialState, ...timelineInitialState, ...subPlugins.management.store.initialState, }, @@ -148,9 +144,7 @@ export const createStoreFactory = async ( ); const rootReducer = { - ...subPlugins.hosts.store.reducer, - ...subPlugins.users.store.reducer, - ...subPlugins.network.store.reducer, + ...subPlugins.explore.store.reducer, timeline: timelineReducer, ...subPlugins.management.store.reducer, }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx index c99f9ae2ac760..5f7bdb2a2745c 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx @@ -65,7 +65,10 @@ const useEnabledColumn = ({ hasCRUDPermissions, startMlJobs }: ColumnsProps): Ta const { loadingRulesAction, loadingRuleIds } = useRulesTableContext().state; const loadingIds = useMemo( - () => (['disable', 'enable', 'edit'].includes(loadingRulesAction ?? '') ? loadingRuleIds : []), + () => + ['disable', 'enable', 'edit', 'delete'].includes(loadingRulesAction ?? '') + ? loadingRuleIds + : [], [loadingRuleIds, loadingRulesAction] ); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/help_text.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/help_text.tsx index ee4b5061e8499..17d869183f96e 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/help_text.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/help_text.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { EuiIcon, EuiLink, EuiText } from '@elastic/eui'; +import { EuiLink, EuiText } from '@elastic/eui'; import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n-react'; @@ -36,13 +36,12 @@ const HelpTextComponent: React.FC<{ href: string; notRunningJobIds: string[] }> /> {notRunningJobIds.length > 0 && ( - - + {notRunningJobIds.length === 1 ? ( ) : ( acc + (i < array.length - 1 ? ', ' : ', and ') + value diff --git a/x-pack/plugins/security_solution/public/explore/hosts/index.ts b/x-pack/plugins/security_solution/public/explore/hosts/index.ts deleted file mode 100644 index 06e61e8ace88c..0000000000000 --- a/x-pack/plugins/security_solution/public/explore/hosts/index.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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { Storage } from '@kbn/kibana-utils-plugin/public'; -import type { TableIdLiteral } from '../../../common/types'; -import { TableId } from '../../../common/types'; -import type { SecuritySubPluginWithStore } from '../../app/types'; -import { getDataTablesInStorageByIds } from '../../timelines/containers/local_storage'; -import { routes } from './routes'; -import type { HostsState } from './store'; -import { initialHostsState, hostsReducer } from './store'; - -const HOST_TABLE_IDS: TableIdLiteral[] = [TableId.hostsPageEvents, TableId.hostsPageSessions]; - -export class Hosts { - public setup() {} - - public start(storage: Storage): SecuritySubPluginWithStore<'hosts', HostsState> { - return { - routes, - storageDataTables: { - tableById: getDataTablesInStorageByIds(storage, HOST_TABLE_IDS), - }, - store: { - initialState: { hosts: initialHostsState }, - reducer: { hosts: hostsReducer }, - }, - }; - } -} diff --git a/x-pack/plugins/security_solution/public/explore/hosts/links.ts b/x-pack/plugins/security_solution/public/explore/hosts/links.ts deleted file mode 100644 index 5c7225b6da452..0000000000000 --- a/x-pack/plugins/security_solution/public/explore/hosts/links.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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { i18n } from '@kbn/i18n'; -import { HOSTS_PATH, SecurityPageName } from '../../../common/constants'; -import { HOSTS } from '../../app/translations'; -import type { LinkItem } from '../../common/links/types'; -import hostsPageImg from '../../common/images/hosts_page.png'; - -export const links: LinkItem = { - id: SecurityPageName.hosts, - title: HOSTS, - landingImage: hostsPageImg, - description: i18n.translate('xpack.securitySolution.landing.threatHunting.hostsDescription', { - defaultMessage: 'A comprehensive overview of all hosts and host-related security events.', - }), - path: HOSTS_PATH, - globalSearchKeywords: [ - i18n.translate('xpack.securitySolution.appLinks.hosts', { - defaultMessage: 'Hosts', - }), - ], - links: [ - { - id: SecurityPageName.uncommonProcesses, - title: i18n.translate('xpack.securitySolution.appLinks.hosts.uncommonProcesses', { - defaultMessage: 'Uncommon Processes', - }), - path: `${HOSTS_PATH}/uncommonProcesses`, - }, - { - id: SecurityPageName.hostsAnomalies, - title: i18n.translate('xpack.securitySolution.appLinks.hosts.anomalies', { - defaultMessage: 'Anomalies', - }), - path: `${HOSTS_PATH}/anomalies`, - licenseType: 'gold', - }, - { - id: SecurityPageName.hostsEvents, - title: i18n.translate('xpack.securitySolution.appLinks.hosts.events', { - defaultMessage: 'Events', - }), - path: `${HOSTS_PATH}/events`, - }, - { - id: SecurityPageName.hostsRisk, - title: i18n.translate('xpack.securitySolution.appLinks.hosts.risk', { - defaultMessage: 'Host risk', - }), - path: `${HOSTS_PATH}/hostRisk`, - }, - { - id: SecurityPageName.sessions, - title: i18n.translate('xpack.securitySolution.appLinks.hosts.sessions', { - defaultMessage: 'Sessions', - }), - path: `${HOSTS_PATH}/sessions`, - isBeta: false, - licenseType: 'enterprise', - }, - ], -}; diff --git a/x-pack/plugins/security_solution/public/explore/hosts/routes.tsx b/x-pack/plugins/security_solution/public/explore/hosts/routes.tsx deleted file mode 100644 index e062a4743be57..0000000000000 --- a/x-pack/plugins/security_solution/public/explore/hosts/routes.tsx +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; -import { HostsContainer } from './pages'; -import type { SecuritySubPluginRoutes } from '../../app/types'; -import { SecurityPageName } from '../../app/types'; -import { HOSTS_PATH } from '../../../common/constants'; -import { PluginTemplateWrapper } from '../../common/components/plugin_template_wrapper'; - -export const HostsRoutes = () => ( - - - - - -); - -export const routes: SecuritySubPluginRoutes = [ - { - path: HOSTS_PATH, - component: HostsRoutes, - }, -]; diff --git a/x-pack/plugins/security_solution/public/explore/index.ts b/x-pack/plugins/security_solution/public/explore/index.ts new file mode 100644 index 0000000000000..2141cd45e0fcc --- /dev/null +++ b/x-pack/plugins/security_solution/public/explore/index.ts @@ -0,0 +1,61 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { AnyAction, Reducer } from 'redux'; +import type { HostsState } from './hosts/store'; +import type { UsersState } from './users/store'; +import { TableId } from '../../common/types'; +import type { SecuritySubPluginWithStore } from '../app/types'; +import { routes } from './routes'; +import type { NetworkState } from './network/store'; +import { initialNetworkState, networkReducer } from './network/store'; +import { getDataTablesInStorageByIds } from '../timelines/containers/local_storage'; +import { initialUsersState, usersReducer } from './users/store'; +import { hostsReducer, initialHostsState } from './hosts/store'; + +export interface ExploreState { + network: NetworkState; + hosts: HostsState; + users: UsersState; +} + +export interface ExploreReducer { + network: Reducer; + hosts: Reducer; + users: Reducer; +} + +export class Explore { + public setup() {} + + public start(storage: Storage): SecuritySubPluginWithStore<'explore', ExploreState> { + return { + routes, + exploreDataTables: { + network: { tableById: getDataTablesInStorageByIds(storage, [TableId.networkPageEvents]) }, + hosts: { + tableById: getDataTablesInStorageByIds(storage, [ + TableId.hostsPageEvents, + TableId.hostsPageSessions, + ]), + }, + users: { + tableById: getDataTablesInStorageByIds(storage, [TableId.usersPageEvents]), + }, + }, + store: { + initialState: { + network: initialNetworkState, + users: initialUsersState, + hosts: initialHostsState, + }, + reducer: { network: networkReducer, users: usersReducer, hosts: hostsReducer }, + }, + }; + } +} diff --git a/x-pack/plugins/security_solution/public/explore/links.ts b/x-pack/plugins/security_solution/public/explore/links.ts new file mode 100644 index 0000000000000..f54262bf57151 --- /dev/null +++ b/x-pack/plugins/security_solution/public/explore/links.ts @@ -0,0 +1,172 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +import { HOSTS_PATH, NETWORK_PATH, SecurityPageName, USERS_PATH } from '../../common/constants'; +import { HOSTS, NETWORK, USERS } from '../app/translations'; +import type { LinkItem } from '../common/links/types'; +import hostsPageImg from '../common/images/hosts_page.png'; +import userPageImg from '../common/images/users_page.png'; +import networkPageImg from '../common/images/network_page.png'; + +const networkLinks: LinkItem = { + id: SecurityPageName.network, + title: NETWORK, + landingImage: networkPageImg, + description: i18n.translate('xpack.securitySolution.appLinks.network.description', { + defaultMessage: + 'Provides key activity metrics in an interactive map as well as event tables that enable interaction with the Timeline.', + }), + path: NETWORK_PATH, + globalSearchKeywords: [ + i18n.translate('xpack.securitySolution.appLinks.network', { + defaultMessage: 'Network', + }), + ], + links: [ + { + id: SecurityPageName.networkDns, + title: i18n.translate('xpack.securitySolution.appLinks.network.dns', { + defaultMessage: 'DNS', + }), + path: `${NETWORK_PATH}/dns`, + }, + { + id: SecurityPageName.networkHttp, + title: i18n.translate('xpack.securitySolution.appLinks.network.http', { + defaultMessage: 'HTTP', + }), + path: `${NETWORK_PATH}/http`, + }, + { + id: SecurityPageName.networkTls, + title: i18n.translate('xpack.securitySolution.appLinks.network.tls', { + defaultMessage: 'TLS', + }), + path: `${NETWORK_PATH}/tls`, + }, + { + id: SecurityPageName.networkAnomalies, + title: i18n.translate('xpack.securitySolution.appLinks.hosts.anomalies', { + defaultMessage: 'Anomalies', + }), + path: `${NETWORK_PATH}/anomalies`, + licenseType: 'gold', + }, + { + id: SecurityPageName.networkEvents, + title: i18n.translate('xpack.securitySolution.appLinks.network.events', { + defaultMessage: 'Events', + }), + path: `${NETWORK_PATH}/events`, + }, + ], +}; + +const usersLinks: LinkItem = { + id: SecurityPageName.users, + title: USERS, + landingImage: userPageImg, + description: i18n.translate('xpack.securitySolution.appLinks.users.description', { + defaultMessage: + 'A comprehensive overview of user data that enables understanding of authentication and user behavior within your environment.', + }), + path: USERS_PATH, + globalSearchKeywords: [ + i18n.translate('xpack.securitySolution.appLinks.users', { + defaultMessage: 'Users', + }), + ], + links: [ + { + id: SecurityPageName.usersAuthentications, + title: i18n.translate('xpack.securitySolution.appLinks.users.authentications', { + defaultMessage: 'Authentications', + }), + path: `${USERS_PATH}/authentications`, + }, + { + id: SecurityPageName.usersAnomalies, + title: i18n.translate('xpack.securitySolution.appLinks.users.anomalies', { + defaultMessage: 'Anomalies', + }), + path: `${USERS_PATH}/anomalies`, + licenseType: 'gold', + }, + { + id: SecurityPageName.usersRisk, + title: i18n.translate('xpack.securitySolution.appLinks.users.risk', { + defaultMessage: 'User risk', + }), + path: `${USERS_PATH}/userRisk`, + }, + { + id: SecurityPageName.usersEvents, + title: i18n.translate('xpack.securitySolution.appLinks.users.events', { + defaultMessage: 'Events', + }), + path: `${USERS_PATH}/events`, + }, + ], +}; + +const hostsLinks: LinkItem = { + id: SecurityPageName.hosts, + title: HOSTS, + landingImage: hostsPageImg, + description: i18n.translate('xpack.securitySolution.landing.threatHunting.hostsDescription', { + defaultMessage: 'A comprehensive overview of all hosts and host-related security events.', + }), + path: HOSTS_PATH, + globalSearchKeywords: [ + i18n.translate('xpack.securitySolution.appLinks.hosts', { + defaultMessage: 'Hosts', + }), + ], + links: [ + { + id: SecurityPageName.uncommonProcesses, + title: i18n.translate('xpack.securitySolution.appLinks.hosts.uncommonProcesses', { + defaultMessage: 'Uncommon Processes', + }), + path: `${HOSTS_PATH}/uncommonProcesses`, + }, + { + id: SecurityPageName.hostsAnomalies, + title: i18n.translate('xpack.securitySolution.appLinks.hosts.anomalies', { + defaultMessage: 'Anomalies', + }), + path: `${HOSTS_PATH}/anomalies`, + licenseType: 'gold', + }, + { + id: SecurityPageName.hostsEvents, + title: i18n.translate('xpack.securitySolution.appLinks.hosts.events', { + defaultMessage: 'Events', + }), + path: `${HOSTS_PATH}/events`, + }, + { + id: SecurityPageName.hostsRisk, + title: i18n.translate('xpack.securitySolution.appLinks.hosts.risk', { + defaultMessage: 'Host risk', + }), + path: `${HOSTS_PATH}/hostRisk`, + }, + { + id: SecurityPageName.sessions, + title: i18n.translate('xpack.securitySolution.appLinks.hosts.sessions', { + defaultMessage: 'Sessions', + }), + path: `${HOSTS_PATH}/sessions`, + isBeta: false, + licenseType: 'enterprise', + }, + ], +}; + +export const exploreLinks = [hostsLinks, networkLinks, usersLinks]; diff --git a/x-pack/plugins/security_solution/public/explore/network/index.ts b/x-pack/plugins/security_solution/public/explore/network/index.ts deleted file mode 100644 index 8dd650c0f5ebf..0000000000000 --- a/x-pack/plugins/security_solution/public/explore/network/index.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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { Storage } from '@kbn/kibana-utils-plugin/public'; -import { TableId } from '../../../common/types'; -import type { SecuritySubPluginWithStore } from '../../app/types'; -import { routes } from './routes'; -import type { NetworkState } from './store'; -import { initialNetworkState, networkReducer } from './store'; -import { getDataTablesInStorageByIds } from '../../timelines/containers/local_storage'; - -export class Network { - public setup() {} - - public start(storage: Storage): SecuritySubPluginWithStore<'network', NetworkState> { - return { - routes, - storageDataTables: { - tableById: getDataTablesInStorageByIds(storage, [TableId.networkPageEvents]), - }, - store: { - initialState: { network: initialNetworkState }, - reducer: { network: networkReducer }, - }, - }; - } -} diff --git a/x-pack/plugins/security_solution/public/explore/network/links.ts b/x-pack/plugins/security_solution/public/explore/network/links.ts deleted file mode 100644 index f762d09dd2ecd..0000000000000 --- a/x-pack/plugins/security_solution/public/explore/network/links.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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { i18n } from '@kbn/i18n'; -import { NETWORK_PATH, SecurityPageName } from '../../../common/constants'; -import { NETWORK } from '../../app/translations'; -import type { LinkItem } from '../../common/links/types'; -import networkPageImg from '../../common/images/network_page.png'; - -export const links: LinkItem = { - id: SecurityPageName.network, - title: NETWORK, - landingImage: networkPageImg, - description: i18n.translate('xpack.securitySolution.appLinks.network.description', { - defaultMessage: - 'Provides key activity metrics in an interactive map as well as event tables that enable interaction with the Timeline.', - }), - path: NETWORK_PATH, - globalSearchKeywords: [ - i18n.translate('xpack.securitySolution.appLinks.network', { - defaultMessage: 'Network', - }), - ], - links: [ - { - id: SecurityPageName.networkDns, - title: i18n.translate('xpack.securitySolution.appLinks.network.dns', { - defaultMessage: 'DNS', - }), - path: `${NETWORK_PATH}/dns`, - }, - { - id: SecurityPageName.networkHttp, - title: i18n.translate('xpack.securitySolution.appLinks.network.http', { - defaultMessage: 'HTTP', - }), - path: `${NETWORK_PATH}/http`, - }, - { - id: SecurityPageName.networkTls, - title: i18n.translate('xpack.securitySolution.appLinks.network.tls', { - defaultMessage: 'TLS', - }), - path: `${NETWORK_PATH}/tls`, - }, - { - id: SecurityPageName.networkAnomalies, - title: i18n.translate('xpack.securitySolution.appLinks.hosts.anomalies', { - defaultMessage: 'Anomalies', - }), - path: `${NETWORK_PATH}/anomalies`, - licenseType: 'gold', - }, - { - id: SecurityPageName.networkEvents, - title: i18n.translate('xpack.securitySolution.appLinks.network.events', { - defaultMessage: 'Events', - }), - path: `${NETWORK_PATH}/events`, - }, - ], -}; diff --git a/x-pack/plugins/security_solution/public/explore/network/routes.tsx b/x-pack/plugins/security_solution/public/explore/network/routes.tsx deleted file mode 100644 index 7a5f9fc8dd98f..0000000000000 --- a/x-pack/plugins/security_solution/public/explore/network/routes.tsx +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; -import { NetworkContainer } from './pages'; - -import type { SecuritySubPluginRoutes } from '../../app/types'; -import { SecurityPageName } from '../../app/types'; -import { NETWORK_PATH } from '../../../common/constants'; -import { PluginTemplateWrapper } from '../../common/components/plugin_template_wrapper'; - -export const NetworkRoutes = () => ( - - - - - -); - -export const routes: SecuritySubPluginRoutes = [ - { - path: NETWORK_PATH, - component: NetworkRoutes, - }, -]; diff --git a/x-pack/plugins/security_solution/public/explore/routes.tsx b/x-pack/plugins/security_solution/public/explore/routes.tsx new file mode 100644 index 0000000000000..0698402623953 --- /dev/null +++ b/x-pack/plugins/security_solution/public/explore/routes.tsx @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; +import { UsersContainer } from './users/pages'; +import { HostsContainer } from './hosts/pages'; +import { NetworkContainer } from './network/pages'; + +import type { SecuritySubPluginRoutes } from '../app/types'; +import { SecurityPageName } from '../app/types'; +import { HOSTS_PATH, NETWORK_PATH, USERS_PATH } from '../../common/constants'; +import { PluginTemplateWrapper } from '../common/components/plugin_template_wrapper'; + +const NetworkRoutes = () => ( + + + + + +); + +const UsersRoutes = () => ( + + + + + +); + +const HostsRoutes = () => ( + + + + + +); + +export const routes: SecuritySubPluginRoutes = [ + { + path: NETWORK_PATH, + component: NetworkRoutes, + }, + { + path: USERS_PATH, + component: UsersRoutes, + }, + { + path: HOSTS_PATH, + component: HostsRoutes, + }, +]; diff --git a/x-pack/plugins/security_solution/public/explore/users/index.ts b/x-pack/plugins/security_solution/public/explore/users/index.ts deleted file mode 100644 index 770cf39102c90..0000000000000 --- a/x-pack/plugins/security_solution/public/explore/users/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { Storage } from '@kbn/kibana-utils-plugin/public'; -import type { SecuritySubPluginWithStore } from '../../app/types'; -import { routes } from './routes'; -import type { usersModel } from './store'; -import { initialUsersState, usersReducer } from './store'; - -export class Users { - public setup() {} - - public start(storage: Storage): SecuritySubPluginWithStore<'users', usersModel.UsersModel> { - return { - routes, - store: { - initialState: { users: initialUsersState }, - reducer: { users: usersReducer }, - }, - }; - } -} diff --git a/x-pack/plugins/security_solution/public/explore/users/links.ts b/x-pack/plugins/security_solution/public/explore/users/links.ts deleted file mode 100644 index 177197dcbd756..0000000000000 --- a/x-pack/plugins/security_solution/public/explore/users/links.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { i18n } from '@kbn/i18n'; -import { SecurityPageName, USERS_PATH } from '../../../common/constants'; -import { USERS } from '../../app/translations'; -import type { LinkItem } from '../../common/links/types'; -import userPageImg from '../../common/images/users_page.png'; - -export const links: LinkItem = { - id: SecurityPageName.users, - title: USERS, - landingImage: userPageImg, - description: i18n.translate('xpack.securitySolution.appLinks.users.description', { - defaultMessage: - 'A comprehensive overview of user data that enables understanding of authentication and user behavior within your environment.', - }), - path: USERS_PATH, - globalSearchKeywords: [ - i18n.translate('xpack.securitySolution.appLinks.users', { - defaultMessage: 'Users', - }), - ], - links: [ - { - id: SecurityPageName.usersAuthentications, - title: i18n.translate('xpack.securitySolution.appLinks.users.authentications', { - defaultMessage: 'Authentications', - }), - path: `${USERS_PATH}/authentications`, - }, - { - id: SecurityPageName.usersAnomalies, - title: i18n.translate('xpack.securitySolution.appLinks.users.anomalies', { - defaultMessage: 'Anomalies', - }), - path: `${USERS_PATH}/anomalies`, - licenseType: 'gold', - }, - { - id: SecurityPageName.usersRisk, - title: i18n.translate('xpack.securitySolution.appLinks.users.risk', { - defaultMessage: 'User risk', - }), - path: `${USERS_PATH}/userRisk`, - }, - { - id: SecurityPageName.usersEvents, - title: i18n.translate('xpack.securitySolution.appLinks.users.events', { - defaultMessage: 'Events', - }), - path: `${USERS_PATH}/events`, - }, - ], -}; diff --git a/x-pack/plugins/security_solution/public/explore/users/routes.tsx b/x-pack/plugins/security_solution/public/explore/users/routes.tsx deleted file mode 100644 index c5b93618316e4..0000000000000 --- a/x-pack/plugins/security_solution/public/explore/users/routes.tsx +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; -import { UsersContainer } from './pages'; - -import type { SecuritySubPluginRoutes } from '../../app/types'; -import { SecurityPageName } from '../../app/types'; -import { USERS_PATH } from '../../../common/constants'; -import { PluginTemplateWrapper } from '../../common/components/plugin_template_wrapper'; - -export const UsersRoutes = () => ( - - - - - -); - -export const routes: SecuritySubPluginRoutes = [ - { - path: USERS_PATH, - component: UsersRoutes, - }, -]; diff --git a/x-pack/plugins/security_solution/public/explore/users/store/reducer.ts b/x-pack/plugins/security_solution/public/explore/users/store/reducer.ts index 3577daf4ce547..5bb7615ff198a 100644 --- a/x-pack/plugins/security_solution/public/explore/users/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/explore/users/store/reducer.ts @@ -25,7 +25,9 @@ import { Direction } from '../../../../common/search_strategy/common'; import { RiskScoreFields } from '../../../../common/search_strategy'; import { UsersFields } from '../../../../common/search_strategy/security_solution/users/common'; -export const initialUsersState: UsersModel = { +export type UsersState = UsersModel; + +export const initialUsersState: UsersState = { page: { queries: { [UsersTableType.allUsers]: { diff --git a/x-pack/plugins/security_solution/public/kubernetes/pages/index.tsx b/x-pack/plugins/security_solution/public/kubernetes/pages/index.tsx index b5786369eb4bd..63345e4a94629 100644 --- a/x-pack/plugins/security_solution/public/kubernetes/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/kubernetes/pages/index.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import React, { useCallback, useMemo } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; +import type { ResponseActionButtonProps } from '@kbn/kubernetes-security-plugin/public/types'; import { TableId } from '../../../common/types'; import { InputsModelId } from '../../common/store/inputs/constants'; import { SecuritySolutionPageWrapper } from '../../common/components/page_wrapper'; @@ -25,9 +26,12 @@ import { convertToBuildEsQuery } from '../../common/lib/kuery'; import { useInvalidFilterQuery } from '../../common/hooks/use_invalid_filter_query'; import { SessionsView } from '../../common/components/sessions_viewer'; import { kubernetesSessionsHeaders } from './constants'; +import { useResponderActionData } from '../../detections/components/endpoint_responder/use_responder_action_data'; +import { useUserPrivileges } from '../../common/components/user_privileges'; export const KubernetesContainer = React.memo(() => { const { kubernetesSecurity, uiSettings } = useKibana().services; + const { globalFullScreen } = useGlobalFullScreen(); const { indexPattern, @@ -43,7 +47,9 @@ export const KubernetesContainer = React.memo(() => { const getGlobalQuerySelector = useMemo(() => inputsSelectors.globalQuerySelector(), []); const query = useDeepEqualSelector(getGlobalQuerySelector); const filters = useDeepEqualSelector(getGlobalFiltersQuerySelector); + const canAccessResponseConsole = useUserPrivileges().endpointPrivileges.canAccessResponseConsole; + const [agentIdForResponder, setAgentIdForResponder] = useState(''); const [filterQuery, kqlError] = useMemo( () => convertToBuildEsQuery({ @@ -79,6 +85,24 @@ export const KubernetesContainer = React.memo(() => { [from, to] ); + const { handleResponseActionsClick, isDisabled, tooltip } = useResponderActionData({ + endpointId: agentIdForResponder, + }); + + const handleTreeNavSelection = useCallback((agentId: string) => { + setAgentIdForResponder(agentId); + }, []); + + const responseActionClick = useCallback(() => { + handleResponseActionsClick(); + }, [handleResponseActionsClick]); + + const responseActionButtonProps: ResponseActionButtonProps = { + isDisabled, + canAccessResponseConsole, + tooltip, + }; + return ( {kubernetesSecurity.getKubernetesPage({ @@ -94,6 +118,9 @@ export const KubernetesContainer = React.memo(() => { endDate: to, }, renderSessionsView, + responseActionClick, + handleTreeNavSelection, + responseActionButtonProps, })} diff --git a/x-pack/plugins/security_solution/public/landing_pages/links.ts b/x-pack/plugins/security_solution/public/landing_pages/links.ts index 36553016bd8bf..8a0681fa01f72 100644 --- a/x-pack/plugins/security_solution/public/landing_pages/links.ts +++ b/x-pack/plugins/security_solution/public/landing_pages/links.ts @@ -15,9 +15,7 @@ import { import { DASHBOARDS, EXPLORE } from '../app/translations'; import type { LinkItem } from '../common/links/types'; import { overviewLinks, detectionResponseLinks, entityAnalyticsLinks } from '../overview/links'; -import { links as hostsLinks } from '../explore/hosts/links'; -import { links as networkLinks } from '../explore/network/links'; -import { links as usersLinks } from '../explore/users/links'; +import { exploreLinks } from '../explore/links'; import { links as kubernetesLinks } from '../kubernetes/links'; import { dashboardLinks as cloudSecurityPostureLinks } from '../cloud_security_posture/links'; @@ -53,6 +51,6 @@ export const threatHuntingLandingLinks: LinkItem = { defaultMessage: 'Explore', }), ], - links: [hostsLinks, networkLinks, usersLinks], + links: exploreLinks, skipUrlState: true, }; diff --git a/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx b/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx index 2615ec90ecda4..1d93699ff1b47 100644 --- a/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx +++ b/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx @@ -13,9 +13,7 @@ import { Cases } from './cases'; import { Detections } from './detections'; import { Exceptions } from './exceptions'; -import { Hosts } from './explore/hosts'; -import { Users } from './explore/users'; -import { Network } from './explore/network'; +import { Explore } from './explore'; import { Kubernetes } from './kubernetes'; import { Overview } from './overview'; import { Rules } from './rules'; @@ -32,9 +30,7 @@ const subPluginClasses = { Detections, Cases, Exceptions, - Hosts, - Users, - Network, + Explore, Kubernetes, Overview, Rules, diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx index ba33e4d34ca12..71f9ff1e5e9a4 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -358,9 +358,7 @@ export class Plugin implements IPlugin; exceptions: ReturnType; [CASES_SUB_PLUGIN_KEY]: ReturnType; - hosts: ReturnType; - users: ReturnType; - network: ReturnType; + explore: ReturnType; kubernetes: ReturnType; overview: ReturnType; timelines: ReturnType; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/fields/code_editor.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/fields/code_editor.tsx index e5d8c8152d68f..d4d82f2efdbdd 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/fields/code_editor.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/fields/code_editor.tsx @@ -25,9 +25,18 @@ interface Props { onChange: (value: string) => void; value: string; placeholder?: string; + height?: string; } -export const CodeEditor = ({ ariaLabel, id, languageId, onChange, value, placeholder }: Props) => { +export const CodeEditor = ({ + ariaLabel, + id, + languageId, + onChange, + value, + placeholder, + height = '250px', +}: Props) => { return ( = { defaultMessage: 'Monitor script is required', }), }, + [ConfigKey.PARAMS]: { + fieldKey: ConfigKey.PARAMS, + label: i18n.translate('xpack.synthetics.monitorConfig.params.label', { + defaultMessage: 'Parameters', + }), + component: JSONEditor, + props: ({ setValue }) => ({ + id: 'syntheticsMonitorConfigParams', + height: '100px', + onChange: (json: string) => { + setValue(ConfigKey.PARAMS, json); + }, + }), + error: i18n.translate('xpack.synthetics.monitorConfig.params.error', { + defaultMessage: 'Invalid JSON format', + }), + helpText: ( + params.value, + }} + /> + ), + validation: () => ({ + validate: (value) => { + const validateFn = validate[DataStream.BROWSER][ConfigKey.PARAMS]; + if (validateFn) { + return !validateFn({ + [ConfigKey.PARAMS]: value, + }); + } + }, + }), + }, isTLSEnabled: { fieldKey: 'isTLSEnabled', component: EuiSwitch, @@ -1058,4 +1094,48 @@ export const FIELD: Record = { }, }), }, + [ConfigKey.IGNORE_HTTPS_ERRORS]: { + fieldKey: ConfigKey.IGNORE_HTTPS_ERRORS, + component: EuiSwitch, + controlled: true, + helpText: ( + + {i18n.translate('xpack.synthetics.monitorConfig.ignoreHttpsErrors.helpText', { + defaultMessage: + 'Turns off TLS/SSL validation in the synthetics browser. This is useful for testing sites that use self-signed certificates.', + })} + + ), + props: ({ setValue }) => ({ + id: 'syntheticsMontiorConfigIgnoreHttpsErrors', + label: i18n.translate('xpack.synthetics.monitorConfig.ignoreHttpsErrors.label', { + defaultMessage: 'Ignore HTTPS errors', + }), + onChange: (event: React.ChangeEvent) => { + setValue(ConfigKey.IGNORE_HTTPS_ERRORS, !!event.target.checked); + }, + }), + }, + [ConfigKey.SYNTHETICS_ARGS]: { + fieldKey: ConfigKey.SYNTHETICS_ARGS, + component: EuiFieldText, + controlled: true, + label: i18n.translate('xpack.synthetics.monitorConfig.syntheticsArgs.label', { + defaultMessage: 'Synthetics args', + }), + helpText: ( + + {i18n.translate('xpack.synthetics.monitorConfig.syntheticsArgs.helpText', { + defaultMessage: + 'Extra arguments to pass to the synthetics agent package. Takes a list of strings. This is useful in rare scenarios, and should not ordinarily need to be set.', + })} + + ), + props: ({ setValue }) => ({ + id: 'syntheticsMontiorConfigSyntheticsArgs', + onChange: (event: React.ChangeEvent) => { + setValue(ConfigKey.SYNTHETICS_ARGS, event.target.value); + }, + }), + }, }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/form_config.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/form_config.tsx index 132e3ab0343e1..5a4bad3e2f561 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/form_config.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/form_config.tsx @@ -114,7 +114,11 @@ export const BROWSER_ADVANCED = [ defaultMessage: 'Provide fine-tuned configuration for the synthetics agent.', } ), - components: [FIELD[`${ConfigKey.PLAYWRIGHT_OPTIONS}`]], + components: [ + FIELD[ConfigKey.IGNORE_HTTPS_ERRORS], + FIELD[ConfigKey.SYNTHETICS_ARGS], + FIELD[ConfigKey.PLAYWRIGHT_OPTIONS], + ], }, ]; @@ -200,7 +204,7 @@ export const FORM_CONFIG: FieldConfig = { FIELD[ConfigKey.THROTTLING_CONFIG], FIELD[ConfigKey.ENABLED], ], - step3: [FIELD[ConfigKey.SOURCE_INLINE]], + step3: [FIELD[ConfigKey.SOURCE_INLINE], FIELD[ConfigKey.PARAMS]], scriptEdit: [FIELD[ConfigKey.SOURCE_INLINE]], advanced: [ { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/validation.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/validation.tsx index 00330134344c4..9f06395bf1a19 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/validation.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/validation.tsx @@ -162,6 +162,8 @@ const validateBrowser: ValidationLibrary = { [ConfigKey.LATENCY]: ({ [ConfigKey.LATENCY]: latency }) => validateThrottleValue(latency, true), [ConfigKey.PLAYWRIGHT_OPTIONS]: ({ [ConfigKey.PLAYWRIGHT_OPTIONS]: playwrightOptions }) => playwrightOptions ? !validJSONFormat(playwrightOptions) : false, + [ConfigKey.PARAMS]: ({ [ConfigKey.PARAMS]: params }) => + params ? !validJSONFormat(params) : false, }; export type ValidateDictionary = Record; diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 5f59edcd62b1c..eddc1b42c26b8 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -447,9 +447,6 @@ "controls.optionsList.description": "Ajoutez un menu pour la sélection de valeurs de champ.", "controls.optionsList.displayName": "Liste des options", "controls.optionsList.editor.allowMultiselectTitle": "Permettre des sélections multiples dans une liste déroulante", - "controls.optionsList.editor.hideExclude": "Autoriser l'exclusion des sélections", - "controls.optionsList.editor.hideExistsQuery": "Autoriser les requêtes \"existe\"", - "controls.optionsList.editor.hideExistsQueryTooltip": "Vous permet de créer une requête \"existe\", qui retourne tous les documents contenant une valeur indexée pour le champ.", "controls.optionsList.editor.runPastTimeout": "Ignorer le délai d'expiration pour les résultats", "controls.optionsList.editor.runPastTimeout.tooltip": "Attendre que la liste soit complète pour afficher les résultats. Ce paramètre est utile pour les ensembles de données volumineux, mais le remplissage des résultats peut prendre plus de temps.", "controls.optionsList.popover.allOptionsTitle": "Afficher toutes les options", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 6df932782dcc0..a6ee2a73e1768 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -449,9 +449,6 @@ "controls.optionsList.description": "フィールド値を選択するメニューを追加", "controls.optionsList.displayName": "オプションリスト", "controls.optionsList.editor.allowMultiselectTitle": "ドロップダウンでの複数選択を許可", - "controls.optionsList.editor.hideExclude": "選択項目の実行を許可", - "controls.optionsList.editor.hideExistsQuery": "existsクエリを許可", - "controls.optionsList.editor.hideExistsQueryTooltip": "existsクエリを作成できます。このクエリは、フィールドのインデックスが作成された値を含むすべてのドキュメントを返します。", "controls.optionsList.editor.runPastTimeout": "結果のタイムアウトを無視", "controls.optionsList.editor.runPastTimeout.tooltip": "リストが入力されるまで待機してから、結果を表示します。この設定は大きいデータセットで有用です。ただし、結果の入力に時間がかかる場合があります。", "controls.optionsList.popover.allOptionsTitle": "すべてのオプションを表示", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 32a87a94e0622..6d055b81112dd 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -449,9 +449,6 @@ "controls.optionsList.description": "添加用于选择字段值的菜单。", "controls.optionsList.displayName": "选项列表", "controls.optionsList.editor.allowMultiselectTitle": "下拉列表中允许多选", - "controls.optionsList.editor.hideExclude": "允许排除所选内容", - "controls.optionsList.editor.hideExistsQuery": "允许存在查询", - "controls.optionsList.editor.hideExistsQueryTooltip": "允许您创建存在查询,它将返回包含字段的索引值的所有文档。", "controls.optionsList.editor.runPastTimeout": "忽略超时以获取结果", "controls.optionsList.editor.runPastTimeout.tooltip": "等待显示结果,直到列表完成。此设置用于大型数据集,但可能需要更长时间来填充结果。", "controls.optionsList.popover.allOptionsTitle": "显示所有选项", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/home.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/home.test.tsx index b976f87a5b5ff..6bd1ef7ccec7a 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/home.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/home.test.tsx @@ -6,17 +6,30 @@ */ import * as React from 'react'; +import { render, screen, waitFor } from '@testing-library/react'; import { RouteComponentProps, Router } from 'react-router-dom'; +import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; import { createMemoryHistory, createLocation } from 'history'; import { mountWithIntl } from '@kbn/test-jest-helpers'; + import TriggersActionsUIHome, { MatchParams } from './home'; import { hasShowActionsCapability } from './lib/capabilities'; -import { useKibana } from '../common/lib/kibana'; import { getIsExperimentalFeatureEnabled } from '../common/get_experimental_features'; + jest.mock('../common/lib/kibana'); jest.mock('../common/get_experimental_features'); jest.mock('./lib/capabilities'); -const useKibanaMock = useKibana as jest.Mocked; + +jest.mock('./sections/rules_list/components/rules_list', () => { + return () =>
{'Render Rule list component'}
; +}); + +jest.mock('./components/health_check', () => ({ + HealthCheck: ({ children }: { children: React.ReactNode }) => <>{children}, +})); +jest.mock('./context/health_context', () => ({ + HealthContextProvider: ({ children }: { children: React.ReactNode }) => <>{children}, +})); describe('home', () => { beforeEach(() => { @@ -24,10 +37,12 @@ describe('home', () => { (getIsExperimentalFeatureEnabled as jest.Mock).mockClear(); }); - it('renders the documentation link', async () => { + it('renders rule list components', async () => { const props: RouteComponentProps = { - history: createMemoryHistory(), - location: createLocation('/'), + history: createMemoryHistory({ + initialEntries: ['/rules'], + }), + location: createLocation('/rules'), match: { isExact: true, path: `/rules`, @@ -38,16 +53,17 @@ describe('home', () => { }, }; - const wrapper = mountWithIntl( - - - - ); - const documentationLink = wrapper.find('[data-test-subj="documentationLink"]'); - expect(documentationLink.exists()).toBeTruthy(); - expect(documentationLink.first().prop('href')).toEqual( - 'https://www.elastic.co/guide/en/kibana/mocked-test-branch/create-and-manage-rules.html' + render( + + + + + ); + + await waitFor(() => { + expect(screen.getByTestId('rulesListComponents')).toBeInTheDocument(); + }); }); it('hides the internal alerts table route if the config is not set', async () => { @@ -67,7 +83,11 @@ describe('home', () => { }, }; - let home = mountWithIntl(); + let home = mountWithIntl( + + + + ); // Just rules/logs expect(home.find('span.euiTab__content').length).toBe(2); @@ -79,7 +99,11 @@ describe('home', () => { return false; }); - home = mountWithIntl(); + home = mountWithIntl( + + + + ); // alerts now too! expect(home.find('span.euiTab__content').length).toBe(3); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.test.ts index 4b36a8e8aeca3..843996fe5f0ce 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.test.ts @@ -63,6 +63,11 @@ const expectedTransformResult = [ 'The human readable name of the action group of the alert that scheduled actions for the rule.', name: 'alert.actionGroupName', }, + { + description: + 'A flag on the alert that indicates whether the alert status is changing repeatedly.', + name: 'alert.flapping', + }, { description: 'The configured server.publicBaseUrl value or empty string if not configured.', name: 'kibanaBaseUrl', diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.ts index 42ae5bedc0747..58942aa069403 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.ts @@ -47,6 +47,7 @@ export enum AlertProvidedActionVariables { alertActionGroup = 'alert.actionGroup', alertActionGroupName = 'alert.actionGroupName', alertActionSubgroup = 'alert.actionSubgroup', + alertFlapping = 'alert.flapping', } export enum LegacyAlertProvidedActionVariables { @@ -156,6 +157,14 @@ function getAlwaysProvidedActionVariables(): ActionVariable[] { ), }); + result.push({ + name: AlertProvidedActionVariables.alertFlapping, + description: i18n.translate('xpack.triggersActionsUI.actionVariables.alertFlappingLabel', { + defaultMessage: + 'A flag on the alert that indicates whether the alert status is changing repeatedly.', + }), + }); + result.push({ name: 'kibanaBaseUrl', description: i18n.translate('xpack.triggersActionsUI.actionVariables.kibanaBaseUrlLabel', { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form.test.tsx index 5c2f9db816893..4225928153c85 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form.test.tsx @@ -87,7 +87,7 @@ describe('ConnectorForm', () => { }); }); - it('calls onChange when the form is invalid', async () => { + it.skip('calls onChange when the form is invalid', async () => { const actionTypeModel = actionTypeRegistryMock.createMockActionTypeModel({ actionConnectorFields: lazy(() => import('./connector_mock')), }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.test.tsx index 5848d2b417d47..e27e50785ac49 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.test.tsx @@ -756,7 +756,7 @@ describe('rule_details', () => { disableButton.simulate('click'); expect(mockRuleApis.bulkDisableRules).toHaveBeenCalledTimes(1); - expect(mockRuleApis.bulkDisableRules).toHaveBeenCalledWith(rule); + expect(mockRuleApis.bulkDisableRules).toHaveBeenCalledWith({ ids: [rule.id] }); }); it('should enable the rule when clicked', async () => { @@ -785,7 +785,7 @@ describe('rule_details', () => { enableButton.simulate('click'); expect(mockRuleApis.bulkEnableRules).toHaveBeenCalledTimes(1); - expect(mockRuleApis.bulkEnableRules).toHaveBeenCalledWith(rule); + expect(mockRuleApis.bulkEnableRules).toHaveBeenCalledWith({ ids: [rule.id] }); }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.test.tsx index 122785c55c401..c48e71adb8d8f 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.test.tsx @@ -261,7 +261,7 @@ describe.skip('rules_list component empty', () => { }); }); -describe('rules_list component with props', () => { +describe.skip('rules_list component with props', () => { describe('Status filter', () => { let wrapper: ReactWrapper; async function setup(editable: boolean = true) { @@ -860,7 +860,7 @@ describe('rules_list component with props', () => { }); }); -describe('rules_list component with items', () => { +describe.skip('rules_list component with items', () => { let wrapper: ReactWrapper; async function setup(editable: boolean = true) { @@ -1440,7 +1440,7 @@ describe('rules_list component with items', () => { }); }); -describe('rules_list component empty with show only capability', () => { +describe.skip('rules_list component empty with show only capability', () => { let wrapper: ReactWrapper; async function setup() { @@ -1483,7 +1483,7 @@ describe('rules_list component empty with show only capability', () => { }); }); -describe('rules_list with show only capability', () => { +describe.skip('rules_list with show only capability', () => { let wrapper: ReactWrapper; async function setup(editable: boolean = true) { @@ -1604,7 +1604,7 @@ describe('rules_list with show only capability', () => { }); }); -describe('rules_list with disabled items', () => { +describe.skip('rules_list with disabled items', () => { let wrapper: ReactWrapper; async function setup() { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_edit.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_edit.test.tsx index db178e71f2569..48a9995d7a82a 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_edit.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_edit.test.tsx @@ -93,7 +93,7 @@ beforeEach(() => { (getIsExperimentalFeatureEnabled as jest.Mock).mockImplementation(() => false); }); -describe('Rules list bulk actions', () => { +describe.skip('Rules list bulk actions', () => { let wrapper: ReactWrapper; async function setup(authorized: boolean = true) { diff --git a/x-pack/test/fleet_api_integration/apis/epm/bulk_upgrade.ts b/x-pack/test/fleet_api_integration/apis/epm/bulk_upgrade.ts index fe875fe4e2565..ad9c1eec519c4 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/bulk_upgrade.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/bulk_upgrade.ts @@ -51,6 +51,7 @@ export default function (providerContext: FtrProviderContext) { .post(`/api/fleet/epm/packages/_bulk`) .auth(testUsers.fleet_all_int_read.username, testUsers.fleet_all_int_read.password) .set('kbn-xsrf', 'xxxx') + .send({ packages: ['multiple_versions', 'overrides'] }) .expect(403); }); it('should return 403 if user without fleet access requests upgrade', async function () { @@ -58,6 +59,7 @@ export default function (providerContext: FtrProviderContext) { .post(`/api/fleet/epm/packages/_bulk`) .auth(testUsers.integr_all_only.username, testUsers.integr_all_only.password) .set('kbn-xsrf', 'xxxx') + .send({ packages: ['multiple_versions', 'overrides'] }) .expect(403); }); it('should return 200 and an array for upgrading a package', async function () { diff --git a/x-pack/test/functional/apps/lens/group2/show_underlying_data.ts b/x-pack/test/functional/apps/lens/group2/show_underlying_data.ts index 41e327234009b..f1f5ffcac75cd 100644 --- a/x-pack/test/functional/apps/lens/group2/show_underlying_data.ts +++ b/x-pack/test/functional/apps/lens/group2/show_underlying_data.ts @@ -49,6 +49,57 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await browser.switchToWindow(lensWindowHandler); }); + it('should show the open button if visualization has an annotation layer', async () => { + await PageObjects.lens.createLayer('annotations'); + await testSubjects.clickWhenNotDisabledWithoutRetry(`lnsApp_openInDiscover`); + const [lensWindowHandler, discoverWindowHandle] = await browser.getAllWindowHandles(); + await browser.switchToWindow(discoverWindowHandle); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await testSubjects.existOrFail('unifiedHistogramChart'); + const columns = await PageObjects.discover.getColumnHeaders(); + expect(columns).to.eql(['@timestamp', 'extension.raw', 'bytes']); + await browser.closeCurrentWindow(); + await browser.switchToWindow(lensWindowHandler); + }); + + it('should show the open button if visualization has a reference line layer', async () => { + await PageObjects.lens.createLayer('referenceLine'); + await testSubjects.clickWhenNotDisabledWithoutRetry(`lnsApp_openInDiscover`); + const [lensWindowHandler, discoverWindowHandle] = await browser.getAllWindowHandles(); + await browser.switchToWindow(discoverWindowHandle); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await testSubjects.existOrFail('unifiedHistogramChart'); + const columns = await PageObjects.discover.getColumnHeaders(); + expect(columns).to.eql(['@timestamp', 'extension.raw', 'bytes']); + await browser.closeCurrentWindow(); + await browser.switchToWindow(lensWindowHandler); + }); + + it('should not show the open button if visualization has multiple data layers', async () => { + await PageObjects.lens.createLayer(); + await PageObjects.lens.configureDimension({ + dimension: 'lns-layerPanel-3 > lnsXY_xDimensionPanel > lns-empty-dimension', + operation: 'date_histogram', + field: '@timestamp', + }); + + await PageObjects.lens.configureDimension({ + dimension: 'lns-layerPanel-3 > lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'median', + field: 'bytes', + }); + + await PageObjects.lens.waitForVisualization('xyVisChart'); + + expect(await testSubjects.isEnabled(`lnsApp_openInDiscover`)).to.be(false); + + for (const index of [3, 2, 1]) { + await PageObjects.lens.removeLayer(index); + } + }); + it('should ignore the top values column if other category is enabled', async () => { // Make the breakdown dimention be ignored await PageObjects.lens.openDimensionEditor( diff --git a/x-pack/test/functional/apps/lens/group2/show_underlying_data_dashboard.ts b/x-pack/test/functional/apps/lens/group2/show_underlying_data_dashboard.ts index 46fdc94879d03..2cc447238de3b 100644 --- a/x-pack/test/functional/apps/lens/group2/show_underlying_data_dashboard.ts +++ b/x-pack/test/functional/apps/lens/group2/show_underlying_data_dashboard.ts @@ -56,6 +56,35 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await browser.switchToWindow(dashboardWindowHandle); }); + it('should show the open button for a compatible saved visualization with annotations and reference line', async () => { + await PageObjects.dashboard.switchToEditMode(); + await dashboardPanelActions.clickEdit(); + + await PageObjects.lens.createLayer('annotations'); + await PageObjects.lens.createLayer('referenceLine'); + await PageObjects.lens.save('Embedded Visualization', false); + + await PageObjects.dashboard.saveDashboard(`Open in Discover Testing ${uuid()}`, { + exitFromEditMode: true, + }); + + await dashboardPanelActions.openContextMenu(); + + await testSubjects.click('embeddablePanelAction-ACTION_OPEN_IN_DISCOVER'); + + const [dashboardWindowHandle, discoverWindowHandle] = await browser.getAllWindowHandles(); + await browser.switchToWindow(discoverWindowHandle); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await testSubjects.existOrFail('unifiedHistogramChart'); + // check the table columns + const columns = await PageObjects.discover.getColumnHeaders(); + expect(columns).to.eql(['@timestamp', 'ip', 'bytes']); + + await browser.closeCurrentWindow(); + await browser.switchToWindow(dashboardWindowHandle); + }); + it('should bring both dashboard context and visualization context to discover', async () => { await PageObjects.dashboard.switchToEditMode(); await dashboardPanelActions.clickEdit(); diff --git a/yarn.lock b/yarn.lock index 3badf7a29d12c..c7df66852875c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3565,6 +3565,10 @@ version "0.0.0" uid "" +"@kbn/ecs@link:bazel-bin/packages/kbn-ecs": + version "0.0.0" + uid "" + "@kbn/es-archiver@link:bazel-bin/packages/kbn-es-archiver": version "0.0.0" uid ""