diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml
index 47c6cab47b052..1d3ea8c5dd4d0 100644
--- a/.buildkite/ftr_configs.yml
+++ b/.buildkite/ftr_configs.yml
@@ -248,7 +248,7 @@ enabled:
- x-pack/test/security_functional/login_selector.config.ts
- x-pack/test/security_functional/oidc.config.ts
- x-pack/test/security_functional/saml.config.ts
- - x-pack/test/security_functional/unsecure_cluster_alert.config.ts
+ - x-pack/test/security_functional/insecure_cluster_warning.config.ts
- x-pack/test/security_solution_endpoint_api_int/config.ts
- x-pack/test/security_solution_endpoint/config.ts
- x-pack/test/session_view/basic/config.ts
diff --git a/.buildkite/scripts/build_kibana.sh b/.buildkite/scripts/build_kibana.sh
index cb12517aeeb1e..54e5273eb4c68 100755
--- a/.buildkite/scripts/build_kibana.sh
+++ b/.buildkite/scripts/build_kibana.sh
@@ -7,13 +7,19 @@ source .buildkite/scripts/common/util.sh
export KBN_NP_PLUGINS_BUILT=true
echo "--- Build Kibana Distribution"
+
+BUILD_ARGS=""
if is_pr_with_label "ci:build-all-platforms"; then
- node scripts/build --all-platforms --skip-os-packages
-elif is_pr_with_label "ci:build-os-packages"; then
- node scripts/build --all-platforms --docker-cross-compile
-else
- node scripts/build
+ BUILD_ARGS="--all-platforms --skip-os-packages"
+fi
+if is_pr_with_label "ci:build-os-packages"; then
+ BUILD_ARGS="--all-platforms --docker-cross-compile"
fi
+if ! is_pr_with_label "ci:build-canvas-shareable-runtime"; then
+ BUILD_ARGS="$BUILD_ARGS --skip-canvas-shareable-runtime"
+fi
+
+node scripts/build "$BUILD_ARGS"
if is_pr_with_label "ci:build-cloud-image"; then
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
diff --git a/.buildkite/scripts/steps/functional/scalability_dataset_extraction.sh b/.buildkite/scripts/steps/functional/scalability_dataset_extraction.sh
index e50e23030bb3f..cb17393f5f423 100755
--- a/.buildkite/scripts/steps/functional/scalability_dataset_extraction.sh
+++ b/.buildkite/scripts/steps/functional/scalability_dataset_extraction.sh
@@ -13,7 +13,7 @@ GCS_BUCKET="gs://kibana-performance/scalability-tests"
.buildkite/scripts/bootstrap.sh
echo "--- Extract APM metrics"
-scalabilityJourneys=("login" "promotion_tracking_dashboard")
+scalabilityJourneys=("login" "ecommerce_dashboard" "flight_dashboard" "web_logs_dashboard" "promotion_tracking_dashboard" "many_fields_discover")
for i in "${scalabilityJourneys[@]}"; do
JOURNEY_NAME="${i}"
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index d6365810cd41c..86c6553e89a2b 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -248,6 +248,11 @@
/packages/kbn-ui-shared-deps-npm/ @elastic/kibana-operations
/packages/kbn-ui-shared-deps-src/ @elastic/kibana-operations
/packages/kbn-utils/ @elastic/kibana-operations
+/packages/kbn-jsonc/ @elastic/kibana-operations
+/packages/kbn-kibana-manifest-parser/ @elastic/kibana-operations
+/packages/kbn-kibana-manifest-schema/ @elastic/kibana-operations
+/packages/kbn-managed-vscode-config/ @elastic/kibana-operations
+/packages/kbn-managed-vscode-config-cli/ @elastic/kibana-operations
/src/cli/keystore/ @elastic/kibana-operations
/.ci/es-snapshots/ @elastic/kibana-operations
/.github/workflows/ @elastic/kibana-operations
@@ -263,7 +268,6 @@
# Performance testing
/packages/kbn-performance-testing-dataset-extractor/ @elastic/kibana-performance-testing
-/packages/kbn-scalability-simulation-generator/ @elastic/kibana-performance-testing
# Quality Assurance
/src/dev/code_coverage @elastic/kibana-qa
@@ -337,6 +341,7 @@
# Kibana Platform Security
/packages/kbn-crypto/ @elastic/kibana-security
/packages/kbn-handlebars/ @elastic/kibana-security
+/packages/kbn-user-profile-components/ @elastic/kibana-security
/packages/core/http/core-http-server-internal/src/csp/ @elastic/kibana-security @elastic/kibana-core
/src/plugins/interactive_setup/ @elastic/kibana-security
/src/plugins/telemetry/server/config/telemetry_labels.ts @elastic/kibana-security
@@ -357,6 +362,7 @@
/x-pack/test/spaces_api_integration/ @elastic/kibana-security
/x-pack/test/saved_object_api_integration/ @elastic/kibana-security
/examples/preboot_example/ @elastic/kibana-security @elastic/kibana-core
+/examples/user_profile_examples/ @elastic/kibana-security
#CC# /x-pack/plugins/security/ @elastic/kibana-security
# Response Ops team
diff --git a/.i18nrc.json b/.i18nrc.json
index 08f2ff151b4c2..b77d2c42508f1 100644
--- a/.i18nrc.json
+++ b/.i18nrc.json
@@ -77,6 +77,7 @@
"uiActionsEnhanced": "src/plugins/ui_actions_enhanced",
"uiActionsExamples": "examples/ui_action_examples",
"usageCollection": "src/plugins/usage_collection",
+ "userProfileComponents": "packages/kbn-user-profile-components",
"utils": "packages/kbn-securitysolution-utils/src",
"visDefaultEditor": "src/plugins/vis_default_editor",
"visTypeGauge": "src/plugins/vis_types/gauge",
diff --git a/NOTICE.txt b/NOTICE.txt
index 10ae7ea6686b3..b150cf5673b42 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -121,6 +121,20 @@ THE SOFTWARE.
This product uses Noto fonts that are licensed under the SIL Open
Font License, Version 1.1.
+---
+Vendored copy of `strip-json-comments` so that we can use it when npm modules are not available.
+https://github.com/sindresorhus/strip-json-comments/tree/34b79cb0f1129aa85ef4b5c3292e8bc546984ef9
+
+MIT License
+
+Copyright (c) Sindre Sorhus (https://sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
---
Based on the scroll-into-view-if-necessary module from npm
https://github.com/stipsan/compute-scroll-into-view/blob/master/src/index.ts#L269-L340
diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx
index 53f0e7d43438a..94c50f9d9954d 100644
--- a/api_docs/actions.mdx
+++ b/api_docs/actions.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/actions
title: "actions"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the actions plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx
index c2db91466b083..cfcdce5a2f26b 100644
--- a/api_docs/advanced_settings.mdx
+++ b/api_docs/advanced_settings.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/advancedSettings
title: "advancedSettings"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the advancedSettings plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx
index 4953d17a169c4..38ba6df5b485c 100644
--- a/api_docs/aiops.mdx
+++ b/api_docs/aiops.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/aiops
title: "aiops"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the aiops plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx
index 4ecbacf26584d..c0ea50254e064 100644
--- a/api_docs/alerting.mdx
+++ b/api_docs/alerting.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/alerting
title: "alerting"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the alerting plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx
index 1c5c2b751041d..c5a43840223fa 100644
--- a/api_docs/apm.mdx
+++ b/api_docs/apm.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/apm
title: "apm"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the apm plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx
index 3c2c1eed0babc..b7c35e2256ac4 100644
--- a/api_docs/banners.mdx
+++ b/api_docs/banners.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/banners
title: "banners"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the banners plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx
index d6b38ed74e19b..e315ff2049b07 100644
--- a/api_docs/bfetch.mdx
+++ b/api_docs/bfetch.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/bfetch
title: "bfetch"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the bfetch plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx
index 392b9e440a777..80c2f52c7d546 100644
--- a/api_docs/canvas.mdx
+++ b/api_docs/canvas.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/canvas
title: "canvas"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the canvas plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/cases.devdocs.json b/api_docs/cases.devdocs.json
index f333dff70af34..5f8bc2d01e9f1 100644
--- a/api_docs/cases.devdocs.json
+++ b/api_docs/cases.devdocs.json
@@ -466,6 +466,21 @@
"deprecated": false,
"initialIsOpen": false
},
+ {
+ "parentPluginId": "cases",
+ "id": "def-public.CaseAttachmentsWithoutOwner",
+ "type": "Type",
+ "tags": [],
+ "label": "CaseAttachmentsWithoutOwner",
+ "description": [],
+ "signature": [
+ "CaseAttachmentWithoutOwner",
+ "[]"
+ ],
+ "path": "x-pack/plugins/cases/public/types.ts",
+ "deprecated": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "cases",
"id": "def-public.DRAFT_COMMENT_STORAGE_ID",
@@ -601,8 +616,8 @@
"pluginId": "cases",
"scope": "public",
"docId": "kibCasesPluginApi",
- "section": "def-public.CaseAttachments",
- "text": "CaseAttachments"
+ "section": "def-public.CaseAttachmentsWithoutOwner",
+ "text": "CaseAttachmentsWithoutOwner"
},
" | undefined; }"
],
@@ -725,7 +740,7 @@
},
" | undefined; severity?: ",
"CaseSeverity",
- " | undefined; reporters?: string | string[] | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; fields?: string | string[] | undefined; from?: string | undefined; page?: number | undefined; perPage?: number | undefined; search?: string | undefined; searchFields?: string | string[] | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; to?: string | undefined; owner?: string | string[] | undefined; }, signal?: AbortSignal | undefined) => Promise<",
+ " | undefined; assignees?: string | string[] | undefined; reporters?: string | string[] | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; fields?: string | string[] | undefined; from?: string | undefined; page?: number | undefined; perPage?: number | undefined; search?: string | undefined; searchFields?: string | string[] | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; to?: string | undefined; owner?: string | string[] | undefined; }, signal?: AbortSignal | undefined) => Promise<",
"Cases",
">; getCasesStatus: (query: { from?: string | undefined; to?: string | undefined; owner?: string | string[] | undefined; }, signal?: AbortSignal | undefined) => Promise<{ countOpenCases: number; countInProgressCases: number; countClosedCases: number; }>; getCasesMetrics: (query: { features: string[]; } & { from?: string | undefined; to?: string | undefined; owner?: string | string[] | undefined; }, signal?: AbortSignal | undefined) => Promise<{ mttr?: number | null | undefined; }>; }; }"
],
@@ -824,16 +839,16 @@
"pluginId": "cases",
"scope": "public",
"docId": "kibCasesPluginApi",
- "section": "def-public.CaseAttachments",
- "text": "CaseAttachments"
+ "section": "def-public.CaseAttachmentsWithoutOwner",
+ "text": "CaseAttachmentsWithoutOwner"
},
" | undefined; }) => void; close: () => void; }; getUseCasesAddToExistingCaseModal: (props?: AddToExistingFlyoutProps) => { open: ({ attachments }?: { attachments?: ",
{
"pluginId": "cases",
"scope": "public",
"docId": "kibCasesPluginApi",
- "section": "def-public.CaseAttachments",
- "text": "CaseAttachments"
+ "section": "def-public.CaseAttachmentsWithoutOwner",
+ "text": "CaseAttachmentsWithoutOwner"
},
" | undefined; }) => void; close: () => void; }; }"
],
@@ -866,13 +881,13 @@
"section": "def-common.CasesPermissions",
"text": "CasesPermissions"
},
- "; getRuleIdFromEvent: (event: Event) => { id: string; name: string; }; groupAlertsByRule: (items: Event[], owner: string) => ",
+ "; getRuleIdFromEvent: (event: Event) => { id: string; name: string; }; groupAlertsByRule: (items: Event[]) => ",
{
"pluginId": "cases",
"scope": "public",
"docId": "kibCasesPluginApi",
- "section": "def-public.CaseAttachments",
- "text": "CaseAttachments"
+ "section": "def-public.CaseAttachmentsWithoutOwner",
+ "text": "CaseAttachmentsWithoutOwner"
},
"; }"
],
@@ -1425,7 +1440,7 @@
"ConnectorTypes",
".swimlane; fields: { caseId: string | null; } | null; name: string; }; settings: { syncAlerts: boolean; }; owner: string; severity: ",
"CaseSeverity",
- "; duration: number | null; closedAt: string | null; closedBy: { email: string | null | undefined; fullName: string | null | undefined; username: string | null | undefined; } | null; createdAt: string; createdBy: { email: string | null | undefined; fullName: string | null | undefined; username: string | null | undefined; }; externalService: { connectorId: string; connectorName: string; externalId: string; externalTitle: string; externalUrl: string; pushedAt: string; pushedBy: { email: string | null | undefined; fullName: string | null | undefined; username: string | null | undefined; }; } | null; updatedAt: string | null; updatedBy: { email: string | null | undefined; fullName: string | null | undefined; username: string | null | undefined; } | null; id: string; totalComment: number; totalAlerts: number; version: string; comments?: ((({ comment: string; type: ",
+ "; assignees: { uid: string; }[]; duration: number | null; closedAt: string | null; closedBy: { email: string | null | undefined; fullName: string | null | undefined; username: string | null | undefined; } | null; createdAt: string; createdBy: { email: string | null | undefined; fullName: string | null | undefined; username: string | null | undefined; }; externalService: { connectorId: string; connectorName: string; externalId: string; externalTitle: string; externalUrl: string; pushedAt: string; pushedBy: { email: string | null | undefined; fullName: string | null | undefined; username: string | null | undefined; }; } | null; updatedAt: string | null; updatedBy: { email: string | null | undefined; fullName: string | null | undefined; username: string | null | undefined; } | null; id: string; totalComment: number; totalAlerts: number; version: string; comments?: ((({ comment: string; type: ",
{
"pluginId": "cases",
"scope": "common",
diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx
index b18ea2f3b7ea7..35affa4f03f9d 100644
--- a/api_docs/cases.mdx
+++ b/api_docs/cases.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cases
title: "cases"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the cases plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact [ResponseOps](https://github.com/orgs/elastic/teams/response-ops) for qu
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 81 | 0 | 65 | 28 |
+| 82 | 0 | 66 | 29 |
## Client
diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx
index d56cbd6dae269..6bb34dd0cddc0 100644
--- a/api_docs/charts.mdx
+++ b/api_docs/charts.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/charts
title: "charts"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the charts plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx
index c994decbee1d1..911a4342765bd 100644
--- a/api_docs/cloud.mdx
+++ b/api_docs/cloud.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cloud
title: "cloud"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the cloud plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx
index 9460c809d4731..f2f550a7219f0 100644
--- a/api_docs/cloud_security_posture.mdx
+++ b/api_docs/cloud_security_posture.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture
title: "cloudSecurityPosture"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the cloudSecurityPosture plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/console.mdx b/api_docs/console.mdx
index 13d9b7020c9b2..49e9b233afff2 100644
--- a/api_docs/console.mdx
+++ b/api_docs/console.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/console
title: "console"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the console plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx
index 2fe07186c4c62..7dd1f58a09b9f 100644
--- a/api_docs/controls.mdx
+++ b/api_docs/controls.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/controls
title: "controls"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the controls plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/core.devdocs.json b/api_docs/core.devdocs.json
index dc72756cac3a8..caa8db405aef7 100644
--- a/api_docs/core.devdocs.json
+++ b/api_docs/core.devdocs.json
@@ -475,7 +475,7 @@
"\nReports a telemetry event."
],
"signature": [
- ">(eventType: string, eventData: EventTypeData) => void"
+ "(eventType: string, eventData: EventTypeData) => void"
],
"path": "node_modules/@types/kbn__analytics-client/index.d.ts",
"deprecated": false,
@@ -1031,7 +1031,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
@@ -1228,7 +1228,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
@@ -1334,13 +1334,7 @@
"{@link SavedObjectsStart}"
],
"signature": [
- {
- "pluginId": "core",
- "scope": "public",
- "docId": "kibCoreSavedObjectsPluginApi",
- "section": "def-public.SavedObjectsStart",
- "text": "SavedObjectsStart"
- }
+ "SavedObjectsStart"
],
"path": "src/core/public/index.ts",
"deprecated": false
@@ -1794,7 +1788,8 @@
"\nDefinition of the full event structure"
],
"signature": [
- "Event"
+ "Event",
+ ""
],
"path": "node_modules/@types/kbn__analytics-client/index.d.ts",
"deprecated": false,
@@ -1826,14 +1821,14 @@
{
"parentPluginId": "core",
"id": "def-public.Event.properties",
- "type": "Object",
+ "type": "Uncategorized",
"tags": [],
"label": "properties",
"description": [
"\nThe specific properties of the event type."
],
"signature": [
- "{ [x: string]: unknown; }"
+ "Properties"
],
"path": "node_modules/@types/kbn__analytics-client/index.d.ts",
"deprecated": false
@@ -4165,7 +4160,7 @@
"signature": [
"(events: ",
"Event",
- "[]) => void"
+ ">[]) => void"
],
"path": "node_modules/@types/kbn__analytics-client/index.d.ts",
"deprecated": false,
@@ -4181,7 +4176,7 @@
],
"signature": [
"Event",
- "[]"
+ ">[]"
],
"path": "node_modules/@types/kbn__analytics-client/index.d.ts",
"deprecated": false,
@@ -8674,6 +8669,37 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "core",
+ "id": "def-public.SavedObjectsStart",
+ "type": "Interface",
+ "tags": [],
+ "label": "SavedObjectsStart",
+ "description": [],
+ "signature": [
+ "SavedObjectsStart"
+ ],
+ "path": "node_modules/@types/kbn__core-saved-objects-browser/index.d.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "core",
+ "id": "def-public.SavedObjectsStart.client",
+ "type": "Object",
+ "tags": [],
+ "label": "client",
+ "description": [
+ "{@link SavedObjectsClientContract}"
+ ],
+ "signature": [
+ "SavedObjectsClientContract"
+ ],
+ "path": "node_modules/@types/kbn__core-saved-objects-browser/index.d.ts",
+ "deprecated": false
+ }
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "core",
"id": "def-public.SavedObjectsUpdateOptions",
@@ -9659,7 +9685,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
@@ -9691,7 +9717,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
@@ -10538,7 +10564,7 @@
"\nReports a telemetry event."
],
"signature": [
- ">(eventType: string, eventData: EventTypeData) => void"
+ "(eventType: string, eventData: EventTypeData) => void"
],
"path": "node_modules/@types/kbn__analytics-client/index.d.ts",
"deprecated": false,
@@ -12127,7 +12153,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
@@ -12316,7 +12342,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
@@ -12608,7 +12634,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
@@ -13955,7 +13981,8 @@
"\nDefinition of the full event structure"
],
"signature": [
- "Event"
+ "Event",
+ ""
],
"path": "node_modules/@types/kbn__analytics-client/index.d.ts",
"deprecated": false,
@@ -13987,14 +14014,14 @@
{
"parentPluginId": "core",
"id": "def-server.Event.properties",
- "type": "Object",
+ "type": "Uncategorized",
"tags": [],
"label": "properties",
"description": [
"\nThe specific properties of the event type."
],
"signature": [
- "{ [x: string]: unknown; }"
+ "Properties"
],
"path": "node_modules/@types/kbn__analytics-client/index.d.ts",
"deprecated": false
@@ -23071,7 +23098,7 @@
"signature": [
"(events: ",
"Event",
- "[]) => void"
+ ">[]) => void"
],
"path": "node_modules/@types/kbn__analytics-client/index.d.ts",
"deprecated": false,
@@ -23087,7 +23114,7 @@
],
"signature": [
"Event",
- "[]"
+ ">[]"
],
"path": "node_modules/@types/kbn__analytics-client/index.d.ts",
"deprecated": false,
@@ -36270,7 +36297,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
@@ -36302,7 +36329,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
@@ -36334,7 +36361,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
diff --git a/api_docs/core.mdx b/api_docs/core.mdx
index 1fe20ec82567f..3d80bced0c0a9 100644
--- a/api_docs/core.mdx
+++ b/api_docs/core.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core
title: "core"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the core plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 2524 | 2 | 297 | 6 |
+| 2524 | 2 | 296 | 6 |
## Client
diff --git a/api_docs/core_application.mdx b/api_docs/core_application.mdx
index c88711c5edd10..6e287b4e1a1e6 100644
--- a/api_docs/core_application.mdx
+++ b/api_docs/core_application.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-application
title: "core.application"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the core.application plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.application']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 2524 | 2 | 297 | 6 |
+| 2524 | 2 | 296 | 6 |
## Client
diff --git a/api_docs/core_chrome.mdx b/api_docs/core_chrome.mdx
index d8b79e0b1ea8c..d84c6bcc7aa18 100644
--- a/api_docs/core_chrome.mdx
+++ b/api_docs/core_chrome.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-chrome
title: "core.chrome"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the core.chrome plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.chrome']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 2524 | 2 | 297 | 6 |
+| 2524 | 2 | 296 | 6 |
## Client
diff --git a/api_docs/core_saved_objects.devdocs.json b/api_docs/core_saved_objects.devdocs.json
index 02ab9528eb6ba..7c494cf0fad8e 100644
--- a/api_docs/core_saved_objects.devdocs.json
+++ b/api_docs/core_saved_objects.devdocs.json
@@ -3,36 +3,7 @@
"client": {
"classes": [],
"functions": [],
- "interfaces": [
- {
- "parentPluginId": "core",
- "id": "def-public.SavedObjectsStart",
- "type": "Interface",
- "tags": [],
- "label": "SavedObjectsStart",
- "description": [],
- "path": "src/core/public/saved_objects/saved_objects_service.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "core",
- "id": "def-public.SavedObjectsStart.client",
- "type": "Object",
- "tags": [],
- "label": "client",
- "description": [
- "{@link SavedObjectsClientContract}"
- ],
- "signature": [
- "SavedObjectsClientContract"
- ],
- "path": "src/core/public/saved_objects/saved_objects_service.ts",
- "deprecated": false
- }
- ],
- "initialIsOpen": false
- }
- ],
+ "interfaces": [],
"enums": [],
"misc": [],
"objects": []
diff --git a/api_docs/core_saved_objects.mdx b/api_docs/core_saved_objects.mdx
index 5f762f68d8946..2afb5d24b66a8 100644
--- a/api_docs/core_saved_objects.mdx
+++ b/api_docs/core_saved_objects.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-savedObjects
title: "core.savedObjects"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the core.savedObjects plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.savedObjects']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,12 +18,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 2524 | 2 | 297 | 6 |
-
-## Client
-
-### Interfaces
-
+| 2524 | 2 | 296 | 6 |
## Server
diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx
index 54ce10c44676a..b576443d8c71e 100644
--- a/api_docs/custom_integrations.mdx
+++ b/api_docs/custom_integrations.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/customIntegrations
title: "customIntegrations"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the customIntegrations plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx
index 662f6d0db964e..70ae98a1c4bc7 100644
--- a/api_docs/dashboard.mdx
+++ b/api_docs/dashboard.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dashboard
title: "dashboard"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the dashboard plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx
index 9320c1c05a2b1..82fdeb274e97c 100644
--- a/api_docs/dashboard_enhanced.mdx
+++ b/api_docs/dashboard_enhanced.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced
title: "dashboardEnhanced"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the dashboardEnhanced plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json
index a218f7d6e6973..226fc6b9ef1fd 100644
--- a/api_docs/data.devdocs.json
+++ b/api_docs/data.devdocs.json
@@ -7102,13 +7102,7 @@
"label": "savedObjects",
"description": [],
"signature": [
- {
- "pluginId": "core",
- "scope": "public",
- "docId": "kibCoreSavedObjectsPluginApi",
- "section": "def-public.SavedObjectsStart",
- "text": "SavedObjectsStart"
- }
+ "SavedObjectsStart"
],
"path": "src/plugins/data/public/types.ts",
"deprecated": false
@@ -22378,10 +22372,10 @@
},
{
"parentPluginId": "data",
- "id": "def-common.IDataViewsApiClient.hasUserIndexPattern",
+ "id": "def-common.IDataViewsApiClient.hasUserDataView",
"type": "Function",
"tags": [],
- "label": "hasUserIndexPattern",
+ "label": "hasUserDataView",
"description": [],
"signature": [
"() => Promise"
@@ -23584,38 +23578,21 @@
"tags": [],
"label": "DEFAULT_ASSETS_TO_IGNORE",
"description": [
- "\nUsed to determine if the instance has some user created index patterns by filtering index patterns\nthat are created and backed only by Fleet server data\nShould be revised after https://github.com/elastic/kibana/issues/82851 is fixed\nFor more background see: https://github.com/elastic/kibana/issues/107020"
+ "\nUsed to optimize on-boarding experience to determine if the instance has some user created data views or data indices/streams by filtering data sources\nthat are created by default by elastic in ese.\nWe should somehow prevent creating initial data for the users without their explicit action\ninstead of relying on these hardcoded assets"
],
"path": "src/plugins/data_views/common/constants.ts",
"deprecated": false,
"children": [
{
"parentPluginId": "data",
- "id": "def-common.DEFAULT_ASSETS_TO_IGNORE.LOGS_INDEX_PATTERN",
- "type": "string",
- "tags": [],
- "label": "LOGS_INDEX_PATTERN",
- "description": [],
- "path": "src/plugins/data_views/common/constants.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "data",
- "id": "def-common.DEFAULT_ASSETS_TO_IGNORE.LOGS_DATA_STREAM_TO_IGNORE",
- "type": "string",
- "tags": [],
- "label": "LOGS_DATA_STREAM_TO_IGNORE",
- "description": [],
- "path": "src/plugins/data_views/common/constants.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "data",
- "id": "def-common.DEFAULT_ASSETS_TO_IGNORE.ENT_SEARCH_LOGS_DATA_STREAM_TO_IGNORE",
- "type": "string",
+ "id": "def-common.DEFAULT_ASSETS_TO_IGNORE.DATA_STREAMS_TO_IGNORE",
+ "type": "Array",
"tags": [],
- "label": "ENT_SEARCH_LOGS_DATA_STREAM_TO_IGNORE",
+ "label": "DATA_STREAMS_TO_IGNORE",
"description": [],
+ "signature": [
+ "string[]"
+ ],
"path": "src/plugins/data_views/common/constants.ts",
"deprecated": false
}
diff --git a/api_docs/data.mdx b/api_docs/data.mdx
index ad41c0b685955..a918c0ff173af 100644
--- a/api_docs/data.mdx
+++ b/api_docs/data.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data
title: "data"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the data plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 3097 | 34 | 2420 | 21 |
+| 3098 | 34 | 2421 | 22 |
## Client
diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx
index 695f56e807b01..cab0ee9f1bc25 100644
--- a/api_docs/data_query.mdx
+++ b/api_docs/data_query.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data-query
title: "data.query"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the data.query plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 3097 | 34 | 2420 | 21 |
+| 3098 | 34 | 2421 | 22 |
## Client
diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json
index 8dde1cc91ae97..4694ad9c33926 100644
--- a/api_docs/data_search.devdocs.json
+++ b/api_docs/data_search.devdocs.json
@@ -12396,7 +12396,9 @@
"label": "getFilterBucketAgg",
"description": [],
"signature": [
- "({ getConfig }: { getConfig: (key: string) => any; }) => ",
+ "({ getConfig, calculateBounds, }: { getConfig: (key: string) => T; calculateBounds: ",
+ "CalculateBoundsFn",
+ "; }) => ",
{
"pluginId": "data",
"scope": "common",
@@ -12422,7 +12424,7 @@
"id": "def-common.getFilterBucketAgg.$1",
"type": "Object",
"tags": [],
- "label": "{ getConfig }",
+ "label": "{\n getConfig,\n calculateBounds,\n}",
"description": [],
"path": "src/plugins/data/common/search/aggs/buckets/filter.ts",
"deprecated": false,
@@ -12435,7 +12437,7 @@
"label": "getConfig",
"description": [],
"signature": [
- "(key: string) => any"
+ "(key: string) => T"
],
"path": "src/plugins/data/common/search/aggs/buckets/filter.ts",
"deprecated": false,
@@ -12456,6 +12458,44 @@
}
],
"returnComment": []
+ },
+ {
+ "parentPluginId": "data",
+ "id": "def-common.getFilterBucketAgg.$1.calculateBounds",
+ "type": "Function",
+ "tags": [],
+ "label": "calculateBounds",
+ "description": [],
+ "signature": [
+ "(timeRange: ",
+ "TimeRange",
+ ") => ",
+ {
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataQueryPluginApi",
+ "section": "def-common.TimeRangeBounds",
+ "text": "TimeRangeBounds"
+ }
+ ],
+ "path": "src/plugins/data/common/search/aggs/buckets/filter.ts",
+ "deprecated": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "data",
+ "id": "def-common.getFilterBucketAgg.$1.calculateBounds.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "timeRange",
+ "description": [],
+ "signature": [
+ "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }"
+ ],
+ "path": "src/plugins/data/common/search/aggs/buckets/date_histogram.ts",
+ "deprecated": false
+ }
+ ]
}
]
}
@@ -18444,6 +18484,19 @@
],
"path": "src/plugins/data/common/search/aggs/buckets/filter.ts",
"deprecated": false
+ },
+ {
+ "parentPluginId": "data",
+ "id": "def-common.AggParamsFilter.timeWindow",
+ "type": "string",
+ "tags": [],
+ "label": "timeWindow",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/data/common/search/aggs/buckets/filter.ts",
+ "deprecated": false
}
],
"initialIsOpen": false
diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx
index 84934965dd73f..f3b9927708a9f 100644
--- a/api_docs/data_search.mdx
+++ b/api_docs/data_search.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data-search
title: "data.search"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the data.search plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 3097 | 34 | 2420 | 21 |
+| 3098 | 34 | 2421 | 22 |
## Client
diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx
index 473368c99a6d1..2a2c12e4a8915 100644
--- a/api_docs/data_view_editor.mdx
+++ b/api_docs/data_view_editor.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewEditor
title: "dataViewEditor"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the dataViewEditor plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx
index 0cfdc54ecc366..907d738289e91 100644
--- a/api_docs/data_view_field_editor.mdx
+++ b/api_docs/data_view_field_editor.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor
title: "dataViewFieldEditor"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the dataViewFieldEditor plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx
index f3fe08062d028..f7443130744ab 100644
--- a/api_docs/data_view_management.mdx
+++ b/api_docs/data_view_management.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewManagement
title: "dataViewManagement"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the dataViewManagement plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/data_views.devdocs.json b/api_docs/data_views.devdocs.json
index 1cdb9bfdd01a8..9dfc6a17bbff4 100644
--- a/api_docs/data_views.devdocs.json
+++ b/api_docs/data_views.devdocs.json
@@ -2318,10 +2318,10 @@
},
{
"parentPluginId": "dataViews",
- "id": "def-public.DataViewsApiClient.hasUserIndexPattern",
+ "id": "def-public.DataViewsApiClient.hasUserDataView",
"type": "Function",
"tags": [],
- "label": "hasUserIndexPattern",
+ "label": "hasUserDataView",
"description": [
"\nDoes a user created data view exist?"
],
@@ -17886,10 +17886,10 @@
},
{
"parentPluginId": "dataViews",
- "id": "def-common.IDataViewsApiClient.hasUserIndexPattern",
+ "id": "def-common.IDataViewsApiClient.hasUserDataView",
"type": "Function",
"tags": [],
- "label": "hasUserIndexPattern",
+ "label": "hasUserDataView",
"description": [],
"signature": [
"() => Promise"
@@ -20443,38 +20443,21 @@
"tags": [],
"label": "DEFAULT_ASSETS_TO_IGNORE",
"description": [
- "\nUsed to determine if the instance has some user created index patterns by filtering index patterns\nthat are created and backed only by Fleet server data\nShould be revised after https://github.com/elastic/kibana/issues/82851 is fixed\nFor more background see: https://github.com/elastic/kibana/issues/107020"
+ "\nUsed to optimize on-boarding experience to determine if the instance has some user created data views or data indices/streams by filtering data sources\nthat are created by default by elastic in ese.\nWe should somehow prevent creating initial data for the users without their explicit action\ninstead of relying on these hardcoded assets"
],
"path": "src/plugins/data_views/common/constants.ts",
"deprecated": false,
"children": [
{
"parentPluginId": "dataViews",
- "id": "def-common.DEFAULT_ASSETS_TO_IGNORE.LOGS_INDEX_PATTERN",
- "type": "string",
- "tags": [],
- "label": "LOGS_INDEX_PATTERN",
- "description": [],
- "path": "src/plugins/data_views/common/constants.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "dataViews",
- "id": "def-common.DEFAULT_ASSETS_TO_IGNORE.LOGS_DATA_STREAM_TO_IGNORE",
- "type": "string",
- "tags": [],
- "label": "LOGS_DATA_STREAM_TO_IGNORE",
- "description": [],
- "path": "src/plugins/data_views/common/constants.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "dataViews",
- "id": "def-common.DEFAULT_ASSETS_TO_IGNORE.ENT_SEARCH_LOGS_DATA_STREAM_TO_IGNORE",
- "type": "string",
+ "id": "def-common.DEFAULT_ASSETS_TO_IGNORE.DATA_STREAMS_TO_IGNORE",
+ "type": "Array",
"tags": [],
- "label": "ENT_SEARCH_LOGS_DATA_STREAM_TO_IGNORE",
+ "label": "DATA_STREAMS_TO_IGNORE",
"description": [],
+ "signature": [
+ "string[]"
+ ],
"path": "src/plugins/data_views/common/constants.ts",
"deprecated": false
}
diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx
index 22864869dbcfa..6bbfb613480c5 100644
--- a/api_docs/data_views.mdx
+++ b/api_docs/data_views.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViews
title: "dataViews"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the dataViews plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 945 | 0 | 201 | 0 |
+| 943 | 0 | 199 | 0 |
## Client
diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx
index 28bca4a317ebc..c8f0dc4159104 100644
--- a/api_docs/data_visualizer.mdx
+++ b/api_docs/data_visualizer.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataVisualizer
title: "dataVisualizer"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the dataVisualizer plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx
index 6c1d68815d01c..0b004fb065085 100644
--- a/api_docs/deprecations_by_api.mdx
+++ b/api_docs/deprecations_by_api.mdx
@@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsByApi
slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api
title: Deprecated API usage by API
summary: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by.
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system.
---
diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx
index 1f0985e83797e..74c5405b0b74e 100644
--- a/api_docs/deprecations_by_plugin.mdx
+++ b/api_docs/deprecations_by_plugin.mdx
@@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsByPlugin
slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin
title: Deprecated API usage by plugin
summary: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by.
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system.
---
diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx
index 7c2c6c0de8296..b487c52323374 100644
--- a/api_docs/deprecations_by_team.mdx
+++ b/api_docs/deprecations_by_team.mdx
@@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsDueByTeam
slug: /kibana-dev-docs/api-meta/deprecations-due-by-team
title: Deprecated APIs due to be removed, by team
summary: Lists the teams that are referencing deprecated APIs with a remove by date.
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system.
---
diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx
index bab76e873aa2b..d1a66d83eb453 100644
--- a/api_docs/dev_tools.mdx
+++ b/api_docs/dev_tools.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/devTools
title: "devTools"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the devTools plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx
index 72f73fe043307..008ce55af5ec5 100644
--- a/api_docs/discover.mdx
+++ b/api_docs/discover.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/discover
title: "discover"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the discover plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx
index b962e99385921..e601532664c5e 100644
--- a/api_docs/discover_enhanced.mdx
+++ b/api_docs/discover_enhanced.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced
title: "discoverEnhanced"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the discoverEnhanced plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/elastic_apm_synthtrace.mdx b/api_docs/elastic_apm_synthtrace.mdx
index 539dc5e90f8cf..22f5d14c68d7f 100644
--- a/api_docs/elastic_apm_synthtrace.mdx
+++ b/api_docs/elastic_apm_synthtrace.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/elastic-apm-synthtrace
title: "@elastic/apm-synthtrace"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @elastic/apm-synthtrace plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@elastic/apm-synthtrace']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx
index 66b9b60c14ec5..9dcf520eef23c 100644
--- a/api_docs/embeddable.mdx
+++ b/api_docs/embeddable.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/embeddable
title: "embeddable"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the embeddable plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx
index dfc85cced95fc..42e9d0825eceb 100644
--- a/api_docs/embeddable_enhanced.mdx
+++ b/api_docs/embeddable_enhanced.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced
title: "embeddableEnhanced"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the embeddableEnhanced plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx
index 40eb6f94668d7..fa12313742d26 100644
--- a/api_docs/encrypted_saved_objects.mdx
+++ b/api_docs/encrypted_saved_objects.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects
title: "encryptedSavedObjects"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the encryptedSavedObjects plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx
index ce8281a32574c..4910b22726c45 100644
--- a/api_docs/enterprise_search.mdx
+++ b/api_docs/enterprise_search.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch
title: "enterpriseSearch"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the enterpriseSearch plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx
index 2dbf4d36b6a68..1dd87e2f43a70 100644
--- a/api_docs/es_ui_shared.mdx
+++ b/api_docs/es_ui_shared.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/esUiShared
title: "esUiShared"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the esUiShared plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx
index 3e6d99e665677..94196d18c036e 100644
--- a/api_docs/event_annotation.mdx
+++ b/api_docs/event_annotation.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/eventAnnotation
title: "eventAnnotation"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the eventAnnotation plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx
index 818f154dc5845..dbf3e9989b95d 100644
--- a/api_docs/event_log.mdx
+++ b/api_docs/event_log.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/eventLog
title: "eventLog"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the eventLog plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx
index 3e19d4babd52f..ae27d29c34c0d 100644
--- a/api_docs/expression_error.mdx
+++ b/api_docs/expression_error.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionError
title: "expressionError"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressionError plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx
index 1bc118f68515b..b59345f33e59f 100644
--- a/api_docs/expression_gauge.mdx
+++ b/api_docs/expression_gauge.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionGauge
title: "expressionGauge"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressionGauge plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx
index 14aae9ced31e6..b9681028971ec 100644
--- a/api_docs/expression_heatmap.mdx
+++ b/api_docs/expression_heatmap.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap
title: "expressionHeatmap"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressionHeatmap plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx
index b5615295dc816..041174d17f695 100644
--- a/api_docs/expression_image.mdx
+++ b/api_docs/expression_image.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionImage
title: "expressionImage"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressionImage plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx
index 849aa65517c37..d557cd3d408ff 100644
--- a/api_docs/expression_legacy_metric_vis.mdx
+++ b/api_docs/expression_legacy_metric_vis.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis
title: "expressionLegacyMetricVis"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressionLegacyMetricVis plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx
index cb44fefeee55d..c8f6a25260ae5 100644
--- a/api_docs/expression_metric.mdx
+++ b/api_docs/expression_metric.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionMetric
title: "expressionMetric"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressionMetric plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx
index 1f8116634883a..594054a9f03cb 100644
--- a/api_docs/expression_metric_vis.mdx
+++ b/api_docs/expression_metric_vis.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis
title: "expressionMetricVis"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressionMetricVis plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx
index b9e5bb881cb4d..c299735df94bc 100644
--- a/api_docs/expression_partition_vis.mdx
+++ b/api_docs/expression_partition_vis.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis
title: "expressionPartitionVis"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressionPartitionVis plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx
index f6ee15aaa23ee..713676a784f11 100644
--- a/api_docs/expression_repeat_image.mdx
+++ b/api_docs/expression_repeat_image.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage
title: "expressionRepeatImage"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressionRepeatImage plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx
index 29fed05b73c15..a44b3476af664 100644
--- a/api_docs/expression_reveal_image.mdx
+++ b/api_docs/expression_reveal_image.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage
title: "expressionRevealImage"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressionRevealImage plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx
index 9a400bf1e500e..f9d588e2fc7bb 100644
--- a/api_docs/expression_shape.mdx
+++ b/api_docs/expression_shape.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionShape
title: "expressionShape"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressionShape plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx
index 5bcd7964420a2..392b7b49d5a70 100644
--- a/api_docs/expression_tagcloud.mdx
+++ b/api_docs/expression_tagcloud.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud
title: "expressionTagcloud"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressionTagcloud plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx
index 964cb152407b6..a82a65d7aa66d 100644
--- a/api_docs/expression_x_y.mdx
+++ b/api_docs/expression_x_y.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionXY
title: "expressionXY"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressionXY plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx
index 2fd3a2479f2a2..36a95d690a340 100644
--- a/api_docs/expressions.mdx
+++ b/api_docs/expressions.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressions
title: "expressions"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the expressions plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/features.mdx b/api_docs/features.mdx
index 25bf5617bb050..1bb9913bc88e4 100644
--- a/api_docs/features.mdx
+++ b/api_docs/features.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/features
title: "features"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the features plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx
index d15893e7a6b2c..84ad7bbf17789 100644
--- a/api_docs/field_formats.mdx
+++ b/api_docs/field_formats.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fieldFormats
title: "fieldFormats"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the fieldFormats plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx
index c1f80d63ae97e..445cfceda7551 100644
--- a/api_docs/file_upload.mdx
+++ b/api_docs/file_upload.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fileUpload
title: "fileUpload"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the fileUpload plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx
index cb62c2c134bdb..727d7e709351a 100644
--- a/api_docs/fleet.mdx
+++ b/api_docs/fleet.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fleet
title: "fleet"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the fleet plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx
index e0e300e6e2dba..9ab3d227a3b96 100644
--- a/api_docs/global_search.mdx
+++ b/api_docs/global_search.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/globalSearch
title: "globalSearch"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the globalSearch plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/home.mdx b/api_docs/home.mdx
index ff59a2d99b132..e40bfc8372fb4 100644
--- a/api_docs/home.mdx
+++ b/api_docs/home.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/home
title: "home"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the home plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx
index a74e8ec9ad801..92077942efa90 100644
--- a/api_docs/index_lifecycle_management.mdx
+++ b/api_docs/index_lifecycle_management.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement
title: "indexLifecycleManagement"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the indexLifecycleManagement plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx
index 41afd93c25662..f86225d3c0c72 100644
--- a/api_docs/index_management.mdx
+++ b/api_docs/index_management.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/indexManagement
title: "indexManagement"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the indexManagement plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx
index e15ba17089092..f34f5a43ac79d 100644
--- a/api_docs/infra.mdx
+++ b/api_docs/infra.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/infra
title: "infra"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the infra plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx
index ded532d9f8e93..fa233bdf41acd 100644
--- a/api_docs/inspector.mdx
+++ b/api_docs/inspector.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/inspector
title: "inspector"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the inspector plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx
index ee39aad81dd4c..73b7ef904892d 100644
--- a/api_docs/interactive_setup.mdx
+++ b/api_docs/interactive_setup.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/interactiveSetup
title: "interactiveSetup"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the interactiveSetup plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx
index 29c4a67c52d78..dc19436275a02 100644
--- a/api_docs/kbn_ace.mdx
+++ b/api_docs/kbn_ace.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ace
title: "@kbn/ace"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/ace plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_aiops_components.devdocs.json b/api_docs/kbn_aiops_components.devdocs.json
index 3f97c3f94849c..f72706ba13e58 100644
--- a/api_docs/kbn_aiops_components.devdocs.json
+++ b/api_docs/kbn_aiops_components.devdocs.json
@@ -27,7 +27,7 @@
"label": "DualBrush",
"description": [],
"signature": [
- "({\n windowParameters,\n min,\n max,\n onChange,\n marginLeft,\n width,\n}: DualBrushProps) => JSX.Element"
+ "({\n windowParameters,\n min,\n max,\n onChange,\n marginLeft,\n snapTimestamps,\n width,\n}: DualBrushProps) => JSX.Element"
],
"path": "x-pack/packages/ml/aiops_components/src/dual_brush/dual_brush.tsx",
"deprecated": false,
@@ -37,7 +37,7 @@
"id": "def-common.DualBrush.$1",
"type": "Object",
"tags": [],
- "label": "{\n windowParameters,\n min,\n max,\n onChange,\n marginLeft,\n width,\n}",
+ "label": "{\n windowParameters,\n min,\n max,\n onChange,\n marginLeft,\n snapTimestamps,\n width,\n}",
"description": [],
"signature": [
"DualBrushProps"
@@ -89,7 +89,7 @@
"label": "ProgressControls",
"description": [],
"signature": [
- "({\n progress,\n progressMessage,\n onRefresh,\n onCancel,\n isRunning,\n}: ProgressControlProps) => JSX.Element"
+ "({\n progress,\n progressMessage,\n onRefresh,\n onCancel,\n isRunning,\n shouldRerunAnalysis,\n}: ProgressControlProps) => JSX.Element"
],
"path": "x-pack/packages/ml/aiops_components/src/progress_controls/progress_controls.tsx",
"deprecated": false,
@@ -99,7 +99,7 @@
"id": "def-common.ProgressControls.$1",
"type": "Object",
"tags": [],
- "label": "{\n progress,\n progressMessage,\n onRefresh,\n onCancel,\n isRunning,\n}",
+ "label": "{\n progress,\n progressMessage,\n onRefresh,\n onCancel,\n isRunning,\n shouldRerunAnalysis,\n}",
"description": [],
"signature": [
"ProgressControlProps"
diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx
index 582a8b0bfe0fd..9886a1539a025 100644
--- a/api_docs/kbn_aiops_components.mdx
+++ b/api_docs/kbn_aiops_components.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components
title: "@kbn/aiops-components"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/aiops-components plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_aiops_utils.devdocs.json b/api_docs/kbn_aiops_utils.devdocs.json
index 3efcc1adf9861..5b96cc8b8b7c7 100644
--- a/api_docs/kbn_aiops_utils.devdocs.json
+++ b/api_docs/kbn_aiops_utils.devdocs.json
@@ -19,6 +19,80 @@
"common": {
"classes": [],
"functions": [
+ {
+ "parentPluginId": "@kbn/aiops-utils",
+ "id": "def-common.getSnappedWindowParameters",
+ "type": "Function",
+ "tags": [],
+ "label": "getSnappedWindowParameters",
+ "description": [
+ "\n\nConverts window paramaters from the brushes to “snap” the brushes to the chart histogram bar width and ensure timestamps\ncorrespond to bucket timestamps\n"
+ ],
+ "signature": [
+ "(windowParameters: ",
+ {
+ "pluginId": "@kbn/aiops-utils",
+ "scope": "common",
+ "docId": "kibKbnAiopsUtilsPluginApi",
+ "section": "def-common.WindowParameters",
+ "text": "WindowParameters"
+ },
+ ", snapTimestamps: number[]) => ",
+ {
+ "pluginId": "@kbn/aiops-utils",
+ "scope": "common",
+ "docId": "kibKbnAiopsUtilsPluginApi",
+ "section": "def-common.WindowParameters",
+ "text": "WindowParameters"
+ }
+ ],
+ "path": "x-pack/packages/ml/aiops_utils/src/get_window_parameters.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/aiops-utils",
+ "id": "def-common.getSnappedWindowParameters.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "windowParameters",
+ "description": [
+ "time range definition for baseline and deviation to be used by spike log analysis"
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/aiops-utils",
+ "scope": "common",
+ "docId": "kibKbnAiopsUtilsPluginApi",
+ "section": "def-common.WindowParameters",
+ "text": "WindowParameters"
+ }
+ ],
+ "path": "x-pack/packages/ml/aiops_utils/src/get_window_parameters.ts",
+ "deprecated": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "@kbn/aiops-utils",
+ "id": "def-common.getSnappedWindowParameters.$2",
+ "type": "Array",
+ "tags": [],
+ "label": "snapTimestamps",
+ "description": [
+ "time range definition that always corresponds to histogram bucket timestamps"
+ ],
+ "signature": [
+ "number[]"
+ ],
+ "path": "x-pack/packages/ml/aiops_utils/src/get_window_parameters.ts",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [
+ "WindowParameters"
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "@kbn/aiops-utils",
"id": "def-common.getWindowParameters",
diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx
index 8c504730efded..8c0f155c497c6 100644
--- a/api_docs/kbn_aiops_utils.mdx
+++ b/api_docs/kbn_aiops_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils
title: "@kbn/aiops-utils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/aiops-utils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact Machine Learning UI for questions regarding this plugin.
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 46 | 0 | 24 | 0 |
+| 49 | 0 | 24 | 0 |
## Common
diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx
index d839b9ba80c9d..4c394ae0db206 100644
--- a/api_docs/kbn_alerts.mdx
+++ b/api_docs/kbn_alerts.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-alerts
title: "@kbn/alerts"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/alerts plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx
index 7ff02c0531f4b..ba11bc0700ed3 100644
--- a/api_docs/kbn_analytics.mdx
+++ b/api_docs/kbn_analytics.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics
title: "@kbn/analytics"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/analytics plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_analytics_client.devdocs.json b/api_docs/kbn_analytics_client.devdocs.json
index 42b3860ecbb9d..a2543aacc179c 100644
--- a/api_docs/kbn_analytics_client.devdocs.json
+++ b/api_docs/kbn_analytics_client.devdocs.json
@@ -219,6 +219,16 @@
"description": [
"\nDefinition of the full event structure"
],
+ "signature": [
+ {
+ "pluginId": "@kbn/analytics-client",
+ "scope": "common",
+ "docId": "kibKbnAnalyticsClientPluginApi",
+ "section": "def-common.Event",
+ "text": "Event"
+ },
+ ""
+ ],
"path": "packages/analytics/client/src/events/types.ts",
"deprecated": false,
"children": [
@@ -249,14 +259,14 @@
{
"parentPluginId": "@kbn/analytics-client",
"id": "def-common.Event.properties",
- "type": "Object",
+ "type": "Uncategorized",
"tags": [],
"label": "properties",
"description": [
"\nThe specific properties of the event type."
],
"signature": [
- "{ [x: string]: unknown; }"
+ "Properties"
],
"path": "packages/analytics/client/src/events/types.ts",
"deprecated": false
@@ -547,7 +557,7 @@
"\nReports a telemetry event."
],
"signature": [
- ">(eventType: string, eventData: EventTypeData) => void"
+ "(eventType: string, eventData: EventTypeData) => void"
],
"path": "packages/analytics/client/src/analytics_client/types.ts",
"deprecated": false,
@@ -945,7 +955,7 @@
"section": "def-common.Event",
"text": "Event"
},
- "[]) => void"
+ ">[]) => void"
],
"path": "packages/analytics/client/src/shippers/types.ts",
"deprecated": false,
@@ -967,7 +977,7 @@
"section": "def-common.Event",
"text": "Event"
},
- "[]"
+ ">[]"
],
"path": "packages/analytics/client/src/shippers/types.ts",
"deprecated": false,
diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx
index 7c082c659af50..a0c1b0cd70e5d 100644
--- a/api_docs/kbn_analytics_client.mdx
+++ b/api_docs/kbn_analytics_client.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client
title: "@kbn/analytics-client"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/analytics-client plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.devdocs.json b/api_docs/kbn_analytics_shippers_elastic_v3_browser.devdocs.json
index 904adc713d0e3..6e2887f902564 100644
--- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.devdocs.json
+++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.devdocs.json
@@ -203,7 +203,7 @@
"signature": [
"(events: ",
"Event",
- "[]) => void"
+ ">[]) => void"
],
"path": "packages/analytics/shippers/elastic_v3/browser/src/browser_shipper.ts",
"deprecated": false,
@@ -219,7 +219,7 @@
],
"signature": [
"Event",
- "[]"
+ ">[]"
],
"path": "packages/analytics/shippers/elastic_v3/browser/src/browser_shipper.ts",
"deprecated": false,
diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx
index c4c9e56f0c2b7..423c865416e0a 100644
--- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx
+++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.devdocs.json b/api_docs/kbn_analytics_shippers_elastic_v3_common.devdocs.json
index 3ced4f235b0b9..cd7ecef5e5286 100644
--- a/api_docs/kbn_analytics_shippers_elastic_v3_common.devdocs.json
+++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.devdocs.json
@@ -227,7 +227,7 @@
"TelemetryCounter",
">, source: string) => (events: ",
"Event",
- "[], { type, code, error, }?: { type?: ",
+ ">[], { type, code, error, }?: { type?: ",
"TelemetryCounterType",
" | undefined; code?: string | undefined; error?: Error | undefined; }) => void"
],
@@ -285,7 +285,7 @@
"signature": [
"(events: ",
"Event",
- "[]) => string"
+ ">[]) => string"
],
"path": "packages/analytics/shippers/elastic_v3/common/src/events_to_ndjson.ts",
"deprecated": false,
@@ -301,7 +301,7 @@
],
"signature": [
"Event",
- "[]"
+ ">[]"
],
"path": "packages/analytics/shippers/elastic_v3/common/src/events_to_ndjson.ts",
"deprecated": false,
diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx
index 28c2d11c0e5b5..e1e0b1e68c8c4 100644
--- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx
+++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.devdocs.json b/api_docs/kbn_analytics_shippers_elastic_v3_server.devdocs.json
index 981257e0fcd16..1d4721767610f 100644
--- a/api_docs/kbn_analytics_shippers_elastic_v3_server.devdocs.json
+++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.devdocs.json
@@ -195,7 +195,7 @@
"signature": [
"(events: ",
"Event",
- "[]) => void"
+ ">[]) => void"
],
"path": "packages/analytics/shippers/elastic_v3/server/src/server_shipper.ts",
"deprecated": false,
@@ -211,7 +211,7 @@
],
"signature": [
"Event",
- "[]"
+ ">[]"
],
"path": "packages/analytics/shippers/elastic_v3/server/src/server_shipper.ts",
"deprecated": false,
diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx
index e7720f6263ec8..52449517c968d 100644
--- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx
+++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_analytics_shippers_fullstory.devdocs.json b/api_docs/kbn_analytics_shippers_fullstory.devdocs.json
index 19cd61dd2651f..005302e9a1a7b 100644
--- a/api_docs/kbn_analytics_shippers_fullstory.devdocs.json
+++ b/api_docs/kbn_analytics_shippers_fullstory.devdocs.json
@@ -191,7 +191,7 @@
"signature": [
"(events: ",
"Event",
- "[]) => void"
+ ">[]) => void"
],
"path": "packages/analytics/shippers/fullstory/src/fullstory_shipper.ts",
"deprecated": false,
@@ -207,7 +207,7 @@
],
"signature": [
"Event",
- "[]"
+ ">[]"
],
"path": "packages/analytics/shippers/fullstory/src/fullstory_shipper.ts",
"deprecated": false,
diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx
index 7f431a9a02162..094c52d069655 100644
--- a/api_docs/kbn_analytics_shippers_fullstory.mdx
+++ b/api_docs/kbn_analytics_shippers_fullstory.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory
title: "@kbn/analytics-shippers-fullstory"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/analytics-shippers-fullstory plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx
index 551be5ca6faf9..a61fa87d21c75 100644
--- a/api_docs/kbn_apm_config_loader.mdx
+++ b/api_docs/kbn_apm_config_loader.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader
title: "@kbn/apm-config-loader"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/apm-config-loader plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx
index 068ebda07dac9..fe5c77a30f79e 100644
--- a/api_docs/kbn_apm_utils.mdx
+++ b/api_docs/kbn_apm_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils
title: "@kbn/apm-utils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/apm-utils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx
index 371a0f441008a..a7e24a009ca64 100644
--- a/api_docs/kbn_axe_config.mdx
+++ b/api_docs/kbn_axe_config.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config
title: "@kbn/axe-config"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/axe-config plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_bazel_packages.mdx b/api_docs/kbn_bazel_packages.mdx
index b3c81463e3319..b72376cd65633 100644
--- a/api_docs/kbn_bazel_packages.mdx
+++ b/api_docs/kbn_bazel_packages.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-bazel-packages
title: "@kbn/bazel-packages"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/bazel-packages plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bazel-packages']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx
index f1766dcb01c68..89ecddefbc25a 100644
--- a/api_docs/kbn_ci_stats_core.mdx
+++ b/api_docs/kbn_ci_stats_core.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core
title: "@kbn/ci-stats-core"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/ci-stats-core plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx
index 5d4876c7c410c..c4ca5ff472e25 100644
--- a/api_docs/kbn_ci_stats_performance_metrics.mdx
+++ b/api_docs/kbn_ci_stats_performance_metrics.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics
title: "@kbn/ci-stats-performance-metrics"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/ci-stats-performance-metrics plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx
index f1a91956c8747..e6424911f5aa6 100644
--- a/api_docs/kbn_ci_stats_reporter.mdx
+++ b/api_docs/kbn_ci_stats_reporter.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter
title: "@kbn/ci-stats-reporter"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/ci-stats-reporter plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx
index 98c4878ddc4cc..59ac09cbe70fe 100644
--- a/api_docs/kbn_cli_dev_mode.mdx
+++ b/api_docs/kbn_cli_dev_mode.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode
title: "@kbn/cli-dev-mode"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/cli-dev-mode plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx
index d33693bd36c2e..ee8663c646e69 100644
--- a/api_docs/kbn_coloring.mdx
+++ b/api_docs/kbn_coloring.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-coloring
title: "@kbn/coloring"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/coloring plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx
index 276608435772b..8e9977261de53 100644
--- a/api_docs/kbn_config.mdx
+++ b/api_docs/kbn_config.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config
title: "@kbn/config"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/config plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx
index 64656e4bbc026..6fbbe19f75a4c 100644
--- a/api_docs/kbn_config_mocks.mdx
+++ b/api_docs/kbn_config_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks
title: "@kbn/config-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/config-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx
index 76cef641fdea0..95f6adda0962a 100644
--- a/api_docs/kbn_config_schema.mdx
+++ b/api_docs/kbn_config_schema.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema
title: "@kbn/config-schema"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/config-schema plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_analytics_browser.devdocs.json b/api_docs/kbn_core_analytics_browser.devdocs.json
index c64c779b2034d..7cb2e58a1c1cf 100644
--- a/api_docs/kbn_core_analytics_browser.devdocs.json
+++ b/api_docs/kbn_core_analytics_browser.devdocs.json
@@ -34,7 +34,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
@@ -66,7 +66,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx
index 8d7e432f32e4a..5153314e25aea 100644
--- a/api_docs/kbn_core_analytics_browser.mdx
+++ b/api_docs/kbn_core_analytics_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser
title: "@kbn/core-analytics-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-analytics-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx
index de0c4ee8e1289..77856ae65c8a1 100644
--- a/api_docs/kbn_core_analytics_browser_internal.mdx
+++ b/api_docs/kbn_core_analytics_browser_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal
title: "@kbn/core-analytics-browser-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-analytics-browser-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx
index 3484294c68f4e..6426283795560 100644
--- a/api_docs/kbn_core_analytics_browser_mocks.mdx
+++ b/api_docs/kbn_core_analytics_browser_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks
title: "@kbn/core-analytics-browser-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-analytics-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_analytics_server.devdocs.json b/api_docs/kbn_core_analytics_server.devdocs.json
index d2f49935b878d..622c76c39b920 100644
--- a/api_docs/kbn_core_analytics_server.devdocs.json
+++ b/api_docs/kbn_core_analytics_server.devdocs.json
@@ -26,7 +26,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
@@ -58,7 +58,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
@@ -90,7 +90,7 @@
"signature": [
"{ optIn: (optInConfig: ",
"OptInConfig",
- ") => void; reportEvent: >(eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
+ ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ",
"Observable",
"<",
"TelemetryCounter",
diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx
index feb1dd8dd5cf3..410e15e3ffc68 100644
--- a/api_docs/kbn_core_analytics_server.mdx
+++ b/api_docs/kbn_core_analytics_server.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server
title: "@kbn/core-analytics-server"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-analytics-server plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx
index e4ed17dfedd79..a1e055051bbfb 100644
--- a/api_docs/kbn_core_analytics_server_internal.mdx
+++ b/api_docs/kbn_core_analytics_server_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal
title: "@kbn/core-analytics-server-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-analytics-server-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx
index 76a851dd16a39..e8d1814bb5150 100644
--- a/api_docs/kbn_core_analytics_server_mocks.mdx
+++ b/api_docs/kbn_core_analytics_server_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks
title: "@kbn/core-analytics-server-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-analytics-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx
index 58b7d5ea0032c..c6a76c065af7b 100644
--- a/api_docs/kbn_core_base_browser_mocks.mdx
+++ b/api_docs/kbn_core_base_browser_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks
title: "@kbn/core-base-browser-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-base-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx
index a56eff28e560f..00d95d4e2dd83 100644
--- a/api_docs/kbn_core_base_common.mdx
+++ b/api_docs/kbn_core_base_common.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common
title: "@kbn/core-base-common"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-base-common plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx
index 1cdd2ed2dbc18..b1bce63c32c7b 100644
--- a/api_docs/kbn_core_base_server_internal.mdx
+++ b/api_docs/kbn_core_base_server_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal
title: "@kbn/core-base-server-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-base-server-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx
index 0c3b649d57972..20b8931a13050 100644
--- a/api_docs/kbn_core_base_server_mocks.mdx
+++ b/api_docs/kbn_core_base_server_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks
title: "@kbn/core-base-server-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-base-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx
index b5c70a4c003cc..3143850c5f326 100644
--- a/api_docs/kbn_core_capabilities_common.mdx
+++ b/api_docs/kbn_core_capabilities_common.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common
title: "@kbn/core-capabilities-common"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-capabilities-common plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx
index 11d966a3191e8..84bae56c2a66f 100644
--- a/api_docs/kbn_core_capabilities_server.mdx
+++ b/api_docs/kbn_core_capabilities_server.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server
title: "@kbn/core-capabilities-server"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-capabilities-server plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx
index 84ccd4b086bee..692a6dfd7da84 100644
--- a/api_docs/kbn_core_capabilities_server_mocks.mdx
+++ b/api_docs/kbn_core_capabilities_server_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks
title: "@kbn/core-capabilities-server-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-capabilities-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_config_server_internal.devdocs.json b/api_docs/kbn_core_config_server_internal.devdocs.json
index da4e89e53775a..3b2226a89c2a0 100644
--- a/api_docs/kbn_core_config_server_internal.devdocs.json
+++ b/api_docs/kbn_core_config_server_internal.devdocs.json
@@ -78,170 +78,6 @@
],
"returnComment": [],
"initialIsOpen": false
- },
- {
- "parentPluginId": "@kbn/core-config-server-internal",
- "id": "def-server.getDeprecationsFor",
- "type": "Function",
- "tags": [],
- "label": "getDeprecationsFor",
- "description": [],
- "signature": [
- "({ provider, settings, path, }: { provider: ",
- "ConfigDeprecationProvider",
- "; settings?: Record | undefined; path: string; }) => { messages: string[]; levels: string[]; migrated: Record; }"
- ],
- "path": "packages/core/config/core-config-server-internal/src/test_utils.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/core-config-server-internal",
- "id": "def-server.getDeprecationsFor.$1",
- "type": "Object",
- "tags": [],
- "label": "{\n provider,\n settings = {},\n path,\n}",
- "description": [],
- "path": "packages/core/config/core-config-server-internal/src/test_utils.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/core-config-server-internal",
- "id": "def-server.getDeprecationsFor.$1.provider",
- "type": "Function",
- "tags": [],
- "label": "provider",
- "description": [],
- "signature": [
- "(factory: ",
- "ConfigDeprecationFactory",
- ") => ",
- "ConfigDeprecation",
- "[]"
- ],
- "path": "packages/core/config/core-config-server-internal/src/test_utils.ts",
- "deprecated": false,
- "returnComment": [],
- "children": [
- {
- "parentPluginId": "@kbn/core-config-server-internal",
- "id": "def-server.getDeprecationsFor.$1.provider.$1",
- "type": "Object",
- "tags": [],
- "label": "factory",
- "description": [],
- "signature": [
- "ConfigDeprecationFactory"
- ],
- "path": "node_modules/@types/kbn__config/index.d.ts",
- "deprecated": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/core-config-server-internal",
- "id": "def-server.getDeprecationsFor.$1.settings",
- "type": "Object",
- "tags": [],
- "label": "settings",
- "description": [],
- "signature": [
- "Record | undefined"
- ],
- "path": "packages/core/config/core-config-server-internal/src/test_utils.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/core-config-server-internal",
- "id": "def-server.getDeprecationsFor.$1.path",
- "type": "string",
- "tags": [],
- "label": "path",
- "description": [],
- "path": "packages/core/config/core-config-server-internal/src/test_utils.ts",
- "deprecated": false
- }
- ]
- }
- ],
- "returnComment": [],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "@kbn/core-config-server-internal",
- "id": "def-server.getDeprecationsForGlobalSettings",
- "type": "Function",
- "tags": [],
- "label": "getDeprecationsForGlobalSettings",
- "description": [],
- "signature": [
- "({ provider, settings, }: { provider: ",
- "ConfigDeprecationProvider",
- "; settings?: Record | undefined; }) => { messages: string[]; levels: string[]; migrated: Record; }"
- ],
- "path": "packages/core/config/core-config-server-internal/src/test_utils.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/core-config-server-internal",
- "id": "def-server.getDeprecationsForGlobalSettings.$1",
- "type": "Object",
- "tags": [],
- "label": "{\n provider,\n settings = {},\n}",
- "description": [],
- "path": "packages/core/config/core-config-server-internal/src/test_utils.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/core-config-server-internal",
- "id": "def-server.getDeprecationsForGlobalSettings.$1.provider",
- "type": "Function",
- "tags": [],
- "label": "provider",
- "description": [],
- "signature": [
- "(factory: ",
- "ConfigDeprecationFactory",
- ") => ",
- "ConfigDeprecation",
- "[]"
- ],
- "path": "packages/core/config/core-config-server-internal/src/test_utils.ts",
- "deprecated": false,
- "returnComment": [],
- "children": [
- {
- "parentPluginId": "@kbn/core-config-server-internal",
- "id": "def-server.getDeprecationsForGlobalSettings.$1.provider.$1",
- "type": "Object",
- "tags": [],
- "label": "factory",
- "description": [],
- "signature": [
- "ConfigDeprecationFactory"
- ],
- "path": "node_modules/@types/kbn__config/index.d.ts",
- "deprecated": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/core-config-server-internal",
- "id": "def-server.getDeprecationsForGlobalSettings.$1.settings",
- "type": "Object",
- "tags": [],
- "label": "settings",
- "description": [],
- "signature": [
- "Record | undefined"
- ],
- "path": "packages/core/config/core-config-server-internal/src/test_utils.ts",
- "deprecated": false
- }
- ]
- }
- ],
- "returnComment": [],
- "initialIsOpen": false
}
],
"interfaces": [],
diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx
index b5f099d6443b3..63d5c475d180b 100644
--- a/api_docs/kbn_core_config_server_internal.mdx
+++ b/api_docs/kbn_core_config_server_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal
title: "@kbn/core-config-server-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-config-server-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact Kibana Core for questions regarding this plugin.
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 15 | 0 | 13 | 0 |
+| 4 | 0 | 4 | 0 |
## Server
diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx
index 5434f82d104ae..f1d3f068d7196 100644
--- a/api_docs/kbn_core_deprecations_browser.mdx
+++ b/api_docs/kbn_core_deprecations_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser
title: "@kbn/core-deprecations-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-deprecations-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx
index 07119eb704591..29caef8bfb516 100644
--- a/api_docs/kbn_core_deprecations_browser_internal.mdx
+++ b/api_docs/kbn_core_deprecations_browser_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal
title: "@kbn/core-deprecations-browser-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-deprecations-browser-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx
index 6100abd823315..e5793b9460ea8 100644
--- a/api_docs/kbn_core_deprecations_browser_mocks.mdx
+++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks
title: "@kbn/core-deprecations-browser-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-deprecations-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx
index 03ba55455bcb1..bca997153a79c 100644
--- a/api_docs/kbn_core_deprecations_common.mdx
+++ b/api_docs/kbn_core_deprecations_common.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common
title: "@kbn/core-deprecations-common"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-deprecations-common plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx
index a8abf884d3119..fd92aa59723b3 100644
--- a/api_docs/kbn_core_doc_links_browser.mdx
+++ b/api_docs/kbn_core_doc_links_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser
title: "@kbn/core-doc-links-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-doc-links-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx
index 0fcd16e9245d7..070148d7b3005 100644
--- a/api_docs/kbn_core_doc_links_browser_mocks.mdx
+++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-doc-links-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx
index b19c516159d75..e0feb6d381f16 100644
--- a/api_docs/kbn_core_doc_links_server.mdx
+++ b/api_docs/kbn_core_doc_links_server.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server
title: "@kbn/core-doc-links-server"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-doc-links-server plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx
index 8626ccdf9b06a..eba83a869baec 100644
--- a/api_docs/kbn_core_doc_links_server_mocks.mdx
+++ b/api_docs/kbn_core_doc_links_server_mocks.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-doc-links-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx
index 73e2d5f899af0..1417ac64698bd 100644
--- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx
+++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-elasticsearch-client-server-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx
index 67d26b2894766..dd895b144ddf8 100644
--- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx
+++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx
index bf0800804ec56..9111681b43b6b 100644
--- a/api_docs/kbn_core_elasticsearch_server.mdx
+++ b/api_docs/kbn_core_elasticsearch_server.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server
title: "@kbn/core-elasticsearch-server"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-elasticsearch-server plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx
index 43afa319f0862..6413a41c90c85 100644
--- a/api_docs/kbn_core_elasticsearch_server_internal.mdx
+++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal
title: "@kbn/core-elasticsearch-server-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-elasticsearch-server-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx
index 66b1fec1185a5..8f5d444372ef8 100644
--- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx
+++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks
title: "@kbn/core-elasticsearch-server-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-elasticsearch-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx
index cbf777d556606..c44939d3f61c9 100644
--- a/api_docs/kbn_core_environment_server_internal.mdx
+++ b/api_docs/kbn_core_environment_server_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal
title: "@kbn/core-environment-server-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-environment-server-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx
index 75ca0729e4c3c..66e0e5e8698a1 100644
--- a/api_docs/kbn_core_environment_server_mocks.mdx
+++ b/api_docs/kbn_core_environment_server_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks
title: "@kbn/core-environment-server-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-environment-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx
index 9de1df05d3c51..f05874250d0e6 100644
--- a/api_docs/kbn_core_execution_context_browser.mdx
+++ b/api_docs/kbn_core_execution_context_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser
title: "@kbn/core-execution-context-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-execution-context-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx
index fa70cf1f5f615..d8f8ce79a821f 100644
--- a/api_docs/kbn_core_execution_context_browser_internal.mdx
+++ b/api_docs/kbn_core_execution_context_browser_internal.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-execution-context-browser-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx
index d4109b6be5a79..ba45072b73d59 100644
--- a/api_docs/kbn_core_execution_context_browser_mocks.mdx
+++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-execution-context-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx
index 0f8b0671f507a..c69ce77cffdd2 100644
--- a/api_docs/kbn_core_execution_context_common.mdx
+++ b/api_docs/kbn_core_execution_context_common.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common
title: "@kbn/core-execution-context-common"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-execution-context-common plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx
index ddbb73758c9af..8e6ef3cd0d6f6 100644
--- a/api_docs/kbn_core_execution_context_server.mdx
+++ b/api_docs/kbn_core_execution_context_server.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server
title: "@kbn/core-execution-context-server"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-execution-context-server plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx
index a587bb3eeb047..d081dc431f8f6 100644
--- a/api_docs/kbn_core_execution_context_server_internal.mdx
+++ b/api_docs/kbn_core_execution_context_server_internal.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-execution-context-server-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx
index 2d8bcc04f4bc8..f978823799417 100644
--- a/api_docs/kbn_core_execution_context_server_mocks.mdx
+++ b/api_docs/kbn_core_execution_context_server_mocks.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-execution-context-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx
index 58179f2be6fa8..680796eb5168e 100644
--- a/api_docs/kbn_core_fatal_errors_browser.mdx
+++ b/api_docs/kbn_core_fatal_errors_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser
title: "@kbn/core-fatal-errors-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-fatal-errors-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx
index edef3cb92ff5e..7e1ae8d667be4 100644
--- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx
+++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-fatal-errors-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx
index 882650258ff22..3ccb58070105e 100644
--- a/api_docs/kbn_core_http_browser.mdx
+++ b/api_docs/kbn_core_http_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser
title: "@kbn/core-http-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-http-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx
index 070fc58c3bab1..a9f6228f4d092 100644
--- a/api_docs/kbn_core_http_browser_internal.mdx
+++ b/api_docs/kbn_core_http_browser_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal
title: "@kbn/core-http-browser-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-http-browser-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx
index 7e05161533bf8..1b5a7ca28fb33 100644
--- a/api_docs/kbn_core_http_browser_mocks.mdx
+++ b/api_docs/kbn_core_http_browser_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks
title: "@kbn/core-http-browser-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-http-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx
index 15e97a6bfc80e..fa5d89c035fa6 100644
--- a/api_docs/kbn_core_http_common.mdx
+++ b/api_docs/kbn_core_http_common.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common
title: "@kbn/core-http-common"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-http-common plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx
index d0712c12e01b6..af25cbf2bd37a 100644
--- a/api_docs/kbn_core_http_context_server_mocks.mdx
+++ b/api_docs/kbn_core_http_context_server_mocks.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-http-context-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx
index 7fdd28a7bfa3a..b91065065dd6b 100644
--- a/api_docs/kbn_core_http_router_server_internal.mdx
+++ b/api_docs/kbn_core_http_router_server_internal.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-http-router-server-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx
index 9a57440173036..cfbef0f5d47c3 100644
--- a/api_docs/kbn_core_http_router_server_mocks.mdx
+++ b/api_docs/kbn_core_http_router_server_mocks.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-http-router-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx
index a83140390f324..d7ed0ddd9c7eb 100644
--- a/api_docs/kbn_core_http_server.mdx
+++ b/api_docs/kbn_core_http_server.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server
title: "@kbn/core-http-server"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-http-server plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx
index d555464e1a2ab..b65c07014917b 100644
--- a/api_docs/kbn_core_http_server_internal.mdx
+++ b/api_docs/kbn_core_http_server_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal
title: "@kbn/core-http-server-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-http-server-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx
index e9cabc3ab741a..e3f527f7b9049 100644
--- a/api_docs/kbn_core_http_server_mocks.mdx
+++ b/api_docs/kbn_core_http_server_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks
title: "@kbn/core-http-server-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-http-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx
index dfc83c93d9a3c..190936c4307c8 100644
--- a/api_docs/kbn_core_i18n_browser.mdx
+++ b/api_docs/kbn_core_i18n_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser
title: "@kbn/core-i18n-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-i18n-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx
index 9753dda1e1d65..402ffd9889893 100644
--- a/api_docs/kbn_core_i18n_browser_mocks.mdx
+++ b/api_docs/kbn_core_i18n_browser_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks
title: "@kbn/core-i18n-browser-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-i18n-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_injected_metadata_browser.mdx b/api_docs/kbn_core_injected_metadata_browser.mdx
index 5a32ce33c9e0b..4685b9678c144 100644
--- a/api_docs/kbn_core_injected_metadata_browser.mdx
+++ b/api_docs/kbn_core_injected_metadata_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser
title: "@kbn/core-injected-metadata-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-injected-metadata-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx
index 6026c7b7c9073..315d98a288204 100644
--- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx
+++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-injected-metadata-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx
index 66b23751de87d..3b75ce2d33d6f 100644
--- a/api_docs/kbn_core_integrations_browser_internal.mdx
+++ b/api_docs/kbn_core_integrations_browser_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal
title: "@kbn/core-integrations-browser-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-integrations-browser-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx
index d0270f6956c4f..bd8af601ca168 100644
--- a/api_docs/kbn_core_integrations_browser_mocks.mdx
+++ b/api_docs/kbn_core_integrations_browser_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks
title: "@kbn/core-integrations-browser-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-integrations-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx
index 6a0579a2f28bb..1d7cc068cb487 100644
--- a/api_docs/kbn_core_logging_server.mdx
+++ b/api_docs/kbn_core_logging_server.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server
title: "@kbn/core-logging-server"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-logging-server plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx
index ee379a1cca97b..1e3e4be341ec3 100644
--- a/api_docs/kbn_core_logging_server_internal.mdx
+++ b/api_docs/kbn_core_logging_server_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal
title: "@kbn/core-logging-server-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-logging-server-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx
index bb3fa29b48ca3..f1bae40daa273 100644
--- a/api_docs/kbn_core_logging_server_mocks.mdx
+++ b/api_docs/kbn_core_logging_server_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks
title: "@kbn/core-logging-server-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-logging-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx
index 278a2e2626eea..469d235c500ce 100644
--- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx
+++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-metrics-collectors-server-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx
index 1d045ad232624..4ec5b703b9056 100644
--- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx
+++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-metrics-collectors-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx
index 47717924ab2a0..693a19f9b793f 100644
--- a/api_docs/kbn_core_metrics_server.mdx
+++ b/api_docs/kbn_core_metrics_server.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server
title: "@kbn/core-metrics-server"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-metrics-server plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx
index 4c2c48ecf041c..c3c51523b750a 100644
--- a/api_docs/kbn_core_metrics_server_internal.mdx
+++ b/api_docs/kbn_core_metrics_server_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal
title: "@kbn/core-metrics-server-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-metrics-server-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx
index 69ade150c409b..2d1365199a1d5 100644
--- a/api_docs/kbn_core_metrics_server_mocks.mdx
+++ b/api_docs/kbn_core_metrics_server_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks
title: "@kbn/core-metrics-server-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-metrics-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx
index 883da788e40f8..a85e7d941ab79 100644
--- a/api_docs/kbn_core_mount_utils_browser.mdx
+++ b/api_docs/kbn_core_mount_utils_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser
title: "@kbn/core-mount-utils-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-mount-utils-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_mount_utils_browser_internal.mdx b/api_docs/kbn_core_mount_utils_browser_internal.mdx
index c6579ee4f42b4..8b3c609916a5c 100644
--- a/api_docs/kbn_core_mount_utils_browser_internal.mdx
+++ b/api_docs/kbn_core_mount_utils_browser_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser-internal
title: "@kbn/core-mount-utils-browser-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-mount-utils-browser-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx
index 241a16e29d734..417b502f7b618 100644
--- a/api_docs/kbn_core_node_server.mdx
+++ b/api_docs/kbn_core_node_server.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server
title: "@kbn/core-node-server"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-node-server plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx
index c89854619b182..28140e9ad3493 100644
--- a/api_docs/kbn_core_node_server_internal.mdx
+++ b/api_docs/kbn_core_node_server_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal
title: "@kbn/core-node-server-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-node-server-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx
index 567ae095ca5a7..79002bbb270c9 100644
--- a/api_docs/kbn_core_node_server_mocks.mdx
+++ b/api_docs/kbn_core_node_server_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks
title: "@kbn/core-node-server-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-node-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx
index 24ff2999ae9ae..f72bc47666d42 100644
--- a/api_docs/kbn_core_notifications_browser.mdx
+++ b/api_docs/kbn_core_notifications_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser
title: "@kbn/core-notifications-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-notifications-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx
index 52351d371efef..0f649712833c4 100644
--- a/api_docs/kbn_core_notifications_browser_internal.mdx
+++ b/api_docs/kbn_core_notifications_browser_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal
title: "@kbn/core-notifications-browser-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-notifications-browser-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx
index 9d1a8f5d4351f..901d3dfa0ccba 100644
--- a/api_docs/kbn_core_notifications_browser_mocks.mdx
+++ b/api_docs/kbn_core_notifications_browser_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks
title: "@kbn/core-notifications-browser-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-notifications-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx
index 7c20aaa76f2ae..f199c7d261511 100644
--- a/api_docs/kbn_core_overlays_browser.mdx
+++ b/api_docs/kbn_core_overlays_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser
title: "@kbn/core-overlays-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-overlays-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx
index 2abf70dd54c0a..b66128bbdebe5 100644
--- a/api_docs/kbn_core_overlays_browser_internal.mdx
+++ b/api_docs/kbn_core_overlays_browser_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal
title: "@kbn/core-overlays-browser-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-overlays-browser-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx
index f6d9fb1f73db8..71422a505359c 100644
--- a/api_docs/kbn_core_overlays_browser_mocks.mdx
+++ b/api_docs/kbn_core_overlays_browser_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks
title: "@kbn/core-overlays-browser-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-overlays-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx
index 06e04eafd9b96..b1276f140df4b 100644
--- a/api_docs/kbn_core_preboot_server.mdx
+++ b/api_docs/kbn_core_preboot_server.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server
title: "@kbn/core-preboot-server"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-preboot-server plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx
index bbff3b155da5e..6a3351c76d92a 100644
--- a/api_docs/kbn_core_preboot_server_mocks.mdx
+++ b/api_docs/kbn_core_preboot_server_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks
title: "@kbn/core-preboot-server-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-preboot-server-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx
index 5576782174bf1..be23b9a8df7d3 100644
--- a/api_docs/kbn_core_saved_objects_api_browser.mdx
+++ b/api_docs/kbn_core_saved_objects_api_browser.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-saved-objects-api-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx
index 1f83b88ba10ae..d63fa9e44eafa 100644
--- a/api_docs/kbn_core_saved_objects_api_server.mdx
+++ b/api_docs/kbn_core_saved_objects_api_server.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-saved-objects-api-server plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_saved_objects_browser.devdocs.json b/api_docs/kbn_core_saved_objects_browser.devdocs.json
new file mode 100644
index 0000000000000..7aa59ac3da7f7
--- /dev/null
+++ b/api_docs/kbn_core_saved_objects_browser.devdocs.json
@@ -0,0 +1,56 @@
+{
+ "id": "@kbn/core-saved-objects-browser",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "common": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser",
+ "id": "def-common.SavedObjectsStart",
+ "type": "Interface",
+ "tags": [],
+ "label": "SavedObjectsStart",
+ "description": [],
+ "path": "packages/core/saved-objects/core-saved-objects-browser/src/contracts.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser",
+ "id": "def-common.SavedObjectsStart.client",
+ "type": "Object",
+ "tags": [],
+ "label": "client",
+ "description": [
+ "{@link SavedObjectsClientContract}"
+ ],
+ "signature": [
+ "SavedObjectsClientContract"
+ ],
+ "path": "packages/core/saved-objects/core-saved-objects-browser/src/contracts.ts",
+ "deprecated": false
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx
new file mode 100644
index 0000000000000..a542705065f9a
--- /dev/null
+++ b/api_docs/kbn_core_saved_objects_browser.mdx
@@ -0,0 +1,27 @@
+---
+id: kibKbnCoreSavedObjectsBrowserPluginApi
+slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser
+title: "@kbn/core-saved-objects-browser"
+image: https://source.unsplash.com/400x175/?github
+summary: API docs for the @kbn/core-saved-objects-browser plugin
+date: 2022-08-08
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser']
+warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
+---
+import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json';
+
+
+
+Contact Kibana Core for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 2 | 0 | 1 | 0 |
+
+## Common
+
+### Interfaces
+
+
diff --git a/api_docs/kbn_core_saved_objects_browser_internal.devdocs.json b/api_docs/kbn_core_saved_objects_browser_internal.devdocs.json
new file mode 100644
index 0000000000000..a973d2292623d
--- /dev/null
+++ b/api_docs/kbn_core_saved_objects_browser_internal.devdocs.json
@@ -0,0 +1,130 @@
+{
+ "id": "@kbn/core-saved-objects-browser-internal",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "common": {
+ "classes": [
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser-internal",
+ "id": "def-common.SavedObjectsService",
+ "type": "Class",
+ "tags": [],
+ "label": "SavedObjectsService",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/core-saved-objects-browser-internal",
+ "scope": "common",
+ "docId": "kibKbnCoreSavedObjectsBrowserInternalPluginApi",
+ "section": "def-common.SavedObjectsService",
+ "text": "SavedObjectsService"
+ },
+ " implements ",
+ "CoreService",
+ ""
+ ],
+ "path": "packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_service.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser-internal",
+ "id": "def-common.SavedObjectsService.setup",
+ "type": "Function",
+ "tags": [],
+ "label": "setup",
+ "description": [],
+ "signature": [
+ "() => Promise"
+ ],
+ "path": "packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_service.ts",
+ "deprecated": false,
+ "children": [],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser-internal",
+ "id": "def-common.SavedObjectsService.start",
+ "type": "Function",
+ "tags": [],
+ "label": "start",
+ "description": [],
+ "signature": [
+ "({ http }: { http: ",
+ "HttpSetup",
+ "; }) => Promise<",
+ "SavedObjectsStart",
+ ">"
+ ],
+ "path": "packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_service.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser-internal",
+ "id": "def-common.SavedObjectsService.start.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{ http }",
+ "description": [],
+ "path": "packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_service.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser-internal",
+ "id": "def-common.SavedObjectsService.start.$1.http",
+ "type": "Object",
+ "tags": [],
+ "label": "http",
+ "description": [],
+ "signature": [
+ "HttpSetup"
+ ],
+ "path": "packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_service.ts",
+ "deprecated": false
+ }
+ ]
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser-internal",
+ "id": "def-common.SavedObjectsService.stop",
+ "type": "Function",
+ "tags": [],
+ "label": "stop",
+ "description": [],
+ "signature": [
+ "() => Promise"
+ ],
+ "path": "packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_service.ts",
+ "deprecated": false,
+ "children": [],
+ "returnComment": []
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx
new file mode 100644
index 0000000000000..5667aeecc328c
--- /dev/null
+++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx
@@ -0,0 +1,27 @@
+---
+id: kibKbnCoreSavedObjectsBrowserInternalPluginApi
+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
+summary: API docs for the @kbn/core-saved-objects-browser-internal plugin
+date: 2022-08-08
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal']
+warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
+---
+import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json';
+
+
+
+Contact Kibana Core for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 6 | 0 | 6 | 0 |
+
+## Common
+
+### Classes
+
+
diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.devdocs.json b/api_docs/kbn_core_saved_objects_browser_mocks.devdocs.json
new file mode 100644
index 0000000000000..8c9a3906a2504
--- /dev/null
+++ b/api_docs/kbn_core_saved_objects_browser_mocks.devdocs.json
@@ -0,0 +1,135 @@
+{
+ "id": "@kbn/core-saved-objects-browser-mocks",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "common": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": [
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser-mocks",
+ "id": "def-common.savedObjectsServiceMock",
+ "type": "Object",
+ "tags": [],
+ "label": "savedObjectsServiceMock",
+ "description": [],
+ "path": "packages/core/saved-objects/core-saved-objects-browser-mocks/src/saved_objects_service.mock.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser-mocks",
+ "id": "def-common.savedObjectsServiceMock.create",
+ "type": "Function",
+ "tags": [],
+ "label": "create",
+ "description": [],
+ "signature": [
+ "() => jest.Mocked"
+ ],
+ "path": "packages/core/saved-objects/core-saved-objects-browser-mocks/src/saved_objects_service.mock.ts",
+ "deprecated": false,
+ "returnComment": [],
+ "children": []
+ },
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser-mocks",
+ "id": "def-common.savedObjectsServiceMock.createStartContract",
+ "type": "Function",
+ "tags": [],
+ "label": "createStartContract",
+ "description": [],
+ "signature": [
+ "() => jest.Mocked<",
+ "SavedObjectsStart",
+ ">"
+ ],
+ "path": "packages/core/saved-objects/core-saved-objects-browser-mocks/src/saved_objects_service.mock.ts",
+ "deprecated": false,
+ "returnComment": [],
+ "children": []
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser-mocks",
+ "id": "def-common.simpleSavedObjectMock",
+ "type": "Object",
+ "tags": [],
+ "label": "simpleSavedObjectMock",
+ "description": [],
+ "path": "packages/core/saved-objects/core-saved-objects-browser-mocks/src/simple_saved_object.mock.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser-mocks",
+ "id": "def-common.simpleSavedObjectMock.create",
+ "type": "Function",
+ "tags": [],
+ "label": "create",
+ "description": [],
+ "signature": [
+ "(client: ",
+ "SavedObjectsClientContract",
+ ", savedObject: ",
+ "SavedObject",
+ ") => ",
+ "SimpleSavedObjectImpl",
+ ""
+ ],
+ "path": "packages/core/saved-objects/core-saved-objects-browser-mocks/src/simple_saved_object.mock.ts",
+ "deprecated": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser-mocks",
+ "id": "def-common.simpleSavedObjectMock.create.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "client",
+ "description": [],
+ "signature": [
+ "SavedObjectsClientContract"
+ ],
+ "path": "packages/core/saved-objects/core-saved-objects-browser-mocks/src/simple_saved_object.mock.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/core-saved-objects-browser-mocks",
+ "id": "def-common.simpleSavedObjectMock.create.$2",
+ "type": "Object",
+ "tags": [],
+ "label": "savedObject",
+ "description": [],
+ "signature": [
+ "SavedObject",
+ ""
+ ],
+ "path": "packages/core/saved-objects/core-saved-objects-browser-mocks/src/simple_saved_object.mock.ts",
+ "deprecated": false
+ }
+ ]
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx
new file mode 100644
index 0000000000000..68a1868e0e1a0
--- /dev/null
+++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx
@@ -0,0 +1,27 @@
+---
+id: kibKbnCoreSavedObjectsBrowserMocksPluginApi
+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
+summary: API docs for the @kbn/core-saved-objects-browser-mocks plugin
+date: 2022-08-08
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks']
+warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
+---
+import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json';
+
+
+
+Contact Kibana Core for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 7 | 0 | 7 | 0 |
+
+## Common
+
+### Objects
+
+
diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx
index 08d48240e8962..3b6f553c5e218 100644
--- a/api_docs/kbn_core_saved_objects_common.mdx
+++ b/api_docs/kbn_core_saved_objects_common.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common
title: "@kbn/core-saved-objects-common"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-saved-objects-common plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx
index 15521b3da2e4e..fff6ab110d5b2 100644
--- a/api_docs/kbn_core_saved_objects_server.mdx
+++ b/api_docs/kbn_core_saved_objects_server.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server
title: "@kbn/core-saved-objects-server"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-saved-objects-server plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.devdocs.json b/api_docs/kbn_core_test_helpers_deprecations_getters.devdocs.json
new file mode 100644
index 0000000000000..05089cba7a7ba
--- /dev/null
+++ b/api_docs/kbn_core_test_helpers_deprecations_getters.devdocs.json
@@ -0,0 +1,192 @@
+{
+ "id": "@kbn/core-test-helpers-deprecations-getters",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [
+ {
+ "parentPluginId": "@kbn/core-test-helpers-deprecations-getters",
+ "id": "def-server.getDeprecationsFor",
+ "type": "Function",
+ "tags": [],
+ "label": "getDeprecationsFor",
+ "description": [],
+ "signature": [
+ "({ provider, settings, path, }: { provider: ",
+ "ConfigDeprecationProvider",
+ "; settings?: Record | undefined; path: string; }) => { messages: string[]; levels: string[]; migrated: Record; }"
+ ],
+ "path": "packages/core/test-helpers/core-test-helpers-deprecations-getters/src/deprecations_getters.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-test-helpers-deprecations-getters",
+ "id": "def-server.getDeprecationsFor.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{\n provider,\n settings = {},\n path,\n}",
+ "description": [],
+ "path": "packages/core/test-helpers/core-test-helpers-deprecations-getters/src/deprecations_getters.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-test-helpers-deprecations-getters",
+ "id": "def-server.getDeprecationsFor.$1.provider",
+ "type": "Function",
+ "tags": [],
+ "label": "provider",
+ "description": [],
+ "signature": [
+ "(factory: ",
+ "ConfigDeprecationFactory",
+ ") => ",
+ "ConfigDeprecation",
+ "[]"
+ ],
+ "path": "packages/core/test-helpers/core-test-helpers-deprecations-getters/src/deprecations_getters.ts",
+ "deprecated": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-test-helpers-deprecations-getters",
+ "id": "def-server.getDeprecationsFor.$1.provider.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "factory",
+ "description": [],
+ "signature": [
+ "ConfigDeprecationFactory"
+ ],
+ "path": "node_modules/@types/kbn__config/index.d.ts",
+ "deprecated": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/core-test-helpers-deprecations-getters",
+ "id": "def-server.getDeprecationsFor.$1.settings",
+ "type": "Object",
+ "tags": [],
+ "label": "settings",
+ "description": [],
+ "signature": [
+ "Record | undefined"
+ ],
+ "path": "packages/core/test-helpers/core-test-helpers-deprecations-getters/src/deprecations_getters.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/core-test-helpers-deprecations-getters",
+ "id": "def-server.getDeprecationsFor.$1.path",
+ "type": "string",
+ "tags": [],
+ "label": "path",
+ "description": [],
+ "path": "packages/core/test-helpers/core-test-helpers-deprecations-getters/src/deprecations_getters.ts",
+ "deprecated": false
+ }
+ ]
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/core-test-helpers-deprecations-getters",
+ "id": "def-server.getDeprecationsForGlobalSettings",
+ "type": "Function",
+ "tags": [],
+ "label": "getDeprecationsForGlobalSettings",
+ "description": [],
+ "signature": [
+ "({ provider, settings, }: { provider: ",
+ "ConfigDeprecationProvider",
+ "; settings?: Record | undefined; }) => { messages: string[]; levels: string[]; migrated: Record; }"
+ ],
+ "path": "packages/core/test-helpers/core-test-helpers-deprecations-getters/src/deprecations_getters.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-test-helpers-deprecations-getters",
+ "id": "def-server.getDeprecationsForGlobalSettings.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{\n provider,\n settings = {},\n}",
+ "description": [],
+ "path": "packages/core/test-helpers/core-test-helpers-deprecations-getters/src/deprecations_getters.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-test-helpers-deprecations-getters",
+ "id": "def-server.getDeprecationsForGlobalSettings.$1.provider",
+ "type": "Function",
+ "tags": [],
+ "label": "provider",
+ "description": [],
+ "signature": [
+ "(factory: ",
+ "ConfigDeprecationFactory",
+ ") => ",
+ "ConfigDeprecation",
+ "[]"
+ ],
+ "path": "packages/core/test-helpers/core-test-helpers-deprecations-getters/src/deprecations_getters.ts",
+ "deprecated": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-test-helpers-deprecations-getters",
+ "id": "def-server.getDeprecationsForGlobalSettings.$1.provider.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "factory",
+ "description": [],
+ "signature": [
+ "ConfigDeprecationFactory"
+ ],
+ "path": "node_modules/@types/kbn__config/index.d.ts",
+ "deprecated": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/core-test-helpers-deprecations-getters",
+ "id": "def-server.getDeprecationsForGlobalSettings.$1.settings",
+ "type": "Object",
+ "tags": [],
+ "label": "settings",
+ "description": [],
+ "signature": [
+ "Record | undefined"
+ ],
+ "path": "packages/core/test-helpers/core-test-helpers-deprecations-getters/src/deprecations_getters.ts",
+ "deprecated": false
+ }
+ ]
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ }
+ ],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "common": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx
new file mode 100644
index 0000000000000..dff29e4cb66b6
--- /dev/null
+++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx
@@ -0,0 +1,27 @@
+---
+id: kibKbnCoreTestHelpersDeprecationsGettersPluginApi
+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
+summary: API docs for the @kbn/core-test-helpers-deprecations-getters plugin
+date: 2022-08-08
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters']
+warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
+---
+import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json';
+
+
+
+Contact Kibana Core for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 11 | 0 | 9 | 0 |
+
+## Server
+
+### Functions
+
+
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 10fcdbdbfd91c..a7558d8857c87 100644
--- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx
+++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-test-helpers-http-setup-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx
index baae698cc5207..28b0872847eb0 100644
--- a/api_docs/kbn_core_theme_browser.mdx
+++ b/api_docs/kbn_core_theme_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser
title: "@kbn/core-theme-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-theme-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_theme_browser_internal.mdx b/api_docs/kbn_core_theme_browser_internal.mdx
index e0b54bcbd638c..1b79050bee746 100644
--- a/api_docs/kbn_core_theme_browser_internal.mdx
+++ b/api_docs/kbn_core_theme_browser_internal.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal
title: "@kbn/core-theme-browser-internal"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-theme-browser-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx
index cf06f6191aa58..60451d02c0846 100644
--- a/api_docs/kbn_core_theme_browser_mocks.mdx
+++ b/api_docs/kbn_core_theme_browser_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks
title: "@kbn/core-theme-browser-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-theme-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx
index aff6e83db56eb..c4a88f3ba555a 100644
--- a/api_docs/kbn_core_ui_settings_browser.mdx
+++ b/api_docs/kbn_core_ui_settings_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser
title: "@kbn/core-ui-settings-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-ui-settings-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx
index c9ecd46d30816..11d673ba71f47 100644
--- a/api_docs/kbn_core_ui_settings_browser_internal.mdx
+++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-ui-settings-browser-internal plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx
index 7849e9b25e95f..925a473515bf9 100644
--- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx
+++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/core-ui-settings-browser-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx
index 93db56ddbcb48..c194896101be6 100644
--- a/api_docs/kbn_core_ui_settings_common.mdx
+++ b/api_docs/kbn_core_ui_settings_common.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common
title: "@kbn/core-ui-settings-common"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/core-ui-settings-common plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx
index 7084e71852107..f9004db68fcbc 100644
--- a/api_docs/kbn_crypto.mdx
+++ b/api_docs/kbn_crypto.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-crypto
title: "@kbn/crypto"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/crypto plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx
index 39db8c06b6e44..e368ba2e49ea6 100644
--- a/api_docs/kbn_crypto_browser.mdx
+++ b/api_docs/kbn_crypto_browser.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser
title: "@kbn/crypto-browser"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/crypto-browser plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx
index 2c1461d4ab516..b8cb4f92eb0cb 100644
--- a/api_docs/kbn_datemath.mdx
+++ b/api_docs/kbn_datemath.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-datemath
title: "@kbn/datemath"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/datemath plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx
index 4a343e96afc60..7e86024c2df8d 100644
--- a/api_docs/kbn_dev_cli_errors.mdx
+++ b/api_docs/kbn_dev_cli_errors.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors
title: "@kbn/dev-cli-errors"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/dev-cli-errors plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx
index 9560e60ff411b..d3b7cdbc6e6f2 100644
--- a/api_docs/kbn_dev_cli_runner.mdx
+++ b/api_docs/kbn_dev_cli_runner.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner
title: "@kbn/dev-cli-runner"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/dev-cli-runner plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx
index d2a6296e82af8..68b57693e1db6 100644
--- a/api_docs/kbn_dev_proc_runner.mdx
+++ b/api_docs/kbn_dev_proc_runner.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner
title: "@kbn/dev-proc-runner"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/dev-proc-runner plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_dev_utils.devdocs.json b/api_docs/kbn_dev_utils.devdocs.json
index 6ff8061e664cf..d3b4ebd72fb2a 100644
--- a/api_docs/kbn_dev_utils.devdocs.json
+++ b/api_docs/kbn_dev_utils.devdocs.json
@@ -184,22 +184,6 @@
"returnComment": [],
"initialIsOpen": false
},
- {
- "parentPluginId": "@kbn/dev-utils",
- "id": "def-server.runUpdateVscodeConfigCli",
- "type": "Function",
- "tags": [],
- "label": "runUpdateVscodeConfigCli",
- "description": [],
- "signature": [
- "() => void"
- ],
- "path": "packages/kbn-dev-utils/src/vscode_config/update_vscode_config_cli.ts",
- "deprecated": false,
- "children": [],
- "returnComment": [],
- "initialIsOpen": false
- },
{
"parentPluginId": "@kbn/dev-utils",
"id": "def-server.shipCiStatsCli",
diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx
index 7e8b54a48fd49..67c90a4051b23 100644
--- a/api_docs/kbn_dev_utils.mdx
+++ b/api_docs/kbn_dev_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils
title: "@kbn/dev-utils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/dev-utils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact [Owner missing] for questions regarding this plugin.
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 31 | 2 | 27 | 0 |
+| 30 | 2 | 26 | 0 |
## Server
diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx
index 4545f6d369743..0d1affc4ab124 100644
--- a/api_docs/kbn_doc_links.mdx
+++ b/api_docs/kbn_doc_links.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links
title: "@kbn/doc-links"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/doc-links plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx
index e8b0b46689585..a181d1c42ffcd 100644
--- a/api_docs/kbn_docs_utils.mdx
+++ b/api_docs/kbn_docs_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils
title: "@kbn/docs-utils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/docs-utils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_ebt_tools.devdocs.json b/api_docs/kbn_ebt_tools.devdocs.json
new file mode 100644
index 0000000000000..7f6e60305d982
--- /dev/null
+++ b/api_docs/kbn_ebt_tools.devdocs.json
@@ -0,0 +1,343 @@
+{
+ "id": "@kbn/ebt-tools",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "common": {
+ "classes": [],
+ "functions": [
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.registerPerformanceMetricEventType",
+ "type": "Function",
+ "tags": [
+ "private"
+ ],
+ "label": "registerPerformanceMetricEventType",
+ "description": [
+ "\nRegister the `performance_metric` event type"
+ ],
+ "signature": [
+ "(analytics: Pick<",
+ "AnalyticsClient",
+ ", \"registerEventType\">) => void"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/helpers.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.registerPerformanceMetricEventType.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "analytics",
+ "description": [
+ "The {@link AnalyticsClient } during the setup phase (it has the method `registerEventType`)"
+ ],
+ "signature": [
+ "Pick<",
+ "AnalyticsClient",
+ ", \"registerEventType\">"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/helpers.ts",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.reportPerformanceMetricEvent",
+ "type": "Function",
+ "tags": [],
+ "label": "reportPerformanceMetricEvent",
+ "description": [
+ "\nReport a `performance_metric` event type."
+ ],
+ "signature": [
+ "(analytics: Pick<",
+ "AnalyticsClient",
+ ", \"reportEvent\">, eventData: ",
+ {
+ "pluginId": "@kbn/ebt-tools",
+ "scope": "common",
+ "docId": "kibKbnEbtToolsPluginApi",
+ "section": "def-common.PerformanceMetricEvent",
+ "text": "PerformanceMetricEvent"
+ },
+ ") => void"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/helpers.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.reportPerformanceMetricEvent.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "analytics",
+ "description": [
+ "The {@link AnalyticsClient } to report the events."
+ ],
+ "signature": [
+ "Pick<",
+ "AnalyticsClient",
+ ", \"reportEvent\">"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/helpers.ts",
+ "deprecated": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.reportPerformanceMetricEvent.$2",
+ "type": "Object",
+ "tags": [],
+ "label": "eventData",
+ "description": [
+ "The data to send, conforming the structure of a {@link MetricEvent }."
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/ebt-tools",
+ "scope": "common",
+ "docId": "kibKbnEbtToolsPluginApi",
+ "section": "def-common.PerformanceMetricEvent",
+ "text": "PerformanceMetricEvent"
+ }
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/helpers.ts",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ }
+ ],
+ "interfaces": [
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent",
+ "type": "Interface",
+ "tags": [],
+ "label": "PerformanceMetricEvent",
+ "description": [
+ "\nStructure of the `metric` event"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent.eventName",
+ "type": "string",
+ "tags": [],
+ "label": "eventName",
+ "description": [
+ "\nThe name of the event that is tracked in the metrics i.e. kibana_loaded, kibana_started"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent.meta",
+ "type": "Object",
+ "tags": [],
+ "label": "meta",
+ "description": [
+ "\nSearchable but not aggregateable metadata relevant to the tracked action."
+ ],
+ "signature": [
+ "Record | undefined"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent.duration",
+ "type": "number",
+ "tags": [
+ "group"
+ ],
+ "label": "duration",
+ "description": [],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent.key1",
+ "type": "string",
+ "tags": [
+ "group"
+ ],
+ "label": "key1",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent.value1",
+ "type": "number",
+ "tags": [
+ "group"
+ ],
+ "label": "value1",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent.key2",
+ "type": "string",
+ "tags": [
+ "group"
+ ],
+ "label": "key2",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent.value2",
+ "type": "number",
+ "tags": [
+ "group"
+ ],
+ "label": "value2",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent.key3",
+ "type": "string",
+ "tags": [
+ "group"
+ ],
+ "label": "key3",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent.value3",
+ "type": "number",
+ "tags": [
+ "group"
+ ],
+ "label": "value3",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent.key4",
+ "type": "string",
+ "tags": [
+ "group"
+ ],
+ "label": "key4",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent.value4",
+ "type": "number",
+ "tags": [
+ "group"
+ ],
+ "label": "value4",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent.key5",
+ "type": "string",
+ "tags": [
+ "group"
+ ],
+ "label": "key5",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/ebt-tools",
+ "id": "def-common.PerformanceMetricEvent.value5",
+ "type": "number",
+ "tags": [
+ "group"
+ ],
+ "label": "value5",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "packages/kbn-ebt-tools/src/performance_metric_events/schema.ts",
+ "deprecated": false
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx
new file mode 100644
index 0000000000000..c60e85cc4a099
--- /dev/null
+++ b/api_docs/kbn_ebt_tools.mdx
@@ -0,0 +1,30 @@
+---
+id: kibKbnEbtToolsPluginApi
+slug: /kibana-dev-docs/api/kbn-ebt-tools
+title: "@kbn/ebt-tools"
+image: https://source.unsplash.com/400x175/?github
+summary: API docs for the @kbn/ebt-tools plugin
+date: 2022-08-08
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools']
+warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
+---
+import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json';
+
+
+
+Contact [Owner missing] for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 19 | 0 | 11 | 0 |
+
+## Common
+
+### Functions
+
+
+### Interfaces
+
+
diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx
index 6b2b4da17a161..a3107704b5139 100644
--- a/api_docs/kbn_es_archiver.mdx
+++ b/api_docs/kbn_es_archiver.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver
title: "@kbn/es-archiver"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/es-archiver plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx
index 6a276ceb384b3..ac749cd05abe2 100644
--- a/api_docs/kbn_es_errors.mdx
+++ b/api_docs/kbn_es_errors.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors
title: "@kbn/es-errors"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/es-errors plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx
index 557dc33c2af02..bf766e1c79cbf 100644
--- a/api_docs/kbn_es_query.mdx
+++ b/api_docs/kbn_es_query.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-query
title: "@kbn/es-query"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/es-query plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx
index 359aed632fe6c..0865db882fafe 100644
--- a/api_docs/kbn_eslint_plugin_imports.mdx
+++ b/api_docs/kbn_eslint_plugin_imports.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports
title: "@kbn/eslint-plugin-imports"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/eslint-plugin-imports plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx
index 2fec873fee110..cab4066790b07 100644
--- a/api_docs/kbn_field_types.mdx
+++ b/api_docs/kbn_field_types.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-field-types
title: "@kbn/field-types"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/field-types plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx
index b92fdac82eff3..f2e06aeb0b43c 100644
--- a/api_docs/kbn_find_used_node_modules.mdx
+++ b/api_docs/kbn_find_used_node_modules.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules
title: "@kbn/find-used-node-modules"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/find-used-node-modules plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx
index 7b4108bb40541..600762dfd3321 100644
--- a/api_docs/kbn_generate.mdx
+++ b/api_docs/kbn_generate.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-generate
title: "@kbn/generate"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/generate plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_get_repo_files.mdx b/api_docs/kbn_get_repo_files.mdx
index e8b977413a8a7..6f3dc4b2ff237 100644
--- a/api_docs/kbn_get_repo_files.mdx
+++ b/api_docs/kbn_get_repo_files.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-get-repo-files
title: "@kbn/get-repo-files"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/get-repo-files plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/get-repo-files']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx
index b466bffda3ab6..f0238094c110b 100644
--- a/api_docs/kbn_handlebars.mdx
+++ b/api_docs/kbn_handlebars.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars
title: "@kbn/handlebars"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/handlebars plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx
index 773b64b425d5b..b88b6ed869d69 100644
--- a/api_docs/kbn_hapi_mocks.mdx
+++ b/api_docs/kbn_hapi_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks
title: "@kbn/hapi-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/hapi-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx
index d2c48ec563309..9f4cf0a9cceec 100644
--- a/api_docs/kbn_home_sample_data_card.mdx
+++ b/api_docs/kbn_home_sample_data_card.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card
title: "@kbn/home-sample-data-card"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/home-sample-data-card plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx
index 769d3e4a41ea4..df7920375764d 100644
--- a/api_docs/kbn_home_sample_data_tab.mdx
+++ b/api_docs/kbn_home_sample_data_tab.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab
title: "@kbn/home-sample-data-tab"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/home-sample-data-tab plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx
index 9c691fa1cc589..a4bb763b8bb27 100644
--- a/api_docs/kbn_i18n.mdx
+++ b/api_docs/kbn_i18n.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-i18n
title: "@kbn/i18n"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/i18n plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx
index b2c3555b5d192..2cb4c592cf5d6 100644
--- a/api_docs/kbn_import_resolver.mdx
+++ b/api_docs/kbn_import_resolver.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver
title: "@kbn/import-resolver"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/import-resolver plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx
index 1df3d25ab7444..c807f19d3ce73 100644
--- a/api_docs/kbn_interpreter.mdx
+++ b/api_docs/kbn_interpreter.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter
title: "@kbn/interpreter"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/interpreter plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx
index d0a900500fa56..72a0349f98591 100644
--- a/api_docs/kbn_io_ts_utils.mdx
+++ b/api_docs/kbn_io_ts_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils
title: "@kbn/io-ts-utils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/io-ts-utils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx
index 4a5036d7f13d2..ef80e776abb49 100644
--- a/api_docs/kbn_jest_serializers.mdx
+++ b/api_docs/kbn_jest_serializers.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers
title: "@kbn/jest-serializers"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/jest-serializers plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_kibana_json_schema.devdocs.json b/api_docs/kbn_kibana_json_schema.devdocs.json
deleted file mode 100644
index 0cc8a1e25feb5..0000000000000
--- a/api_docs/kbn_kibana_json_schema.devdocs.json
+++ /dev/null
@@ -1,844 +0,0 @@
-{
- "id": "@kbn/kibana-json-schema",
- "client": {
- "classes": [],
- "functions": [],
- "interfaces": [],
- "enums": [],
- "misc": [],
- "objects": []
- },
- "server": {
- "classes": [],
- "functions": [],
- "interfaces": [],
- "enums": [],
- "misc": [],
- "objects": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema",
- "type": "Object",
- "tags": [],
- "label": "KibanaJsonSchema",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"object\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.required",
- "type": "Array",
- "tags": [],
- "label": "required",
- "description": [],
- "signature": [
- "string[]"
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties",
- "type": "Object",
- "tags": [],
- "label": "properties",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.id",
- "type": "Object",
- "tags": [],
- "label": "id",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.id.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.id.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"string\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.id.pattern",
- "type": "string",
- "tags": [],
- "label": "pattern",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.version",
- "type": "Object",
- "tags": [],
- "label": "version",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.version.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.version.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"string\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.version.pattern",
- "type": "string",
- "tags": [],
- "label": "pattern",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.kibanaVersion",
- "type": "Object",
- "tags": [],
- "label": "kibanaVersion",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.kibanaVersion.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.kibanaVersion.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"string\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.kibanaVersion.pattern",
- "type": "string",
- "tags": [],
- "label": "pattern",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.type",
- "type": "Object",
- "tags": [],
- "label": "type",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.type.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.type.enum",
- "type": "Array",
- "tags": [],
- "label": "enum",
- "description": [],
- "signature": [
- "string[]"
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.configPath",
- "type": "Object",
- "tags": [],
- "label": "configPath",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.configPath.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.configPath.oneOf",
- "type": "Array",
- "tags": [],
- "label": "oneOf",
- "description": [],
- "signature": [
- "({ type: \"string\"; } | { type: \"array\"; items: { type: \"string\"; }; })[]"
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.requiredPlugins",
- "type": "Object",
- "tags": [],
- "label": "requiredPlugins",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.requiredPlugins.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.requiredPlugins.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"array\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.requiredPlugins.items",
- "type": "Object",
- "tags": [],
- "label": "items",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.requiredPlugins.items.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"string\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.optionalPlugins",
- "type": "Object",
- "tags": [],
- "label": "optionalPlugins",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.optionalPlugins.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.optionalPlugins.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"array\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.optionalPlugins.items",
- "type": "Object",
- "tags": [],
- "label": "items",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.optionalPlugins.items.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"string\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.requiredBundles",
- "type": "Object",
- "tags": [],
- "label": "requiredBundles",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.requiredBundles.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.requiredBundles.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"array\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.requiredBundles.items",
- "type": "Object",
- "tags": [],
- "label": "items",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.requiredBundles.items.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"string\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.ui",
- "type": "Object",
- "tags": [],
- "label": "ui",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.ui.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.ui.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"boolean\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.server",
- "type": "Object",
- "tags": [],
- "label": "server",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.server.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.server.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"boolean\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.extraPublicDirs",
- "type": "Object",
- "tags": [],
- "label": "extraPublicDirs",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.extraPublicDirs.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.extraPublicDirs.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"array\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.extraPublicDirs.items",
- "type": "Object",
- "tags": [],
- "label": "items",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.extraPublicDirs.items.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"string\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.serviceFolders",
- "type": "Object",
- "tags": [],
- "label": "serviceFolders",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.serviceFolders.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.serviceFolders.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"array\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.serviceFolders.items",
- "type": "Object",
- "tags": [],
- "label": "items",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.serviceFolders.items.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"string\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.owner",
- "type": "Object",
- "tags": [],
- "label": "owner",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.owner.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"object\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.owner.required",
- "type": "Array",
- "tags": [],
- "label": "required",
- "description": [],
- "signature": [
- "string[]"
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.owner.properties",
- "type": "Object",
- "tags": [],
- "label": "properties",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.owner.properties.name",
- "type": "Object",
- "tags": [],
- "label": "name",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.owner.properties.name.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.owner.properties.name.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"string\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.owner.properties.githubTeam",
- "type": "Object",
- "tags": [],
- "label": "githubTeam",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.owner.properties.githubTeam.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.owner.properties.githubTeam.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"string\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.description",
- "type": "Object",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.description.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.description.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"string\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.enabledOnAnonymousPages",
- "type": "Object",
- "tags": [],
- "label": "enabledOnAnonymousPages",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.enabledOnAnonymousPages.description",
- "type": "string",
- "tags": [],
- "label": "description",
- "description": [],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- },
- {
- "parentPluginId": "@kbn/kibana-json-schema",
- "id": "def-server.KibanaJsonSchema.properties.enabledOnAnonymousPages.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"boolean\""
- ],
- "path": "packages/kbn-kibana-json-schema/src/kibana_json_schema.ts",
- "deprecated": false
- }
- ]
- }
- ]
- }
- ],
- "initialIsOpen": false
- }
- ]
- },
- "common": {
- "classes": [],
- "functions": [],
- "interfaces": [],
- "enums": [],
- "misc": [],
- "objects": []
- }
-}
\ No newline at end of file
diff --git a/api_docs/kbn_kibana_manifest_parser.devdocs.json b/api_docs/kbn_kibana_manifest_parser.devdocs.json
new file mode 100644
index 0000000000000..69af5a03b1498
--- /dev/null
+++ b/api_docs/kbn_kibana_manifest_parser.devdocs.json
@@ -0,0 +1,167 @@
+{
+ "id": "@kbn/kibana-manifest-parser",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-parser",
+ "id": "def-server.parseKibanaManifest",
+ "type": "Function",
+ "tags": [],
+ "label": "parseKibanaManifest",
+ "description": [
+ "\nParse a kibana.jsonc file from a string"
+ ],
+ "signature": [
+ "(content: string) => ",
+ {
+ "pluginId": "@kbn/kibana-manifest-parser",
+ "scope": "server",
+ "docId": "kibKbnKibanaManifestParserPluginApi",
+ "section": "def-server.KibanaPackageManifest",
+ "text": "KibanaPackageManifest"
+ }
+ ],
+ "path": "packages/kbn-kibana-manifest-parser/src/parse_kibana_manifest.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-parser",
+ "id": "def-server.parseKibanaManifest.$1",
+ "type": "string",
+ "tags": [],
+ "label": "content",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "packages/kbn-kibana-manifest-parser/src/parse_kibana_manifest.ts",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-parser",
+ "id": "def-server.readKibanaManifest",
+ "type": "Function",
+ "tags": [],
+ "label": "readKibanaManifest",
+ "description": [
+ "\nParse a kibana.jsonc file from the filesystem"
+ ],
+ "signature": [
+ "(path: string) => ",
+ {
+ "pluginId": "@kbn/kibana-manifest-parser",
+ "scope": "server",
+ "docId": "kibKbnKibanaManifestParserPluginApi",
+ "section": "def-server.KibanaPackageManifest",
+ "text": "KibanaPackageManifest"
+ }
+ ],
+ "path": "packages/kbn-kibana-manifest-parser/src/parse_kibana_manifest.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-parser",
+ "id": "def-server.readKibanaManifest.$1",
+ "type": "string",
+ "tags": [],
+ "label": "path",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "packages/kbn-kibana-manifest-parser/src/parse_kibana_manifest.ts",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-parser",
+ "id": "def-server.validateKibanaManifest",
+ "type": "Function",
+ "tags": [],
+ "label": "validateKibanaManifest",
+ "description": [
+ "\nValidate the contents of a parsed kibana.jsonc file."
+ ],
+ "signature": [
+ "(parsed: unknown) => ",
+ {
+ "pluginId": "@kbn/kibana-manifest-parser",
+ "scope": "server",
+ "docId": "kibKbnKibanaManifestParserPluginApi",
+ "section": "def-server.KibanaPackageManifest",
+ "text": "KibanaPackageManifest"
+ }
+ ],
+ "path": "packages/kbn-kibana-manifest-parser/src/parse_kibana_manifest.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-parser",
+ "id": "def-server.validateKibanaManifest.$1",
+ "type": "Unknown",
+ "tags": [],
+ "label": "parsed",
+ "description": [],
+ "signature": [
+ "unknown"
+ ],
+ "path": "packages/kbn-kibana-manifest-parser/src/parse_kibana_manifest.ts",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ }
+ ],
+ "interfaces": [],
+ "enums": [],
+ "misc": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-parser",
+ "id": "def-server.KibanaPackageManifest",
+ "type": "Type",
+ "tags": [],
+ "label": "KibanaPackageManifest",
+ "description": [],
+ "signature": [
+ "PluginPackageManifest",
+ " | ",
+ "SharedBrowserPackageManifest",
+ " | ",
+ "BasePackageManifest"
+ ],
+ "path": "packages/kbn-kibana-manifest-parser/src/kibana_manifest.ts",
+ "deprecated": false,
+ "initialIsOpen": false
+ }
+ ],
+ "objects": []
+ },
+ "common": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_kibana_manifest_parser.mdx b/api_docs/kbn_kibana_manifest_parser.mdx
new file mode 100644
index 0000000000000..aca8f6337063e
--- /dev/null
+++ b/api_docs/kbn_kibana_manifest_parser.mdx
@@ -0,0 +1,30 @@
+---
+id: kibKbnKibanaManifestParserPluginApi
+slug: /kibana-dev-docs/api/kbn-kibana-manifest-parser
+title: "@kbn/kibana-manifest-parser"
+image: https://source.unsplash.com/400x175/?github
+summary: API docs for the @kbn/kibana-manifest-parser plugin
+date: 2022-08-08
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-parser']
+warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
+---
+import kbnKibanaManifestParserObj from './kbn_kibana_manifest_parser.devdocs.json';
+
+
+
+Contact [Owner missing] for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 7 | 0 | 4 | 3 |
+
+## Server
+
+### Functions
+
+
+### Consts, variables and types
+
+
diff --git a/api_docs/kbn_kibana_manifest_schema.devdocs.json b/api_docs/kbn_kibana_manifest_schema.devdocs.json
new file mode 100644
index 0000000000000..6f93a8e7f8851
--- /dev/null
+++ b/api_docs/kbn_kibana_manifest_schema.devdocs.json
@@ -0,0 +1,1024 @@
+{
+ "id": "@kbn/kibana-manifest-schema",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1",
+ "type": "Object",
+ "tags": [],
+ "label": "MANIFEST_V1",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.required",
+ "type": "Array",
+ "tags": [],
+ "label": "required",
+ "description": [],
+ "signature": [
+ "string[]"
+ ],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties",
+ "type": "Object",
+ "tags": [],
+ "label": "properties",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.id",
+ "type": "Object",
+ "tags": [],
+ "label": "id",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.id.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.id.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.id.pattern",
+ "type": "string",
+ "tags": [],
+ "label": "pattern",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.version",
+ "type": "Object",
+ "tags": [],
+ "label": "version",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.version.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.version.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.version.pattern",
+ "type": "string",
+ "tags": [],
+ "label": "pattern",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.kibanaVersion",
+ "type": "Object",
+ "tags": [],
+ "label": "kibanaVersion",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.kibanaVersion.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.kibanaVersion.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.kibanaVersion.pattern",
+ "type": "string",
+ "tags": [],
+ "label": "pattern",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.type",
+ "type": "Object",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.type.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.type.enum",
+ "type": "Array",
+ "tags": [],
+ "label": "enum",
+ "description": [],
+ "signature": [
+ "string[]"
+ ],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.configPath",
+ "type": "Object",
+ "tags": [],
+ "label": "configPath",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.configPath.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.configPath.oneOf",
+ "type": "Array",
+ "tags": [],
+ "label": "oneOf",
+ "description": [],
+ "signature": [
+ "({ type: string; } | { type: string; items: { type: string; }; })[]"
+ ],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.requiredPlugins",
+ "type": "Object",
+ "tags": [],
+ "label": "requiredPlugins",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.requiredPlugins.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.requiredPlugins.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.requiredPlugins.items",
+ "type": "Object",
+ "tags": [],
+ "label": "items",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.requiredPlugins.items.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.optionalPlugins",
+ "type": "Object",
+ "tags": [],
+ "label": "optionalPlugins",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.optionalPlugins.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.optionalPlugins.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.optionalPlugins.items",
+ "type": "Object",
+ "tags": [],
+ "label": "items",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.optionalPlugins.items.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.requiredBundles",
+ "type": "Object",
+ "tags": [],
+ "label": "requiredBundles",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.requiredBundles.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.requiredBundles.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.requiredBundles.items",
+ "type": "Object",
+ "tags": [],
+ "label": "items",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.requiredBundles.items.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.ui",
+ "type": "Object",
+ "tags": [],
+ "label": "ui",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.ui.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.ui.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.server",
+ "type": "Object",
+ "tags": [],
+ "label": "server",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.server.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.server.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.extraPublicDirs",
+ "type": "Object",
+ "tags": [],
+ "label": "extraPublicDirs",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.extraPublicDirs.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.extraPublicDirs.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.extraPublicDirs.items",
+ "type": "Object",
+ "tags": [],
+ "label": "items",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.extraPublicDirs.items.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.serviceFolders",
+ "type": "Object",
+ "tags": [],
+ "label": "serviceFolders",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.serviceFolders.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.serviceFolders.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.serviceFolders.items",
+ "type": "Object",
+ "tags": [],
+ "label": "items",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.serviceFolders.items.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.owner",
+ "type": "Object",
+ "tags": [],
+ "label": "owner",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.owner.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.owner.required",
+ "type": "Array",
+ "tags": [],
+ "label": "required",
+ "description": [],
+ "signature": [
+ "string[]"
+ ],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.owner.properties",
+ "type": "Object",
+ "tags": [],
+ "label": "properties",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.owner.properties.name",
+ "type": "Object",
+ "tags": [],
+ "label": "name",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.owner.properties.name.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.owner.properties.name.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.owner.properties.githubTeam",
+ "type": "Object",
+ "tags": [],
+ "label": "githubTeam",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.owner.properties.githubTeam.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.owner.properties.githubTeam.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.description",
+ "type": "Object",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.description.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.description.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.enabledOnAnonymousPages",
+ "type": "Object",
+ "tags": [],
+ "label": "enabledOnAnonymousPages",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.enabledOnAnonymousPages.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V1.properties.enabledOnAnonymousPages.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts",
+ "deprecated": false
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2",
+ "type": "Object",
+ "tags": [],
+ "label": "MANIFEST_V2",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.required",
+ "type": "Array",
+ "tags": [],
+ "label": "required",
+ "description": [],
+ "signature": [
+ "string[]"
+ ],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties",
+ "type": "Object",
+ "tags": [],
+ "label": "properties",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.id",
+ "type": "Object",
+ "tags": [],
+ "label": "id",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.id.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.id.pattern",
+ "type": "string",
+ "tags": [],
+ "label": "pattern",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.owner",
+ "type": "Object",
+ "tags": [],
+ "label": "owner",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.owner.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.owner.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.owner.pattern",
+ "type": "string",
+ "tags": [],
+ "label": "pattern",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.typeDependencies",
+ "type": "Object",
+ "tags": [],
+ "label": "typeDependencies",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.typeDependencies.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.typeDependencies.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.typeDependencies.items",
+ "type": "Object",
+ "tags": [],
+ "label": "items",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.typeDependencies.items.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.runtimeDependencies",
+ "type": "Object",
+ "tags": [],
+ "label": "runtimeDependencies",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.runtimeDependencies.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.runtimeDependencies.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.runtimeDependencies.items",
+ "type": "Object",
+ "tags": [],
+ "label": "items",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.properties.runtimeDependencies.items.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/kibana-manifest-schema",
+ "id": "def-server.MANIFEST_V2.oneOf",
+ "type": "Array",
+ "tags": [],
+ "label": "oneOf",
+ "description": [],
+ "signature": [
+ "({ type: string; properties: { type: { enum: string[]; }; plugin: { type: string; required: string[]; properties: { id: { type: string; pattern: string; }; configPath: { description: string; type: string; items: { type: string; pattern: string; }; }; requiredPlugins: { type: string; items: { type: string; pattern: string; }; }; optionalPlugins: { type: string; items: { type: string; pattern: string; }; }; description: { description: string; type: string; }; enabledOnAnonymousPages: { description: string; type: string; }; serviceFolders: { description: string; type: string; items: { type: string; }; }; }; }; }; } | { type: string; properties: { type: { const: string; }; sharedBrowserBundle: { type: string; description: string; }; }; } | { type: string; properties: { type: { enum: string[]; }; }; })[]"
+ ],
+ "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts",
+ "deprecated": false
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ]
+ },
+ "common": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_kibana_json_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx
similarity index 50%
rename from api_docs/kbn_kibana_json_schema.mdx
rename to api_docs/kbn_kibana_manifest_schema.mdx
index 83953aab2ecfe..9fd9b442a44ec 100644
--- a/api_docs/kbn_kibana_json_schema.mdx
+++ b/api_docs/kbn_kibana_manifest_schema.mdx
@@ -1,14 +1,14 @@
---
-id: kibKbnKibanaJsonSchemaPluginApi
-slug: /kibana-dev-docs/api/kbn-kibana-json-schema
-title: "@kbn/kibana-json-schema"
+id: kibKbnKibanaManifestSchemaPluginApi
+slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema
+title: "@kbn/kibana-manifest-schema"
image: https://source.unsplash.com/400x175/?github
-summary: API docs for the @kbn/kibana-json-schema plugin
-date: 2022-08-03
-tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-json-schema']
+summary: API docs for the @kbn/kibana-manifest-schema plugin
+date: 2022-08-08
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
-import kbnKibanaJsonSchemaObj from './kbn_kibana_json_schema.devdocs.json';
+import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json';
@@ -18,10 +18,10 @@ Contact [Owner missing] for questions regarding this plugin.
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 69 | 0 | 69 | 0 |
+| 91 | 0 | 91 | 0 |
## Server
### Objects
-
+
diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx
index e0ba4e37c3900..dd24a7c53a95a 100644
--- a/api_docs/kbn_logging.mdx
+++ b/api_docs/kbn_logging.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-logging
title: "@kbn/logging"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/logging plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx
index e689e5b7afb7f..93fd455f8626d 100644
--- a/api_docs/kbn_logging_mocks.mdx
+++ b/api_docs/kbn_logging_mocks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks
title: "@kbn/logging-mocks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/logging-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_managed_vscode_config.devdocs.json b/api_docs/kbn_managed_vscode_config.devdocs.json
new file mode 100644
index 0000000000000..8a40ed80ca04a
--- /dev/null
+++ b/api_docs/kbn_managed_vscode_config.devdocs.json
@@ -0,0 +1,130 @@
+{
+ "id": "@kbn/managed-vscode-config",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [
+ {
+ "parentPluginId": "@kbn/managed-vscode-config",
+ "id": "def-server.updateVscodeConfig",
+ "type": "Function",
+ "tags": [],
+ "label": "updateVscodeConfig",
+ "description": [
+ "\nUpdate the settings.json file used by VSCode in the Kibana repository. If the file starts\nwith the comment \"// self managed\" then it is not touched. If a top-level keys is prefixed with\n`// self managed` then all the properties of that setting are left untouched. And finally, if\na specific child property of a setting like `search.exclude` is prefixed with `// self managed`\nthen it is left untouched.\n\nWe don't just use `JSON.parse()` and `JSON.stringify()` in order to support this customization and\nalso to support users using comments in this file, which is very useful for temporarily disabling settings.\n\nAfter the config file is updated it is formatted with prettier.\n"
+ ],
+ "signature": [
+ "(keys: ",
+ "ManagedConfigKey",
+ "[], infoText: string, json: string | undefined) => string"
+ ],
+ "path": "packages/kbn-managed-vscode-config/src/update_vscode_config.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/managed-vscode-config",
+ "id": "def-server.updateVscodeConfig.$1",
+ "type": "Array",
+ "tags": [],
+ "label": "keys",
+ "description": [
+ "The config keys which are managed"
+ ],
+ "signature": [
+ "ManagedConfigKey",
+ "[]"
+ ],
+ "path": "packages/kbn-managed-vscode-config/src/update_vscode_config.ts",
+ "deprecated": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "@kbn/managed-vscode-config",
+ "id": "def-server.updateVscodeConfig.$2",
+ "type": "string",
+ "tags": [],
+ "label": "infoText",
+ "description": [
+ "The text which should be written to the top of the file to educate users how to customize the settings"
+ ],
+ "signature": [
+ "string"
+ ],
+ "path": "packages/kbn-managed-vscode-config/src/update_vscode_config.ts",
+ "deprecated": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "@kbn/managed-vscode-config",
+ "id": "def-server.updateVscodeConfig.$3",
+ "type": "string",
+ "tags": [],
+ "label": "json",
+ "description": [
+ "The settings file as a string"
+ ],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-managed-vscode-config/src/update_vscode_config.ts",
+ "deprecated": false,
+ "isRequired": false
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ }
+ ],
+ "interfaces": [],
+ "enums": [],
+ "misc": [
+ {
+ "parentPluginId": "@kbn/managed-vscode-config",
+ "id": "def-server.MANAGED_CONFIG_FILES",
+ "type": "Array",
+ "tags": [],
+ "label": "MANAGED_CONFIG_FILES",
+ "description": [],
+ "signature": [
+ "{ name: string; content: string; }[]"
+ ],
+ "path": "packages/kbn-managed-vscode-config/src/managed_config_keys.ts",
+ "deprecated": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/managed-vscode-config",
+ "id": "def-server.MANAGED_CONFIG_KEYS",
+ "type": "Array",
+ "tags": [],
+ "label": "MANAGED_CONFIG_KEYS",
+ "description": [
+ "\nDefines the keys which we overrite in user's vscode config for the workspace. We currently\nonly support object values because that's all we needed to support, but support for non object\nvalues should be easy to add."
+ ],
+ "signature": [
+ "ManagedConfigKey",
+ "[]"
+ ],
+ "path": "packages/kbn-managed-vscode-config/src/managed_config_keys.ts",
+ "deprecated": false,
+ "initialIsOpen": false
+ }
+ ],
+ "objects": []
+ },
+ "common": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx
new file mode 100644
index 0000000000000..35339e96006f8
--- /dev/null
+++ b/api_docs/kbn_managed_vscode_config.mdx
@@ -0,0 +1,30 @@
+---
+id: kibKbnManagedVscodeConfigPluginApi
+slug: /kibana-dev-docs/api/kbn-managed-vscode-config
+title: "@kbn/managed-vscode-config"
+image: https://source.unsplash.com/400x175/?github
+summary: API docs for the @kbn/managed-vscode-config plugin
+date: 2022-08-08
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config']
+warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
+---
+import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json';
+
+
+
+Contact [Owner missing] for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 6 | 0 | 1 | 1 |
+
+## Server
+
+### Functions
+
+
+### Consts, variables and types
+
+
diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx
index 32ec13ef17914..26c6934ea668e 100644
--- a/api_docs/kbn_mapbox_gl.mdx
+++ b/api_docs/kbn_mapbox_gl.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl
title: "@kbn/mapbox-gl"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/mapbox-gl plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx
index 6972b3c792329..1e4dfc6e9ae81 100644
--- a/api_docs/kbn_ml_agg_utils.mdx
+++ b/api_docs/kbn_ml_agg_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils
title: "@kbn/ml-agg-utils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/ml-agg-utils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx
index bf322145f5d97..07f41d04f6d6b 100644
--- a/api_docs/kbn_ml_is_populated_object.mdx
+++ b/api_docs/kbn_ml_is_populated_object.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object
title: "@kbn/ml-is-populated-object"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/ml-is-populated-object plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx
index 2fe1937dab8a5..a706b10098cbc 100644
--- a/api_docs/kbn_ml_string_hash.mdx
+++ b/api_docs/kbn_ml_string_hash.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash
title: "@kbn/ml-string-hash"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/ml-string-hash plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx
index 0b88545ae5c1f..030ee367617f5 100644
--- a/api_docs/kbn_monaco.mdx
+++ b/api_docs/kbn_monaco.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-monaco
title: "@kbn/monaco"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/monaco plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx
index 6fc438aef3842..da0b717882761 100644
--- a/api_docs/kbn_optimizer.mdx
+++ b/api_docs/kbn_optimizer.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer
title: "@kbn/optimizer"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/optimizer plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx
index da9a21c3d2a6c..c425df126fff8 100644
--- a/api_docs/kbn_optimizer_webpack_helpers.mdx
+++ b/api_docs/kbn_optimizer_webpack_helpers.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers
title: "@kbn/optimizer-webpack-helpers"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/optimizer-webpack-helpers plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx
index af8c9adcf68f9..3665225852659 100644
--- a/api_docs/kbn_performance_testing_dataset_extractor.mdx
+++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor
title: "@kbn/performance-testing-dataset-extractor"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/performance-testing-dataset-extractor plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx
index dac3bfca7e055..7c126a8137e20 100644
--- a/api_docs/kbn_plugin_generator.mdx
+++ b/api_docs/kbn_plugin_generator.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator
title: "@kbn/plugin-generator"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/plugin-generator plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx
index c031128076226..cdbaccd79fbe0 100644
--- a/api_docs/kbn_plugin_helpers.mdx
+++ b/api_docs/kbn_plugin_helpers.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers
title: "@kbn/plugin-helpers"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/plugin-helpers plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx
index abbc63c896fe0..0dfea2497ac10 100644
--- a/api_docs/kbn_react_field.mdx
+++ b/api_docs/kbn_react_field.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-react-field
title: "@kbn/react-field"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/react-field plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx
index 3c0c18df90330..87b273893a57b 100644
--- a/api_docs/kbn_repo_source_classifier.mdx
+++ b/api_docs/kbn_repo_source_classifier.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier
title: "@kbn/repo-source-classifier"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/repo-source-classifier plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx
index 041c3b1a43118..35058a11e94e1 100644
--- a/api_docs/kbn_rule_data_utils.mdx
+++ b/api_docs/kbn_rule_data_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils
title: "@kbn/rule-data-utils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/rule-data-utils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_scalability_simulation_generator.devdocs.json b/api_docs/kbn_scalability_simulation_generator.devdocs.json
deleted file mode 100644
index e2fef53729609..0000000000000
--- a/api_docs/kbn_scalability_simulation_generator.devdocs.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "id": "@kbn/scalability-simulation-generator",
- "client": {
- "classes": [],
- "functions": [],
- "interfaces": [],
- "enums": [],
- "misc": [],
- "objects": []
- },
- "server": {
- "classes": [],
- "functions": [
- {
- "parentPluginId": "@kbn/scalability-simulation-generator",
- "id": "def-server.generateScalabilitySimulations",
- "type": "Function",
- "tags": [],
- "label": "generateScalabilitySimulations",
- "description": [],
- "signature": [
- "() => Promise"
- ],
- "path": "packages/kbn-scalability-simulation-generator/src/cli.ts",
- "deprecated": false,
- "children": [],
- "returnComment": [],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "@kbn/scalability-simulation-generator",
- "id": "def-server.generator",
- "type": "Function",
- "tags": [],
- "label": "generator",
- "description": [],
- "signature": [
- "({ dir, baseUrl, packageName, log }: ",
- "CLIParams",
- ") => Promise"
- ],
- "path": "packages/kbn-scalability-simulation-generator/src/generate_files.ts",
- "deprecated": false,
- "children": [
- {
- "parentPluginId": "@kbn/scalability-simulation-generator",
- "id": "def-server.generator.$1",
- "type": "Object",
- "tags": [],
- "label": "{ dir, baseUrl, packageName, log }",
- "description": [],
- "signature": [
- "CLIParams"
- ],
- "path": "packages/kbn-scalability-simulation-generator/src/generate_files.ts",
- "deprecated": false,
- "isRequired": true
- }
- ],
- "returnComment": [],
- "initialIsOpen": false
- }
- ],
- "interfaces": [],
- "enums": [],
- "misc": [],
- "objects": []
- },
- "common": {
- "classes": [],
- "functions": [],
- "interfaces": [],
- "enums": [],
- "misc": [],
- "objects": []
- }
-}
\ No newline at end of file
diff --git a/api_docs/kbn_scalability_simulation_generator.mdx b/api_docs/kbn_scalability_simulation_generator.mdx
deleted file mode 100644
index f099bf29646c1..0000000000000
--- a/api_docs/kbn_scalability_simulation_generator.mdx
+++ /dev/null
@@ -1,27 +0,0 @@
----
-id: kibKbnScalabilitySimulationGeneratorPluginApi
-slug: /kibana-dev-docs/api/kbn-scalability-simulation-generator
-title: "@kbn/scalability-simulation-generator"
-image: https://source.unsplash.com/400x175/?github
-summary: API docs for the @kbn/scalability-simulation-generator plugin
-date: 2022-08-03
-tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/scalability-simulation-generator']
-warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
----
-import kbnScalabilitySimulationGeneratorObj from './kbn_scalability_simulation_generator.devdocs.json';
-
-A library to generate scalability benchmarking simulation files from APM traces.
-
-Contact [Owner missing] for questions regarding this plugin.
-
-**Code health stats**
-
-| Public API count | Any count | Items lacking comments | Missing exports |
-|-------------------|-----------|------------------------|-----------------|
-| 3 | 0 | 3 | 1 |
-
-## Server
-
-### Functions
-
-
diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx
index 1612397d0a286..1524979e7f658 100644
--- a/api_docs/kbn_securitysolution_autocomplete.mdx
+++ b/api_docs/kbn_securitysolution_autocomplete.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete
title: "@kbn/securitysolution-autocomplete"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/securitysolution-autocomplete plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx
index 1e4c1029e5c78..c5fffeb1a7a7d 100644
--- a/api_docs/kbn_securitysolution_es_utils.mdx
+++ b/api_docs/kbn_securitysolution_es_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils
title: "@kbn/securitysolution-es-utils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/securitysolution-es-utils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx
index e49b5d189b39e..4d38077a5e0f8 100644
--- a/api_docs/kbn_securitysolution_hook_utils.mdx
+++ b/api_docs/kbn_securitysolution_hook_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils
title: "@kbn/securitysolution-hook-utils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/securitysolution-hook-utils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx
index be7e5479ff367..cfa2f3fa35c3a 100644
--- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx
+++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx
index 43be069053d8f..753b38f87251e 100644
--- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx
+++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/securitysolution-io-ts-list-types plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx
index aa3c9cbfde9db..8b52bb4632100 100644
--- a/api_docs/kbn_securitysolution_io_ts_types.mdx
+++ b/api_docs/kbn_securitysolution_io_ts_types.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types
title: "@kbn/securitysolution-io-ts-types"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/securitysolution-io-ts-types plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx
index bafc1b7611874..0772a1d985707 100644
--- a/api_docs/kbn_securitysolution_io_ts_utils.mdx
+++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils
title: "@kbn/securitysolution-io-ts-utils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/securitysolution-io-ts-utils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx
index e5da490c3aeb3..04cd40dd5a197 100644
--- a/api_docs/kbn_securitysolution_list_api.mdx
+++ b/api_docs/kbn_securitysolution_list_api.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api
title: "@kbn/securitysolution-list-api"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/securitysolution-list-api plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx
index 0e9e291928646..067c5da768ecf 100644
--- a/api_docs/kbn_securitysolution_list_constants.mdx
+++ b/api_docs/kbn_securitysolution_list_constants.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants
title: "@kbn/securitysolution-list-constants"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/securitysolution-list-constants plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx
index 367b5e791da07..b777044322169 100644
--- a/api_docs/kbn_securitysolution_list_hooks.mdx
+++ b/api_docs/kbn_securitysolution_list_hooks.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks
title: "@kbn/securitysolution-list-hooks"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/securitysolution-list-hooks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx
index 706f2d6e8e08b..43b8c84c07c51 100644
--- a/api_docs/kbn_securitysolution_list_utils.mdx
+++ b/api_docs/kbn_securitysolution_list_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils
title: "@kbn/securitysolution-list-utils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/securitysolution-list-utils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx
index f0718fcd501df..2dcccba55cdd2 100644
--- a/api_docs/kbn_securitysolution_rules.mdx
+++ b/api_docs/kbn_securitysolution_rules.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules
title: "@kbn/securitysolution-rules"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/securitysolution-rules plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx
index 4d62e59bf5cd7..d13adf5392eda 100644
--- a/api_docs/kbn_securitysolution_t_grid.mdx
+++ b/api_docs/kbn_securitysolution_t_grid.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid
title: "@kbn/securitysolution-t-grid"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/securitysolution-t-grid plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx
index 72fff1c45738b..885de701a8211 100644
--- a/api_docs/kbn_securitysolution_utils.mdx
+++ b/api_docs/kbn_securitysolution_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils
title: "@kbn/securitysolution-utils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/securitysolution-utils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx
index 5276f235567b7..88603ac5d64b1 100644
--- a/api_docs/kbn_server_http_tools.mdx
+++ b/api_docs/kbn_server_http_tools.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools
title: "@kbn/server-http-tools"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/server-http-tools plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx
index 1151f310a847a..16a8229e33830 100644
--- a/api_docs/kbn_server_route_repository.mdx
+++ b/api_docs/kbn_server_route_repository.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository
title: "@kbn/server-route-repository"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/server-route-repository plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_shared_svg.devdocs.json b/api_docs/kbn_shared_svg.devdocs.json
new file mode 100644
index 0000000000000..264d5fb254209
--- /dev/null
+++ b/api_docs/kbn_shared_svg.devdocs.json
@@ -0,0 +1,50 @@
+{
+ "id": "@kbn/shared-svg",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "common": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [
+ {
+ "parentPluginId": "@kbn/shared-svg",
+ "id": "def-common.content",
+ "type": "string",
+ "tags": [],
+ "label": "content",
+ "description": [],
+ "path": "node_modules/@kbn/ambient-ui-types/index.d.ts",
+ "deprecated": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/shared-svg",
+ "id": "def-common.content",
+ "type": "string",
+ "tags": [],
+ "label": "content",
+ "description": [],
+ "path": "node_modules/@kbn/ambient-ui-types/index.d.ts",
+ "deprecated": false,
+ "initialIsOpen": false
+ }
+ ],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx
new file mode 100644
index 0000000000000..4349736b252e1
--- /dev/null
+++ b/api_docs/kbn_shared_svg.mdx
@@ -0,0 +1,27 @@
+---
+id: kibKbnSharedSvgPluginApi
+slug: /kibana-dev-docs/api/kbn-shared-svg
+title: "@kbn/shared-svg"
+image: https://source.unsplash.com/400x175/?github
+summary: API docs for the @kbn/shared-svg plugin
+date: 2022-08-08
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg']
+warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
+---
+import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json';
+
+
+
+Contact [Owner missing] for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 2 | 0 | 0 | 0 |
+
+## Common
+
+### Consts, variables and types
+
+
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 604ef41cb2743..b32e59b7c2878 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
@@ -4,7 +4,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
summary: API docs for the @kbn/shared-ux-button-exit-full-screen-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx
index cd185fa16b250..080ba411e5867 100644
--- a/api_docs/kbn_shared_ux_button_toolbar.mdx
+++ b/api_docs/kbn_shared_ux_button_toolbar.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar
title: "@kbn/shared-ux-button-toolbar"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/shared-ux-button-toolbar plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx
index 3d928f793ff22..3cb4091cb5142 100644
--- a/api_docs/kbn_shared_ux_card_no_data.mdx
+++ b/api_docs/kbn_shared_ux_card_no_data.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/shared-ux-card-no-data plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
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 ba871afe1166f..86589552d9e82 100644
--- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx
+++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/shared-ux-card-no-data-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_shared_ux_components.mdx b/api_docs/kbn_shared_ux_components.mdx
index 593e709762a78..e6cdab4d9abac 100644
--- a/api_docs/kbn_shared_ux_components.mdx
+++ b/api_docs/kbn_shared_ux_components.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-components
title: "@kbn/shared-ux-components"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/shared-ux-components plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-components']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
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 01245802791e9..dba90d4f832eb 100644
--- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx
+++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
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 5cacff36e009c..faa962efeaad1 100644
--- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx
+++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/shared-ux-page-analytics-no-data plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
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 dab5e6114ccc5..9c68223a23b13 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
@@ -4,7 +4,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
summary: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
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 7ce7b9fce2ffb..ea7223613dbcd 100644
--- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx
+++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/shared-ux-page-kibana-no-data plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
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 b06114dfded4d..f7d4e15b40701 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
@@ -4,7 +4,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
summary: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx
index cf20d260b12a0..888a1132c18ce 100644
--- a/api_docs/kbn_shared_ux_page_solution_nav.mdx
+++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/shared-ux-page-solution-nav plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
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 357a8d91f914a..86e72ceef7f69 100644
--- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx
+++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx
@@ -4,7 +4,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
summary: API docs for the @kbn/shared-ux-prompt-no-data-views plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
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 b632505a8d25e..86029119d6a48 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
@@ -4,7 +4,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
summary: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_shared_ux_services.mdx b/api_docs/kbn_shared_ux_services.mdx
index 394dd12bbecb9..de7fc465bfc3a 100644
--- a/api_docs/kbn_shared_ux_services.mdx
+++ b/api_docs/kbn_shared_ux_services.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-services
title: "@kbn/shared-ux-services"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/shared-ux-services plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-services']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_shared_ux_storybook.mdx b/api_docs/kbn_shared_ux_storybook.mdx
index 7cd8bf637738d..d2920bae12110 100644
--- a/api_docs/kbn_shared_ux_storybook.mdx
+++ b/api_docs/kbn_shared_ux_storybook.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook
title: "@kbn/shared-ux-storybook"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/shared-ux-storybook plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx
index 58f4c124fee17..22f76b2c4a1ee 100644
--- a/api_docs/kbn_shared_ux_storybook_mock.mdx
+++ b/api_docs/kbn_shared_ux_storybook_mock.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock
title: "@kbn/shared-ux-storybook-mock"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/shared-ux-storybook-mock plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx
index 8fe615f189494..0a7df2085d99b 100644
--- a/api_docs/kbn_shared_ux_utility.mdx
+++ b/api_docs/kbn_shared_ux_utility.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility
title: "@kbn/shared-ux-utility"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/shared-ux-utility plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx
index ca728e5a9d31f..8cf128f2dd76d 100644
--- a/api_docs/kbn_some_dev_log.mdx
+++ b/api_docs/kbn_some_dev_log.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log
title: "@kbn/some-dev-log"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/some-dev-log plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_sort_package_json.mdx b/api_docs/kbn_sort_package_json.mdx
index 8e4e5a3e975f1..a16656e0b3525 100644
--- a/api_docs/kbn_sort_package_json.mdx
+++ b/api_docs/kbn_sort_package_json.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-sort-package-json
title: "@kbn/sort-package-json"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/sort-package-json plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-package-json']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx
index 5a9aa4302d18a..7db268d57d2b0 100644
--- a/api_docs/kbn_std.mdx
+++ b/api_docs/kbn_std.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-std
title: "@kbn/std"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/std plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx
index af5ddf99f6290..e7018eae50eb5 100644
--- a/api_docs/kbn_stdio_dev_helpers.mdx
+++ b/api_docs/kbn_stdio_dev_helpers.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers
title: "@kbn/stdio-dev-helpers"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/stdio-dev-helpers plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx
index e88a366eed917..76bee02c28b90 100644
--- a/api_docs/kbn_storybook.mdx
+++ b/api_docs/kbn_storybook.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-storybook
title: "@kbn/storybook"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/storybook plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx
index 48281d80cb61c..c3cb55c301c3a 100644
--- a/api_docs/kbn_telemetry_tools.mdx
+++ b/api_docs/kbn_telemetry_tools.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools
title: "@kbn/telemetry-tools"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/telemetry-tools plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx
index 1030e6905f9ef..ca0f3e4401e79 100644
--- a/api_docs/kbn_test.mdx
+++ b/api_docs/kbn_test.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-test
title: "@kbn/test"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/test plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx
index 5d702dd4cb952..879217657c2c9 100644
--- a/api_docs/kbn_test_jest_helpers.mdx
+++ b/api_docs/kbn_test_jest_helpers.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers
title: "@kbn/test-jest-helpers"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/test-jest-helpers plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx
index ed2d73b1766de..ad96e87f675fe 100644
--- a/api_docs/kbn_tooling_log.mdx
+++ b/api_docs/kbn_tooling_log.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log
title: "@kbn/tooling-log"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/tooling-log plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_type_summarizer.mdx b/api_docs/kbn_type_summarizer.mdx
index a5c6be055b4ed..c2d0c179ebb3b 100644
--- a/api_docs/kbn_type_summarizer.mdx
+++ b/api_docs/kbn_type_summarizer.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer
title: "@kbn/type-summarizer"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/type-summarizer plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_type_summarizer_core.mdx b/api_docs/kbn_type_summarizer_core.mdx
index ab4bc6232e840..92676ede7f1ce 100644
--- a/api_docs/kbn_type_summarizer_core.mdx
+++ b/api_docs/kbn_type_summarizer_core.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer-core
title: "@kbn/type-summarizer-core"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/type-summarizer-core plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer-core']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx
index 6caf18c0f4170..7ab8071ab1924 100644
--- a/api_docs/kbn_typed_react_router_config.mdx
+++ b/api_docs/kbn_typed_react_router_config.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config
title: "@kbn/typed-react-router-config"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/typed-react-router-config plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx
index 6a206384dd6f0..d6381bf0fd24d 100644
--- a/api_docs/kbn_ui_theme.mdx
+++ b/api_docs/kbn_ui_theme.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme
title: "@kbn/ui-theme"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/ui-theme plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_user_profile_components.devdocs.json b/api_docs/kbn_user_profile_components.devdocs.json
new file mode 100644
index 0000000000000..cf2e0482a54cc
--- /dev/null
+++ b/api_docs/kbn_user_profile_components.devdocs.json
@@ -0,0 +1,805 @@
+{
+ "id": "@kbn/user-profile-components",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "common": {
+ "classes": [],
+ "functions": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserAvatar",
+ "type": "Function",
+ "tags": [],
+ "label": "UserAvatar",
+ "description": [
+ "\nRenders an avatar given a user profile"
+ ],
+ "signature": [
+ "({ user, avatar, ...rest }: React.PropsWithChildren<",
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserAvatarProps",
+ "text": "UserAvatarProps"
+ },
+ ">) => JSX.Element"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_avatar.tsx",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserAvatar.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "{ user, avatar, ...rest }",
+ "description": [],
+ "signature": [
+ "React.PropsWithChildren<",
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserAvatarProps",
+ "text": "UserAvatarProps"
+ },
+ ">"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_avatar.tsx",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesPopover",
+ "type": "Function",
+ "tags": [],
+ "label": "UserProfilesPopover",
+ "description": [
+ "\nRenders a selectable component inside a popover given a list of user profiles"
+ ],
+ "signature": [
+ "({ title, selectableProps, ...popoverProps }: React.PropsWithChildren<",
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfilesPopoverProps",
+ "text": "UserProfilesPopoverProps"
+ },
+ ">) => JSX.Element"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_popover.tsx",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesPopover.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "{\n title,\n selectableProps,\n ...popoverProps\n}",
+ "description": [],
+ "signature": [
+ "React.PropsWithChildren<",
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfilesPopoverProps",
+ "text": "UserProfilesPopoverProps"
+ },
+ ">"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_popover.tsx",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectable",
+ "type": "Function",
+ "tags": [],
+ "label": "UserProfilesSelectable",
+ "description": [
+ "\nRenders a selectable component given a list of user profiles"
+ ],
+ "signature": [
+ "({ selectedOptions, defaultOptions, options, onChange, onSearchChange, isLoading, singleSelection, height, loadingMessage, noMatchesMessage, emptyMessage, errorMessage, searchPlaceholder, selectedStatusMessage, clearButtonLabel, }: React.PropsWithChildren<",
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfilesSelectableProps",
+ "text": "UserProfilesSelectableProps"
+ },
+ ">) => JSX.Element"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectable.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "{\n selectedOptions,\n defaultOptions,\n options,\n onChange,\n onSearchChange,\n isLoading = false,\n singleSelection = false,\n height,\n loadingMessage,\n noMatchesMessage,\n emptyMessage,\n errorMessage,\n searchPlaceholder,\n selectedStatusMessage,\n clearButtonLabel,\n}",
+ "description": [],
+ "signature": [
+ "React.PropsWithChildren<",
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfilesSelectableProps",
+ "text": "UserProfilesSelectableProps"
+ },
+ ">"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ }
+ ],
+ "interfaces": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserAvatarProps",
+ "type": "Interface",
+ "tags": [],
+ "label": "UserAvatarProps",
+ "description": [
+ "\nProps of {@link UserAvatar} component"
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserAvatarProps",
+ "text": "UserAvatarProps"
+ },
+ " extends Omit<",
+ "EuiAvatarProps",
+ ", \"type\" | \"color\" | \"name\" | \"iconColor\" | \"iconType\" | \"iconSize\" | \"initials\" | \"initialsLength\" | \"imageUrl\">"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_avatar.tsx",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserAvatarProps.user",
+ "type": "Object",
+ "tags": [],
+ "label": "user",
+ "description": [
+ "\nUser to be rendered"
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfileUserInfo",
+ "text": "UserProfileUserInfo"
+ },
+ " | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_avatar.tsx",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserAvatarProps.avatar",
+ "type": "Object",
+ "tags": [],
+ "label": "avatar",
+ "description": [
+ "\nAvatar data of user to be rendered"
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfileAvatarData",
+ "text": "UserProfileAvatarData"
+ },
+ " | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_avatar.tsx",
+ "deprecated": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfile",
+ "type": "Interface",
+ "tags": [],
+ "label": "UserProfile",
+ "description": [
+ "\nIMPORTANT:\n\nThe types in this file have been imported from\n`x-pack/plugins/security/common/model/user_profile.ts`\n\nWhen making changes please ensure to keep both files in sync.\n\nDescribes basic properties stored in user profile."
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfile",
+ "text": "UserProfile"
+ },
+ ""
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profile.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfile.uid",
+ "type": "string",
+ "tags": [],
+ "label": "uid",
+ "description": [
+ "\nUnique ID for of the user profile."
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profile.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfile.user",
+ "type": "Object",
+ "tags": [],
+ "label": "user",
+ "description": [
+ "\nInformation about the user that owns profile."
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfileUserInfo",
+ "text": "UserProfileUserInfo"
+ }
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profile.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfile.data",
+ "type": "Object",
+ "tags": [],
+ "label": "data",
+ "description": [
+ "\nUser specific data associated with the profile."
+ ],
+ "signature": [
+ "{ [P in keyof D]?: D[P] | undefined; }"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profile.ts",
+ "deprecated": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfileAvatarData",
+ "type": "Interface",
+ "tags": [],
+ "label": "UserProfileAvatarData",
+ "description": [
+ "\nAvatar stored in user profile."
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profile.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfileAvatarData.initials",
+ "type": "string",
+ "tags": [],
+ "label": "initials",
+ "description": [
+ "\nOptional initials (two letters) of the user to use as avatar if avatar picture isn't specified."
+ ],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profile.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfileAvatarData.color",
+ "type": "string",
+ "tags": [],
+ "label": "color",
+ "description": [
+ "\nBackground color of the avatar when initials are used."
+ ],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profile.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfileAvatarData.imageUrl",
+ "type": "string",
+ "tags": [],
+ "label": "imageUrl",
+ "description": [
+ "\nBase64 data URL for the user avatar image."
+ ],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profile.ts",
+ "deprecated": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesPopoverProps",
+ "type": "Interface",
+ "tags": [],
+ "label": "UserProfilesPopoverProps",
+ "description": [
+ "\nProps of {@link UserProfilesPopover} component"
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfilesPopoverProps",
+ "text": "UserProfilesPopoverProps"
+ },
+ " extends ",
+ "EuiPopoverProps"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_popover.tsx",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesPopoverProps.title",
+ "type": "CompoundType",
+ "tags": [
+ "see"
+ ],
+ "label": "title",
+ "description": [
+ "\nTitle of the popover"
+ ],
+ "signature": [
+ "boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_popover.tsx",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesPopoverProps.selectableProps",
+ "type": "Object",
+ "tags": [
+ "see"
+ ],
+ "label": "selectableProps",
+ "description": [
+ "\nProps forwarded to selectable component"
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfilesSelectableProps",
+ "text": "UserProfilesSelectableProps"
+ }
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_popover.tsx",
+ "deprecated": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectableProps",
+ "type": "Interface",
+ "tags": [],
+ "label": "UserProfilesSelectableProps",
+ "description": [
+ "\nProps of {@link UserProfilesSelectable} component"
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfilesSelectableProps",
+ "text": "UserProfilesSelectableProps"
+ },
+ " extends Pick<",
+ "EuiSelectableProps",
+ "<{}>, \"height\" | \"errorMessage\" | \"singleSelection\" | \"loadingMessage\" | \"noMatchesMessage\" | \"emptyMessage\">"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectableProps.defaultOptions",
+ "type": "Array",
+ "tags": [],
+ "label": "defaultOptions",
+ "description": [
+ "\nList of users to be rendered as suggestions."
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfileWithAvatar",
+ "text": "UserProfileWithAvatar"
+ },
+ "[] | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectableProps.selectedOptions",
+ "type": "Array",
+ "tags": [],
+ "label": "selectedOptions",
+ "description": [
+ "\nList of selected users."
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfileWithAvatar",
+ "text": "UserProfileWithAvatar"
+ },
+ "[] | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectableProps.options",
+ "type": "Array",
+ "tags": [],
+ "label": "options",
+ "description": [
+ "\nList of users from search results. Should be updated based on the search term provided by `onSearchChange` callback."
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfileWithAvatar",
+ "text": "UserProfileWithAvatar"
+ },
+ "[] | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectableProps.onChange",
+ "type": "Function",
+ "tags": [],
+ "label": "onChange",
+ "description": [
+ "\nPasses back the list of selected users."
+ ],
+ "signature": [
+ "((options: ",
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfileWithAvatar",
+ "text": "UserProfileWithAvatar"
+ },
+ "[]) => void) | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectableProps.onChange.$1",
+ "type": "Array",
+ "tags": [],
+ "label": "options",
+ "description": [
+ "List of selected users"
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfileWithAvatar",
+ "text": "UserProfileWithAvatar"
+ },
+ "[]"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectableProps.onSearchChange",
+ "type": "Function",
+ "tags": [],
+ "label": "onSearchChange",
+ "description": [
+ "\nPasses back the search term."
+ ],
+ "signature": [
+ "((searchTerm: string) => void) | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectableProps.onSearchChange.$1",
+ "type": "string",
+ "tags": [],
+ "label": "searchTerm",
+ "description": [
+ "Search term"
+ ],
+ "signature": [
+ "string"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectableProps.isLoading",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "isLoading",
+ "description": [
+ "\nLoading indicator for asynchronous search operations."
+ ],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectableProps.searchPlaceholder",
+ "type": "string",
+ "tags": [],
+ "label": "searchPlaceholder",
+ "description": [
+ "\nPlaceholder text for search box."
+ ],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectableProps.selectedStatusMessage",
+ "type": "Function",
+ "tags": [],
+ "label": "selectedStatusMessage",
+ "description": [
+ "\nReturns text for selected status."
+ ],
+ "signature": [
+ "((selectedCount: number) => React.ReactNode) | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectableProps.selectedStatusMessage.$1",
+ "type": "number",
+ "tags": [],
+ "label": "selectedCount",
+ "description": [
+ "Number of selected users"
+ ],
+ "signature": [
+ "number"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfilesSelectableProps.clearButtonLabel",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "clearButtonLabel",
+ "description": [
+ "\nText for label of clear button."
+ ],
+ "signature": [
+ "boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profiles_selectable.tsx",
+ "deprecated": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfileUserInfo",
+ "type": "Interface",
+ "tags": [],
+ "label": "UserProfileUserInfo",
+ "description": [
+ "\nBasic user information returned in user profile."
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profile.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfileUserInfo.username",
+ "type": "string",
+ "tags": [],
+ "label": "username",
+ "description": [
+ "\nUsername of the user."
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profile.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfileUserInfo.email",
+ "type": "string",
+ "tags": [],
+ "label": "email",
+ "description": [
+ "\nOptional email of the user."
+ ],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profile.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfileUserInfo.full_name",
+ "type": "string",
+ "tags": [],
+ "label": "full_name",
+ "description": [
+ "\nOptional full name of the user."
+ ],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profile.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfileUserInfo.display_name",
+ "type": "string",
+ "tags": [],
+ "label": "display_name",
+ "description": [
+ "\nOptional display name of the user."
+ ],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_profile.ts",
+ "deprecated": false
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "enums": [],
+ "misc": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserProfileWithAvatar",
+ "type": "Type",
+ "tags": [],
+ "label": "UserProfileWithAvatar",
+ "description": [
+ "\nConvenience type for a {@link UserProfile} with avatar data"
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfile",
+ "text": "UserProfile"
+ },
+ "<{ avatar?: ",
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserProfileAvatarData",
+ "text": "UserProfileAvatarData"
+ },
+ " | undefined; }>"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_avatar.tsx",
+ "deprecated": false,
+ "initialIsOpen": false
+ }
+ ],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx
new file mode 100644
index 0000000000000..6b241c74faec3
--- /dev/null
+++ b/api_docs/kbn_user_profile_components.mdx
@@ -0,0 +1,33 @@
+---
+id: kibKbnUserProfileComponentsPluginApi
+slug: /kibana-dev-docs/api/kbn-user-profile-components
+title: "@kbn/user-profile-components"
+image: https://source.unsplash.com/400x175/?github
+summary: API docs for the @kbn/user-profile-components plugin
+date: 2022-08-08
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components']
+warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
+---
+import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json';
+
+
+
+Contact [Owner missing] for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 39 | 0 | 3 | 0 |
+
+## Common
+
+### Functions
+
+
+### Interfaces
+
+
+### Consts, variables and types
+
+
diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx
index 05cce1bcc32ff..5a4b4a905b479 100644
--- a/api_docs/kbn_utility_types.mdx
+++ b/api_docs/kbn_utility_types.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types
title: "@kbn/utility-types"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/utility-types plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx
index 1ceaa666f67a8..76fc0a8449fdb 100644
--- a/api_docs/kbn_utility_types_jest.mdx
+++ b/api_docs/kbn_utility_types_jest.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest
title: "@kbn/utility-types-jest"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/utility-types-jest plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx
index bbd59ac0847a0..04d581660d6c5 100644
--- a/api_docs/kbn_utils.mdx
+++ b/api_docs/kbn_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utils
title: "@kbn/utils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/utils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx
index e81df082b4ba3..0c35776cf6638 100644
--- a/api_docs/kbn_yarn_lock_validator.mdx
+++ b/api_docs/kbn_yarn_lock_validator.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator
title: "@kbn/yarn-lock-validator"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the @kbn/yarn-lock-validator plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx
index 1009b34616b9d..aaa17e38ad8ea 100644
--- a/api_docs/kibana_overview.mdx
+++ b/api_docs/kibana_overview.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaOverview
title: "kibanaOverview"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the kibanaOverview plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kibana_react.devdocs.json b/api_docs/kibana_react.devdocs.json
index d0fe7574aed78..5bd2da953db8b 100644
--- a/api_docs/kibana_react.devdocs.json
+++ b/api_docs/kibana_react.devdocs.json
@@ -4115,13 +4115,7 @@
" | undefined; http?: ",
"HttpSetup",
" | undefined; savedObjects?: ",
- {
- "pluginId": "core",
- "scope": "public",
- "docId": "kibCoreSavedObjectsPluginApi",
- "section": "def-public.SavedObjectsStart",
- "text": "SavedObjectsStart"
- },
+ "SavedObjectsStart",
" | undefined; i18n?: ",
"I18nStart",
" | undefined; notifications?: ",
diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx
index d9f3423b3d556..40c0c4c0878bc 100644
--- a/api_docs/kibana_react.mdx
+++ b/api_docs/kibana_react.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaReact
title: "kibanaReact"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the kibanaReact plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx
index 304f60affdc07..1309c3a0dac66 100644
--- a/api_docs/kibana_utils.mdx
+++ b/api_docs/kibana_utils.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaUtils
title: "kibanaUtils"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the kibanaUtils plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx
index 1d3408efebcbd..a5292a5795ac3 100644
--- a/api_docs/kubernetes_security.mdx
+++ b/api_docs/kubernetes_security.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity
title: "kubernetesSecurity"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the kubernetesSecurity plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/lens.devdocs.json b/api_docs/lens.devdocs.json
index a969b7b0a2c2a..43917b42f5d61 100644
--- a/api_docs/lens.devdocs.json
+++ b/api_docs/lens.devdocs.json
@@ -1462,7 +1462,7 @@
"tags": [],
"label": "DatatableVisualizationState",
"description": [],
- "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx",
+ "path": "x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx",
"deprecated": false,
"children": [
{
@@ -1476,7 +1476,7 @@
"ColumnState",
"[]"
],
- "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx",
+ "path": "x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx",
"deprecated": false
},
{
@@ -1486,7 +1486,7 @@
"tags": [],
"label": "layerId",
"description": [],
- "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx",
+ "path": "x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx",
"deprecated": false
},
{
@@ -1499,7 +1499,7 @@
"signature": [
"\"data\" | \"referenceLine\" | \"annotations\""
],
- "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx",
+ "path": "x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx",
"deprecated": false
},
{
@@ -1513,7 +1513,7 @@
"SortingState",
" | undefined"
],
- "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx",
+ "path": "x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx",
"deprecated": false
},
{
@@ -1526,7 +1526,7 @@
"signature": [
"\"auto\" | \"custom\" | \"single\" | undefined"
],
- "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx",
+ "path": "x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx",
"deprecated": false
},
{
@@ -1539,7 +1539,7 @@
"signature": [
"\"auto\" | \"custom\" | \"single\" | undefined"
],
- "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx",
+ "path": "x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx",
"deprecated": false
},
{
@@ -1552,7 +1552,7 @@
"signature": [
"number | undefined"
],
- "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx",
+ "path": "x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx",
"deprecated": false
},
{
@@ -1565,7 +1565,7 @@
"signature": [
"number | undefined"
],
- "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx",
+ "path": "x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx",
"deprecated": false
},
{
@@ -1579,7 +1579,7 @@
"PagingState",
" | undefined"
],
- "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx",
+ "path": "x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx",
"deprecated": false
}
],
@@ -4835,6 +4835,55 @@
],
"returnComment": []
},
+ {
+ "parentPluginId": "lens",
+ "id": "def-public.Visualization.renderDimensionEditorAdditionalSection",
+ "type": "Function",
+ "tags": [],
+ "label": "renderDimensionEditorAdditionalSection",
+ "description": [
+ "\nAdditional editor that gets rendered inside the dimension popover.\nThis can be used to configure dimension-specific options"
+ ],
+ "signature": [
+ "((domElement: Element, props: ",
+ "VisualizationDimensionEditorProps",
+ ") => void | ((cleanupElement: Element) => void)) | undefined"
+ ],
+ "path": "x-pack/plugins/lens/public/types.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "lens",
+ "id": "def-public.Visualization.renderDimensionEditorAdditionalSection.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "domElement",
+ "description": [],
+ "signature": [
+ "Element"
+ ],
+ "path": "x-pack/plugins/lens/public/types.ts",
+ "deprecated": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "lens",
+ "id": "def-public.Visualization.renderDimensionEditorAdditionalSection.$2",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "VisualizationDimensionEditorProps",
+ ""
+ ],
+ "path": "x-pack/plugins/lens/public/types.ts",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
{
"parentPluginId": "lens",
"id": "def-public.Visualization.renderDimensionTrigger",
@@ -5476,7 +5525,7 @@
"tags": [],
"label": "XYAnnotationLayerConfig",
"description": [],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false,
"children": [
{
@@ -5486,7 +5535,7 @@
"tags": [],
"label": "layerId",
"description": [],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -5499,7 +5548,7 @@
"signature": [
"\"annotations\""
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -5519,7 +5568,7 @@
},
"[]"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -5532,7 +5581,7 @@
"signature": [
"boolean | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
}
],
@@ -5944,7 +5993,7 @@
"tags": [],
"label": "XYDataLayerConfig",
"description": [],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false,
"children": [
{
@@ -5954,7 +6003,7 @@
"tags": [],
"label": "layerId",
"description": [],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -5967,7 +6016,7 @@
"signature": [
"string[]"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -5980,7 +6029,7 @@
"signature": [
"\"data\""
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -5993,7 +6042,7 @@
"signature": [
"\"bar\" | \"line\" | \"area\" | \"bar_stacked\" | \"area_stacked\" | \"bar_horizontal\" | \"bar_percentage_stacked\" | \"bar_horizontal_stacked\" | \"area_percentage_stacked\" | \"bar_horizontal_percentage_stacked\""
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6006,7 +6055,7 @@
"signature": [
"string | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6019,7 +6068,7 @@
"signature": [
"boolean | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6039,7 +6088,7 @@
},
"[] | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6052,7 +6101,7 @@
"signature": [
"string | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6066,7 +6115,7 @@
"PaletteOutput",
"<{ [key: string]: unknown; }> | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6079,7 +6128,7 @@
"signature": [
"string | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6099,7 +6148,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6112,7 +6161,7 @@
"signature": [
"boolean | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6125,7 +6174,7 @@
"signature": [
"string | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
}
],
@@ -6138,7 +6187,7 @@
"tags": [],
"label": "XYReferenceLineLayerConfig",
"description": [],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false,
"children": [
{
@@ -6148,7 +6197,7 @@
"tags": [],
"label": "layerId",
"description": [],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6161,7 +6210,7 @@
"signature": [
"string[]"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6181,7 +6230,7 @@
},
"[] | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6194,7 +6243,7 @@
"signature": [
"\"referenceLine\""
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
}
],
@@ -6265,7 +6314,7 @@
"tags": [],
"label": "XYState",
"description": [],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false,
"children": [
{
@@ -6278,7 +6327,7 @@
"signature": [
"\"bar\" | \"line\" | \"area\" | \"bar_stacked\" | \"area_stacked\" | \"bar_horizontal\" | \"bar_percentage_stacked\" | \"bar_horizontal_stacked\" | \"area_percentage_stacked\" | \"bar_horizontal_percentage_stacked\""
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6297,7 +6346,7 @@
"text": "LegendConfig"
}
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6317,7 +6366,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6337,7 +6386,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6350,7 +6399,7 @@
"signature": [
"boolean | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6370,7 +6419,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6390,7 +6439,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6410,7 +6459,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6430,7 +6479,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6450,7 +6499,7 @@
},
"[]"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6463,7 +6512,7 @@
"signature": [
"string | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6476,7 +6525,7 @@
"signature": [
"string | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6489,7 +6538,7 @@
"signature": [
"string | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6509,7 +6558,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6529,7 +6578,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6549,7 +6598,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6569,7 +6618,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6589,7 +6638,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6603,7 +6652,7 @@
"LabelsOrientationConfig",
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6623,7 +6672,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6636,7 +6685,7 @@
"signature": [
"number | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6649,7 +6698,7 @@
"signature": [
"boolean | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6662,7 +6711,7 @@
"signature": [
"boolean | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
}
],
@@ -6675,7 +6724,7 @@
"tags": [],
"label": "YConfig",
"description": [],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false,
"children": [
{
@@ -6685,7 +6734,7 @@
"tags": [],
"label": "forAccessor",
"description": [],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6698,7 +6747,7 @@
"signature": [
"string | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6711,7 +6760,7 @@
"signature": [
"string | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6724,7 +6773,7 @@
"signature": [
"number | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6744,7 +6793,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6764,7 +6813,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6784,7 +6833,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6797,7 +6846,7 @@
"signature": [
"boolean | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
},
{
@@ -6817,7 +6866,7 @@
},
" | undefined"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false
}
],
@@ -7147,7 +7196,7 @@
"Palette",
" | undefined; }"
],
- "path": "x-pack/plugins/lens/public/heatmap_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/heatmap/types.ts",
"deprecated": false,
"initialIsOpen": false
},
@@ -7468,7 +7517,7 @@
"signature": [
"\"bar\" | \"line\" | \"area\" | \"bar_stacked\" | \"area_stacked\" | \"bar_horizontal\" | \"bar_percentage_stacked\" | \"bar_horizontal_stacked\" | \"area_percentage_stacked\" | \"bar_horizontal_percentage_stacked\""
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false,
"initialIsOpen": false
},
@@ -7619,7 +7668,7 @@
" | ",
"ValidXYDataLayerConfig"
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false,
"initialIsOpen": false
},
@@ -7711,7 +7760,7 @@
"text": "XYAnnotationLayerConfig"
}
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false,
"initialIsOpen": false
},
@@ -7725,7 +7774,7 @@
"signature": [
"\"auto\" | \"bottom\" | \"left\" | \"right\""
],
- "path": "x-pack/plugins/lens/public/xy_visualization/types.ts",
+ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts",
"deprecated": false,
"initialIsOpen": false
},
diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx
index 971afc3611c60..52eab12f1013c 100644
--- a/api_docs/lens.mdx
+++ b/api_docs/lens.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/lens
title: "lens"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the lens plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors)
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 608 | 0 | 527 | 41 |
+| 611 | 0 | 529 | 41 |
## Client
diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx
index 3223c14e9a215..fbb92e3f8e713 100644
--- a/api_docs/license_api_guard.mdx
+++ b/api_docs/license_api_guard.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard
title: "licenseApiGuard"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the licenseApiGuard plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx
index 2028991f01f26..3398861d93ff8 100644
--- a/api_docs/license_management.mdx
+++ b/api_docs/license_management.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licenseManagement
title: "licenseManagement"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the licenseManagement plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx
index e0ecf8de4211d..5d9b64f51f639 100644
--- a/api_docs/licensing.mdx
+++ b/api_docs/licensing.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licensing
title: "licensing"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the licensing plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx
index 0b7c4e2db03c3..8dc7ca9f50ce3 100644
--- a/api_docs/lists.mdx
+++ b/api_docs/lists.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/lists
title: "lists"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the lists plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/management.mdx b/api_docs/management.mdx
index f0a9d4451dc35..7c8ca9a1a08b0 100644
--- a/api_docs/management.mdx
+++ b/api_docs/management.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/management
title: "management"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the management plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx
index ca8e73ea737ce..114b485e012cb 100644
--- a/api_docs/maps.mdx
+++ b/api_docs/maps.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/maps
title: "maps"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the maps plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx
index 81cd2dac3f1c2..294d2f1792512 100644
--- a/api_docs/maps_ems.mdx
+++ b/api_docs/maps_ems.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/mapsEms
title: "mapsEms"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the mapsEms plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx
index 30ea2ec88d359..d5f315b7db65b 100644
--- a/api_docs/ml.mdx
+++ b/api_docs/ml.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ml
title: "ml"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the ml plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx
index f76fa7c3e730f..02bec40051aa4 100644
--- a/api_docs/monitoring.mdx
+++ b/api_docs/monitoring.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/monitoring
title: "monitoring"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the monitoring plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx
index 796ecabb52f32..1d220a82f6cd2 100644
--- a/api_docs/monitoring_collection.mdx
+++ b/api_docs/monitoring_collection.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/monitoringCollection
title: "monitoringCollection"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the monitoringCollection plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx
index 4a5b113af6cf5..b1d62a1f229ed 100644
--- a/api_docs/navigation.mdx
+++ b/api_docs/navigation.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/navigation
title: "navigation"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the navigation plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx
index ea4feaeb25ce2..c6ce9d60ae123 100644
--- a/api_docs/newsfeed.mdx
+++ b/api_docs/newsfeed.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/newsfeed
title: "newsfeed"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the newsfeed plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json
index 45b7a6ff1d098..ec992224fa207 100644
--- a/api_docs/observability.devdocs.json
+++ b/api_docs/observability.devdocs.json
@@ -3473,6 +3473,25 @@
],
"path": "x-pack/plugins/observability/public/plugin.ts",
"deprecated": false
+ },
+ {
+ "parentPluginId": "observability",
+ "id": "def-public.ObservabilityPublicPluginsStart.security",
+ "type": "Object",
+ "tags": [],
+ "label": "security",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "security",
+ "scope": "public",
+ "docId": "kibSecurityPluginApi",
+ "section": "def-public.SecurityPluginStart",
+ "text": "SecurityPluginStart"
+ }
+ ],
+ "path": "x-pack/plugins/observability/public/plugin.ts",
+ "deprecated": false
}
],
"initialIsOpen": false
@@ -3924,7 +3943,13 @@
"label": "filters",
"description": [],
"signature": [
- "UrlFilter",
+ {
+ "pluginId": "observability",
+ "scope": "public",
+ "docId": "kibObservabilityPluginApi",
+ "section": "def-public.UrlFilter",
+ "text": "UrlFilter"
+ },
"[] | undefined"
],
"path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts",
@@ -4231,6 +4256,81 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "observability",
+ "id": "def-public.UrlFilter",
+ "type": "Interface",
+ "tags": [],
+ "label": "UrlFilter",
+ "description": [],
+ "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "observability",
+ "id": "def-public.UrlFilter.field",
+ "type": "string",
+ "tags": [],
+ "label": "field",
+ "description": [],
+ "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "observability",
+ "id": "def-public.UrlFilter.values",
+ "type": "Array",
+ "tags": [],
+ "label": "values",
+ "description": [],
+ "signature": [
+ "string[] | undefined"
+ ],
+ "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "observability",
+ "id": "def-public.UrlFilter.notValues",
+ "type": "Array",
+ "tags": [],
+ "label": "notValues",
+ "description": [],
+ "signature": [
+ "string[] | undefined"
+ ],
+ "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "observability",
+ "id": "def-public.UrlFilter.wildcards",
+ "type": "Array",
+ "tags": [],
+ "label": "wildcards",
+ "description": [],
+ "signature": [
+ "string[] | undefined"
+ ],
+ "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "observability",
+ "id": "def-public.UrlFilter.notWildcards",
+ "type": "Array",
+ "tags": [],
+ "label": "notWildcards",
+ "description": [],
+ "signature": [
+ "string[] | undefined"
+ ],
+ "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts",
+ "deprecated": false
+ }
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "observability",
"id": "def-public.UxFetchDataResponse",
diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx
index 890575ba77dff..53bc0f5767412 100644
--- a/api_docs/observability.mdx
+++ b/api_docs/observability.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/observability
title: "observability"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the observability plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact [Observability UI](https://github.com/orgs/elastic/teams/observability-u
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 392 | 2 | 389 | 31 |
+| 399 | 2 | 396 | 30 |
## Client
diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx
index 56cd53123fd9a..0f839d5fcd0af 100644
--- a/api_docs/osquery.mdx
+++ b/api_docs/osquery.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/osquery
title: "osquery"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the osquery plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx
index 53cc62cd42830..bfbcc91f51110 100644
--- a/api_docs/plugin_directory.mdx
+++ b/api_docs/plugin_directory.mdx
@@ -3,7 +3,7 @@ id: kibDevDocsPluginDirectory
slug: /kibana-dev-docs/api-meta/plugin-api-directory
title: Directory
summary: Directory of public APIs available through plugins or packages.
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -12,13 +12,13 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| Count | Plugins or Packages with a public API | Number of teams |
|--------------|----------|------------------------|
-| 391 | 327 | 36 |
+| 401 | 335 | 36 |
### Public API health stats
| API Count | Any Count | Missing comments | Missing exports |
|--------------|----------|-----------------|--------|
-| 28741 | 175 | 19539 | 907 |
+| 28864 | 175 | 19600 | 911 |
## Plugin Directory
@@ -32,22 +32,22 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 |
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back. | 78 | 1 | 69 | 2 |
| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Canvas application to Kibana | 9 | 0 | 8 | 3 |
-| | [ResponseOps](https://github.com/orgs/elastic/teams/response-ops) | The Case management system in Kibana | 81 | 0 | 65 | 28 |
+| | [ResponseOps](https://github.com/orgs/elastic/teams/response-ops) | The Case management system in Kibana | 82 | 0 | 66 | 29 |
| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | - | 272 | 2 | 253 | 9 |
| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 29 | 0 | 24 | 0 |
| | [Cloud Security Posture](https://github.com/orgs/elastic/teams/cloud-posture-security) | The cloud security posture plugin | 18 | 0 | 2 | 3 |
| | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 13 | 0 | 13 | 1 |
| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 207 | 0 | 199 | 7 |
-| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2524 | 2 | 297 | 6 |
+| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2524 | 2 | 296 | 6 |
| crossClusterReplication | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 |
| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 102 | 0 | 83 | 1 |
| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 143 | 0 | 141 | 12 |
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 52 | 0 | 51 | 0 |
-| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3097 | 34 | 2420 | 21 |
+| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3098 | 34 | 2421 | 22 |
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | This plugin provides the ability to create data views via a modal flyout inside Kibana apps | 15 | 0 | 7 | 0 |
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Reusable data view field editor across Kibana | 49 | 0 | 29 | 3 |
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data view management app | 2 | 0 | 2 | 0 |
-| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 945 | 0 | 201 | 0 |
+| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 943 | 0 | 199 | 0 |
| | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The Data Visualizer tools help you understand your data, by analyzing the metrics and fields in a log file or an existing Elasticsearch index. | 28 | 3 | 24 | 1 |
| | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 10 | 0 | 8 | 2 |
| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 84 | 0 | 68 | 7 |
@@ -95,7 +95,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| kibanaUsageCollection | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 0 | 0 | 0 | 0 |
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 615 | 3 | 420 | 9 |
| | [Security Team](https://github.com/orgs/elastic/teams/security-team) | - | 3 | 0 | 3 | 1 |
-| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 608 | 0 | 527 | 41 |
+| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 611 | 0 | 529 | 41 |
| | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 8 | 0 | 8 | 0 |
| | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 3 | 0 | 3 | 0 |
| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 117 | 0 | 42 | 10 |
@@ -109,7 +109,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| | [Stack Monitoring](https://github.com/orgs/elastic/teams/stack-monitoring-ui) | - | 9 | 0 | 9 | 0 |
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 34 | 0 | 34 | 2 |
| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 |
-| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 392 | 2 | 389 | 31 |
+| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 399 | 2 | 396 | 30 |
| | [Security asset management](https://github.com/orgs/elastic/teams/security-asset-management) | - | 13 | 0 | 13 | 0 |
| painlessLab | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 |
| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Presentation Utility Plugin is a set of common, shared components and toolkits for solutions within the Presentation space, (e.g. Dashboards, Canvas). | 243 | 2 | 187 | 12 |
@@ -125,7 +125,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 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. | 236 | 0 | 90 | 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. | 239 | 0 | 90 | 0 |
| | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 54 | 0 | 53 | 22 |
| | [Security Team](https://github.com/orgs/elastic/teams/security-team) | - | 3 | 0 | 3 | 1 |
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds URL Service and sharing capabilities to Kibana | 114 | 0 | 55 | 10 |
@@ -143,10 +143,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 447 | 1 | 342 | 32 |
| | [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) | - | 426 | 0 | 405 | 46 |
+| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 428 | 0 | 407 | 46 |
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds UI Actions service to Kibana | 130 | 0 | 91 | 11 |
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends UI Actions plugin with more functionality | 205 | 0 | 142 | 9 |
-| | [Unified Search](https://github.com/orgs/elastic/teams/kibana-app-services) | Contains all the key functionality of Kibana's unified search experience.Contains all the key functionality of Kibana's unified search experience. | 98 | 2 | 84 | 16 |
+| | [Unified Search](https://github.com/orgs/elastic/teams/kibana-app-services) | Contains all the key functionality of Kibana's unified search experience.Contains all the key functionality of Kibana's unified search experience. | 97 | 2 | 84 | 16 |
| upgradeAssistant | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 |
| urlDrilldown | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds drilldown implementations to Kibana | 0 | 0 | 0 | 0 |
| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | - | 12 | 0 | 12 | 0 |
@@ -175,7 +175,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| | [Owner missing] | Elastic APM trace data generator | 74 | 0 | 74 | 11 |
| | [Owner missing] | - | 11 | 5 | 11 | 0 |
| | Machine Learning UI | React components for AIOps related efforts. | 6 | 0 | 6 | 0 |
-| | Machine Learning UI | Static utilities for AIOps related efforts. | 46 | 0 | 24 | 0 |
+| | Machine Learning UI | Static utilities for AIOps related efforts. | 49 | 0 | 24 | 0 |
| | [Owner missing] | Alerts components and hooks | 9 | 1 | 9 | 0 |
| | Kibana Core | Kibana Analytics tool | 69 | 0 | 69 | 2 |
| | Kibana Core | - | 96 | 0 | 0 | 0 |
@@ -208,7 +208,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| | Kibana Core | - | 5 | 0 | 0 | 0 |
| | Kibana Core | - | 16 | 0 | 7 | 0 |
| | Kibana Core | - | 6 | 0 | 6 | 0 |
-| | Kibana Core | - | 15 | 0 | 13 | 0 |
+| | Kibana Core | - | 4 | 0 | 4 | 0 |
| | Kibana Core | - | 9 | 0 | 3 | 0 |
| | Kibana Core | - | 6 | 0 | 6 | 0 |
| | Kibana Core | - | 4 | 0 | 4 | 0 |
@@ -272,8 +272,12 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| | Kibana Core | - | 6 | 0 | 6 | 0 |
| | Kibana Core | - | 94 | 1 | 66 | 0 |
| | Kibana Core | - | 288 | 1 | 125 | 0 |
+| | Kibana Core | - | 2 | 0 | 1 | 0 |
+| | Kibana Core | - | 6 | 0 | 6 | 0 |
+| | Kibana Core | - | 7 | 0 | 7 | 0 |
| | Kibana Core | - | 82 | 0 | 41 | 0 |
| | Kibana Core | - | 225 | 0 | 82 | 0 |
+| | Kibana Core | - | 11 | 0 | 9 | 0 |
| | Kibana Core | - | 5 | 0 | 5 | 0 |
| | Kibana Core | - | 6 | 0 | 4 | 0 |
| | Kibana Core | - | 2 | 0 | 1 | 0 |
@@ -288,9 +292,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| | [Owner missing] | - | 9 | 1 | 9 | 0 |
| | [Owner missing] | - | 65 | 0 | 64 | 0 |
| | [Owner missing] | - | 15 | 0 | 9 | 0 |
-| | [Owner missing] | - | 31 | 2 | 27 | 0 |
+| | [Owner missing] | - | 30 | 2 | 26 | 0 |
| | [Owner missing] | - | 67 | 0 | 67 | 2 |
| | [Owner missing] | - | 1 | 0 | 1 | 0 |
+| | [Owner missing] | - | 19 | 0 | 11 | 0 |
| | [Owner missing] | - | 27 | 0 | 14 | 1 |
| | Kibana Core | - | 7 | 0 | 3 | 0 |
| | [Owner missing] | - | 222 | 1 | 168 | 12 |
@@ -308,9 +313,11 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| | App Services | - | 35 | 4 | 35 | 0 |
| | [Owner missing] | - | 20 | 0 | 20 | 2 |
| | [Owner missing] | - | 13 | 0 | 13 | 0 |
-| | [Owner missing] | - | 69 | 0 | 69 | 0 |
+| | [Owner missing] | - | 7 | 0 | 4 | 3 |
+| | [Owner missing] | - | 91 | 0 | 91 | 0 |
| | Kibana Core | - | 30 | 0 | 5 | 37 |
| | Kibana Core | - | 8 | 0 | 8 | 0 |
+| | [Owner missing] | - | 6 | 0 | 1 | 1 |
| | [Owner missing] | - | 534 | 1 | 1 | 0 |
| | Machine Learning UI | This package includes utility functions related to creating elasticsearch aggregation queries, data manipulation and verification. | 53 | 2 | 35 | 4 |
| | Machine Learning UI | A type guard to check record like object structures. | 3 | 0 | 2 | 0 |
@@ -324,7 +331,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| | [Owner missing] | - | 21 | 0 | 10 | 0 |
| | [Owner missing] | - | 6 | 0 | 6 | 1 |
| | [Owner missing] | - | 74 | 0 | 71 | 0 |
-| | [Owner missing] | A library to generate scalability benchmarking simulation files from APM traces. | 3 | 0 | 3 | 1 |
| | [Owner missing] | Security Solution auto complete | 50 | 1 | 35 | 0 |
| | [Owner missing] | security solution elastic search utilities to use across plugins such lists, security_solution, cases, etc... | 67 | 0 | 61 | 1 |
| | [Owner missing] | Security Solution utilities for React hooks | 15 | 0 | 7 | 0 |
@@ -341,6 +347,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| | [Owner missing] | security solution utilities to use across plugins such lists, security_solution, cases, etc... | 31 | 0 | 29 | 0 |
| | Kibana Core | - | 53 | 0 | 50 | 1 |
| | [Owner missing] | - | 25 | 0 | 24 | 1 |
+| | [Owner missing] | - | 2 | 0 | 0 | 0 |
| | [Owner missing] | - | 13 | 0 | 9 | 0 |
| | [Owner missing] | - | 20 | 0 | 6 | 0 |
| | [Owner missing] | - | 10 | 0 | 4 | 0 |
@@ -371,6 +378,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex
| | [Owner missing] | - | 113 | 1 | 65 | 0 |
| | [Owner missing] | - | 83 | 0 | 83 | 1 |
| | [Owner missing] | - | 7 | 0 | 6 | 0 |
+| | [Owner missing] | - | 39 | 0 | 3 | 0 |
| | [Owner missing] | - | 32 | 0 | 12 | 1 |
| | [Owner missing] | - | 2 | 0 | 2 | 0 |
| | [Owner missing] | - | 30 | 0 | 20 | 0 |
diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx
index c34b8f22bd3af..b0d7c1dc08388 100644
--- a/api_docs/presentation_util.mdx
+++ b/api_docs/presentation_util.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/presentationUtil
title: "presentationUtil"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the presentationUtil plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx
index 314b88deda879..710686e9fa1ac 100644
--- a/api_docs/remote_clusters.mdx
+++ b/api_docs/remote_clusters.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/remoteClusters
title: "remoteClusters"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the remoteClusters plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx
index 0b43c7aecfa28..e9dd7653613c9 100644
--- a/api_docs/reporting.mdx
+++ b/api_docs/reporting.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/reporting
title: "reporting"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the reporting plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx
index 3ab0c6fc31b14..6d6e7fe976481 100644
--- a/api_docs/rollup.mdx
+++ b/api_docs/rollup.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/rollup
title: "rollup"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the rollup plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx
index 5650592555279..5dfb3f11cded3 100644
--- a/api_docs/rule_registry.mdx
+++ b/api_docs/rule_registry.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ruleRegistry
title: "ruleRegistry"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the ruleRegistry plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx
index 648761dd160a1..e8845e53df8a4 100644
--- a/api_docs/runtime_fields.mdx
+++ b/api_docs/runtime_fields.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/runtimeFields
title: "runtimeFields"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the runtimeFields plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/saved_objects.devdocs.json b/api_docs/saved_objects.devdocs.json
index 2eb978fe290ae..fba13f71ed1cc 100644
--- a/api_docs/saved_objects.devdocs.json
+++ b/api_docs/saved_objects.devdocs.json
@@ -821,13 +821,7 @@
"description": [],
"signature": [
"(savedObject: ",
- {
- "pluginId": "core",
- "scope": "public",
- "docId": "kibCoreSavedObjectsPluginApi",
- "section": "def-public.SavedObjectsStart",
- "text": "SavedObjectsStart"
- },
+ "SavedObjectsStart",
", uiSettings: ",
"IUiSettingsClient",
") => (props: ",
@@ -845,13 +839,7 @@
"label": "savedObject",
"description": [],
"signature": [
- {
- "pluginId": "core",
- "scope": "public",
- "docId": "kibCoreSavedObjectsPluginApi",
- "section": "def-public.SavedObjectsStart",
- "text": "SavedObjectsStart"
- }
+ "SavedObjectsStart"
],
"path": "src/plugins/saved_objects/public/finder/saved_object_finder.tsx",
"deprecated": false,
@@ -2900,13 +2888,7 @@
"description": [],
"signature": [
"{ savedObjects: ",
- {
- "pluginId": "core",
- "scope": "public",
- "docId": "kibCoreSavedObjectsPluginApi",
- "section": "def-public.SavedObjectsStart",
- "text": "SavedObjectsStart"
- },
+ "SavedObjectsStart",
"; uiSettings: ",
"IUiSettingsClient",
"; } & ",
diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx
index 04b30cec2d9b1..a62f0a0d7d73d 100644
--- a/api_docs/saved_objects.mdx
+++ b/api_docs/saved_objects.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjects
title: "savedObjects"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the savedObjects plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx
index 151aff38f6b27..5ea34029c565d 100644
--- a/api_docs/saved_objects_management.mdx
+++ b/api_docs/saved_objects_management.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement
title: "savedObjectsManagement"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the savedObjectsManagement plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx
index 0c09406cef78d..8d7f7e14cbc9d 100644
--- a/api_docs/saved_objects_tagging.mdx
+++ b/api_docs/saved_objects_tagging.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging
title: "savedObjectsTagging"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the savedObjectsTagging plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx
index fdf0de50a9e17..90edb754d8a6a 100644
--- a/api_docs/saved_objects_tagging_oss.mdx
+++ b/api_docs/saved_objects_tagging_oss.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss
title: "savedObjectsTaggingOss"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the savedObjectsTaggingOss plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx
index 22e94adfe2954..b9c4bfd867854 100644
--- a/api_docs/screenshot_mode.mdx
+++ b/api_docs/screenshot_mode.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/screenshotMode
title: "screenshotMode"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the screenshotMode plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx
index 85d702f767330..6412428b7dc4f 100644
--- a/api_docs/screenshotting.mdx
+++ b/api_docs/screenshotting.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/screenshotting
title: "screenshotting"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the screenshotting plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/security.devdocs.json b/api_docs/security.devdocs.json
index bb06aa96cef9b..11dfcb65020ff 100644
--- a/api_docs/security.devdocs.json
+++ b/api_docs/security.devdocs.json
@@ -788,6 +788,63 @@
}
],
"initialIsOpen": false
+ },
+ {
+ "parentPluginId": "security",
+ "id": "def-public.UserProfileSuggestParams",
+ "type": "Interface",
+ "tags": [],
+ "label": "UserProfileSuggestParams",
+ "description": [
+ "\nParameters for the suggest API."
+ ],
+ "path": "x-pack/plugins/security/public/account_management/user_profile/user_profile_api_client.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "security",
+ "id": "def-public.UserProfileSuggestParams.name",
+ "type": "string",
+ "tags": [],
+ "label": "name",
+ "description": [
+ "\nQuery string used to match name-related fields in user profiles. The following fields are treated as\nname-related: username, full_name and email."
+ ],
+ "path": "x-pack/plugins/security/public/account_management/user_profile/user_profile_api_client.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "security",
+ "id": "def-public.UserProfileSuggestParams.size",
+ "type": "number",
+ "tags": [],
+ "label": "size",
+ "description": [
+ "\nDesired number of suggestions to return. The default value is 10."
+ ],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "x-pack/plugins/security/public/account_management/user_profile/user_profile_api_client.ts",
+ "deprecated": false
+ },
+ {
+ "parentPluginId": "security",
+ "id": "def-public.UserProfileSuggestParams.dataPath",
+ "type": "string",
+ "tags": [],
+ "label": "dataPath",
+ "description": [
+ "\nBy default, suggest API returns user information, but does not return any user data. The optional \"dataPath\"\nparameter can be used to return personal data for this user (within `kibana` namespace only)."
+ ],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "x-pack/plugins/security/public/account_management/user_profile/user_profile_api_client.ts",
+ "deprecated": false
+ }
+ ],
+ "initialIsOpen": false
}
],
"enums": [],
@@ -934,7 +991,7 @@
"\nA set of methods to work with Kibana user profiles."
],
"signature": [
- "{ getCurrent(params?: ",
+ ">(path: string, params: ",
{
"pluginId": "security",
"scope": "public",
"docId": "kibSecurityPluginApi",
- "section": "def-public.UserProfileGetCurrentParams",
- "text": "UserProfileGetCurrentParams"
+ "section": "def-public.UserProfileSuggestParams",
+ "text": "UserProfileSuggestParams"
},
- " | undefined): Promise<",
+ ") => Promise<",
{
"pluginId": "security",
"scope": "common",
"docId": "kibSecurityPluginApi",
- "section": "def-common.UserProfileWithSecurity",
- "text": "UserProfileWithSecurity"
+ "section": "def-common.UserProfile",
+ "text": "UserProfile"
},
- "[]>; getCurrent: | null>; bulkGet(params?: ",
+ {
+ "pluginId": "security",
+ "scope": "public",
+ "docId": "kibSecurityPluginApi",
+ "section": "def-public.UserProfileGetCurrentParams",
+ "text": "UserProfileGetCurrentParams"
+ },
+ " | undefined) => Promise<",
+ {
+ "pluginId": "security",
+ "scope": "common",
+ "docId": "kibSecurityPluginApi",
+ "section": "def-common.GetUserProfileResponse",
+ "text": "GetUserProfileResponse"
+ },
+ ">; bulkGet: Promise<",
{
"pluginId": "security",
"scope": "common",
@@ -2048,7 +2121,7 @@
"tags": [],
"label": "suggest",
"description": [
- "\nRetrieves a single user profile by identifier."
+ "\nSuggests multiple user profiles by search criteria."
],
"signature": [
" JSX.Element"
],
@@ -23,7 +23,7 @@
"id": "def-public.DataViewPicker.$1",
"type": "Object",
"tags": [],
- "label": "{\n isMissingCurrent,\n currentDataViewId,\n onChangeDataView,\n onAddField,\n onDataViewCreated,\n trigger,\n selectableProps,\n showNewMenuTour,\n textBasedLanguages,\n onSaveTextLanguageQuery,\n onTextLangQuerySubmit,\n textBasedLanguage,\n}",
+ "label": "{\n isMissingCurrent,\n currentDataViewId,\n onChangeDataView,\n onAddField,\n onDataViewCreated,\n trigger,\n selectableProps,\n textBasedLanguages,\n onSaveTextLanguageQuery,\n onTextLangQuerySubmit,\n textBasedLanguage,\n}",
"description": [],
"signature": [
"DataViewPickerPropsExtended"
@@ -502,21 +502,6 @@
"children": [],
"returnComment": []
},
- {
- "parentPluginId": "unifiedSearch",
- "id": "def-public.DataViewPickerProps.showNewMenuTour",
- "type": "CompoundType",
- "tags": [],
- "label": "showNewMenuTour",
- "description": [
- "\nFlag to show the tour component for the first time."
- ],
- "signature": [
- "boolean | undefined"
- ],
- "path": "src/plugins/unified_search/public/dataview_picker/index.tsx",
- "deprecated": false
- },
{
"parentPluginId": "unifiedSearch",
"id": "def-public.DataViewPickerProps.textBasedLanguages",
diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx
index c64ee5e7ce2a5..0db1a30762630 100644
--- a/api_docs/unified_search.mdx
+++ b/api_docs/unified_search.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/unifiedSearch
title: "unifiedSearch"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the unifiedSearch plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact [Unified Search](https://github.com/orgs/elastic/teams/kibana-app-servic
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 98 | 2 | 84 | 16 |
+| 97 | 2 | 84 | 16 |
## Client
diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx
index 68f2f2374de4e..4f28e4e939197 100644
--- a/api_docs/unified_search_autocomplete.mdx
+++ b/api_docs/unified_search_autocomplete.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete
title: "unifiedSearch.autocomplete"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the unifiedSearch.autocomplete plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
@@ -18,7 +18,7 @@ Contact [Unified Search](https://github.com/orgs/elastic/teams/kibana-app-servic
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 98 | 2 | 84 | 16 |
+| 97 | 2 | 84 | 16 |
## Client
diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx
index 2fdfb613a2bc7..afe7d3468da1d 100644
--- a/api_docs/url_forwarding.mdx
+++ b/api_docs/url_forwarding.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/urlForwarding
title: "urlForwarding"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the urlForwarding plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx
index 988758bf33879..24c15fe918f4c 100644
--- a/api_docs/usage_collection.mdx
+++ b/api_docs/usage_collection.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/usageCollection
title: "usageCollection"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the usageCollection plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx
index 91a2a7b530778..71457797f93c8 100644
--- a/api_docs/ux.mdx
+++ b/api_docs/ux.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ux
title: "ux"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the ux plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx
index a1e26af8f3387..8761ab09e052f 100644
--- a/api_docs/vis_default_editor.mdx
+++ b/api_docs/vis_default_editor.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor
title: "visDefaultEditor"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the visDefaultEditor plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx
index 6ec204a5baafe..17f3ca755415f 100644
--- a/api_docs/vis_type_gauge.mdx
+++ b/api_docs/vis_type_gauge.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeGauge
title: "visTypeGauge"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the visTypeGauge plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx
index ff3ca2729bc9d..ab47ff3151238 100644
--- a/api_docs/vis_type_heatmap.mdx
+++ b/api_docs/vis_type_heatmap.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap
title: "visTypeHeatmap"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the visTypeHeatmap plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx
index 492f7cca4c428..d5fd739a83113 100644
--- a/api_docs/vis_type_pie.mdx
+++ b/api_docs/vis_type_pie.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypePie
title: "visTypePie"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the visTypePie plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx
index 2189f7b8a9603..0b25a9d343315 100644
--- a/api_docs/vis_type_table.mdx
+++ b/api_docs/vis_type_table.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTable
title: "visTypeTable"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the visTypeTable plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx
index c097183bcb395..7de4951b099c9 100644
--- a/api_docs/vis_type_timelion.mdx
+++ b/api_docs/vis_type_timelion.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion
title: "visTypeTimelion"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the visTypeTimelion plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx
index 88ca2a004f2bc..c454e66b16a9d 100644
--- a/api_docs/vis_type_timeseries.mdx
+++ b/api_docs/vis_type_timeseries.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries
title: "visTypeTimeseries"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the visTypeTimeseries plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx
index 5a000cc13478d..24434a894dc2b 100644
--- a/api_docs/vis_type_vega.mdx
+++ b/api_docs/vis_type_vega.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeVega
title: "visTypeVega"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the visTypeVega plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx
index a372b64545688..0b7cad3e6ce63 100644
--- a/api_docs/vis_type_vislib.mdx
+++ b/api_docs/vis_type_vislib.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeVislib
title: "visTypeVislib"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the visTypeVislib plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx
index 72daa67a4bebd..a102c03d77cc4 100644
--- a/api_docs/vis_type_xy.mdx
+++ b/api_docs/vis_type_xy.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeXy
title: "visTypeXy"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the visTypeXy plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx
index 671f0c333880f..a5a65cd36a79c 100644
--- a/api_docs/visualizations.mdx
+++ b/api_docs/visualizations.mdx
@@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visualizations
title: "visualizations"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the visualizations plugin
-date: 2022-08-03
+date: 2022-08-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
diff --git a/dev_docs/operations/operations_landing.mdx b/dev_docs/operations/operations_landing.mdx
index 2533df2f194b9..2b1a6e773d39f 100644
--- a/dev_docs/operations/operations_landing.mdx
+++ b/dev_docs/operations/operations_landing.mdx
@@ -12,6 +12,13 @@ layout: landing
description="👋 Here you will find documentation about all the things the Kibana Operations team manages. Feel free to look around and ask questions!"
/>
+
+
\ No newline at end of file
diff --git a/dev_docs/operations/packages_idm.mdx b/dev_docs/operations/packages_idm.mdx
new file mode 100644
index 0000000000000..62fe1a76c69f2
--- /dev/null
+++ b/dev_docs/operations/packages_idm.mdx
@@ -0,0 +1,208 @@
+---
+id: kibDevDocsOpsPackages
+slug: /kibana-dev-docs/ops/packages
+title: "Packages / Internal Dependency Management"
+description: Information about packages, where we are going, and how we are going to get there
+tags: ['kibana', 'dev', 'contributor', 'operations', 'idm', 'packages']
+---
+
+## Summary
+
+The size of the Kibana repository has surpassed almost all other Typescript projects on Github, and the Javascript tooling ecosystem is inadequate. AppEx Operations team has done a lot of work over the years to close these gaps and keep up with our codebase's growth. Still, significant steps are necessary to provide a more efficient development experience. The AppEx Operations team is leading an effort to migrate to Bazel, which among other things, will provide remote caching and incremental builds. This initiative should drastically improve the productivity of Kibana contributors by minimizing what needs to be built, both locally and in CI, and providing faster and more thorough feedback.
+
+
+ This document represents the target of the IDM project and not the currently implemented features. See [What works now?][status] for information about current implementation status.
+
+
+## Goals
+
+- Use packages as a core unit of code used throughout the repository
+- Packages have well defined boundaries, a single responsibility, and are easily reusable and shareable across the repository when desired
+- Support organizing the repository by domain
+- Allow developers and CI to benefit from a remote cache and incremental builds for all development/validation/build tasks
+
+## Definitions
+
+These are some of the terms we are using to describe parts of this initiative:
+
+Build Tasks/Tasks
+: We refer to any task/command that is executed as part of developement or CI as a "build task" or just "task"
+
+Package
+: Packages can be installed from NPM, or implemented in the repository. Local packages are structured in a specific way detailed in the [Package Structure](#package-structure) section.
+
+Incremental tasks
+: The ability to execute the minimal set of build tasks necessary by inspecting the files which have changed and utilizing local+remote caches
+
+## Package Structure
+
+Every package has:
+ - a globally unique module ID in the `@kbn/` namespace
+ - a type, see [Package Types](#package-types)
+ - dependencies on other packages in the repo or from NPM declared in their `kibana.jsonc` file and updated automatically
+ - configuration files like `BUILD.bazel`, `jest.config.js`, `package.json`, etc. which are automatically generated when necessary from the `kibana.jsonc` file.
+ - a single interface. When you import a package you get it's one and only interface. Packages don't have sub-imports, or sub-modules.
+ - the ability to include jest tests alongside the code
+
+## Package Types
+
+Every package is of one of the following types. Using package types allows us to have many different packages and pre-defined build tasks, restrictions, and unique config for each package type. There is currently a proposal to add a new `test-helpers` package type, and we expect more package types to be defined in the future.
+
+`shared-common`
+: These packages can be imported from all other packages.
+
+`shared-browser`
+: These packages can be imported from `shared-browser` and `plugin-browser` packages. Storybooks may be included in package of type `shared-browser`.
+
+`shared-server`
+: These packages can be imported from `shared-server` and `plugin-server` packages.
+
+`shared-scss`
+: These packages can be imported by `shared-browser` and `plugin-browser` packages. Instead of an `index.ts` file these pacakges have an `index.scss` file which will be exposed to consumers of this package.
+
+`plugin-browser`
+: These packages expose types to other packages via a root `types.ts` file, `import type` statements must be used when importing. Module IDs must end with `-plugin-browser`.
+
+`plugin-server`
+: These packages expose types to other packages via a root `types.ts` file, `import type` statements must be used when importing. Module IDs must end with `-plugin-server`.
+
+`functional-test`
+: These packages can not be imported by other packages and expose one or more functional testing configurations, including API integration tests. Having this separate means that iterating on functional tests will not need to rebuild the application and updating the application will usually not rebuild the tests.
+
+
+## Phases
+
+We're planning to implement the full package system described in phases. Currently, those phases look like this:
+
+### Phase 1: Ground preparation
+
+**status:** ✅ complete
+
+This phase is about identifying issues that would prevent a migration for teams in order to provide adequate time for them before they have the need to migrate.
+
+ - Migrate all plugins to use module IDs
+ - Find instances of ESLint being disabled and illegal cross-boundary imports are used; create issues for teams to address
+ - Prevent naked eslint-disable
+ - Prevent disabling specific ESLint rules
+ - Windows development is not supported
+ - Rewrite @kbn/pm using native Node.js to remove its build step. Anything outside of bootstrap like clean and reset commands will move to different packages.
+ - Document how to break up packages into smaller pieces
+
+### Phase 2: Legacy packages migration
+
+**status:** in progress
+
+This phase is about migrating the existing legacy packages to one of the [package types](#package-types).
+
+ - Add kibana.json files to existing packages
+ - Auto generating configuration files based on the `kibana.jsonc` manifest
+ - Discover dependencies used in packages automatically
+
+### Phase 3: Double down on DX
+
+This phase is all about making it easier for teams to start breaking their plugin up into packages.
+
+ - Rebuilding packages when running the Kibana Development CLI is automatic
+ - Pause requests when packages are being re-built
+ - Ensure the server restarts when files in a shared-server package are rebuilt
+ - Package linting to validate rules
+ - Start with a package rule to validate dependencies are all used and included
+ - Document how to create, build and watch packages.
+
+### Phase 4: Plugins everywhere
+
+This phase is all about supporting the creation of plugin-browser and plugin-server packages anywhere in the repository.
+
+ - Extracting Webpack config from @kbn/optimizer to work on a single bundle inside Bazel
+ - Update plugin discovery to find and differentiate between legacy plugins and plugin-browser/server packages
+ - ESLint rules to validate imports into and out of plugin-browser and plugin-server packages
+ - Finish the migration of core to packages and reflect with the core team (and possibly the Shared UX team) around what we should recommend for plugin authors before we start to migrate legacy plugins to the package system
+ - Documentation, documentation, documentation
+ - How do 3rd party plugins migrate to the new system?
+
+### Phase 5: Legacy plugins migration
+
+This phase is all about having the solution teams migrating their legacy plugins into packages.
+
+ - Identify the order of plugins that can be migrated
+ - Identify and communicate what needs to be done by teams
+ - Provide migration consultations
+ - Deprecate legacy 3rd party plugin styles and communicate 18 month migration period
+
+### Phase 6: Cleanup
+
+This phase is about finalizing the rough edges and making sure every piece of code is on Bazel.
+
+ - No code lives outside a Bazel package
+ - Extend the package development tooling to support 3rd party package development and allow packages to participate in the benefits of Bazel within the `plugins` directory.
+ - Ability for 3rd party packages to require specific versions of specific packages from NPM
+ - Automatically build the components that need changes
+ - Build package artifacts that can be installed in Kibana distributables
+
+
+## FAQ
+
+### Is it time for me to start creating packages?
+
+Probably not. The Shared UX and Core teams are currently our Guinea Pig teams and they're experiencing the pain of living on the bleeding edge. If you want to create a single package you are welcome to, but for now it's probably best that you wait until Operations reached out to your team.
+
+### How do circular dependencies work?
+
+By breaking the repository into packages we not be able to support cross-package circular dependency.
+
+Imagine trying to build the types for `@kbn/a`, which depend on the types for `@kbn/b`. If `@kbn/b` also depends on the types for `@kbn/a` there is no way to build the types for eather package because they form a circular dependency.
+
+If you cause a circular dependency in the task graph Bazel will produce a pretty great error message explaining where the cycle is.
+
+So far, the solution to resolving circular dependencies has always been to break out some component which is causing the circular dependency into a separate package. Packages are light weight, and are very easy to create ([work in progress][status]) so please feel comfortable creating more packages.
+
+### How do we name packages?
+
+There are a few package naming rules:
+ - all packages must use the `@kbn/` namespace
+ - `plugin-browser` packages must end with `-plugin-browser`
+ - `plugin-server` packages must end with `-plugin-server`
+ - be considerate of the fact that we are operating in a global namespace and avoid overly generic names
+
+Other than these rules, it's up to you what the best name for your package is.
+
+
+ Keep the single responsibility principle in mind, if there isn't a clear name for your package it might mean that it includes too many things and should be split into multiple smaller packages with explicit purposes.
+
+
+The shared-ux team makes a lot of packages containing a single component which is widely shared and provides a lot of helpers and types for other packages to consume, the shared-ux team has used the following naming scheme:
+
+```
+/{domain}/{componentName}
+ impl/ :: `@kbn/shared-ux-{domain}-{componentName}`
+ mocks/ :: `@kbn/shared-ux-{domain}-{componentName}-mocks`
+ types/ :: `@kbn/shared-ux-{domain}-{componentName}-types`
+```
+
+The `@kbn/{team}-{domain}-{component}(-{type})?` style naming scheme is also followed by the core team in their packages:
+
+ - `@kbn/core-analytics-browser`
+ - `@kbn/core-analytics-browser-internal`
+ - `@kbn/core-analytics-browser-mocks`
+ - `@kbn/core-analytics-server`
+ - `@kbn/core-analytics-server-mocks`
+ - `@kbn/core-analytics-server-internal`
+ - etc.
+
+### Where do I put my package?
+
+The only rule the package system enforces is that packages can't live inside of other packages. Additionally, for licensing purposes it's probably best to keep SSPL licensed code in the `packages` or `src` directories and Elastic licensed code in the `x-pack` directory.
+
+Otherise, you can put your packages wherever you like. It's probably best that you don't put them in the current `packages` directory as it's huge and only getting bigger with time.
+
+To define a new directory where packages will live you will need to edit the [`BAZEL_PACKAGE_DIRS`][pkgDirs] const. This list points to all the directories where packages can live in the repository and includes the current list of locations where packages are being created.
+
+### What works now?
+
+Today we have a basic package generator that produces legacy package definitions. We're done laying the groundwork now and have both the Core and Shared UX teams playing guinea pig. You can use the legacy package generator with `node scripts/generate package` and create a package, but it's not the right time for more teams to start migrating large portions of their code to packages.
+
+We're now entering Phase 2 of the plan, more details about the phases of our plan can be found [above](#phases)
+
+[status]: #what-works-now
+[idm-rfc]: https://docs.google.com/document/d/1Bhg601MoGQjqGMGdLWSLnkopRexwrcbf_0MNcUkhx3I "Internal Dependency Management RFC on Google Docs"
+[pkgDirs]: https://github.com/elastic/kibana/blob/main/packages/kbn-bazel-packages/src/bazel_package_dirs.ts#L22
diff --git a/docs/developer/plugin/external-plugin-localization.asciidoc b/docs/developer/plugin/external-plugin-localization.asciidoc
index 9fbf7cdab9b76..1eb56a6787a62 100644
--- a/docs/developer/plugin/external-plugin-localization.asciidoc
+++ b/docs/developer/plugin/external-plugin-localization.asciidoc
@@ -132,9 +132,9 @@ Full details are {kib-repo}tree/main/packages/kbn-i18n#react[here].
[discrete]
=== Resources
-To learn more about i18n tooling, see {kib-repo}blob/{branch}src/dev/i18n/README.md[i18n dev tooling].
+To learn more about i18n tooling, see {kib-repo}blob/{branch}/src/dev/i18n/README.md[i18n dev tooling].
To learn more about implementing i18n in the UI, use the following links:
-* {kib-repo}blob/{branch}packages/kbn-i18n/README.md[i18n plugin]
-* {kib-repo}blob/{branch}packages/kbn-i18n/GUIDELINE.md[i18n guidelines]
\ No newline at end of file
+* {kib-repo}blob/{branch}/packages/kbn-i18n/README.md[i18n plugin]
+* {kib-repo}blob/{branch}/packages/kbn-i18n/GUIDELINE.md[i18n guidelines]
diff --git a/docs/user/dashboard/url-drilldown.asciidoc b/docs/user/dashboard/url-drilldown.asciidoc
index 99cbf6f8eb533..d5e0ea6e397f7 100644
--- a/docs/user/dashboard/url-drilldown.asciidoc
+++ b/docs/user/dashboard/url-drilldown.asciidoc
@@ -46,7 +46,8 @@ a|Format dates. Supports relative dates expressions (for example, "now-15d"). R
Example:
`{{date event.from “YYYY MM DD”}}` +
-`{{date “now-15”}}`
+`{{date “now-15d”}}` +
+`{{date “now/d” roundUp=true}}`
|formatNumber
a|Format numbers. Numbers can be formatted to look like currency, percentages, times or numbers with decimal places, thousands, and abbreviations.
diff --git a/docs/user/plugins.asciidoc b/docs/user/plugins.asciidoc
index 36f7ce8eb49ed..0bf407ac1ff90 100644
--- a/docs/user/plugins.asciidoc
+++ b/docs/user/plugins.asciidoc
@@ -70,6 +70,7 @@ We are unable to evaluate or maintain the known plugins, so care should be taken
* https://github.com/PhaedrusTheGreek/transform_vis[Transform Visualization] (PhaedrusTheGreek)
* https://github.com/nyurik/kibana-vega-vis[Vega-based visualizations] (nyurik) - Support for user-defined graphs, external data sources, maps, images, and user-defined interactivity.
* https://github.com/Camichan/kbn_aframe[VR Graph Visualizations] (Camichan)
+* https://github.com/uniberg/kbn_sankey_vis[Sankey-Visualization] (uniberg)
[float]
=== Other
diff --git a/examples/response_stream/README.md b/examples/response_stream/README.md
index 3582f06fd216b..9f66fc19f2393 100644
--- a/examples/response_stream/README.md
+++ b/examples/response_stream/README.md
@@ -21,7 +21,7 @@ The request's headers get passed on to automatically identify if compression is
On the client, the custom hook is used like this:
```ts
-const { error, start, cancel, data, isRunning } = useFetchStream<
+const { errors, start, cancel, data, isRunning } = useFetchStream<
ApiSimpleStringStream, typeof basePath
>(`${basePath}/internal/response_stream/simple_string_stream`);
```
diff --git a/examples/response_stream/public/containers/app/pages/page_reducer_stream/index.tsx b/examples/response_stream/public/containers/app/pages/page_reducer_stream/index.tsx
index 8f5687db1749d..0755765374330 100644
--- a/examples/response_stream/public/containers/app/pages/page_reducer_stream/index.tsx
+++ b/examples/response_stream/public/containers/app/pages/page_reducer_stream/index.tsx
@@ -45,7 +45,7 @@ export const PageReducerStream: FC = () => {
const [simulateErrors, setSimulateErrors] = useState(false);
- const { dispatch, start, cancel, data, error, isCancelled, isRunning } = useFetchStream<
+ const { dispatch, start, cancel, data, errors, isCancelled, isRunning } = useFetchStream<
ApiReducerStream,
typeof basePath
>(
@@ -65,13 +65,15 @@ export const PageReducerStream: FC = () => {
}
};
+ // TODO This approach needs to be adapted as it might miss when error messages arrive bulk.
// This is for low level errors on the stream/HTTP level.
useEffect(() => {
- if (error) {
- notifications.toasts.addDanger(error);
+ if (errors.length > 0) {
+ notifications.toasts.addDanger(errors[errors.length - 1]);
}
- }, [error, notifications.toasts]);
+ }, [errors, notifications.toasts]);
+ // TODO This approach needs to be adapted as it might miss when error messages arrive bulk.
// This is for errors on the application level
useEffect(() => {
if (data.errors.length > 0) {
diff --git a/examples/response_stream/public/containers/app/pages/page_simple_string_stream/index.tsx b/examples/response_stream/public/containers/app/pages/page_simple_string_stream/index.tsx
index ba159887edfaf..cfa76688d9701 100644
--- a/examples/response_stream/public/containers/app/pages/page_simple_string_stream/index.tsx
+++ b/examples/response_stream/public/containers/app/pages/page_simple_string_stream/index.tsx
@@ -21,7 +21,7 @@ export const PageSimpleStringStream: FC = () => {
const { core } = useDeps();
const basePath = core.http?.basePath.get() ?? '';
- const { dispatch, error, start, cancel, data, isRunning } = useFetchStream<
+ const { dispatch, errors, start, cancel, data, isRunning } = useFetchStream<
ApiSimpleStringStream,
typeof basePath
>(`${basePath}/internal/response_stream/simple_string_stream`, { timeout: 500 });
@@ -61,9 +61,17 @@ export const PageSimpleStringStream: FC = () => {
{data}
- {error && (
+ {errors.length > 0 && (
- {error}
+ {errors.length === 1 ? (
+ {errors[0]}
+ ) : (
+
+ {errors.map((e, i) => (
+ {e}
+ ))}
+
+ )}{' '}
)}
diff --git a/examples/user_profile_examples/README.md b/examples/user_profile_examples/README.md
new file mode 100644
index 0000000000000..7d000bb04e34f
--- /dev/null
+++ b/examples/user_profile_examples/README.md
@@ -0,0 +1,3 @@
+# User profile examples
+
+Demo of how to implement a suggest user functionality.
diff --git a/examples/user_profile_examples/kibana.json b/examples/user_profile_examples/kibana.json
new file mode 100644
index 0000000000000..c808302fe65a7
--- /dev/null
+++ b/examples/user_profile_examples/kibana.json
@@ -0,0 +1,14 @@
+{
+ "id": "userProfileExamples",
+ "kibanaVersion": "kibana",
+ "version": "0.0.1",
+ "server": true,
+ "ui": true,
+ "owner": {
+ "name": "Kibana Platform Security",
+ "githubTeam": "kibana-security"
+ },
+ "description": "Demo of how to implement a suggest user functionality",
+ "requiredPlugins": ["developerExamples", "security", "spaces"],
+ "optionalPlugins": []
+}
diff --git a/examples/user_profile_examples/public/avatar_demo.tsx b/examples/user_profile_examples/public/avatar_demo.tsx
new file mode 100644
index 0000000000000..b80bfa8b575a6
--- /dev/null
+++ b/examples/user_profile_examples/public/avatar_demo.tsx
@@ -0,0 +1,66 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+import React, { FunctionComponent } from 'react';
+import { EuiTitle, EuiSpacer } from '@elastic/eui';
+import { UserAvatar } from '@kbn/user-profile-components';
+import { PanelWithCodeBlock } from './panel_with_code_block';
+
+export const AvatarDemo: FunctionComponent = () => {
+ const userProfile = {
+ uid: 'u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0',
+ user: {
+ username: 'delighted_nightingale',
+ email: 'delighted_nightingale@elastic.co',
+ full_name: 'Delighted Nightingale',
+ },
+ data: {
+ avatar: {
+ color: '#09e8ca',
+ initials: 'DN',
+ imageUrl: 'https://source.unsplash.com/64x64/?cat',
+ },
+ },
+ };
+
+ return (
+
+
+
+
+
+
+ Unknown
+
+
+
+
+ );
+};
+
+const code = `import { UserAvatar } from '@kbn/user-profile-components';
+
+const userProfile = {
+ uid: 'u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0',
+ user: {
+ username: 'delighted_nightingale',
+ email: 'delighted_nightingale@elastic.co',
+ full_name: 'Delighted Nightingale',
+ },
+ data: {
+ avatar: {
+ color: '#09e8ca',
+ initials: 'DN',
+ imageUrl: 'https://source.unsplash.com/64x64/?cat'
+ }
+ },
+};
+
+ `;
diff --git a/scripts/generate_scalability_simulations.js b/examples/user_profile_examples/public/index.ts
old mode 100644
new mode 100755
similarity index 75%
rename from scripts/generate_scalability_simulations.js
rename to examples/user_profile_examples/public/index.ts
index 9773e1d1439a7..7b5e8eb32a645
--- a/scripts/generate_scalability_simulations.js
+++ b/examples/user_profile_examples/public/index.ts
@@ -5,6 +5,6 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
+import { UserProfilesPlugin } from './plugin';
-require('../src/setup_node_env');
-require('@kbn/scalability-simulation-generator').generateScalabilitySimulations();
+export const plugin = () => new UserProfilesPlugin();
diff --git a/examples/user_profile_examples/public/panel_with_code_block.tsx b/examples/user_profile_examples/public/panel_with_code_block.tsx
new file mode 100644
index 0000000000000..3b86b343eda7d
--- /dev/null
+++ b/examples/user_profile_examples/public/panel_with_code_block.tsx
@@ -0,0 +1,36 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+import React from 'react';
+import { EuiTitle, EuiSpacer, EuiSplitPanel, EuiCodeBlock } from '@elastic/eui';
+
+export interface PanelWithCodeBlockProps {
+ title: string;
+ code: string;
+}
+
+export const PanelWithCodeBlock: React.FunctionComponent = ({
+ title,
+ code,
+ children,
+}) => (
+ <>
+
+ {title}
+
+
+
+ {children}
+
+
+ {code}
+
+
+
+
+ >
+);
diff --git a/examples/user_profile_examples/public/plugin.tsx b/examples/user_profile_examples/public/plugin.tsx
new file mode 100755
index 0000000000000..4a273dc097291
--- /dev/null
+++ b/examples/user_profile_examples/public/plugin.tsx
@@ -0,0 +1,68 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+import React from 'react';
+import ReactDOM from 'react-dom';
+import { AppMountParameters, CoreSetup, CoreStart, Plugin } from '@kbn/core/public';
+import { DeveloperExamplesSetup } from '@kbn/developer-examples-plugin/public';
+import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/public';
+import { EuiPageTemplate } from '@elastic/eui';
+import { AvatarDemo } from './avatar_demo';
+import { PopoverDemo } from './popover_demo';
+import { SelectableDemo } from './selectable_demo';
+
+interface SetupDeps {
+ developerExamples: DeveloperExamplesSetup;
+ security: SecurityPluginSetup;
+}
+
+interface StartDeps {
+ security: SecurityPluginStart;
+}
+
+export class UserProfilesPlugin implements Plugin {
+ public setup(core: CoreSetup, deps: SetupDeps) {
+ // Register an application into the side navigation menu
+ core.application.register({
+ id: 'userProfileExamples',
+ title: 'User profile components',
+ async mount({ element }: AppMountParameters) {
+ // Fetch user suggestions
+ // const [, depsStart] = await core.getStartServices();
+ // depsStart.security.userProfiles.suggest('/internal/user_profiles_examples/_suggest', {
+ // name: 'a',
+ // });
+
+ ReactDOM.render(
+
+
+
+
+ ,
+ element
+ );
+ return () => ReactDOM.unmountComponentAtNode(element);
+ },
+ });
+
+ deps.developerExamples.register({
+ appId: 'userProfileExamples',
+ title: 'User Profile',
+ description: 'Demo of how to implement a suggest user functionality',
+ });
+ }
+
+ public start(core: CoreStart) {
+ return {};
+ }
+
+ public stop() {}
+}
diff --git a/examples/user_profile_examples/public/popover_demo.tsx b/examples/user_profile_examples/public/popover_demo.tsx
new file mode 100644
index 0000000000000..5b9ef060fd277
--- /dev/null
+++ b/examples/user_profile_examples/public/popover_demo.tsx
@@ -0,0 +1,106 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+import React, { FunctionComponent, useState } from 'react';
+import { EuiButtonEmpty } from '@elastic/eui';
+import { UserProfilesPopover, UserProfileWithAvatar } from '@kbn/user-profile-components';
+import { PanelWithCodeBlock } from './panel_with_code_block';
+
+export const PopoverDemo: FunctionComponent = () => {
+ const [isOpen, setIsOpen] = useState(false);
+ const [selectedOptions, setSelectedOptions] = useState([
+ {
+ uid: 'u_BOulL4QMPSyV9jg5lQI2JmCkUnokHTazBnet3xVHNv0_0',
+ data: {},
+ user: {
+ username: 'delighted_nightingale',
+ email: 'delighted_nightingale@elastic.co',
+ full_name: 'Delighted Nightingale',
+ },
+ },
+ ]);
+ const defaultOptions: UserProfileWithAvatar[] = [
+ {
+ uid: 'u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0',
+ data: {},
+ user: {
+ username: 'damaged_raccoon',
+ email: 'damaged_raccoon@elastic.co',
+ full_name: 'Damaged Raccoon',
+ },
+ },
+ {
+ uid: 'u_A_tM4n0wPkdiQ9smmd8o0Hr_h61XQfu8aRPh9GMoRoc_0',
+ data: {},
+ user: {
+ username: 'physical_dinosaur',
+ email: 'physical_dinosaur@elastic.co',
+ full_name: 'Physical Dinosaur',
+ },
+ },
+ {
+ uid: 'u_9xDEQqUqoYCnFnPPLq5mIRHKL8gBTo_NiKgOnd5gGk0_0',
+ data: {},
+ user: {
+ username: 'wet_dingo',
+ email: 'wet_dingo@elastic.co',
+ full_name: 'Wet Dingo',
+ },
+ },
+ ];
+
+ return (
+
+ setIsOpen((value) => !value)}>
+ Edit assignees
+
+ }
+ isOpen={isOpen}
+ closePopover={() => setIsOpen(false)}
+ selectableProps={{
+ selectedOptions,
+ defaultOptions,
+ onChange: setSelectedOptions,
+ height: 32 * 8,
+ }}
+ panelStyle={{
+ width: 32 * 16,
+ }}
+ />
+
+ );
+};
+
+const code = `import { UserProfilesPopover } from '@kbn/user-profile-components';
+
+const [selectedOptions, setSelectedOptions] = useState([
+ {
+ uid: 'u_BOulL4QMPSyV9jg5lQI2JmCkUnokHTazBnet3xVHNv0_0',
+ data: {},
+ user: {
+ username: 'delighted_nightingale',
+ email: 'delighted_nightingale@elastic.co',
+ full_name: 'Delighted Nightingale',
+ },
+ },
+]);
+
+
+ Edit assignees
+
+ }
+ selectableProps={{
+ selectedOptions,
+ onChange: setSelectedOptions
+ }}
+/>`;
diff --git a/examples/user_profile_examples/public/selectable_demo.tsx b/examples/user_profile_examples/public/selectable_demo.tsx
new file mode 100644
index 0000000000000..09b0f6ce54758
--- /dev/null
+++ b/examples/user_profile_examples/public/selectable_demo.tsx
@@ -0,0 +1,80 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+import React, { FunctionComponent, useState } from 'react';
+import { UserProfilesSelectable, UserProfileWithAvatar } from '@kbn/user-profile-components';
+import { PanelWithCodeBlock } from './panel_with_code_block';
+
+export const SelectableDemo: FunctionComponent = () => {
+ const [selectedOptions, setSelectedOptions] = useState([
+ {
+ uid: 'u_BOulL4QMPSyV9jg5lQI2JmCkUnokHTazBnet3xVHNv0_0',
+ data: {},
+ user: {
+ username: 'delighted_nightingale',
+ email: 'delighted_nightingale@elastic.co',
+ full_name: 'Delighted Nightingale',
+ },
+ },
+ ]);
+
+ const defaultOptions: UserProfileWithAvatar[] = [
+ {
+ uid: 'u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0',
+ data: {},
+ user: {
+ username: 'damaged_raccoon',
+ email: 'damaged_raccoon@elastic.co',
+ full_name: 'Damaged Raccoon',
+ },
+ },
+ {
+ uid: 'u_A_tM4n0wPkdiQ9smmd8o0Hr_h61XQfu8aRPh9GMoRoc_0',
+ data: {},
+ user: {
+ username: 'physical_dinosaur',
+ email: 'physical_dinosaur@elastic.co',
+ full_name: 'Physical Dinosaur',
+ },
+ },
+ {
+ uid: 'u_9xDEQqUqoYCnFnPPLq5mIRHKL8gBTo_NiKgOnd5gGk0_0',
+ data: {},
+ user: {
+ username: 'wet_dingo',
+ email: 'wet_dingo@elastic.co',
+ full_name: 'Wet Dingo',
+ },
+ },
+ ];
+
+ return (
+
+
+
+ );
+};
+
+const code = `import { UserProfilesSelectable } from '@kbn/user-profile-components';
+
+const [selectedOptions, setSelectedOptions] = useState([
+ {
+ uid: 'u_BOulL4QMPSyV9jg5lQI2JmCkUnokHTazBnet3xVHNv0_0',
+ data: {},
+ user: {
+ username: 'delighted_nightingale',
+ email: 'delighted_nightingale@elastic.co',
+ full_name: 'Delighted Nightingale',
+ },
+ },
+]);
+
+ `;
diff --git a/examples/user_profile_examples/server/index.ts b/examples/user_profile_examples/server/index.ts
new file mode 100755
index 0000000000000..7b5e8eb32a645
--- /dev/null
+++ b/examples/user_profile_examples/server/index.ts
@@ -0,0 +1,10 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+import { UserProfilesPlugin } from './plugin';
+
+export const plugin = () => new UserProfilesPlugin();
diff --git a/examples/user_profile_examples/server/plugin.ts b/examples/user_profile_examples/server/plugin.ts
new file mode 100644
index 0000000000000..8f92b98b935a9
--- /dev/null
+++ b/examples/user_profile_examples/server/plugin.ts
@@ -0,0 +1,83 @@
+/*
+ * Copyright 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 { Plugin, CoreSetup } from '@kbn/core/server';
+import {
+ PluginSetupContract as FeaturesPluginSetup,
+ PluginStartContract as FeaturesPluginStart,
+} from '@kbn/features-plugin/server';
+import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server';
+import { SpacesPluginSetup, SpacesPluginStart } from '@kbn/spaces-plugin/server';
+import { schema } from '@kbn/config-schema';
+
+export interface SetupDeps {
+ features: FeaturesPluginSetup;
+ security: SecurityPluginSetup;
+ spaces: SpacesPluginSetup;
+}
+
+export interface StartDeps {
+ features: FeaturesPluginStart;
+ security: SecurityPluginStart;
+ spaces: SpacesPluginStart;
+}
+
+export class UserProfilesPlugin implements Plugin {
+ setup(core: CoreSetup) {
+ const router = core.http.createRouter();
+ router.post(
+ {
+ path: '/internal/user_profiles_examples/_suggest',
+ validate: {
+ body: schema.object({
+ name: schema.string(),
+ dataPath: schema.maybe(schema.string()),
+ }),
+ },
+ /**
+ * Important: You must restrict access to this endpoint using access `tags`.
+ */
+ options: { tags: ['access:suggestUserProfiles'] },
+ },
+ async (context, request, response) => {
+ const [, pluginDeps] = await core.getStartServices();
+
+ /**
+ * Important: `requiredPrivileges` must be hard-coded server-side and cannot be exposed as a
+ * param client-side.
+ *
+ * If your app requires suggestions based on different privileges you must expose separate
+ * endpoints for each use-case.
+ *
+ * In this example we ensure that suggested users have access to the current space and are
+ * able to login but in your app you will want to change that to something more relevant.
+ */
+ const profiles = await pluginDeps.security.userProfiles.suggest({
+ name: request.body.name,
+ dataPath: request.body.dataPath,
+ requiredPrivileges: {
+ spaceId: pluginDeps.spaces.spacesService.getSpaceId(request),
+ privileges: {
+ kibana: [pluginDeps.security.authz.actions.login],
+ },
+ },
+ });
+
+ return response.ok({ body: profiles });
+ }
+ );
+ }
+
+ start() {
+ return {};
+ }
+
+ stop() {
+ return {};
+ }
+}
diff --git a/examples/user_profile_examples/tsconfig.json b/examples/user_profile_examples/tsconfig.json
new file mode 100644
index 0000000000000..da98fc26aa8f2
--- /dev/null
+++ b/examples/user_profile_examples/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "extends": "../../tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "./target/types"
+ },
+ "include": [
+ "index.ts",
+ "public/**/*.ts",
+ "public/**/*.tsx",
+ "server/**/*.ts",
+ "../../typings/**/*"
+ ],
+ "exclude": [],
+ "references": [
+ { "path": "../../src/core/tsconfig.json" },
+ { "path": "../../x-pack/plugins/security/tsconfig.json" },
+ { "path": "../developer_examples/tsconfig.json" }
+ ]
+}
diff --git a/nav-kibana-dev.docnav.json b/nav-kibana-dev.docnav.json
index 434e7075c21aa..9aa3530578857 100644
--- a/nav-kibana-dev.docnav.json
+++ b/nav-kibana-dev.docnav.json
@@ -439,6 +439,14 @@
"id": "kibDevDocsOpsOverview",
"label": "Overview"
},
+ {
+ "label": "Initiatives",
+ "items": [
+ {
+ "id": "kibDevDocsOpsPackages"
+ }
+ ]
+ },
{
"label": "CI",
"items": [
@@ -540,6 +548,21 @@
},
{
"id": "kibDevDocsOpsRepoSourceClassifier"
+ },
+ {
+ "id": "kibDevDocsOpsJsonc"
+ },
+ {
+ "id": "kibDevDocsOpsKibanaManifestParser"
+ },
+ {
+ "id": "kibDevDocsOpsKibanaManifestSchema"
+ },
+ {
+ "id": "kibDevDocsOpsManagedVscodeConfig"
+ },
+ {
+ "id": "kibDevDocsOpsManagedVscodeConfigCli"
}
]
}
diff --git a/package.json b/package.json
index ad7b41a63d069..6ba3c8023e4c1 100644
--- a/package.json
+++ b/package.json
@@ -103,7 +103,7 @@
"@elastic/apm-rum": "^5.12.0",
"@elastic/apm-rum-react": "^1.4.2",
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace",
- "@elastic/charts": "47.0.0",
+ "@elastic/charts": "47.1.1",
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.3.0-canary.1",
"@elastic/ems-client": "8.3.3",
@@ -234,6 +234,9 @@
"@kbn/core-preboot-server-mocks": "link:bazel-bin/packages/core/preboot/core-preboot-server-mocks",
"@kbn/core-saved-objects-api-browser": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-api-browser",
"@kbn/core-saved-objects-api-server": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-api-server",
+ "@kbn/core-saved-objects-browser": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-browser",
+ "@kbn/core-saved-objects-browser-internal": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-browser-internal",
+ "@kbn/core-saved-objects-browser-mocks": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-browser-mocks",
"@kbn/core-saved-objects-common": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-common",
"@kbn/core-saved-objects-server": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-server",
"@kbn/core-test-helpers-deprecations-getters": "link:bazel-bin/packages/core/test-helpers/core-test-helpers-deprecations-getters",
@@ -249,6 +252,7 @@
"@kbn/crypto-browser": "link:bazel-bin/packages/kbn-crypto-browser",
"@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/es-errors": "link:bazel-bin/packages/kbn-es-errors",
"@kbn/es-query": "link:bazel-bin/packages/kbn-es-query",
"@kbn/eslint-plugin-disable": "link:bazel-bin/packages/kbn-eslint-plugin-disable",
@@ -264,7 +268,9 @@
"@kbn/i18n-react": "link:bazel-bin/packages/kbn-i18n-react",
"@kbn/interpreter": "link:bazel-bin/packages/kbn-interpreter",
"@kbn/io-ts-utils": "link:bazel-bin/packages/kbn-io-ts-utils",
- "@kbn/kibana-json-schema": "link:bazel-bin/packages/kbn-kibana-json-schema",
+ "@kbn/jsonc": "link:bazel-bin/packages/kbn-jsonc",
+ "@kbn/kibana-manifest-parser": "link:bazel-bin/packages/kbn-kibana-manifest-parser",
+ "@kbn/kibana-manifest-schema": "link:bazel-bin/packages/kbn-kibana-manifest-schema",
"@kbn/logging": "link:bazel-bin/packages/kbn-logging",
"@kbn/logging-mocks": "link:bazel-bin/packages/kbn-logging-mocks",
"@kbn/mapbox-gl": "link:bazel-bin/packages/kbn-mapbox-gl",
@@ -326,6 +332,7 @@
"@kbn/ui-shared-deps-npm": "link:bazel-bin/packages/kbn-ui-shared-deps-npm",
"@kbn/ui-shared-deps-src": "link:bazel-bin/packages/kbn-ui-shared-deps-src",
"@kbn/ui-theme": "link:bazel-bin/packages/kbn-ui-theme",
+ "@kbn/user-profile-components": "link:bazel-bin/packages/kbn-user-profile-components",
"@kbn/utility-types": "link:bazel-bin/packages/kbn-utility-types",
"@kbn/utility-types-jest": "link:bazel-bin/packages/kbn-utility-types-jest",
"@kbn/utils": "link:bazel-bin/packages/kbn-utils",
@@ -636,6 +643,8 @@
"@kbn/get-repo-files": "link:bazel-bin/packages/kbn-get-repo-files",
"@kbn/import-resolver": "link:bazel-bin/packages/kbn-import-resolver",
"@kbn/jest-serializers": "link:bazel-bin/packages/kbn-jest-serializers",
+ "@kbn/managed-vscode-config": "link:bazel-bin/packages/kbn-managed-vscode-config",
+ "@kbn/managed-vscode-config-cli": "link:bazel-bin/packages/kbn-managed-vscode-config-cli",
"@kbn/optimizer": "link:bazel-bin/packages/kbn-optimizer",
"@kbn/optimizer-webpack-helpers": "link:bazel-bin/packages/kbn-optimizer-webpack-helpers",
"@kbn/performance-testing-dataset-extractor": "link:bazel-bin/packages/kbn-performance-testing-dataset-extractor",
@@ -643,7 +652,6 @@
"@kbn/plugin-helpers": "link:bazel-bin/packages/kbn-plugin-helpers",
"@kbn/repo-source-classifier": "link:bazel-bin/packages/kbn-repo-source-classifier",
"@kbn/repo-source-classifier-cli": "link:bazel-bin/packages/kbn-repo-source-classifier-cli",
- "@kbn/scalability-simulation-generator": "link:bazel-bin/packages/kbn-scalability-simulation-generator",
"@kbn/some-dev-log": "link:bazel-bin/packages/kbn-some-dev-log",
"@kbn/sort-package-json": "link:bazel-bin/packages/kbn-sort-package-json",
"@kbn/spec-to-console": "link:bazel-bin/packages/kbn-spec-to-console",
@@ -689,6 +697,7 @@
"@types/apidoc": "^0.22.3",
"@types/archiver": "^5.3.1",
"@types/babel__core": "^7.1.19",
+ "@types/babel__generator": "^7.6.4",
"@types/babel__helper-plugin-utils": "^7.10.0",
"@types/base64-js": "^1.2.5",
"@types/chance": "^1.0.0",
@@ -747,6 +756,7 @@
"@types/js-search": "^1.4.0",
"@types/js-yaml": "^3.11.1",
"@types/jsdom": "^16.2.14",
+ "@types/json-schema": "^7",
"@types/json-stable-stringify": "^1.0.32",
"@types/json5": "^0.0.30",
"@types/jsonwebtoken": "^8.5.6",
@@ -867,6 +877,9 @@
"@types/kbn__core-public-internal-base": "link:bazel-bin/packages/core/public/internal-base/npm_module_types",
"@types/kbn__core-saved-objects-api-browser": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-api-browser/npm_module_types",
"@types/kbn__core-saved-objects-api-server": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-api-server/npm_module_types",
+ "@types/kbn__core-saved-objects-browser": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-browser/npm_module_types",
+ "@types/kbn__core-saved-objects-browser-internal": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-browser-internal/npm_module_types",
+ "@types/kbn__core-saved-objects-browser-mocks": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-browser-mocks/npm_module_types",
"@types/kbn__core-saved-objects-common": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-common/npm_module_types",
"@types/kbn__core-saved-objects-server": "link:bazel-bin/packages/core/saved-objects/core-saved-objects-server/npm_module_types",
"@types/kbn__core-server-internal-base": "link:bazel-bin/packages/core/server/internal-base/npm_module_types",
@@ -888,6 +901,7 @@
"@types/kbn__dev-utils": "link:bazel-bin/packages/kbn-dev-utils/npm_module_types",
"@types/kbn__doc-links": "link:bazel-bin/packages/kbn-doc-links/npm_module_types",
"@types/kbn__docs-utils": "link:bazel-bin/packages/kbn-docs-utils/npm_module_types",
+ "@types/kbn__ebt-tools": "link:bazel-bin/packages/kbn-ebt-tools/npm_module_types",
"@types/kbn__es-archiver": "link:bazel-bin/packages/kbn-es-archiver/npm_module_types",
"@types/kbn__es-errors": "link:bazel-bin/packages/kbn-es-errors/npm_module_types",
"@types/kbn__es-query": "link:bazel-bin/packages/kbn-es-query/npm_module_types",
@@ -908,10 +922,14 @@
"@types/kbn__interpreter": "link:bazel-bin/packages/kbn-interpreter/npm_module_types",
"@types/kbn__io-ts-utils": "link:bazel-bin/packages/kbn-io-ts-utils/npm_module_types",
"@types/kbn__jest-serializers": "link:bazel-bin/packages/kbn-jest-serializers/npm_module_types",
+ "@types/kbn__jsonc": "link:bazel-bin/packages/kbn-jsonc/npm_module_types",
"@types/kbn__kbn-ci-stats-performance-metrics": "link:bazel-bin/packages/kbn-kbn-ci-stats-performance-metrics/npm_module_types",
- "@types/kbn__kibana-json-schema": "link:bazel-bin/packages/kbn-kibana-json-schema/npm_module_types",
+ "@types/kbn__kibana-manifest-parser": "link:bazel-bin/packages/kbn-kibana-manifest-parser/npm_module_types",
+ "@types/kbn__kibana-manifest-schema": "link:bazel-bin/packages/kbn-kibana-manifest-schema/npm_module_types",
"@types/kbn__logging": "link:bazel-bin/packages/kbn-logging/npm_module_types",
"@types/kbn__logging-mocks": "link:bazel-bin/packages/kbn-logging-mocks/npm_module_types",
+ "@types/kbn__managed-vscode-config": "link:bazel-bin/packages/kbn-managed-vscode-config/npm_module_types",
+ "@types/kbn__managed-vscode-config-cli": "link:bazel-bin/packages/kbn-managed-vscode-config-cli/npm_module_types",
"@types/kbn__mapbox-gl": "link:bazel-bin/packages/kbn-mapbox-gl/npm_module_types",
"@types/kbn__ml-agg-utils": "link:bazel-bin/x-pack/packages/ml/agg_utils/npm_module_types",
"@types/kbn__ml-is-populated-object": "link:bazel-bin/x-pack/packages/ml/is_populated_object/npm_module_types",
@@ -927,7 +945,6 @@
"@types/kbn__repo-source-classifier": "link:bazel-bin/packages/kbn-repo-source-classifier/npm_module_types",
"@types/kbn__repo-source-classifier-cli": "link:bazel-bin/packages/kbn-repo-source-classifier-cli/npm_module_types",
"@types/kbn__rule-data-utils": "link:bazel-bin/packages/kbn-rule-data-utils/npm_module_types",
- "@types/kbn__scalability-simulation-generator": "link:bazel-bin/packages/kbn-scalability-simulation-generator/npm_module_types",
"@types/kbn__securitysolution-autocomplete": "link:bazel-bin/packages/kbn-securitysolution-autocomplete/npm_module_types",
"@types/kbn__securitysolution-es-utils": "link:bazel-bin/packages/kbn-securitysolution-es-utils/npm_module_types",
"@types/kbn__securitysolution-hook-utils": "link:bazel-bin/packages/kbn-securitysolution-hook-utils/npm_module_types",
@@ -987,6 +1004,7 @@
"@types/kbn__ui-shared-deps-npm": "link:bazel-bin/packages/kbn-ui-shared-deps-npm/npm_module_types",
"@types/kbn__ui-shared-deps-src": "link:bazel-bin/packages/kbn-ui-shared-deps-src/npm_module_types",
"@types/kbn__ui-theme": "link:bazel-bin/packages/kbn-ui-theme/npm_module_types",
+ "@types/kbn__user-profile-components": "link:bazel-bin/packages/kbn-user-profile-components/npm_module_types",
"@types/kbn__utility-types": "link:bazel-bin/packages/kbn-utility-types/npm_module_types",
"@types/kbn__utility-types-jest": "link:bazel-bin/packages/kbn-utility-types-jest/npm_module_types",
"@types/kbn__utils": "link:bazel-bin/packages/kbn-utils/npm_module_types",
@@ -1085,6 +1103,7 @@
"@yarnpkg/lockfile": "^1.1.0",
"abab": "^2.0.4",
"aggregate-error": "^3.1.0",
+ "ajv": "^8.11.0",
"antlr4ts-cli": "^0.5.0-alpha.3",
"apidoc": "^0.29.0",
"apidoc-markdown": "^6.0.0",
@@ -1187,7 +1206,7 @@
"jest-styled-components": "^7.0.3",
"jimp": "^0.14.0",
"jsdom": "13.1.0",
- "json-schema-typed": "^7.0.3",
+ "json-schema-typed": "^8.0.1",
"json5": "^1.0.1",
"jsondiffpatch": "0.4.1",
"license-checker": "^25.0.1",
diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel
index b64608d5e718b..c0957f7ee2bb8 100644
--- a/packages/BUILD.bazel
+++ b/packages/BUILD.bazel
@@ -102,6 +102,9 @@ filegroup(
"//packages/core/preboot/core-preboot-server:build",
"//packages/core/saved-objects/core-saved-objects-api-browser:build",
"//packages/core/saved-objects/core-saved-objects-api-server:build",
+ "//packages/core/saved-objects/core-saved-objects-browser-internal:build",
+ "//packages/core/saved-objects/core-saved-objects-browser-mocks:build",
+ "//packages/core/saved-objects/core-saved-objects-browser:build",
"//packages/core/saved-objects/core-saved-objects-common:build",
"//packages/core/saved-objects/core-saved-objects-server:build",
"//packages/core/test-helpers/core-test-helpers-deprecations-getters:build",
@@ -147,6 +150,7 @@ filegroup(
"//packages/kbn-dev-utils:build",
"//packages/kbn-doc-links:build",
"//packages/kbn-docs-utils:build",
+ "//packages/kbn-ebt-tools:build",
"//packages/kbn-es-archiver:build",
"//packages/kbn-es-errors:build",
"//packages/kbn-es-query:build",
@@ -169,9 +173,13 @@ filegroup(
"//packages/kbn-interpreter:build",
"//packages/kbn-io-ts-utils:build",
"//packages/kbn-jest-serializers:build",
- "//packages/kbn-kibana-json-schema:build",
+ "//packages/kbn-jsonc:build",
+ "//packages/kbn-kibana-manifest-parser:build",
+ "//packages/kbn-kibana-manifest-schema:build",
"//packages/kbn-logging-mocks:build",
"//packages/kbn-logging:build",
+ "//packages/kbn-managed-vscode-config-cli:build",
+ "//packages/kbn-managed-vscode-config:build",
"//packages/kbn-mapbox-gl:build",
"//packages/kbn-monaco:build",
"//packages/kbn-optimizer-webpack-helpers:build",
@@ -184,7 +192,6 @@ filegroup(
"//packages/kbn-repo-source-classifier-cli:build",
"//packages/kbn-repo-source-classifier:build",
"//packages/kbn-rule-data-utils:build",
- "//packages/kbn-scalability-simulation-generator:build",
"//packages/kbn-securitysolution-autocomplete:build",
"//packages/kbn-securitysolution-es-utils:build",
"//packages/kbn-securitysolution-hook-utils:build",
@@ -228,6 +235,7 @@ filegroup(
"//packages/kbn-ui-shared-deps-npm:build",
"//packages/kbn-ui-shared-deps-src:build",
"//packages/kbn-ui-theme:build",
+ "//packages/kbn-user-profile-components:build",
"//packages/kbn-utility-types-jest:build",
"//packages/kbn-utility-types:build",
"//packages/kbn-utils:build",
@@ -359,6 +367,9 @@ filegroup(
"//packages/core/preboot/core-preboot-server:build_types",
"//packages/core/saved-objects/core-saved-objects-api-browser:build_types",
"//packages/core/saved-objects/core-saved-objects-api-server:build_types",
+ "//packages/core/saved-objects/core-saved-objects-browser-internal:build_types",
+ "//packages/core/saved-objects/core-saved-objects-browser-mocks:build_types",
+ "//packages/core/saved-objects/core-saved-objects-browser:build_types",
"//packages/core/saved-objects/core-saved-objects-common:build_types",
"//packages/core/saved-objects/core-saved-objects-server:build_types",
"//packages/core/test-helpers/core-test-helpers-deprecations-getters:build_types",
@@ -399,6 +410,7 @@ filegroup(
"//packages/kbn-dev-utils:build_types",
"//packages/kbn-doc-links:build_types",
"//packages/kbn-docs-utils:build_types",
+ "//packages/kbn-ebt-tools:build_types",
"//packages/kbn-es-archiver:build_types",
"//packages/kbn-es-errors:build_types",
"//packages/kbn-es-query:build_types",
@@ -416,9 +428,13 @@ filegroup(
"//packages/kbn-interpreter:build_types",
"//packages/kbn-io-ts-utils:build_types",
"//packages/kbn-jest-serializers:build_types",
- "//packages/kbn-kibana-json-schema:build_types",
+ "//packages/kbn-jsonc:build_types",
+ "//packages/kbn-kibana-manifest-parser:build_types",
+ "//packages/kbn-kibana-manifest-schema:build_types",
"//packages/kbn-logging-mocks:build_types",
"//packages/kbn-logging:build_types",
+ "//packages/kbn-managed-vscode-config-cli:build_types",
+ "//packages/kbn-managed-vscode-config:build_types",
"//packages/kbn-mapbox-gl:build_types",
"//packages/kbn-monaco:build_types",
"//packages/kbn-optimizer-webpack-helpers:build_types",
@@ -431,7 +447,6 @@ filegroup(
"//packages/kbn-repo-source-classifier-cli:build_types",
"//packages/kbn-repo-source-classifier:build_types",
"//packages/kbn-rule-data-utils:build_types",
- "//packages/kbn-scalability-simulation-generator:build_types",
"//packages/kbn-securitysolution-autocomplete:build_types",
"//packages/kbn-securitysolution-es-utils:build_types",
"//packages/kbn-securitysolution-hook-utils:build_types",
@@ -469,6 +484,7 @@ filegroup(
"//packages/kbn-ui-shared-deps-npm:build_types",
"//packages/kbn-ui-shared-deps-src:build_types",
"//packages/kbn-ui-theme:build_types",
+ "//packages/kbn-user-profile-components:build_types",
"//packages/kbn-utility-types-jest:build_types",
"//packages/kbn-utility-types:build_types",
"//packages/kbn-utils:build_types",
diff --git a/packages/analytics/client/src/analytics_client/analytics_client.ts b/packages/analytics/client/src/analytics_client/analytics_client.ts
index e6815b4415254..57741f098c6ac 100644
--- a/packages/analytics/client/src/analytics_client/analytics_client.ts
+++ b/packages/analytics/client/src/analytics_client/analytics_client.ts
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import type { Type } from 'io-ts';
+import type { Mixed } from 'io-ts';
import type { Observable } from 'rxjs';
import { BehaviorSubject, Subject, combineLatest, from, merge } from 'rxjs';
import {
@@ -43,7 +43,7 @@ import { ContextService } from './context_service';
import { schemaToIoTs, validateSchema } from '../schema/validation';
interface EventDebugLogMeta extends LogMeta {
- ebt_event: Event;
+ ebt_event: Event;
}
export class AnalyticsClient implements IAnalyticsClient {
@@ -65,7 +65,7 @@ export class AnalyticsClient implements IAnalyticsClient {
private readonly shipperRegistered$ = new Subject();
private readonly eventTypeRegistry = new Map<
EventType,
- EventTypeOpts & { validator?: Type> }
+ EventTypeOpts & { validator?: Mixed }
>();
private readonly contextService: ContextService;
private readonly context$ = new BehaviorSubject>({});
@@ -88,7 +88,7 @@ export class AnalyticsClient implements IAnalyticsClient {
this.reportEnqueuedEventsWhenClientIsReady();
}
- public reportEvent = >(
+ public reportEvent = (
eventType: EventType,
eventData: EventTypeData
) => {
@@ -119,14 +119,18 @@ export class AnalyticsClient implements IAnalyticsClient {
// If the validator is registered (dev-mode only), perform the validation.
if (eventTypeOpts.validator) {
- validateSchema(`Event Type '${eventType}'`, eventTypeOpts.validator, eventData);
+ validateSchema(
+ `Event Type '${eventType}'`,
+ eventTypeOpts.validator,
+ eventData
+ );
}
const event: Event = {
timestamp,
event_type: eventType,
context: this.context$.value,
- properties: eventData,
+ properties: eventData as unknown as Record,
};
// debug-logging before checking the opt-in status to help during development
diff --git a/packages/analytics/client/src/analytics_client/types.ts b/packages/analytics/client/src/analytics_client/types.ts
index 88b60dc100e89..2af29d88b5ceb 100644
--- a/packages/analytics/client/src/analytics_client/types.ts
+++ b/packages/analytics/client/src/analytics_client/types.ts
@@ -170,7 +170,7 @@ export interface IAnalyticsClient {
* @param eventType The event type registered via the `registerEventType` API.
* @param eventData The properties matching the schema declared in the `registerEventType` API.
*/
- reportEvent: >(
+ reportEvent: (
eventType: EventType,
eventData: EventTypeData
) => void;
diff --git a/packages/analytics/client/src/events/types.ts b/packages/analytics/client/src/events/types.ts
index 0c97bee3fdbb7..78b2f792e9e2b 100644
--- a/packages/analytics/client/src/events/types.ts
+++ b/packages/analytics/client/src/events/types.ts
@@ -108,7 +108,7 @@ export interface TelemetryCounter {
/**
* Definition of the full event structure
*/
-export interface Event {
+export interface Event> {
/**
* The time the event was generated in ISO format.
*/
@@ -120,7 +120,7 @@ export interface Event {
/**
* The specific properties of the event type.
*/
- properties: Record;
+ properties: Properties;
/**
* The {@link EventContext} enriched during the processing pipeline.
*/
diff --git a/packages/analytics/shippers/fullstory/src/format_payload.ts b/packages/analytics/shippers/fullstory/src/format_payload.ts
index c55ed2409da50..03873617af8fc 100644
--- a/packages/analytics/shippers/fullstory/src/format_payload.ts
+++ b/packages/analytics/shippers/fullstory/src/format_payload.ts
@@ -19,7 +19,7 @@ const FULLSTORY_RESERVED_PROPERTIES = [
'pageName',
];
-export function formatPayload(context: Record): Record {
+export function formatPayload(context: object): Record {
// format context keys as required for env vars, see docs: https://help.fullstory.com/hc/en-us/articles/360020623234
return Object.fromEntries(
Object.entries(context)
diff --git a/packages/core/analytics/core-analytics-browser-internal/BUILD.bazel b/packages/core/analytics/core-analytics-browser-internal/BUILD.bazel
index 2540ccabd517c..59f18b8f11d4a 100644
--- a/packages/core/analytics/core-analytics-browser-internal/BUILD.bazel
+++ b/packages/core/analytics/core-analytics-browser-internal/BUILD.bazel
@@ -30,6 +30,7 @@ RUNTIME_DEPS = [
"@npm//rxjs",
"@npm//uuid",
"//packages/analytics/client",
+ "//packages/kbn-ebt-tools",
"//packages/core/base/core-base-browser-mocks",
"//packages/core/injected-metadata/core-injected-metadata-browser-mocks",
]
@@ -41,6 +42,7 @@ TYPES_DEPS = [
"@npm//rxjs",
"//packages/kbn-logging:npm_module_types",
"//packages/analytics/client:npm_module_types",
+ "//packages/kbn-ebt-tools:npm_module_types",
"//packages/core/base/core-base-browser-internal:npm_module_types",
"//packages/core/injected-metadata/core-injected-metadata-browser-internal:npm_module_types",
"//packages/core/analytics/core-analytics-browser:npm_module_types",
diff --git a/packages/core/analytics/core-analytics-browser-internal/src/analytics_service.test.ts b/packages/core/analytics/core-analytics-browser-internal/src/analytics_service.test.ts
index 8ae572ae34528..d3514cb80edf3 100644
--- a/packages/core/analytics/core-analytics-browser-internal/src/analytics_service.test.ts
+++ b/packages/core/analytics/core-analytics-browser-internal/src/analytics_service.test.ts
@@ -20,30 +20,150 @@ describe('AnalyticsService', () => {
});
test('should register some context providers on creation', async () => {
expect(analyticsClientMock.registerContextProvider).toHaveBeenCalledTimes(3);
- await expect(
- firstValueFrom(analyticsClientMock.registerContextProvider.mock.calls[0][0].context$)
- ).resolves.toMatchInlineSnapshot(`
- Object {
- "branch": "branch",
- "buildNum": 100,
- "buildSha": "buildSha",
- "isDev": true,
- "isDistributable": false,
- "version": "version",
- }
- `);
- await expect(
- firstValueFrom(analyticsClientMock.registerContextProvider.mock.calls[1][0].context$)
- ).resolves.toEqual({ session_id: expect.any(String) });
- await expect(
- firstValueFrom(analyticsClientMock.registerContextProvider.mock.calls[2][0].context$)
- ).resolves.toEqual({
+ expect(
+ await firstValueFrom(analyticsClientMock.registerContextProvider.mock.calls[0][0].context$)
+ ).toMatchInlineSnapshot(`
+ Object {
+ "branch": "branch",
+ "buildNum": 100,
+ "buildSha": "buildSha",
+ "isDev": true,
+ "isDistributable": false,
+ "version": "version",
+ }
+ `);
+ expect(
+ await firstValueFrom(analyticsClientMock.registerContextProvider.mock.calls[1][0].context$)
+ ).toEqual({ session_id: expect.any(String) });
+ expect(
+ await firstValueFrom(analyticsClientMock.registerContextProvider.mock.calls[2][0].context$)
+ ).toEqual({
preferred_language: 'en-US',
preferred_languages: ['en-US', 'en'],
user_agent: expect.any(String),
});
});
+ test('should register the `performance_metric` and `click` event types on creation', () => {
+ expect(analyticsClientMock.registerEventType).toHaveBeenCalledTimes(2);
+ expect(analyticsClientMock.registerEventType.mock.calls[0]).toMatchInlineSnapshot(`
+ Array [
+ Object {
+ "eventType": "performance_metric",
+ "schema": Object {
+ "duration": Object {
+ "_meta": Object {
+ "description": "The main event duration in ms",
+ },
+ "type": "integer",
+ },
+ "eventName": Object {
+ "_meta": Object {
+ "description": "The name of the event that is tracked in the metrics i.e. kibana_loaded, kibana_started",
+ },
+ "type": "keyword",
+ },
+ "key1": Object {
+ "_meta": Object {
+ "description": "Performance metric label 1",
+ "optional": true,
+ },
+ "type": "keyword",
+ },
+ "key2": Object {
+ "_meta": Object {
+ "description": "Performance metric label 2",
+ "optional": true,
+ },
+ "type": "keyword",
+ },
+ "key3": Object {
+ "_meta": Object {
+ "description": "Performance metric label 3",
+ "optional": true,
+ },
+ "type": "keyword",
+ },
+ "key4": Object {
+ "_meta": Object {
+ "description": "Performance metric label 4",
+ "optional": true,
+ },
+ "type": "keyword",
+ },
+ "key5": Object {
+ "_meta": Object {
+ "description": "Performance metric label 5",
+ "optional": true,
+ },
+ "type": "keyword",
+ },
+ "meta": Object {
+ "_meta": Object {
+ "description": "Meta data that is searchable but not aggregatable",
+ "optional": true,
+ },
+ "type": "pass_through",
+ },
+ "value1": Object {
+ "_meta": Object {
+ "description": "Performance metric value 1",
+ "optional": true,
+ },
+ "type": "long",
+ },
+ "value2": Object {
+ "_meta": Object {
+ "description": "Performance metric value 2",
+ "optional": true,
+ },
+ "type": "long",
+ },
+ "value3": Object {
+ "_meta": Object {
+ "description": "Performance metric value 3",
+ "optional": true,
+ },
+ "type": "long",
+ },
+ "value4": Object {
+ "_meta": Object {
+ "description": "Performance metric value 4",
+ "optional": true,
+ },
+ "type": "long",
+ },
+ "value5": Object {
+ "_meta": Object {
+ "description": "Performance metric value 5",
+ "optional": true,
+ },
+ "type": "long",
+ },
+ },
+ },
+ ]
+ `);
+ expect(analyticsClientMock.registerEventType.mock.calls[1]).toMatchInlineSnapshot(`
+ Array [
+ Object {
+ "eventType": "click",
+ "schema": Object {
+ "target": Object {
+ "items": Object {
+ "_meta": Object {
+ "description": "The attributes of the clicked element and all its parents in the form \`{attr.name}={attr.value}\`. It allows finding the clicked elements by looking up its attributes like \\"data-test-subj=my-button\\".",
+ },
+ "type": "keyword",
+ },
+ "type": "array",
+ },
+ },
+ },
+ ]
+ `);
+ });
+
test('setup should expose all the register APIs, reportEvent and opt-in', () => {
const injectedMetadata = injectedMetadataServiceMock.createSetupContract();
expect(analyticsService.setup({ injectedMetadata })).toStrictEqual({
@@ -60,9 +180,9 @@ describe('AnalyticsService', () => {
test('setup should register the elasticsearch info context provider (undefined)', async () => {
const injectedMetadata = injectedMetadataServiceMock.createSetupContract();
analyticsService.setup({ injectedMetadata });
- await expect(
- firstValueFrom(analyticsClientMock.registerContextProvider.mock.calls[3][0].context$)
- ).resolves.toMatchInlineSnapshot(`undefined`);
+ expect(
+ await firstValueFrom(analyticsClientMock.registerContextProvider.mock.calls[3][0].context$)
+ ).toMatchInlineSnapshot(`undefined`);
});
test('setup should register the elasticsearch info context provider (with info)', async () => {
@@ -73,15 +193,15 @@ describe('AnalyticsService', () => {
cluster_version: 'version',
});
analyticsService.setup({ injectedMetadata });
- await expect(
- firstValueFrom(analyticsClientMock.registerContextProvider.mock.calls[3][0].context$)
- ).resolves.toMatchInlineSnapshot(`
- Object {
- "cluster_name": "cluster_name",
- "cluster_uuid": "cluster_uuid",
- "cluster_version": "version",
- }
- `);
+ expect(
+ await firstValueFrom(analyticsClientMock.registerContextProvider.mock.calls[3][0].context$)
+ ).toMatchInlineSnapshot(`
+ Object {
+ "cluster_name": "cluster_name",
+ "cluster_uuid": "cluster_uuid",
+ "cluster_version": "version",
+ }
+ `);
});
test('setup should expose only the APIs report and opt-in', () => {
diff --git a/packages/core/analytics/core-analytics-browser-internal/src/analytics_service.ts b/packages/core/analytics/core-analytics-browser-internal/src/analytics_service.ts
index 580fbac92aa5d..938b0b043bc29 100644
--- a/packages/core/analytics/core-analytics-browser-internal/src/analytics_service.ts
+++ b/packages/core/analytics/core-analytics-browser-internal/src/analytics_service.ts
@@ -9,6 +9,7 @@
import { of } from 'rxjs';
import type { AnalyticsClient } from '@kbn/analytics-client';
import { createAnalytics } from '@kbn/analytics-client';
+import { registerPerformanceMetricEventType } from '@kbn/ebt-tools';
import type { CoreContext } from '@kbn/core-base-browser-internal';
import type { InternalInjectedMetadataSetup } from '@kbn/core-injected-metadata-browser-internal';
import type { AnalyticsServiceSetup, AnalyticsServiceStart } from '@kbn/core-analytics-browser';
@@ -34,6 +35,7 @@ export class AnalyticsService {
});
this.registerBuildInfoAnalyticsContext(core);
+ registerPerformanceMetricEventType(this.analyticsClient);
// We may eventually move the following to the client's package since they are not Kibana-specific
// and can benefit other consumers of the client.
diff --git a/packages/core/analytics/core-analytics-server-internal/BUILD.bazel b/packages/core/analytics/core-analytics-server-internal/BUILD.bazel
index b7ba4ed35a5a3..0ad590f1ee505 100644
--- a/packages/core/analytics/core-analytics-server-internal/BUILD.bazel
+++ b/packages/core/analytics/core-analytics-server-internal/BUILD.bazel
@@ -28,6 +28,7 @@ NPM_MODULE_EXTRA_FILES = [
RUNTIME_DEPS = [
"@npm//rxjs",
"//packages/analytics/client",
+ "//packages/kbn-ebt-tools",
]
TYPES_DEPS = [
@@ -35,6 +36,7 @@ TYPES_DEPS = [
"@npm//@types/jest",
"@npm//rxjs",
"//packages/analytics/client:npm_module_types",
+ "//packages/kbn-ebt-tools:npm_module_types",
"//packages/core/base/core-base-server-internal:npm_module_types",
"//packages/core/analytics/core-analytics-server:npm_module_types",
]
diff --git a/packages/core/analytics/core-analytics-server-internal/src/analytics_service.test.mocks.ts b/packages/core/analytics/core-analytics-server-internal/src/analytics_service.test.mocks.ts
new file mode 100644
index 0000000000000..3d98cf4392926
--- /dev/null
+++ b/packages/core/analytics/core-analytics-server-internal/src/analytics_service.test.mocks.ts
@@ -0,0 +1,25 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 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 { AnalyticsClient } from '@kbn/analytics-client';
+import { Subject } from 'rxjs';
+
+export const analyticsClientMock: jest.Mocked = {
+ optIn: jest.fn(),
+ reportEvent: jest.fn(),
+ registerEventType: jest.fn(),
+ registerContextProvider: jest.fn(),
+ removeContextProvider: jest.fn(),
+ registerShipper: jest.fn(),
+ telemetryCounter$: new Subject(),
+ shutdown: jest.fn(),
+};
+
+jest.doMock('@kbn/analytics-client', () => ({
+ createAnalytics: () => analyticsClientMock,
+}));
diff --git a/packages/core/analytics/core-analytics-server-internal/src/analytics_service.test.ts b/packages/core/analytics/core-analytics-server-internal/src/analytics_service.test.ts
new file mode 100644
index 0000000000000..2609859ae9d8c
--- /dev/null
+++ b/packages/core/analytics/core-analytics-server-internal/src/analytics_service.test.ts
@@ -0,0 +1,158 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { firstValueFrom, Observable } from 'rxjs';
+import { mockCoreContext } from '@kbn/core-base-server-mocks';
+import { analyticsClientMock } from './analytics_service.test.mocks';
+import { AnalyticsService } from './analytics_service';
+
+describe('AnalyticsService', () => {
+ let analyticsService: AnalyticsService;
+ beforeEach(() => {
+ jest.clearAllMocks();
+ analyticsService = new AnalyticsService(mockCoreContext.create());
+ });
+
+ test('should register the context provider `build info` on creation', async () => {
+ expect(analyticsClientMock.registerContextProvider).toHaveBeenCalledTimes(1);
+ await expect(
+ await firstValueFrom(analyticsClientMock.registerContextProvider.mock.calls[0][0].context$)
+ ).toMatchInlineSnapshot(`
+ Object {
+ "branch": "main",
+ "buildNum": 9007199254740991,
+ "buildSha": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+ "isDev": true,
+ "isDistributable": false,
+ "version": "8.5.0",
+ }
+ `);
+ });
+
+ test('should register the `performance_metric` event type on creation', () => {
+ expect(analyticsClientMock.registerEventType).toHaveBeenCalledTimes(1);
+ expect(analyticsClientMock.registerEventType.mock.calls[0]).toMatchInlineSnapshot(`
+ Array [
+ Object {
+ "eventType": "performance_metric",
+ "schema": Object {
+ "duration": Object {
+ "_meta": Object {
+ "description": "The main event duration in ms",
+ },
+ "type": "integer",
+ },
+ "eventName": Object {
+ "_meta": Object {
+ "description": "The name of the event that is tracked in the metrics i.e. kibana_loaded, kibana_started",
+ },
+ "type": "keyword",
+ },
+ "key1": Object {
+ "_meta": Object {
+ "description": "Performance metric label 1",
+ "optional": true,
+ },
+ "type": "keyword",
+ },
+ "key2": Object {
+ "_meta": Object {
+ "description": "Performance metric label 2",
+ "optional": true,
+ },
+ "type": "keyword",
+ },
+ "key3": Object {
+ "_meta": Object {
+ "description": "Performance metric label 3",
+ "optional": true,
+ },
+ "type": "keyword",
+ },
+ "key4": Object {
+ "_meta": Object {
+ "description": "Performance metric label 4",
+ "optional": true,
+ },
+ "type": "keyword",
+ },
+ "key5": Object {
+ "_meta": Object {
+ "description": "Performance metric label 5",
+ "optional": true,
+ },
+ "type": "keyword",
+ },
+ "meta": Object {
+ "_meta": Object {
+ "description": "Meta data that is searchable but not aggregatable",
+ "optional": true,
+ },
+ "type": "pass_through",
+ },
+ "value1": Object {
+ "_meta": Object {
+ "description": "Performance metric value 1",
+ "optional": true,
+ },
+ "type": "long",
+ },
+ "value2": Object {
+ "_meta": Object {
+ "description": "Performance metric value 2",
+ "optional": true,
+ },
+ "type": "long",
+ },
+ "value3": Object {
+ "_meta": Object {
+ "description": "Performance metric value 3",
+ "optional": true,
+ },
+ "type": "long",
+ },
+ "value4": Object {
+ "_meta": Object {
+ "description": "Performance metric value 4",
+ "optional": true,
+ },
+ "type": "long",
+ },
+ "value5": Object {
+ "_meta": Object {
+ "description": "Performance metric value 5",
+ "optional": true,
+ },
+ "type": "long",
+ },
+ },
+ },
+ ]
+ `);
+ });
+
+ test('setup should expose all the register APIs, reportEvent and opt-in', () => {
+ expect(analyticsService.setup()).toStrictEqual({
+ registerShipper: expect.any(Function),
+ registerContextProvider: expect.any(Function),
+ removeContextProvider: expect.any(Function),
+ registerEventType: expect.any(Function),
+ reportEvent: expect.any(Function),
+ optIn: expect.any(Function),
+ telemetryCounter$: expect.any(Observable),
+ });
+ });
+
+ test('setup should expose only the APIs report and opt-in', () => {
+ expect(analyticsService.start()).toStrictEqual({
+ reportEvent: expect.any(Function),
+ optIn: expect.any(Function),
+ telemetryCounter$: expect.any(Observable),
+ });
+ });
+});
diff --git a/packages/core/analytics/core-analytics-server-internal/src/analytics_service.ts b/packages/core/analytics/core-analytics-server-internal/src/analytics_service.ts
index 0fa96ebe0ae51..46b0726660e4c 100644
--- a/packages/core/analytics/core-analytics-server-internal/src/analytics_service.ts
+++ b/packages/core/analytics/core-analytics-server-internal/src/analytics_service.ts
@@ -9,6 +9,7 @@
import { of } from 'rxjs';
import type { AnalyticsClient } from '@kbn/analytics-client';
import { createAnalytics } from '@kbn/analytics-client';
+import { registerPerformanceMetricEventType } from '@kbn/ebt-tools';
import type { CoreContext } from '@kbn/core-base-server-internal';
import type {
AnalyticsServiceSetup,
@@ -29,6 +30,7 @@ export class AnalyticsService {
});
this.registerBuildInfoAnalyticsContext(core);
+ registerPerformanceMetricEventType(this.analyticsClient);
}
public preboot(): AnalyticsServicePreboot {
diff --git a/packages/core/saved-objects/core-saved-objects-browser-internal/BUILD.bazel b/packages/core/saved-objects/core-saved-objects-browser-internal/BUILD.bazel
new file mode 100644
index 0000000000000..6e489170375fc
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser-internal/BUILD.bazel
@@ -0,0 +1,117 @@
+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 = "core-saved-objects-browser-internal"
+PKG_REQUIRE_NAME = "@kbn/core-saved-objects-browser-internal"
+
+SOURCE_FILES = glob(
+ [
+ "src/**/*.ts",
+ "src/**/*.tsx",
+ ],
+ exclude = [
+ "**/*.test.*",
+ "**/*.stories.*",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+]
+
+RUNTIME_DEPS = [
+ "@npm//lodash",
+ "//packages/elastic-safer-lodash-set",
+ ### test dependencies
+ "//packages/core/http/core-http-browser-mocks",
+]
+
+TYPES_DEPS = [
+ "@npm//@types/node",
+ "@npm//@types/jest",
+ "@npm//lodash",
+ "//packages/elastic-safer-lodash-set:npm_module_types",
+ "//packages/core/base/core-base-browser-internal:npm_module_types",
+ "//packages/core/http/core-http-browser:npm_module_types",
+ "//packages/core/saved-objects/core-saved-objects-common:npm_module_types",
+ "//packages/core/saved-objects/core-saved-objects-browser:npm_module_types",
+ "//packages/core/saved-objects/core-saved-objects-api-server:npm_module_types",
+ "//packages/core/saved-objects/core-saved-objects-api-browser:npm_module_types",
+]
+
+jsts_transpiler(
+ name = "target_node",
+ srcs = SRCS,
+ build_pkg_name = package_name(),
+)
+
+jsts_transpiler(
+ name = "target_web",
+ srcs = SRCS,
+ build_pkg_name = package_name(),
+ web = True,
+)
+
+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,
+ declaration_map = True,
+ emit_declaration_only = True,
+ out_dir = "target_types",
+ root_dir = "src",
+ tsconfig = ":tsconfig",
+)
+
+js_library(
+ name = PKG_DIRNAME,
+ srcs = NPM_MODULE_EXTRA_FILES,
+ deps = RUNTIME_DEPS + [":target_node", ":target_web"],
+ 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_types(
+ name = "npm_module_types",
+ srcs = SRCS,
+ deps = [":tsc_types"],
+ package_name = PKG_REQUIRE_NAME,
+ tsconfig = ":tsconfig",
+ visibility = ["//visibility:public"],
+)
+
+filegroup(
+ name = "build_types",
+ srcs = [":npm_module_types"],
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/core/saved-objects/core-saved-objects-browser-internal/README.md b/packages/core/saved-objects/core-saved-objects-browser-internal/README.md
new file mode 100644
index 0000000000000..0ba18ba699b42
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser-internal/README.md
@@ -0,0 +1,6 @@
+# @kbn/core-saved-objects-browser-internal
+
+This package contains the implementation, internal types and tests for Core's browser-side saved objects service.
+
+Note: the types related to the savedObjects client and repository APIs can be found in the `@kbn/core-saved-objects-api-browser` package.
+
diff --git a/packages/core/saved-objects/core-saved-objects-browser-internal/jest.config.js b/packages/core/saved-objects/core-saved-objects-browser-internal/jest.config.js
new file mode 100644
index 0000000000000..0c122581f1a55
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser-internal/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/core/saved-objects/core-saved-objects-browser-internal'],
+};
diff --git a/packages/core/saved-objects/core-saved-objects-browser-internal/package.json b/packages/core/saved-objects/core-saved-objects-browser-internal/package.json
new file mode 100644
index 0000000000000..dcb18eba421c5
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser-internal/package.json
@@ -0,0 +1,9 @@
+{
+ "name": "@kbn/core-saved-objects-browser-internal",
+ "private": true,
+ "version": "1.0.0",
+ "main": "./target_node/index.js",
+ "browser": "./target_web/index.js",
+ "author": "Kibana Core",
+ "license": "SSPL-1.0 OR Elastic License 2.0"
+}
diff --git a/src/core/public/saved_objects/index.ts b/packages/core/saved-objects/core-saved-objects-browser-internal/src/index.ts
similarity index 89%
rename from src/core/public/saved_objects/index.ts
rename to packages/core/saved-objects/core-saved-objects-browser-internal/src/index.ts
index cb3ab31cea5c8..0b7d08a7f0b18 100644
--- a/src/core/public/saved_objects/index.ts
+++ b/packages/core/saved-objects/core-saved-objects-browser-internal/src/index.ts
@@ -9,4 +9,3 @@
export { SavedObjectsService } from './saved_objects_service';
export type { SavedObjectsClient } from './saved_objects_client';
export { SimpleSavedObjectImpl } from './simple_saved_object';
-export type { SavedObjectsStart } from './saved_objects_service';
diff --git a/src/core/public/saved_objects/saved_objects_client.test.ts b/packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_client.test.ts
similarity index 100%
rename from src/core/public/saved_objects/saved_objects_client.test.ts
rename to packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_client.test.ts
diff --git a/src/core/public/saved_objects/saved_objects_client.ts b/packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_client.ts
similarity index 100%
rename from src/core/public/saved_objects/saved_objects_client.ts
rename to packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_client.ts
diff --git a/src/core/public/saved_objects/saved_objects_service.ts b/packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_service.ts
similarity index 78%
rename from src/core/public/saved_objects/saved_objects_service.ts
rename to packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_service.ts
index 776e35700a0af..111d98bfcc126 100644
--- a/src/core/public/saved_objects/saved_objects_service.ts
+++ b/packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_service.ts
@@ -8,17 +8,9 @@
import type { CoreService } from '@kbn/core-base-browser-internal';
import type { HttpStart } from '@kbn/core-http-browser';
-import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-browser';
+import type { SavedObjectsStart } from '@kbn/core-saved-objects-browser';
import { SavedObjectsClient } from './saved_objects_client';
-/**
- * @public
- */
-export interface SavedObjectsStart {
- /** {@link SavedObjectsClientContract} */
- client: SavedObjectsClientContract;
-}
-
export class SavedObjectsService implements CoreService {
public async setup() {}
diff --git a/src/core/public/saved_objects/simple_saved_object.test.ts b/packages/core/saved-objects/core-saved-objects-browser-internal/src/simple_saved_object.test.ts
similarity index 100%
rename from src/core/public/saved_objects/simple_saved_object.test.ts
rename to packages/core/saved-objects/core-saved-objects-browser-internal/src/simple_saved_object.test.ts
diff --git a/src/core/public/saved_objects/simple_saved_object.ts b/packages/core/saved-objects/core-saved-objects-browser-internal/src/simple_saved_object.ts
similarity index 100%
rename from src/core/public/saved_objects/simple_saved_object.ts
rename to packages/core/saved-objects/core-saved-objects-browser-internal/src/simple_saved_object.ts
diff --git a/packages/core/saved-objects/core-saved-objects-browser-internal/tsconfig.json b/packages/core/saved-objects/core-saved-objects-browser-internal/tsconfig.json
new file mode 100644
index 0000000000000..39d3c7097814a
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser-internal/tsconfig.json
@@ -0,0 +1,18 @@
+{
+ "extends": "../../../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outDir": "target_types",
+ "rootDir": "src",
+ "stripInternal": false,
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": [
+ "src/**/*"
+ ]
+}
diff --git a/packages/core/saved-objects/core-saved-objects-browser-mocks/BUILD.bazel b/packages/core/saved-objects/core-saved-objects-browser-mocks/BUILD.bazel
new file mode 100644
index 0000000000000..c1f827840f738
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser-mocks/BUILD.bazel
@@ -0,0 +1,109 @@
+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 = "core-saved-objects-browser-mocks"
+PKG_REQUIRE_NAME = "@kbn/core-saved-objects-browser-mocks"
+
+SOURCE_FILES = glob(
+ [
+ "src/**/*.ts",
+ "src/**/*.tsx",
+ ],
+ exclude = [
+ "**/*.test.*",
+ "**/*.stories.*",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+]
+
+RUNTIME_DEPS = [
+ "//packages/core/saved-objects/core-saved-objects-browser-internal"
+]
+
+TYPES_DEPS = [
+ "@npm//@types/node",
+ "@npm//@types/jest",
+ "//packages/kbn-utility-types:npm_module_types",
+ "//packages/core/saved-objects/core-saved-objects-browser:npm_module_types",
+ "//packages/core/saved-objects/core-saved-objects-browser-internal:npm_module_types"
+]
+
+jsts_transpiler(
+ name = "target_node",
+ srcs = SRCS,
+ build_pkg_name = package_name(),
+)
+
+jsts_transpiler(
+ name = "target_web",
+ srcs = SRCS,
+ build_pkg_name = package_name(),
+ web = True,
+)
+
+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,
+ declaration_map = True,
+ emit_declaration_only = True,
+ out_dir = "target_types",
+ root_dir = "src",
+ tsconfig = ":tsconfig",
+)
+
+js_library(
+ name = PKG_DIRNAME,
+ srcs = NPM_MODULE_EXTRA_FILES,
+ deps = RUNTIME_DEPS + [":target_node", ":target_web"],
+ 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_types(
+ name = "npm_module_types",
+ srcs = SRCS,
+ deps = [":tsc_types"],
+ package_name = PKG_REQUIRE_NAME,
+ tsconfig = ":tsconfig",
+ visibility = ["//visibility:public"],
+)
+
+filegroup(
+ name = "build_types",
+ srcs = [":npm_module_types"],
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/core/saved-objects/core-saved-objects-browser-mocks/README.md b/packages/core/saved-objects/core-saved-objects-browser-mocks/README.md
new file mode 100644
index 0000000000000..5c3e17e59876e
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser-mocks/README.md
@@ -0,0 +1,3 @@
+# @kbn/core-saved-objects-browser-mocks
+
+This package contains the mocks for core's browser-side saved objects service.
diff --git a/packages/core/saved-objects/core-saved-objects-browser-mocks/jest.config.js b/packages/core/saved-objects/core-saved-objects-browser-mocks/jest.config.js
new file mode 100644
index 0000000000000..25e2ef97a1d09
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser-mocks/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/core/saved-objects/core-saved-objects-browser-mocks'],
+};
diff --git a/packages/core/saved-objects/core-saved-objects-browser-mocks/package.json b/packages/core/saved-objects/core-saved-objects-browser-mocks/package.json
new file mode 100644
index 0000000000000..d05e22ddfda3f
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser-mocks/package.json
@@ -0,0 +1,9 @@
+{
+ "name": "@kbn/core-saved-objects-browser-mocks",
+ "private": true,
+ "version": "1.0.0",
+ "main": "./target_node/index.js",
+ "browser": "./target_web/index.js",
+ "author": "Kibana Core",
+ "license": "SSPL-1.0 OR Elastic License 2.0"
+}
diff --git a/packages/core/saved-objects/core-saved-objects-browser-mocks/src/index.ts b/packages/core/saved-objects/core-saved-objects-browser-mocks/src/index.ts
new file mode 100644
index 0000000000000..f10ac6b53f2c9
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser-mocks/src/index.ts
@@ -0,0 +1,10 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+export { savedObjectsServiceMock } from './saved_objects_service.mock';
+export { simpleSavedObjectMock } from './simple_saved_object.mock';
diff --git a/src/core/public/saved_objects/saved_objects_service.mock.ts b/packages/core/saved-objects/core-saved-objects-browser-mocks/src/saved_objects_service.mock.ts
similarity index 74%
rename from src/core/public/saved_objects/saved_objects_service.mock.ts
rename to packages/core/saved-objects/core-saved-objects-browser-mocks/src/saved_objects_service.mock.ts
index 8e483094eed4b..0caa572238807 100644
--- a/src/core/public/saved_objects/saved_objects_service.mock.ts
+++ b/packages/core/saved-objects/core-saved-objects-browser-mocks/src/saved_objects_service.mock.ts
@@ -6,7 +6,11 @@
* Side Public License, v 1.
*/
-import { SavedObjectsService, SavedObjectsStart } from './saved_objects_service';
+import type { PublicMethodsOf } from '@kbn/utility-types';
+import type { SavedObjectsService } from '@kbn/core-saved-objects-browser-internal';
+import type { SavedObjectsStart } from '@kbn/core-saved-objects-browser';
+
+type SavedObjectsServiceContract = PublicMethodsOf;
const createStartContractMock = () => {
const mock: jest.Mocked = {
@@ -27,7 +31,7 @@ const createStartContractMock = () => {
};
const createMock = () => {
- const mocked: jest.Mocked = {
+ const mocked: jest.Mocked = {
setup: jest.fn(),
start: jest.fn(),
stop: jest.fn(),
diff --git a/packages/core/saved-objects/core-saved-objects-browser-mocks/src/simple_saved_object.mock.ts b/packages/core/saved-objects/core-saved-objects-browser-mocks/src/simple_saved_object.mock.ts
new file mode 100644
index 0000000000000..6ed402ccc30c5
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser-mocks/src/simple_saved_object.mock.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 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 { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-browser';
+import { SimpleSavedObjectImpl } from '@kbn/core-saved-objects-browser-internal';
+import type { SavedObject } from '@kbn/core-saved-objects-common';
+
+const createSimpleSavedObjectMock = (
+ client: SavedObjectsClientContract,
+ savedObject: SavedObject
+) => new SimpleSavedObjectImpl(client, savedObject);
+
+export const simpleSavedObjectMock = {
+ create: createSimpleSavedObjectMock,
+};
diff --git a/packages/core/saved-objects/core-saved-objects-browser-mocks/tsconfig.json b/packages/core/saved-objects/core-saved-objects-browser-mocks/tsconfig.json
new file mode 100644
index 0000000000000..39d3c7097814a
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser-mocks/tsconfig.json
@@ -0,0 +1,18 @@
+{
+ "extends": "../../../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outDir": "target_types",
+ "rootDir": "src",
+ "stripInternal": false,
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": [
+ "src/**/*"
+ ]
+}
diff --git a/packages/core/saved-objects/core-saved-objects-browser/BUILD.bazel b/packages/core/saved-objects/core-saved-objects-browser/BUILD.bazel
new file mode 100644
index 0000000000000..17fb2cdf203b9
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser/BUILD.bazel
@@ -0,0 +1,106 @@
+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 = "core-saved-objects-browser"
+PKG_REQUIRE_NAME = "@kbn/core-saved-objects-browser"
+
+SOURCE_FILES = glob(
+ [
+ "src/**/*.ts",
+ "src/**/*.tsx",
+ ],
+ exclude = [
+ "**/*.test.*",
+ "**/*.stories.*",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+]
+
+RUNTIME_DEPS = [
+]
+
+TYPES_DEPS = [
+ "@npm//@types/node",
+ "@npm//@types/jest",
+ "//packages/core/saved-objects/core-saved-objects-api-browser:npm_module_types"
+]
+
+jsts_transpiler(
+ name = "target_node",
+ srcs = SRCS,
+ build_pkg_name = package_name(),
+)
+
+jsts_transpiler(
+ name = "target_web",
+ srcs = SRCS,
+ build_pkg_name = package_name(),
+ web = True,
+)
+
+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,
+ declaration_map = True,
+ emit_declaration_only = True,
+ out_dir = "target_types",
+ root_dir = "src",
+ tsconfig = ":tsconfig",
+)
+
+js_library(
+ name = PKG_DIRNAME,
+ srcs = NPM_MODULE_EXTRA_FILES,
+ deps = RUNTIME_DEPS + [":target_node", ":target_web"],
+ 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_types(
+ name = "npm_module_types",
+ srcs = SRCS,
+ deps = [":tsc_types"],
+ package_name = PKG_REQUIRE_NAME,
+ tsconfig = ":tsconfig",
+ visibility = ["//visibility:public"],
+)
+
+filegroup(
+ name = "build_types",
+ srcs = [":npm_module_types"],
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/core/saved-objects/core-saved-objects-browser/README.md b/packages/core/saved-objects/core-saved-objects-browser/README.md
new file mode 100644
index 0000000000000..ee5a54934313d
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser/README.md
@@ -0,0 +1,5 @@
+# @kbn/core-saved-objects-browser
+
+This package contains the public types for core's browser-side saved objects service.
+
+Note: the types related to the savedObjects client and repository APIs can be found in the `@kbn/core-saved-objects-api-browser` package.
diff --git a/packages/core/saved-objects/core-saved-objects-browser/jest.config.js b/packages/core/saved-objects/core-saved-objects-browser/jest.config.js
new file mode 100644
index 0000000000000..2765d4ead2322
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser/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/core/saved-objects/core-saved-objects-browser'],
+};
diff --git a/packages/core/saved-objects/core-saved-objects-browser/package.json b/packages/core/saved-objects/core-saved-objects-browser/package.json
new file mode 100644
index 0000000000000..6494337430596
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser/package.json
@@ -0,0 +1,9 @@
+{
+ "name": "@kbn/core-saved-objects-browser",
+ "private": true,
+ "version": "1.0.0",
+ "main": "./target_node/index.js",
+ "browser": "./target_web/index.js",
+ "author": "Kibana Core",
+ "license": "SSPL-1.0 OR Elastic License 2.0"
+}
diff --git a/packages/core/saved-objects/core-saved-objects-browser/src/contracts.ts b/packages/core/saved-objects/core-saved-objects-browser/src/contracts.ts
new file mode 100644
index 0000000000000..c372f3169ed80
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser/src/contracts.ts
@@ -0,0 +1,16 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-browser';
+
+/**
+ * @public
+ */
+export interface SavedObjectsStart {
+ /** {@link SavedObjectsClientContract} */
+ client: SavedObjectsClientContract;
+}
diff --git a/packages/kbn-kibana-json-schema/src/index.ts b/packages/core/saved-objects/core-saved-objects-browser/src/index.ts
similarity index 86%
rename from packages/kbn-kibana-json-schema/src/index.ts
rename to packages/core/saved-objects/core-saved-objects-browser/src/index.ts
index 57d8be3e215e6..d9333ccedd329 100644
--- a/packages/kbn-kibana-json-schema/src/index.ts
+++ b/packages/core/saved-objects/core-saved-objects-browser/src/index.ts
@@ -6,4 +6,4 @@
* Side Public License, v 1.
*/
-export { KibanaJsonSchema } from './kibana_json_schema';
+export type { SavedObjectsStart } from './contracts';
diff --git a/packages/core/saved-objects/core-saved-objects-browser/tsconfig.json b/packages/core/saved-objects/core-saved-objects-browser/tsconfig.json
new file mode 100644
index 0000000000000..39d3c7097814a
--- /dev/null
+++ b/packages/core/saved-objects/core-saved-objects-browser/tsconfig.json
@@ -0,0 +1,18 @@
+{
+ "extends": "../../../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outDir": "target_types",
+ "rootDir": "src",
+ "stripInternal": false,
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": [
+ "src/**/*"
+ ]
+}
diff --git a/packages/kbn-coloring/src/shared_components/coloring/color_ranges/color_ranges_extra_actions.tsx b/packages/kbn-coloring/src/shared_components/coloring/color_ranges/color_ranges_extra_actions.tsx
index 9d8d1fe590c9e..e7cdba71008f9 100644
--- a/packages/kbn-coloring/src/shared_components/coloring/color_ranges/color_ranges_extra_actions.tsx
+++ b/packages/kbn-coloring/src/shared_components/coloring/color_ranges/color_ranges_extra_actions.tsx
@@ -51,7 +51,7 @@ export function ColorRangesExtraActions({
});
return (
-
+
) => {
const prevStartValue = colorRanges[index - 1]?.start ?? Number.NEGATIVE_INFINITY;
@@ -162,15 +166,28 @@ export function ColorRangeItem({
}
);
+ const styles = useMemo(
+ () => css`
+ display: block;
+ min-width: ${euiTheme.size.xl};
+ text-align: center;
+ `,
+ [euiTheme.size.xl]
+ );
+
return (
-
+
{!isLast ? (
+
) : (
) : (
-
+
)}
diff --git a/packages/kbn-coloring/src/shared_components/coloring/palette_configuration.tsx b/packages/kbn-coloring/src/shared_components/coloring/palette_configuration.tsx
index 3bca5955182a9..2822402981e0d 100644
--- a/packages/kbn-coloring/src/shared_components/coloring/palette_configuration.tsx
+++ b/packages/kbn-coloring/src/shared_components/coloring/palette_configuration.tsx
@@ -76,10 +76,8 @@ export const CustomizablePalette = ({
const styles = useMemo(
() => css`
padding: ${euiTheme.size.base};
- background-color: ${euiTheme.colors.lightestShade};
- border-bottom: ${euiTheme.border.thin};
`,
- [euiTheme.size.base, euiTheme.colors.lightestShade, euiTheme.border.thin]
+ [euiTheme.size.base]
);
return (
diff --git a/packages/kbn-dev-utils/BUILD.bazel b/packages/kbn-dev-utils/BUILD.bazel
index 8222acb1c3a00..303ce379cfd16 100644
--- a/packages/kbn-dev-utils/BUILD.bazel
+++ b/packages/kbn-dev-utils/BUILD.bazel
@@ -50,7 +50,7 @@ RUNTIME_DEPS = [
"//packages/kbn-stdio-dev-helpers",
"//packages/kbn-ci-stats-reporter",
"//packages/kbn-jest-serializers",
- "//packages/kbn-kibana-json-schema",
+ "//packages/kbn-kibana-manifest-schema",
"@npm//@babel/core",
"@npm//axios",
"@npm//chalk",
@@ -84,7 +84,7 @@ TYPES_DEPS = [
"//packages/kbn-stdio-dev-helpers:npm_module_types",
"//packages/kbn-ci-stats-reporter:npm_module_types",
"//packages/kbn-jest-serializers:npm_module_types",
- "//packages/kbn-kibana-json-schema:npm_module_types",
+ "//packages/kbn-kibana-manifest-schema:npm_module_types",
"@npm//@babel/parser",
"@npm//@babel/types",
"@npm//@types/babel__core",
diff --git a/packages/kbn-dev-utils/src/index.ts b/packages/kbn-dev-utils/src/index.ts
index ddaa0ff37b47a..edaf2b2f47927 100644
--- a/packages/kbn-dev-utils/src/index.ts
+++ b/packages/kbn-dev-utils/src/index.ts
@@ -25,5 +25,4 @@ export * from './plugin_list';
export * from './streams';
export * from './babel';
export * from './extract';
-export * from './vscode_config';
export * from './diff_strings';
diff --git a/packages/kbn-ebt-tools/BUILD.bazel b/packages/kbn-ebt-tools/BUILD.bazel
new file mode 100644
index 0000000000000..e4c4209361906
--- /dev/null
+++ b/packages/kbn-ebt-tools/BUILD.bazel
@@ -0,0 +1,101 @@
+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_BASE_NAME = "kbn-ebt-tools"
+PKG_REQUIRE_NAME = "@kbn/ebt-tools"
+
+SOURCE_FILES = glob(
+ [
+ "src/**/*.ts",
+ ],
+ exclude = ["**/*.test.*"],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+ "README.md"
+]
+
+RUNTIME_DEPS = []
+
+TYPES_DEPS = [
+ "//packages/analytics/client:npm_module_types",
+ "@npm//@types/jest",
+ "@npm//@types/node",
+]
+
+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,
+ declaration_map = True,
+ emit_declaration_only = True,
+ out_dir = "target_types",
+ root_dir = "src",
+ tsconfig = ":tsconfig",
+)
+
+js_library(
+ name = PKG_BASE_NAME,
+ 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 = [
+ ":%s" % PKG_BASE_NAME,
+ ]
+)
+
+filegroup(
+ name = "build",
+ srcs = [
+ ":npm_module",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+pkg_npm_types(
+ name = "npm_module_types",
+ srcs = SRCS,
+ deps = [":tsc_types"],
+ package_name = PKG_REQUIRE_NAME,
+ tsconfig = ":tsconfig",
+ visibility = ["//visibility:public"],
+)
+
+filegroup(
+ name = "build_types",
+ srcs = [
+ ":npm_module_types",
+ ],
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/kbn-ebt-tools/README.md b/packages/kbn-ebt-tools/README.md
new file mode 100644
index 0000000000000..72aae680b49b8
--- /dev/null
+++ b/packages/kbn-ebt-tools/README.md
@@ -0,0 +1,3 @@
+# @kbn/ebt-tools
+
+Shared tools for event based telemetry
\ No newline at end of file
diff --git a/packages/kbn-ebt-tools/jest.config.js b/packages/kbn-ebt-tools/jest.config.js
new file mode 100644
index 0000000000000..56faeaaa0b324
--- /dev/null
+++ b/packages/kbn-ebt-tools/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-ebt-tools'],
+};
diff --git a/packages/kbn-ebt-tools/package.json b/packages/kbn-ebt-tools/package.json
new file mode 100644
index 0000000000000..5e5136966b5f9
--- /dev/null
+++ b/packages/kbn-ebt-tools/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "@kbn/ebt-tools",
+ "version": "1.0.0",
+ "license": "SSPL-1.0 OR Elastic License 2.0",
+ "browser": "./target_web/index.js",
+ "main": "./target_node/index.js",
+ "private": true
+}
\ No newline at end of file
diff --git a/packages/kbn-scalability-simulation-generator/src/index.ts b/packages/kbn-ebt-tools/src/index.ts
similarity index 83%
rename from packages/kbn-scalability-simulation-generator/src/index.ts
rename to packages/kbn-ebt-tools/src/index.ts
index 108817e96f603..9357513d40f55 100644
--- a/packages/kbn-scalability-simulation-generator/src/index.ts
+++ b/packages/kbn-ebt-tools/src/index.ts
@@ -6,5 +6,4 @@
* Side Public License, v 1.
*/
-export { generator } from './generate_files';
-export * from './cli';
+export * from './performance_metric_events';
diff --git a/packages/kbn-ebt-tools/src/performance_metric_events/helpers.test.ts b/packages/kbn-ebt-tools/src/performance_metric_events/helpers.test.ts
new file mode 100644
index 0000000000000..a6ad3970a6a97
--- /dev/null
+++ b/packages/kbn-ebt-tools/src/performance_metric_events/helpers.test.ts
@@ -0,0 +1,98 @@
+/*
+ * Copyright 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 { createAnalytics, type AnalyticsClient } from '@kbn/analytics-client';
+import { loggerMock } from '@kbn/logging-mocks';
+import { registerPerformanceMetricEventType, reportPerformanceMetricEvent } from './helpers';
+import { METRIC_EVENT_SCHEMA } from './schema';
+
+describe('performance metric event helpers', () => {
+ let analyticsClient: AnalyticsClient;
+
+ describe('registerPerformanceMetricEventType', () => {
+ beforeEach(() => {
+ analyticsClient = createAnalytics({
+ isDev: true, // Explicitly setting `true` to ensure we have event validation to make sure the events sent pass our validation.
+ sendTo: 'staging',
+ logger: loggerMock.create(),
+ });
+ });
+
+ test('registers the `performance_metric` eventType to the analytics client', () => {
+ const registerEventTypeSpy = jest.spyOn(analyticsClient, 'registerEventType');
+
+ expect(() => registerPerformanceMetricEventType(analyticsClient)).not.toThrow();
+
+ expect(registerEventTypeSpy).toHaveBeenCalledWith({
+ eventType: 'performance_metric',
+ schema: METRIC_EVENT_SCHEMA,
+ });
+ });
+ });
+
+ describe('reportPerformanceMetricEvent', () => {
+ beforeEach(() => {
+ analyticsClient = createAnalytics({
+ isDev: true, // Explicitly setting `true` to ensure we have event validation to make sure the events sent pass our validation.
+ sendTo: 'staging',
+ logger: loggerMock.create(),
+ });
+ registerPerformanceMetricEventType(analyticsClient);
+ });
+
+ test('reports the minimum allowed event', () => {
+ reportPerformanceMetricEvent(analyticsClient, { eventName: 'test-event', duration: 1000 });
+ });
+
+ test('reports all the allowed fields in the event', () => {
+ reportPerformanceMetricEvent(analyticsClient, {
+ eventName: 'test-event',
+ meta: { my: { custom: { fields: 'here' } }, another_field: true, status: 'something' },
+ duration: 10,
+ key1: 'something',
+ value1: 10,
+ key2: 'something',
+ value2: 10,
+ key3: 'something',
+ value3: 10,
+ key4: 'something',
+ value4: 10,
+ key5: 'something',
+ value5: 10,
+ });
+ });
+
+ test('should fail if eventName and duration is missing', () => {
+ expect(() =>
+ reportPerformanceMetricEvent(
+ analyticsClient,
+ // @ts-expect-error
+ {}
+ )
+ ).toThrowErrorMatchingInlineSnapshot(`
+ "Failed to validate payload coming from \\"Event Type 'performance_metric'\\":
+ - [eventName]: {\\"expected\\":\\"string\\",\\"actual\\":\\"undefined\\",\\"value\\":\\"undefined\\"}
+ - [duration]: {\\"expected\\":\\"number\\",\\"actual\\":\\"undefined\\",\\"value\\":\\"undefined\\"}"
+ `);
+ });
+
+ test('should fail if any additional unknown keys are added', () => {
+ expect(() =>
+ reportPerformanceMetricEvent(analyticsClient, {
+ eventName: 'test-event',
+ duration: 1000,
+ // @ts-expect-error
+ an_unknown_field: 'blah',
+ })
+ ).toThrowErrorMatchingInlineSnapshot(`
+ "Failed to validate payload coming from \\"Event Type 'performance_metric'\\":
+ - []: excess key 'an_unknown_field' found"
+ `);
+ });
+ });
+});
diff --git a/packages/kbn-ebt-tools/src/performance_metric_events/helpers.ts b/packages/kbn-ebt-tools/src/performance_metric_events/helpers.ts
new file mode 100644
index 0000000000000..ed971118687c3
--- /dev/null
+++ b/packages/kbn-ebt-tools/src/performance_metric_events/helpers.ts
@@ -0,0 +1,38 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type { AnalyticsClient } from '@kbn/analytics-client';
+import { type PerformanceMetricEvent, METRIC_EVENT_SCHEMA } from './schema';
+
+const PERFORMANCE_METRIC_EVENT_TYPE = 'performance_metric';
+
+/**
+ * Register the `performance_metric` event type
+ * @param analytics The {@link AnalyticsClient} during the setup phase (it has the method `registerEventType`)
+ * @private To be called only by core's Analytics Service
+ */
+export function registerPerformanceMetricEventType(
+ analytics: Pick
+) {
+ analytics.registerEventType({
+ eventType: PERFORMANCE_METRIC_EVENT_TYPE,
+ schema: METRIC_EVENT_SCHEMA,
+ });
+}
+
+/**
+ * Report a `performance_metric` event type.
+ * @param analytics The {@link AnalyticsClient} to report the events.
+ * @param eventData The data to send, conforming the structure of a {@link MetricEvent}.
+ */
+export function reportPerformanceMetricEvent(
+ analytics: Pick,
+ eventData: PerformanceMetricEvent
+) {
+ analytics.reportEvent(PERFORMANCE_METRIC_EVENT_TYPE, eventData);
+}
diff --git a/packages/kbn-ebt-tools/src/performance_metric_events/index.ts b/packages/kbn-ebt-tools/src/performance_metric_events/index.ts
new file mode 100644
index 0000000000000..0002b082754dd
--- /dev/null
+++ b/packages/kbn-ebt-tools/src/performance_metric_events/index.ts
@@ -0,0 +1,12 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+export type { PerformanceMetricEvent as MetricEvent } from './schema';
+export {
+ registerPerformanceMetricEventType as registerPerformanceMetricEventType,
+ reportPerformanceMetricEvent,
+} from './helpers';
diff --git a/packages/kbn-ebt-tools/src/performance_metric_events/schema.ts b/packages/kbn-ebt-tools/src/performance_metric_events/schema.ts
new file mode 100644
index 0000000000000..ed0b3a8eefde5
--- /dev/null
+++ b/packages/kbn-ebt-tools/src/performance_metric_events/schema.ts
@@ -0,0 +1,138 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type { RootSchema } from '@kbn/analytics-client';
+
+/**
+ * Structure of the `metric` event
+ */
+export interface PerformanceMetricEvent {
+ /**
+ * The name of the event that is tracked in the metrics i.e. kibana_loaded, kibana_started
+ */
+ eventName: string;
+ /**
+ * Searchable but not aggregateable metadata relevant to the tracked action.
+ */
+ meta?: Record;
+
+ /**
+ * @group Standardized fields
+ * The time (in milliseconds) it took to run the entire action.
+ */
+ duration: number;
+
+ /**
+ * @group Free fields for custom metrics (searchable and aggregateable)
+ * Description label for the metric 1
+ */
+ key1?: string;
+ /**
+ * @group Free fields for custom metrics (searchable and aggregateable)
+ * Value for the metric 1
+ */
+ value1?: number;
+ /**
+ * @group Free fields for custom metrics (searchable and aggregateable)
+ * Description label for the metric 2
+ */
+ key2?: string;
+ /**
+ * @group Free fields for custom metrics (searchable and aggregateable)
+ * Value for the metric 2
+ */
+ value2?: number;
+ /**
+ * @group Free fields for custom metrics (searchable and aggregateable)
+ * Description label for the metric 3
+ */
+ key3?: string;
+ /**
+ * @group Free fields for custom metrics (searchable and aggregateable)
+ * Value for the metric 3
+ */
+ value3?: number;
+ /**
+ * @group Free fields for custom metrics (searchable and aggregateable)
+ * Description label for the metric 4
+ */
+ key4?: string;
+ /**
+ * @group Free fields for custom metrics (searchable and aggregateable)
+ * Value for the metric 4
+ */
+ value4?: number;
+ /**
+ * @group Free fields for custom metrics (searchable and aggregateable)
+ * Description label for the metric 5
+ */
+ key5?: string;
+ /**
+ * @group Free fields for custom metrics (searchable and aggregateable)
+ * Value for the metric 5
+ */
+ value5?: number;
+}
+
+export const METRIC_EVENT_SCHEMA: RootSchema = {
+ eventName: {
+ type: 'keyword',
+ _meta: {
+ description:
+ 'The name of the event that is tracked in the metrics i.e. kibana_loaded, kibana_started',
+ },
+ },
+ meta: {
+ type: 'pass_through',
+ _meta: { description: 'Meta data that is searchable but not aggregatable', optional: true },
+ },
+ duration: {
+ type: 'integer',
+ _meta: { description: 'The main event duration in ms' },
+ },
+ key1: {
+ type: 'keyword',
+ _meta: { description: 'Performance metric label 1', optional: true },
+ },
+ value1: {
+ type: 'long',
+ _meta: { description: 'Performance metric value 1', optional: true },
+ },
+ key2: {
+ type: 'keyword',
+ _meta: { description: 'Performance metric label 2', optional: true },
+ },
+ value2: {
+ type: 'long',
+ _meta: { description: 'Performance metric value 2', optional: true },
+ },
+ key3: {
+ type: 'keyword',
+ _meta: { description: 'Performance metric label 3', optional: true },
+ },
+ value3: {
+ type: 'long',
+ _meta: { description: 'Performance metric value 3', optional: true },
+ },
+ key4: {
+ type: 'keyword',
+ _meta: { description: 'Performance metric label 4', optional: true },
+ },
+ value4: {
+ type: 'long',
+ _meta: { description: 'Performance metric value 4', optional: true },
+ },
+ key5: {
+ type: 'keyword',
+ _meta: { description: 'Performance metric label 5', optional: true },
+ },
+ value5: {
+ type: 'long',
+ _meta: { description: 'Performance metric value 5', optional: true },
+ },
+};
diff --git a/packages/kbn-ebt-tools/tsconfig.json b/packages/kbn-ebt-tools/tsconfig.json
new file mode 100644
index 0000000000000..bb93370ed412f
--- /dev/null
+++ b/packages/kbn-ebt-tools/tsconfig.json
@@ -0,0 +1,16 @@
+{
+ "extends": "../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outDir": "target_types",
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": [
+ "src/**/*"
+ ]
+}
diff --git a/packages/kbn-jsonc/BUILD.bazel b/packages/kbn-jsonc/BUILD.bazel
new file mode 100644
index 0000000000000..41620e12bead7
--- /dev/null
+++ b/packages/kbn-jsonc/BUILD.bazel
@@ -0,0 +1,117 @@
+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-jsonc"
+PKG_REQUIRE_NAME = "@kbn/jsonc"
+
+SOURCE_FILES = glob(
+ [
+ "src/**/*.js",
+ ],
+ exclude = [
+ "**/*.test.*",
+ "**/*.stories.*",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+]
+
+# In this array place runtime dependencies, including other packages and NPM packages
+# which must be available for this code to run.
+#
+# To reference other packages use:
+# "//repo/relative/path/to/package"
+# eg. "//packages/kbn-utils"
+#
+# To reference a NPM package use:
+# "@npm//name-of-package"
+# eg. "@npm//lodash"
+RUNTIME_DEPS = [
+]
+
+# In this array place dependencies necessary to build the types, which will include the
+# :npm_module_types target of other packages and packages from NPM, including @types/*
+# packages.
+#
+# To reference the types for another package use:
+# "//repo/relative/path/to/package:npm_module_types"
+# eg. "//packages/kbn-utils:npm_module_types"
+#
+# References to NPM packages work the same as 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,
+ declaration_map = True,
+ allow_js = True,
+ emit_declaration_only = True,
+ out_dir = "target_types",
+ root_dir = "src",
+ 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"],
+)
+
+pkg_npm(
+ name = "npm_module",
+ deps = [":" + PKG_DIRNAME],
+)
+
+filegroup(
+ name = "build",
+ srcs = [":npm_module"],
+ visibility = ["//visibility:public"],
+)
+
+pkg_npm_types(
+ name = "npm_module_types",
+ srcs = SRCS,
+ deps = [":tsc_types"],
+ package_name = PKG_REQUIRE_NAME,
+ tsconfig = ":tsconfig",
+ visibility = ["//visibility:public"],
+)
+
+filegroup(
+ name = "build_types",
+ srcs = [":npm_module_types"],
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/kbn-jsonc/README.mdx b/packages/kbn-jsonc/README.mdx
new file mode 100644
index 0000000000000..79ab8fc52bd92
--- /dev/null
+++ b/packages/kbn-jsonc/README.mdx
@@ -0,0 +1,20 @@
+---
+id: kibDevDocsOpsJsonc
+slug: /kibana-dev-docs/ops/jsonc
+title: "@kbn/jsonc"
+description: A package for parsing jsonc
+date: 2022-05-24
+tags: ['kibana', 'dev', 'contributor', 'operations', 'json', 'jsonc']
+---
+
+This package exposes a simple `parse(jsonc: string)` function for parsing JSON-C content. JSON-C is a variant of JSON which supports both block and line comments, which are incredibly useful for configuration files that are committed to the repository and would benefit from the context of comments.
+
+Additionally supported in JSON-C... TRAILING COMMAS!
+
+VSCode and TypeScript use jsonc for their config files, so we're already using it in a lot of places, but we're going to start using it in more places too. This package is implemented in vanilla JS with a vendored copy of [`strip-json-comments`](https://github.com/sindresorhus/strip-json-comments) so that we can use this code from kbn_pm without node modules installed.
+
+## API
+
+### parse(jsonc: string): any
+
+Parses a JSON-C string into the value defined by the content.
\ No newline at end of file
diff --git a/packages/kbn-scalability-simulation-generator/jest.config.js b/packages/kbn-jsonc/jest.config.js
similarity index 86%
rename from packages/kbn-scalability-simulation-generator/jest.config.js
rename to packages/kbn-jsonc/jest.config.js
index c8a3f90fa670b..c958647e1c154 100644
--- a/packages/kbn-scalability-simulation-generator/jest.config.js
+++ b/packages/kbn-jsonc/jest.config.js
@@ -9,5 +9,5 @@
module.exports = {
preset: '@kbn/test/jest_node',
rootDir: '../..',
- roots: ['/packages/kbn-scalability-simulation-generator'],
+ roots: ['/packages/kbn-jsonc'],
};
diff --git a/packages/kbn-kibana-json-schema/package.json b/packages/kbn-jsonc/package.json
similarity index 77%
rename from packages/kbn-kibana-json-schema/package.json
rename to packages/kbn-jsonc/package.json
index 12df4c2d199a2..73fc5acfe447c 100644
--- a/packages/kbn-kibana-json-schema/package.json
+++ b/packages/kbn-jsonc/package.json
@@ -1,5 +1,5 @@
{
- "name": "@kbn/kibana-json-schema",
+ "name": "@kbn/jsonc",
"private": true,
"version": "1.0.0",
"main": "./target_node/index.js",
diff --git a/packages/kbn-jsonc/src/index.js b/packages/kbn-jsonc/src/index.js
new file mode 100644
index 0000000000000..89ad44c7fdcc9
--- /dev/null
+++ b/packages/kbn-jsonc/src/index.js
@@ -0,0 +1,23 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+const { stripJsonComments } = require('./strip_json_comments');
+
+/**
+ * @param {string} jsonWithComments
+ */
+function parse(jsonWithComments) {
+ return JSON.parse(
+ stripJsonComments(jsonWithComments, {
+ whitespace: false,
+ trailingCommas: true,
+ })
+ );
+}
+
+module.exports = { parse };
diff --git a/packages/kbn-jsonc/src/strip_json_comments.js b/packages/kbn-jsonc/src/strip_json_comments.js
new file mode 100644
index 0000000000000..01c3f2932da2a
--- /dev/null
+++ b/packages/kbn-jsonc/src/strip_json_comments.js
@@ -0,0 +1,153 @@
+/* eslint-disable @kbn/eslint/require-license-header */
+
+/**
+ * @notice
+ *
+ * Vendored copy of `strip-json-comments` so that we can use it when npm modules are not available.
+ * https://github.com/sindresorhus/strip-json-comments/tree/34b79cb0f1129aa85ef4b5c3292e8bc546984ef9
+ *
+ * MIT License
+ *
+ * Copyright (c) Sindre Sorhus (https://sindresorhus.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+const singleComment = Symbol('singleComment');
+const multiComment = Symbol('multiComment');
+
+const stripWithoutWhitespace = () => '';
+
+/**
+ * @param {string} string
+ * @param {number | undefined} start
+ * @param {number | undefined} end
+ */
+const stripWithWhitespace = (string, start = undefined, end = undefined) =>
+ string.slice(start, end).replace(/\S/g, ' ');
+
+/**
+ * @param {string} jsonString
+ * @param {number} quotePosition
+ */
+const isEscaped = (jsonString, quotePosition) => {
+ let index = quotePosition - 1;
+ let backslashCount = 0;
+
+ while (jsonString[index] === '\\') {
+ index -= 1;
+ backslashCount += 1;
+ }
+
+ return Boolean(backslashCount % 2);
+};
+
+/**
+ * @param {string} jsonString
+ * @param {{ whitespace?: boolean; trailingCommas?: boolean }} options
+ */
+function stripJsonComments(jsonString, { whitespace = true, trailingCommas = false } = {}) {
+ if (typeof jsonString !== 'string') {
+ throw new TypeError(
+ `Expected argument \`jsonString\` to be a \`string\`, got \`${typeof jsonString}\``
+ );
+ }
+
+ const strip = whitespace ? stripWithWhitespace : stripWithoutWhitespace;
+
+ let isInsideString = false;
+ /** @type {boolean | symbol} */
+ let isInsideComment = false;
+ let offset = 0;
+ let buffer = '';
+ let result = '';
+ let commaIndex = -1;
+
+ for (let index = 0; index < jsonString.length; index++) {
+ const currentCharacter = jsonString[index];
+ const nextCharacter = jsonString[index + 1];
+
+ if (!isInsideComment && currentCharacter === '"') {
+ // Enter or exit string
+ const escaped = isEscaped(jsonString, index);
+ if (!escaped) {
+ isInsideString = !isInsideString;
+ }
+ }
+
+ if (isInsideString) {
+ continue;
+ }
+
+ if (!isInsideComment && currentCharacter + nextCharacter === '//') {
+ // Enter single-line comment
+ buffer += jsonString.slice(offset, index);
+ offset = index;
+ isInsideComment = singleComment;
+ index++;
+ } else if (isInsideComment === singleComment && currentCharacter + nextCharacter === '\r\n') {
+ // Exit single-line comment via \r\n
+ index++;
+ isInsideComment = false;
+ buffer += strip(jsonString, offset, index);
+ offset = index;
+ continue;
+ } else if (isInsideComment === singleComment && currentCharacter === '\n') {
+ // Exit single-line comment via \n
+ isInsideComment = false;
+ buffer += strip(jsonString, offset, index);
+ offset = index;
+ } else if (!isInsideComment && currentCharacter + nextCharacter === '/*') {
+ // Enter multiline comment
+ buffer += jsonString.slice(offset, index);
+ offset = index;
+ isInsideComment = multiComment;
+ index++;
+ continue;
+ } else if (isInsideComment === multiComment && currentCharacter + nextCharacter === '*/') {
+ // Exit multiline comment
+ index++;
+ isInsideComment = false;
+ buffer += strip(jsonString, offset, index + 1);
+ offset = index + 1;
+ continue;
+ } else if (trailingCommas && !isInsideComment) {
+ if (commaIndex !== -1) {
+ if (currentCharacter === '}' || currentCharacter === ']') {
+ // Strip trailing comma
+ buffer += jsonString.slice(offset, index);
+ result += strip(buffer, 0, 1) + buffer.slice(1);
+ buffer = '';
+ offset = index;
+ commaIndex = -1;
+ } else if (
+ currentCharacter !== ' ' &&
+ currentCharacter !== '\t' &&
+ currentCharacter !== '\r' &&
+ currentCharacter !== '\n'
+ ) {
+ // Hit non-whitespace following a comma; comma is not trailing
+ buffer += jsonString.slice(offset, index);
+ offset = index;
+ commaIndex = -1;
+ }
+ } else if (currentCharacter === ',') {
+ // Flush buffer prior to this point, and save new comma index
+ result += buffer + jsonString.slice(offset, index);
+ buffer = '';
+ offset = index;
+ commaIndex = index;
+ }
+ }
+ }
+
+ return (
+ result + buffer + (isInsideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset))
+ );
+}
+
+module.exports = { stripJsonComments };
diff --git a/packages/kbn-jsonc/tsconfig.json b/packages/kbn-jsonc/tsconfig.json
new file mode 100644
index 0000000000000..9f78bc243ac66
--- /dev/null
+++ b/packages/kbn-jsonc/tsconfig.json
@@ -0,0 +1,20 @@
+{
+ "extends": "../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "allowJs": true,
+ "checkJs": true,
+ "outDir": "target_types",
+ "rootDir": "src",
+ "stripInternal": false,
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": [
+ "src/**/*"
+ ]
+}
diff --git a/packages/kbn-kibana-json-schema/README.md b/packages/kbn-kibana-json-schema/README.md
deleted file mode 100644
index f1edda001081b..0000000000000
--- a/packages/kbn-kibana-json-schema/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# @kbn/kibana-json-schema
-
-The JSON Schema used for kibana.json files
\ No newline at end of file
diff --git a/packages/kbn-kibana-manifest-parser/BUILD.bazel b/packages/kbn-kibana-manifest-parser/BUILD.bazel
new file mode 100644
index 0000000000000..17c8bc4a226f6
--- /dev/null
+++ b/packages/kbn-kibana-manifest-parser/BUILD.bazel
@@ -0,0 +1,119 @@
+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-kibana-manifest-parser"
+PKG_REQUIRE_NAME = "@kbn/kibana-manifest-parser"
+
+SOURCE_FILES = glob(
+ [
+ "src/**/*.js",
+ "src/**/*.ts",
+ ],
+ exclude = [
+ "**/*.test.*",
+ "**/*.stories.*",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+]
+
+# In this array place runtime dependencies, including other packages and NPM packages
+# which must be available for this code to run.
+#
+# To reference other packages use:
+# "//repo/relative/path/to/package"
+# eg. "//packages/kbn-utils"
+#
+# To reference a NPM package use:
+# "@npm//name-of-package"
+# eg. "@npm//lodash"
+RUNTIME_DEPS = [
+]
+
+# In this array place dependencies necessary to build the types, which will include the
+# :npm_module_types target of other packages and packages from NPM, including @types/*
+# packages.
+#
+# To reference the types for another package use:
+# "//repo/relative/path/to/package:npm_module_types"
+# eg. "//packages/kbn-utils:npm_module_types"
+#
+# References to NPM packages work the same as RUNTIME_DEPS
+TYPES_DEPS = [
+ "@npm//@types/node",
+ "@npm//@types/jest",
+ "//packages/kbn-jsonc:npm_module_types",
+]
+
+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,
+ declaration_map = True,
+ allow_js = True,
+ emit_declaration_only = True,
+ out_dir = "target_types",
+ root_dir = "src",
+ 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"],
+)
+
+pkg_npm(
+ name = "npm_module",
+ deps = [":" + PKG_DIRNAME],
+)
+
+filegroup(
+ name = "build",
+ srcs = [":npm_module"],
+ visibility = ["//visibility:public"],
+)
+
+pkg_npm_types(
+ name = "npm_module_types",
+ srcs = SRCS,
+ deps = [":tsc_types"],
+ package_name = PKG_REQUIRE_NAME,
+ tsconfig = ":tsconfig",
+ visibility = ["//visibility:public"],
+)
+
+filegroup(
+ name = "build_types",
+ srcs = [":npm_module_types"],
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/kbn-kibana-manifest-parser/README.mdx b/packages/kbn-kibana-manifest-parser/README.mdx
new file mode 100644
index 0000000000000..52467e94cdcec
--- /dev/null
+++ b/packages/kbn-kibana-manifest-parser/README.mdx
@@ -0,0 +1,24 @@
+---
+id: kibDevDocsOpsKibanaManifestParser
+slug: /kibana-dev-docs/ops/kibana-manifest-parser
+title: "@kbn/kibana-manifest-parser"
+description: A package for parsing Kibana package manifest files
+date: 2022-05-24
+tags: ['kibana', 'dev', 'contributor', 'operations', 'package', 'kibana.json', 'kibana.jsonc']
+---
+
+This package exposes functions and types for parsing Kibana manifest files (in the new `kibana.jsonc` format)
+
+## API
+
+### `parseKibanaManifest(jsonc: string): KibanaPackageManifest`
+
+Parses a JSON-C string into a valid `KibanaPackageManifest` object. If the manifest is invalid an error is thrown.
+
+### `readKibanaManifest(path: string): KibanaPackageManifest`
+
+Read a Kibana manifest from disk and parse it, returning a KibanaPackageManifest. If the file doesn't exist or is invalid in some way an error is thrown.
+
+### `validateKibanaManifest(value: unknown): KibanaPackageManifest`
+
+Validate a parsed Kibana manifest. If the manifest is invalid an error is thrown.
diff --git a/packages/kbn-kibana-manifest-parser/jest.config.js b/packages/kbn-kibana-manifest-parser/jest.config.js
new file mode 100644
index 0000000000000..f50552e3e36e5
--- /dev/null
+++ b/packages/kbn-kibana-manifest-parser/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/jest_node',
+ rootDir: '../..',
+ roots: ['/packages/kbn-kibana-manifest-parser'],
+};
diff --git a/packages/kbn-kibana-manifest-parser/package.json b/packages/kbn-kibana-manifest-parser/package.json
new file mode 100644
index 0000000000000..e2ab7ac2417e9
--- /dev/null
+++ b/packages/kbn-kibana-manifest-parser/package.json
@@ -0,0 +1,7 @@
+{
+ "name": "@kbn/kibana-manifest-parser",
+ "private": true,
+ "version": "1.0.0",
+ "main": "./target_node/index.js",
+ "license": "SSPL-1.0 OR Elastic License 2.0"
+}
diff --git a/packages/kbn-kibana-manifest-parser/src/index.ts b/packages/kbn-kibana-manifest-parser/src/index.ts
new file mode 100644
index 0000000000000..18f51e4986a6e
--- /dev/null
+++ b/packages/kbn-kibana-manifest-parser/src/index.ts
@@ -0,0 +1,14 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+export {
+ parseKibanaManifest,
+ readKibanaManifest,
+ validateKibanaManifest,
+} from './parse_kibana_manifest';
+export type { KibanaPackageManifest } from './kibana_manifest';
diff --git a/packages/kbn-kibana-manifest-parser/src/kibana_manifest.ts b/packages/kbn-kibana-manifest-parser/src/kibana_manifest.ts
new file mode 100644
index 0000000000000..2f99b0293d8a2
--- /dev/null
+++ b/packages/kbn-kibana-manifest-parser/src/kibana_manifest.ts
@@ -0,0 +1,52 @@
+/*
+ * Copyright 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 type KibanaPackageType =
+ | 'plugin-browser'
+ | 'plugin-server'
+ | 'shared-browser'
+ | 'shared-server'
+ | 'shared-common'
+ | 'shared-scss'
+ | 'functional-tests'
+ | 'test-helper';
+
+interface PackageManifestBaseFields {
+ type: KibanaPackageType;
+ id: string;
+ owner: string;
+ typeDeps: string[];
+ runtimeDeps: string[];
+}
+
+export interface PluginPackageManifest extends PackageManifestBaseFields {
+ type: 'plugin-browser' | 'plugin-server';
+ plugin: {
+ id: string;
+ configPath?: string[];
+ requiredPlugins?: string[];
+ optionalPlugins?: string[];
+ description?: string;
+ enabledOnAnonymousPages?: boolean;
+ serviceFolders?: string[];
+ };
+}
+
+export interface SharedBrowserPackageManifest extends PackageManifestBaseFields {
+ type: 'shared-browser' | 'shared-common';
+ sharedBrowserBundle?: boolean;
+}
+
+export interface BasePackageManifest extends PackageManifestBaseFields {
+ type: 'shared-server' | 'functional-tests' | 'test-helper' | 'shared-scss';
+}
+
+export type KibanaPackageManifest =
+ | PluginPackageManifest
+ | SharedBrowserPackageManifest
+ | BasePackageManifest;
diff --git a/packages/kbn-kibana-manifest-parser/src/parse_kibana_manifest.test.ts b/packages/kbn-kibana-manifest-parser/src/parse_kibana_manifest.test.ts
new file mode 100644
index 0000000000000..4743adb1f5e48
--- /dev/null
+++ b/packages/kbn-kibana-manifest-parser/src/parse_kibana_manifest.test.ts
@@ -0,0 +1,229 @@
+/*
+ * Copyright 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 { validateKibanaManifest } from './parse_kibana_manifest';
+
+const BASE_FIELDS = {
+ id: '@kbn/foo',
+ owner: '@elastic/kibana-operations',
+ typeDeps: [],
+ runtimeDeps: [],
+};
+
+describe('validateKibanaManifest', () => {
+ it('requires valid type', () => {
+ expect(() => validateKibanaManifest({})).toThrowErrorMatchingInlineSnapshot(
+ `"invalid package \\"type\\", options are [functional-tests, plugin-browser, plugin-server, shared-browser, shared-common, shared-server, test-helper, shared-scss]"`
+ );
+ });
+
+ it('requires valid id', () => {
+ expect(() =>
+ validateKibanaManifest({
+ type: 'plugin-browser',
+ })
+ ).toThrowErrorMatchingInlineSnapshot(
+ `"invalid package \\"id\\", must be a string that starts with @kbn/"`
+ );
+ });
+
+ it('requires valid owner', () => {
+ expect(() =>
+ validateKibanaManifest({
+ type: 'plugin-browser',
+ id: '@kbn/foo',
+ })
+ ).toThrowErrorMatchingInlineSnapshot(
+ `"invalid package \\"owner\\", must be a valid Github team handle starting with @"`
+ );
+ });
+
+ it('requires valid typeDeps', () => {
+ expect(() =>
+ validateKibanaManifest({
+ type: 'plugin-browser',
+ id: '@kbn/foo',
+ owner: '@elastic/kibana-operations',
+ })
+ ).toThrowErrorMatchingInlineSnapshot(`"invalid \\"typeDeps\\", must be an array of strings"`);
+
+ expect(() =>
+ validateKibanaManifest({
+ type: 'plugin-browser',
+ id: '@kbn/foo',
+ owner: '@elastic/kibana-operations',
+ typeDeps: false,
+ })
+ ).toThrowErrorMatchingInlineSnapshot(`"invalid \\"typeDeps\\", must be an array of strings"`);
+
+ expect(() =>
+ validateKibanaManifest({
+ type: 'plugin-browser',
+ id: '@kbn/foo',
+ owner: '@elastic/kibana-operations',
+ typeDeps: [1],
+ })
+ ).toThrowErrorMatchingInlineSnapshot(`"invalid \\"typeDeps\\", must be an array of strings"`);
+ });
+
+ it('requires valid runtimeDeps', () => {
+ expect(() =>
+ validateKibanaManifest({
+ type: 'plugin-browser',
+ id: '@kbn/foo',
+ owner: '@elastic/kibana-operations',
+ typeDeps: [],
+ })
+ ).toThrowErrorMatchingInlineSnapshot(
+ `"invalid \\"runtimeDeps\\", must be an array of strings"`
+ );
+
+ expect(() =>
+ validateKibanaManifest({
+ type: 'plugin-browser',
+ id: '@kbn/foo',
+ owner: '@elastic/kibana-operations',
+ typeDeps: [],
+ runtimeDeps: false,
+ })
+ ).toThrowErrorMatchingInlineSnapshot(
+ `"invalid \\"runtimeDeps\\", must be an array of strings"`
+ );
+
+ expect(() =>
+ validateKibanaManifest({
+ type: 'plugin-browser',
+ id: '@kbn/foo',
+ owner: '@elastic/kibana-operations',
+ typeDeps: [],
+ runtimeDeps: [1],
+ })
+ ).toThrowErrorMatchingInlineSnapshot(
+ `"invalid \\"runtimeDeps\\", must be an array of strings"`
+ );
+ });
+
+ it('validates base types', () => {
+ expect(
+ validateKibanaManifest({
+ type: 'shared-server',
+ ...BASE_FIELDS,
+ })
+ ).toMatchInlineSnapshot(`
+ Object {
+ "id": "@kbn/foo",
+ "owner": "@elastic/kibana-operations",
+ "runtimeDeps": Array [],
+ "type": "shared-server",
+ "typeDeps": Array [],
+ }
+ `);
+ expect(
+ validateKibanaManifest({
+ type: 'functional-tests',
+ ...BASE_FIELDS,
+ })
+ ).toMatchInlineSnapshot(`
+ Object {
+ "id": "@kbn/foo",
+ "owner": "@elastic/kibana-operations",
+ "runtimeDeps": Array [],
+ "type": "functional-tests",
+ "typeDeps": Array [],
+ }
+ `);
+ expect(
+ validateKibanaManifest({
+ type: 'test-helper',
+ ...BASE_FIELDS,
+ })
+ ).toMatchInlineSnapshot(`
+ Object {
+ "id": "@kbn/foo",
+ "owner": "@elastic/kibana-operations",
+ "runtimeDeps": Array [],
+ "type": "test-helper",
+ "typeDeps": Array [],
+ }
+ `);
+ });
+
+ describe('plugin-* types', () => {
+ it('requires valid plugin for plugin-* types', () => {
+ expect(() =>
+ validateKibanaManifest({
+ type: 'plugin-browser',
+ id: '@kbn/foo',
+ owner: '@elastic/kibana-operations',
+ typeDeps: [],
+ runtimeDeps: [],
+ })
+ ).toThrowErrorMatchingInlineSnapshot(`"invalid package \\"plugin\\", must be an object"`);
+ });
+
+ it('requires "id" in plugins', () => {
+ expect(() =>
+ validateKibanaManifest({
+ type: 'plugin-browser',
+ id: '@kbn/foo',
+ owner: '@elastic/kibana-operations',
+ typeDeps: [],
+ runtimeDeps: [],
+ plugin: {},
+ })
+ ).toThrowErrorMatchingInlineSnapshot(
+ `"invalid \\"plugin.id\\", must be a string in camel or snake case"`
+ );
+
+ expect(() =>
+ validateKibanaManifest({
+ type: 'plugin-browser',
+ id: '@kbn/foo',
+ owner: '@elastic/kibana-operations',
+ typeDeps: [],
+ runtimeDeps: [],
+ plugin: {
+ id: 'not-camel-case',
+ },
+ })
+ ).toThrowErrorMatchingInlineSnapshot(
+ `"invalid \\"plugin.id\\", must be a string in camel or snake case"`
+ );
+
+ expect(
+ validateKibanaManifest({
+ type: 'plugin-browser',
+ id: '@kbn/foo',
+ owner: '@elastic/kibana-operations',
+ typeDeps: [],
+ runtimeDeps: [],
+ plugin: {
+ id: 'camelCase',
+ },
+ })
+ ).toMatchInlineSnapshot(`
+ Object {
+ "id": "@kbn/foo",
+ "owner": "@elastic/kibana-operations",
+ "plugin": Object {
+ "configPath": undefined,
+ "description": undefined,
+ "enabledOnAnonymousPages": undefined,
+ "id": "camelCase",
+ "optionalPlugins": undefined,
+ "requiredPlugins": undefined,
+ "serviceFolders": undefined,
+ },
+ "runtimeDeps": Array [],
+ "type": "plugin-browser",
+ "typeDeps": Array [],
+ }
+ `);
+ });
+ });
+});
diff --git a/packages/kbn-kibana-manifest-parser/src/parse_kibana_manifest.ts b/packages/kbn-kibana-manifest-parser/src/parse_kibana_manifest.ts
new file mode 100644
index 0000000000000..aeccd08e6d8c0
--- /dev/null
+++ b/packages/kbn-kibana-manifest-parser/src/parse_kibana_manifest.ts
@@ -0,0 +1,189 @@
+/*
+ * Copyright 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 { parse } from '@kbn/jsonc';
+import { PluginPackageManifest, KibanaPackageManifest } from './kibana_manifest';
+
+import {
+ isObj,
+ isValidId,
+ isValidPkgType,
+ isArrOfIds,
+ isArrOfStrings,
+ PACKAGE_TYPES,
+} from './util';
+
+const err = (msg: string) => new Error(msg);
+
+function validateKibanaManifestPlugin(plugin: unknown): PluginPackageManifest['plugin'] {
+ if (!isObj(plugin)) {
+ throw err(`invalid package "plugin", must be an object`);
+ }
+
+ const {
+ id,
+ configPath,
+ requiredPlugins,
+ optionalPlugins,
+ description,
+ enabledOnAnonymousPages,
+ serviceFolders,
+ ...extra
+ } = plugin;
+
+ const extraKeys = Object.keys(extra);
+ if (extraKeys.length) {
+ throw err(`unexpected keys in "plugin" of package [${extraKeys.join(', ')}]`);
+ }
+
+ if (typeof id !== 'string' || !isValidId(id)) {
+ throw err(`invalid "plugin.id", must be a string in camel or snake case`);
+ }
+
+ if (configPath !== undefined && !isArrOfIds(configPath)) {
+ throw err(`invalid "plugin.configPath", must be an array of strings in camel or snake case`);
+ }
+
+ if (requiredPlugins !== undefined && !isArrOfIds(requiredPlugins)) {
+ throw err(
+ `invalid "plugin.requiredPlugins", must be an array of strings in camel or snake case`
+ );
+ }
+
+ if (optionalPlugins !== undefined && !isArrOfIds(optionalPlugins)) {
+ throw err(
+ `invalid "plugin.requiredPlugins", must be an array of strings in camel or snake case`
+ );
+ }
+
+ if (description !== undefined && typeof description !== 'string') {
+ throw err(`invalid "plugin.description", must be a string`);
+ }
+
+ if (enabledOnAnonymousPages !== undefined && typeof enabledOnAnonymousPages !== 'boolean') {
+ throw err(`invalid "plugin.enabledOnAnonymousPages", must be a boolean`);
+ }
+
+ if (serviceFolders !== undefined && !isArrOfStrings(serviceFolders)) {
+ throw err(`invalid "plugin.serviceFolders", must be an array of strings`);
+ }
+
+ return {
+ id,
+ configPath,
+ requiredPlugins,
+ optionalPlugins,
+ description,
+ enabledOnAnonymousPages,
+ serviceFolders,
+ };
+}
+
+/**
+ * Validate the contents of a parsed kibana.jsonc file.
+ */
+export function validateKibanaManifest(parsed: unknown): KibanaPackageManifest {
+ if (!isObj(parsed)) {
+ throw err('expected root value to be an object');
+ }
+
+ const { type, id, owner, typeDeps, runtimeDeps, plugin, sharedBrowserBundle, ...extra } = parsed;
+
+ const extraKeys = Object.keys(extra);
+ if (extraKeys.length) {
+ throw err(`unexpected keys in package manifest [${extraKeys.join(', ')}]`);
+ }
+
+ if (!isValidPkgType(type)) {
+ throw err(`invalid package "type", options are [${PACKAGE_TYPES.join(', ')}]`);
+ }
+
+ if (typeof id !== 'string' || !id.startsWith('@kbn/')) {
+ throw err(`invalid package "id", must be a string that starts with @kbn/`);
+ }
+
+ if (typeof owner !== 'string' || !owner.startsWith('@')) {
+ throw err(`invalid package "owner", must be a valid Github team handle starting with @`);
+ }
+
+ if (!isArrOfStrings(typeDeps)) {
+ throw err(`invalid "typeDeps", must be an array of strings`);
+ }
+
+ if (!isArrOfStrings(runtimeDeps)) {
+ throw err(`invalid "runtimeDeps", must be an array of strings`);
+ }
+
+ const base = {
+ id,
+ owner,
+ typeDeps,
+ runtimeDeps,
+ };
+
+ // return if this is one of the more basic types of package types
+ if (type === 'shared-server' || type === 'functional-tests' || type === 'test-helper') {
+ return {
+ type,
+ ...base,
+ };
+ }
+
+ // handle the plugin field for plugin-* types
+ if (type === 'plugin-browser' || type === 'plugin-server') {
+ return {
+ type,
+ ...base,
+ plugin: validateKibanaManifestPlugin(plugin),
+ };
+ }
+
+ // parse the sharedBrowserBundle for shared-browser and shared-common types
+ if (sharedBrowserBundle !== undefined && typeof sharedBrowserBundle !== 'boolean') {
+ throw err(`invalid "sharedBrowserBundle" field, expected undefined or a boolean`);
+ }
+ return {
+ type,
+ ...base,
+ sharedBrowserBundle,
+ };
+}
+
+/**
+ * Parse a kibana.jsonc file from the filesystem
+ */
+export function readKibanaManifest(path: string) {
+ let content;
+ try {
+ content = Fs.readFileSync(path, 'utf8');
+ } catch (error) {
+ if (error.code === 'ENOENT') {
+ throw err(`Missing kibana.json file at ${path}`);
+ }
+
+ throw error;
+ }
+
+ return parseKibanaManifest(content);
+}
+
+/**
+ * Parse a kibana.jsonc file from a string
+ */
+export function parseKibanaManifest(content: string) {
+ let parsed;
+ try {
+ parsed = parse(content);
+ } catch (error) {
+ throw err(`Invalid JSONc: ${error.message}`);
+ }
+
+ return validateKibanaManifest(parsed);
+}
diff --git a/packages/kbn-kibana-manifest-parser/src/util.ts b/packages/kbn-kibana-manifest-parser/src/util.ts
new file mode 100644
index 0000000000000..07b6a6c40a91e
--- /dev/null
+++ b/packages/kbn-kibana-manifest-parser/src/util.ts
@@ -0,0 +1,44 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 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 { KibanaPackageType } from './kibana_manifest';
+
+export const ID_PATTERN = /^[a-z][a-zA-Z_]*$/;
+
+export function isObj(v: unknown): v is Record {
+ return typeof v === 'object' && v !== null;
+}
+
+export const isArrOfStrings = (v: unknown): v is string[] =>
+ Array.isArray(v) && v.every((i) => typeof i === 'string');
+
+export const isValidId = (id: string) => ID_PATTERN.test(id);
+
+export const isArrOfIds = (v: unknown): v is string[] => isArrOfStrings(v) && v.every(isValidId);
+
+/**
+ * This weird map allows us to ensure that every value in the
+ * `KibanaPackageType` union is represented because the mapped
+ * type requires that the `PACKAGE_TYPE_MAP` map has a property
+ * matching every value in the union.
+ */
+const PACKAGE_TYPE_MAP: { [k in KibanaPackageType]: true } = {
+ 'functional-tests': true,
+ 'plugin-browser': true,
+ 'plugin-server': true,
+ 'shared-browser': true,
+ 'shared-common': true,
+ 'shared-server': true,
+ 'test-helper': true,
+ 'shared-scss': true,
+};
+
+export const PACKAGE_TYPES = Object.keys(PACKAGE_TYPE_MAP) as KibanaPackageType[];
+
+export const isValidPkgType = (type: unknown): type is keyof typeof PACKAGE_TYPE_MAP =>
+ typeof type === 'string' && Object.hasOwn(PACKAGE_TYPE_MAP, type);
diff --git a/packages/kbn-kibana-manifest-parser/tsconfig.json b/packages/kbn-kibana-manifest-parser/tsconfig.json
new file mode 100644
index 0000000000000..9f78bc243ac66
--- /dev/null
+++ b/packages/kbn-kibana-manifest-parser/tsconfig.json
@@ -0,0 +1,20 @@
+{
+ "extends": "../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "allowJs": true,
+ "checkJs": true,
+ "outDir": "target_types",
+ "rootDir": "src",
+ "stripInternal": false,
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": [
+ "src/**/*"
+ ]
+}
diff --git a/packages/kbn-kibana-json-schema/BUILD.bazel b/packages/kbn-kibana-manifest-schema/BUILD.bazel
similarity index 94%
rename from packages/kbn-kibana-json-schema/BUILD.bazel
rename to packages/kbn-kibana-manifest-schema/BUILD.bazel
index df7e96d012266..db36bbbb6c26f 100644
--- a/packages/kbn-kibana-json-schema/BUILD.bazel
+++ b/packages/kbn-kibana-manifest-schema/BUILD.bazel
@@ -2,8 +2,8 @@ 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-kibana-json-schema"
-PKG_REQUIRE_NAME = "@kbn/kibana-json-schema"
+PKG_DIRNAME = "kbn-kibana-manifest-schema"
+PKG_REQUIRE_NAME = "@kbn/kibana-manifest-schema"
SOURCE_FILES = glob(
[
@@ -52,7 +52,8 @@ TYPES_DEPS = [
"@npm//@types/dedent",
"@npm//@types/node",
"@npm//@types/jest",
- "@npm//json-schema-typed"
+ "@npm//@types/json-schema",
+ "@npm//json-schema-typed",
]
jsts_transpiler(
diff --git a/packages/kbn-kibana-manifest-schema/README.mdx b/packages/kbn-kibana-manifest-schema/README.mdx
new file mode 100644
index 0000000000000..96def9e65ee73
--- /dev/null
+++ b/packages/kbn-kibana-manifest-schema/README.mdx
@@ -0,0 +1,10 @@
+---
+id: kibDevDocsOpsKibanaManifestSchema
+slug: /kibana-dev-docs/ops/kibana-manifest-schema
+title: "@kbn/jsonc"
+description: The JSON schema for Kibana manifest files
+date: 2022-05-24
+tags: ['kibana', 'dev', 'contributor', 'operations', 'json', 'schema', 'manifest']
+---
+
+This package exposes JSON-Schema definitions for the `kibana.json` and `kibana.jsonc` manifest files. The JSON-Schemas are not used for validation, but are instead installed in the `.vscode` directory to provide autocomplete for these files in VSCode.
\ No newline at end of file
diff --git a/packages/kbn-kibana-manifest-schema/jest.config.js b/packages/kbn-kibana-manifest-schema/jest.config.js
new file mode 100644
index 0000000000000..90cda1a572f6a
--- /dev/null
+++ b/packages/kbn-kibana-manifest-schema/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/jest_node',
+ rootDir: '../..',
+ roots: ['/packages/kbn-kibana-manifest-schema'],
+};
diff --git a/packages/kbn-kibana-manifest-schema/package.json b/packages/kbn-kibana-manifest-schema/package.json
new file mode 100644
index 0000000000000..3bcb493067c9b
--- /dev/null
+++ b/packages/kbn-kibana-manifest-schema/package.json
@@ -0,0 +1,7 @@
+{
+ "name": "@kbn/kibana-manifest-schema",
+ "private": true,
+ "version": "1.0.0",
+ "main": "./target_node/index.js",
+ "license": "SSPL-1.0 OR Elastic License 2.0"
+}
diff --git a/packages/kbn-kibana-manifest-schema/src/desc.ts b/packages/kbn-kibana-manifest-schema/src/desc.ts
new file mode 100644
index 0000000000000..de286397d73d3
--- /dev/null
+++ b/packages/kbn-kibana-manifest-schema/src/desc.ts
@@ -0,0 +1,26 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import dedent from 'dedent';
+
+export const desc = (str: TemplateStringsArray, vars?: any[]) => {
+ const sourceLines = dedent(str, vars)
+ .split('\n')
+ .map((l) => l.trim());
+ const lines: string[] = [];
+ for (const line of sourceLines) {
+ if (line === '') {
+ lines.push('', '');
+ continue;
+ }
+
+ const existing = lines.length ? lines.pop() : '';
+ lines.push(existing ? `${existing} ${line}` : line);
+ }
+ return lines.join('\n');
+};
diff --git a/packages/kbn-kibana-manifest-schema/src/index.ts b/packages/kbn-kibana-manifest-schema/src/index.ts
new file mode 100644
index 0000000000000..5545942012e7e
--- /dev/null
+++ b/packages/kbn-kibana-manifest-schema/src/index.ts
@@ -0,0 +1,10 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+export { MANIFEST_V1 } from './kibana_json_v1_schema';
+export { MANIFEST_V2 } from './kibana_json_v2_schema';
diff --git a/packages/kbn-kibana-json-schema/src/kibana_json_schema.ts b/packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts
similarity index 90%
rename from packages/kbn-kibana-json-schema/src/kibana_json_schema.ts
rename to packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts
index 40686a9230cc6..2b6372649d9a2 100644
--- a/packages/kbn-kibana-json-schema/src/kibana_json_schema.ts
+++ b/packages/kbn-kibana-manifest-schema/src/kibana_json_v1_schema.ts
@@ -6,15 +6,15 @@
* Side Public License, v 1.
*/
-import type { JSONSchema } from 'json-schema-typed';
-import dedent from 'dedent';
+import { JSONSchema } from 'json-schema-typed';
+import { desc } from './desc';
-export const KibanaJsonSchema: JSONSchema = {
+export const MANIFEST_V1: JSONSchema = {
type: 'object',
required: ['id', 'version', 'owner'],
properties: {
id: {
- description: dedent`
+ description: desc`
Identifier of the plugin. Must be a string in camelCase. Part of a plugin
public contract. Other plugins leverage it to access plugin API, navigate
to the plugin, etc.
@@ -28,7 +28,7 @@ export const KibanaJsonSchema: JSONSchema = {
pattern: '^(kibana|v?\\d+(\\.\\d+){0,2})$',
},
kibanaVersion: {
- description: dedent`
+ description: desc`
The version of Kibana the plugin is compatible with, defaults to the value of the version field.
`,
type: 'string',
@@ -50,7 +50,7 @@ export const KibanaJsonSchema: JSONSchema = {
],
},
requiredPlugins: {
- description: dedent`
+ description: desc`
An optional list of the other plugins that MUST BE installed and enabled for this
plugin to function properly.
`,
@@ -58,7 +58,7 @@ export const KibanaJsonSchema: JSONSchema = {
items: { type: 'string' },
},
optionalPlugins: {
- description: dedent`
+ description: desc`
An optional list of the other plugins that if installed and enabled **may be**
leveraged by this plugin for some additional functionality but otherwise are
not required for this plugin to work properly.
@@ -67,7 +67,7 @@ export const KibanaJsonSchema: JSONSchema = {
items: { type: 'string' },
},
requiredBundles: {
- description: dedent`
+ description: desc`
An optional list of the other plugins that if installed and enabled MAY BE leveraged
by this plugin for some additional functionality but otherwise are not required for
this plugin to work properly.
@@ -81,20 +81,20 @@ export const KibanaJsonSchema: JSONSchema = {
items: { type: 'string' },
},
ui: {
- description: dedent`
+ description: desc`
Specifies whether plugin includes some client/browser specific functionality
that should be included into client bundle via \`public/ui_plugin.js\` file.
`,
type: 'boolean',
},
server: {
- description: dedent`
+ description: desc`
Specifies whether plugin includes some server-side specific functionality.
`,
type: 'boolean',
},
extraPublicDirs: {
- description: dedent`
+ description: desc`
Specifies directory names that can be imported by other ui-plugins built
using the same instance of the @kbn/optimizer. A temporary measure we plan
to replace with better mechanisms for sharing static code between plugins
@@ -104,7 +104,7 @@ export const KibanaJsonSchema: JSONSchema = {
items: { type: 'string' },
},
serviceFolders: {
- description: dedent`
+ description: desc`
Only used for the automatically generated API documentation. Specifying service
folders will cause your plugin API reference to be broken up into sub sections.
`,
@@ -120,7 +120,7 @@ export const KibanaJsonSchema: JSONSchema = {
type: 'string',
},
githubTeam: {
- description: dedent`
+ description: desc`
All internal plugins should have a github team specified. GitHub teams can be
viewed here: https://github.com/orgs/elastic/teams
`,
@@ -129,13 +129,13 @@ export const KibanaJsonSchema: JSONSchema = {
},
},
description: {
- description: dedent`
+ description: desc`
A brief description of what this plugin does and any capabilities it provides.
`,
type: 'string',
},
enabledOnAnonymousPages: {
- description: dedent`
+ description: desc`
Specifies whether this plugin - and its required dependencies - will be enabled for anonymous pages (login page, status page when
configured, etc.) Default is false.
`,
diff --git a/packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts b/packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts
new file mode 100644
index 0000000000000..ca02e48f00e2d
--- /dev/null
+++ b/packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts
@@ -0,0 +1,147 @@
+/*
+ * Copyright 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 { JSONSchema } from 'json-schema-typed';
+import { desc } from './desc';
+
+export const PLUGIN_ID_PATTERN = /^[a-z][a-zA-Z_]*$/;
+
+export const MANIFEST_V2: JSONSchema = {
+ type: 'object',
+ required: ['id', 'type', 'owner', 'typeDependencies', 'runtimeDependencies'],
+ properties: {
+ id: {
+ type: 'string',
+ pattern: '^@kbn/',
+ },
+ owner: {
+ type: 'string',
+ description: desc`
+ Github handle for the person or team who is responsible for this package.
+ This owner will be used in the codeowners files for this package.
+
+ For additional codeowners, you add additional entries at the end of the
+ codeowners file.
+ `,
+ pattern: '^@',
+ },
+ typeDependencies: {
+ type: 'array',
+ description: desc`
+ Packages which are required for the source code in the package to be
+ type-checked. This list is updated automatically by the package linter.
+ `,
+ items: {
+ type: 'string',
+ },
+ },
+ runtimeDependencies: {
+ type: 'array',
+ description: desc`
+ Packages which are required for the source code in the package to run. This list
+ is updated automatically by the package linter.
+ `,
+ items: {
+ type: 'string',
+ },
+ },
+ },
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ type: {
+ enum: ['plugin-browser', 'plugin-server'],
+ },
+ plugin: {
+ type: 'object',
+ required: ['id'],
+ properties: {
+ id: {
+ type: 'string',
+ pattern: PLUGIN_ID_PATTERN.source,
+ },
+ configPath: {
+ description:
+ 'Root configuration path used by the plugin, defaults to "id" in snake_case format.',
+ type: 'array',
+ items: {
+ type: 'string',
+ pattern: PLUGIN_ID_PATTERN.source,
+ },
+ },
+ requiredPlugins: {
+ type: 'array',
+ items: {
+ type: 'string',
+ pattern: PLUGIN_ID_PATTERN.source,
+ },
+ },
+ optionalPlugins: {
+ type: 'array',
+ items: {
+ type: 'string',
+ pattern: PLUGIN_ID_PATTERN.source,
+ },
+ },
+ description: {
+ description: desc`
+ A brief description of what this plugin does and any capabilities it provides.
+ `,
+ type: 'string',
+ },
+ enabledOnAnonymousPages: {
+ description: desc`
+ Specifies whether this plugin - and its required dependencies - will be enabled for anonymous pages (login page, status page when
+ configured, etc.) Default is false.
+ `,
+ type: 'boolean',
+ },
+ serviceFolders: {
+ description: desc`
+ Only used for the automatically generated API documentation. Specifying service
+ folders will cause your plugin API reference to be broken up into sub sections.
+ `,
+ type: 'array',
+ items: { type: 'string' },
+ },
+ },
+ },
+ },
+ },
+ {
+ type: 'object',
+ properties: {
+ type: {
+ const: 'shared-browser',
+ },
+ sharedBrowserBundle: {
+ type: 'boolean',
+ description: desc`
+ Set this flag to true for this package to produce it's own bundle that will be loaded
+ asynchronously when needed. Defaults to false.
+ `,
+ },
+ },
+ },
+ {
+ type: 'object',
+ properties: {
+ type: {
+ enum: [
+ 'shared-server',
+ 'shared-common',
+ 'functional-tests',
+ 'test-helper',
+ 'shared-scss',
+ ],
+ },
+ },
+ },
+ ],
+};
diff --git a/packages/kbn-kibana-json-schema/tsconfig.json b/packages/kbn-kibana-manifest-schema/tsconfig.json
similarity index 100%
rename from packages/kbn-kibana-json-schema/tsconfig.json
rename to packages/kbn-kibana-manifest-schema/tsconfig.json
diff --git a/packages/kbn-scalability-simulation-generator/BUILD.bazel b/packages/kbn-managed-vscode-config-cli/BUILD.bazel
similarity index 88%
rename from packages/kbn-scalability-simulation-generator/BUILD.bazel
rename to packages/kbn-managed-vscode-config-cli/BUILD.bazel
index 57464d684874c..f635c88a74fa2 100644
--- a/packages/kbn-scalability-simulation-generator/BUILD.bazel
+++ b/packages/kbn-managed-vscode-config-cli/BUILD.bazel
@@ -2,8 +2,8 @@ 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-scalability-simulation-generator"
-PKG_REQUIRE_NAME = "@kbn/scalability-simulation-generator"
+PKG_DIRNAME = "kbn-managed-vscode-config-cli"
+PKG_REQUIRE_NAME = "@kbn/managed-vscode-config-cli"
SOURCE_FILES = glob(
[
@@ -11,6 +11,7 @@ SOURCE_FILES = glob(
],
exclude = [
"**/*.test.*",
+ "**/*.stories.*",
],
)
@@ -36,9 +37,6 @@ NPM_MODULE_EXTRA_FILES = [
# "@npm//name-of-package"
# eg. "@npm//lodash"
RUNTIME_DEPS = [
- "//packages/kbn-dev-cli-errors",
- "//packages/kbn-dev-cli-runner",
- "//packages/kbn-tooling-log",
]
# In this array place dependencies necessary to build the types, which will include the
@@ -51,11 +49,12 @@ RUNTIME_DEPS = [
#
# References to NPM packages work the same as RUNTIME_DEPS
TYPES_DEPS = [
- "//packages/kbn-dev-cli-errors:npm_module_types",
- "//packages/kbn-dev-cli-runner:npm_module_types",
- "//packages/kbn-tooling-log:npm_module_types",
"@npm//@types/node",
"@npm//@types/jest",
+ "@npm//dedent",
+ "//packages/kbn-utils:npm_module_types",
+ "//packages/kbn-dev-cli-runner:npm_module_types",
+ "//packages/kbn-managed-vscode-config:npm_module_types",
]
jsts_transpiler(
diff --git a/packages/kbn-managed-vscode-config-cli/README.mdx b/packages/kbn-managed-vscode-config-cli/README.mdx
new file mode 100644
index 0000000000000..5cb8a068ebe0d
--- /dev/null
+++ b/packages/kbn-managed-vscode-config-cli/README.mdx
@@ -0,0 +1,12 @@
+---
+id: kibDevDocsOpsManagedVscodeConfigCli
+slug: /kibana-dev-docs/ops/managed-vscode-config-cli
+title: "@kbn/managed-vscode-config-cli"
+description: CLI for updating the .vscode directory
+date: 2022-05-24
+tags: ['kibana', 'dev', 'contributor', 'operations', 'vscode']
+---
+
+Usage: `node scripts/update_vscode_config`
+
+Updates the `.vscode` directory to have the current value of the managed configs, and updates the managed config files from
\ No newline at end of file
diff --git a/packages/kbn-managed-vscode-config-cli/jest.config.js b/packages/kbn-managed-vscode-config-cli/jest.config.js
new file mode 100644
index 0000000000000..fe1aa62847e40
--- /dev/null
+++ b/packages/kbn-managed-vscode-config-cli/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/jest_node',
+ rootDir: '../..',
+ roots: ['/packages/kbn-managed-vscode-config-cli'],
+};
diff --git a/packages/kbn-scalability-simulation-generator/package.json b/packages/kbn-managed-vscode-config-cli/package.json
similarity index 52%
rename from packages/kbn-scalability-simulation-generator/package.json
rename to packages/kbn-managed-vscode-config-cli/package.json
index e5865fd1c72f4..c1da1e53dbc04 100644
--- a/packages/kbn-scalability-simulation-generator/package.json
+++ b/packages/kbn-managed-vscode-config-cli/package.json
@@ -1,6 +1,5 @@
{
- "name": "@kbn/scalability-simulation-generator",
- "description": "A library to generate scalability benchmarking simulation files from APM traces.",
+ "name": "@kbn/managed-vscode-config-cli",
"private": true,
"version": "1.0.0",
"main": "./target_node/index.js",
diff --git a/packages/kbn-dev-utils/src/vscode_config/update_vscode_config_cli.ts b/packages/kbn-managed-vscode-config-cli/src/index.ts
similarity index 53%
rename from packages/kbn-dev-utils/src/vscode_config/update_vscode_config_cli.ts
rename to packages/kbn-managed-vscode-config-cli/src/index.ts
index 8a2c85ad6ff27..deb829da76407 100644
--- a/packages/kbn-dev-utils/src/vscode_config/update_vscode_config_cli.ts
+++ b/packages/kbn-managed-vscode-config-cli/src/index.ts
@@ -14,43 +14,44 @@ import dedent from 'dedent';
import { run } from '@kbn/dev-cli-runner';
-import { MANAGED_CONFIG_KEYS, MANAGED_CONFIG_FILES } from './managed_config_keys';
-import { updateVscodeConfig } from './update_vscode_config';
+import {
+ MANAGED_CONFIG_KEYS,
+ MANAGED_CONFIG_FILES,
+ updateVscodeConfig,
+} from '@kbn/managed-vscode-config';
const CONFIG_DIR = Path.resolve(REPO_ROOT, '.vscode');
-export function runUpdateVscodeConfigCli() {
- run(async ({ log }) => {
- const path = Path.resolve(CONFIG_DIR, 'settings.json');
-
- let json;
- try {
- json = await Fsp.readFile(path, 'utf-8');
- } catch (error) {
- if (error.code !== 'ENOENT') {
- throw error;
- }
+run(async ({ log }) => {
+ const path = Path.resolve(CONFIG_DIR, 'settings.json');
+
+ let json;
+ try {
+ json = await Fsp.readFile(path, 'utf-8');
+ } catch (error) {
+ if (error.code !== 'ENOENT') {
+ throw error;
}
+ }
- const updatedJson = updateVscodeConfig(
- MANAGED_CONFIG_KEYS,
- dedent`
+ const updatedJson = updateVscodeConfig(
+ MANAGED_CONFIG_KEYS,
+ dedent`
Some settings in this file are managed by @kbn/dev-utils. When a setting is managed it is preceeded
with a comment "// @managed" comment. Replace that with "// self managed" and the scripts will not
touch that value. Put a "// self managed" comment at the top of the file, or above a group of settings
to disable management of that entire section.
`,
- json
- );
- await Fsp.mkdir(Path.dirname(path), { recursive: true });
+ json
+ );
+ await Fsp.mkdir(Path.dirname(path), { recursive: true });
- // write managed config files
- for (const { name, content } of MANAGED_CONFIG_FILES) {
- await Fsp.writeFile(Path.resolve(CONFIG_DIR, name), content);
- }
+ // write managed config files
+ for (const { name, content } of MANAGED_CONFIG_FILES) {
+ await Fsp.writeFile(Path.resolve(CONFIG_DIR, name), content);
+ }
- await Fsp.writeFile(path, updatedJson);
+ await Fsp.writeFile(path, updatedJson);
- log.success('updated', path);
- });
-}
+ log.success('updated', path);
+});
diff --git a/packages/kbn-scalability-simulation-generator/tsconfig.json b/packages/kbn-managed-vscode-config-cli/tsconfig.json
similarity index 100%
rename from packages/kbn-scalability-simulation-generator/tsconfig.json
rename to packages/kbn-managed-vscode-config-cli/tsconfig.json
diff --git a/packages/kbn-managed-vscode-config/BUILD.bazel b/packages/kbn-managed-vscode-config/BUILD.bazel
new file mode 100644
index 0000000000000..255e331c189d0
--- /dev/null
+++ b/packages/kbn-managed-vscode-config/BUILD.bazel
@@ -0,0 +1,122 @@
+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-managed-vscode-config"
+PKG_REQUIRE_NAME = "@kbn/managed-vscode-config"
+
+SOURCE_FILES = glob(
+ [
+ "src/**/*.ts",
+ ],
+ exclude = [
+ "**/*.test.*",
+ "**/*.stories.*",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+]
+
+# In this array place runtime dependencies, including other packages and NPM packages
+# which must be available for this code to run.
+#
+# To reference other packages use:
+# "//repo/relative/path/to/package"
+# eg. "//packages/kbn-utils"
+#
+# To reference a NPM package use:
+# "@npm//name-of-package"
+# eg. "@npm//lodash"
+RUNTIME_DEPS = [
+]
+
+# In this array place dependencies necessary to build the types, which will include the
+# :npm_module_types target of other packages and packages from NPM, including @types/*
+# packages.
+#
+# To reference the types for another package use:
+# "//repo/relative/path/to/package:npm_module_types"
+# eg. "//packages/kbn-utils:npm_module_types"
+#
+# References to NPM packages work the same as RUNTIME_DEPS
+TYPES_DEPS = [
+ "@npm//@types/node",
+ "@npm//@types/jest",
+ "@npm//@babel/parser",
+ "@npm//@babel/types",
+ "@npm//@types/babel__generator",
+ "@npm//@types/prettier",
+ "@npm//tslib",
+ "//packages/kbn-kibana-manifest-schema:npm_module_types",
+]
+
+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,
+ declaration_map = True,
+ emit_declaration_only = True,
+ out_dir = "target_types",
+ root_dir = "src",
+ 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"],
+)
+
+pkg_npm(
+ name = "npm_module",
+ deps = [":" + PKG_DIRNAME],
+)
+
+filegroup(
+ name = "build",
+ srcs = [":npm_module"],
+ visibility = ["//visibility:public"],
+)
+
+pkg_npm_types(
+ name = "npm_module_types",
+ srcs = SRCS,
+ deps = [":tsc_types"],
+ package_name = PKG_REQUIRE_NAME,
+ tsconfig = ":tsconfig",
+ visibility = ["//visibility:public"],
+)
+
+filegroup(
+ name = "build_types",
+ srcs = [":npm_module_types"],
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/kbn-managed-vscode-config/README.mdx b/packages/kbn-managed-vscode-config/README.mdx
new file mode 100644
index 0000000000000..2e0cb5433173d
--- /dev/null
+++ b/packages/kbn-managed-vscode-config/README.mdx
@@ -0,0 +1,14 @@
+---
+id: kibDevDocsOpsManagedVscodeConfig
+slug: /kibana-dev-docs/ops/managed-vscode-config
+title: "@kbn/managed-vscode-config"
+description: Config options for vscode that are automatically setup for contributors
+date: 2022-05-24
+tags: ['kibana', 'dev', 'contributor', 'operations', 'vscode']
+---
+
+This package contains VSCode settings which are automatically setup for contributors on bootstrap. This is done via the using `node scripts/update_vscode_config`.
+
+In order to support contributors maintaining workspace-specific configuration of their own, this tool prefixes all managed config settings with `// @managed` comments. If you want to override any config that is `// @managed` then just update that comment to `// self managed` and the update script won't touch that key/value.
+
+`// self managed` comments are only necessary for keys which are currently or might become managed in the future. Config keys which are not managed are always preserved when updating the `.vscode` directory.
\ No newline at end of file
diff --git a/packages/kbn-managed-vscode-config/jest.config.js b/packages/kbn-managed-vscode-config/jest.config.js
new file mode 100644
index 0000000000000..77993fd762eeb
--- /dev/null
+++ b/packages/kbn-managed-vscode-config/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/jest_node',
+ rootDir: '../..',
+ roots: ['/packages/kbn-managed-vscode-config'],
+};
diff --git a/packages/kbn-managed-vscode-config/package.json b/packages/kbn-managed-vscode-config/package.json
new file mode 100644
index 0000000000000..84de677b6f378
--- /dev/null
+++ b/packages/kbn-managed-vscode-config/package.json
@@ -0,0 +1,10 @@
+{
+ "name": "@kbn/managed-vscode-config",
+ "private": true,
+ "version": "1.0.0",
+ "main": "./target_node/index.js",
+ "license": "SSPL-1.0 OR Elastic License 2.0",
+ "kibana": {
+ "devOnly": true
+ }
+}
diff --git a/packages/kbn-managed-vscode-config/src/index.ts b/packages/kbn-managed-vscode-config/src/index.ts
new file mode 100644
index 0000000000000..1b104fc95fbd4
--- /dev/null
+++ b/packages/kbn-managed-vscode-config/src/index.ts
@@ -0,0 +1,10 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+export { MANAGED_CONFIG_FILES, MANAGED_CONFIG_KEYS } from './managed_config_keys';
+export { updateVscodeConfig } from './update_vscode_config';
diff --git a/packages/kbn-dev-utils/src/vscode_config/managed_config_keys.ts b/packages/kbn-managed-vscode-config/src/managed_config_keys.ts
similarity index 83%
rename from packages/kbn-dev-utils/src/vscode_config/managed_config_keys.ts
rename to packages/kbn-managed-vscode-config/src/managed_config_keys.ts
index 55a44564d29ea..29fae6e7ed38a 100644
--- a/packages/kbn-dev-utils/src/vscode_config/managed_config_keys.ts
+++ b/packages/kbn-managed-vscode-config/src/managed_config_keys.ts
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import { KibanaJsonSchema } from '@kbn/kibana-json-schema';
+import { MANIFEST_V1, MANIFEST_V2 } from '@kbn/kibana-manifest-schema';
export interface ManagedConfigKey {
key: string;
@@ -67,10 +67,21 @@ export const MANAGED_CONFIG_KEYS: ManagedConfigKey[] = [
fileMatch: ['kibana.json'],
url: './.vscode/kibana-json-schema.json',
},
+ {
+ fileMatch: ['kibana.jsonc'],
+ url: './.vscode/kibana-manifest-schema-v2.json',
+ },
],
},
];
export const MANAGED_CONFIG_FILES = [
- { name: 'kibana-json-schema.json', content: JSON.stringify(KibanaJsonSchema, null, 2) },
+ {
+ name: 'kibana-json-schema.json',
+ content: JSON.stringify(MANIFEST_V1, null, 2),
+ },
+ {
+ name: 'kibana-manifest-schema-v2.json',
+ content: JSON.stringify(MANIFEST_V2, null, 2),
+ },
];
diff --git a/packages/kbn-dev-utils/src/vscode_config/update_vscode_config.test.ts b/packages/kbn-managed-vscode-config/src/update_vscode_config.test.ts
similarity index 100%
rename from packages/kbn-dev-utils/src/vscode_config/update_vscode_config.test.ts
rename to packages/kbn-managed-vscode-config/src/update_vscode_config.test.ts
diff --git a/packages/kbn-dev-utils/src/vscode_config/update_vscode_config.ts b/packages/kbn-managed-vscode-config/src/update_vscode_config.ts
similarity index 100%
rename from packages/kbn-dev-utils/src/vscode_config/update_vscode_config.ts
rename to packages/kbn-managed-vscode-config/src/update_vscode_config.ts
diff --git a/packages/kbn-managed-vscode-config/tsconfig.json b/packages/kbn-managed-vscode-config/tsconfig.json
new file mode 100644
index 0000000000000..789c6b3111115
--- /dev/null
+++ b/packages/kbn-managed-vscode-config/tsconfig.json
@@ -0,0 +1,18 @@
+{
+ "extends": "../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outDir": "target_types",
+ "rootDir": "src",
+ "stripInternal": false,
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": [
+ "src/**/*"
+ ]
+}
diff --git a/packages/kbn-performance-testing-dataset-extractor/src/cli.ts b/packages/kbn-performance-testing-dataset-extractor/src/cli.ts
index 4e24cde4799d5..914a7d587efdf 100644
--- a/packages/kbn-performance-testing-dataset-extractor/src/cli.ts
+++ b/packages/kbn-performance-testing-dataset-extractor/src/cli.ts
@@ -58,8 +58,9 @@ export async function runExtractor() {
const scalabilitySetup: ScalabilitySetup = config.get('scalabilitySetup');
if (!scalabilitySetup) {
- log.error(`'scalabilitySetup' must be defined in config file!`);
- return;
+ log.warning(
+ `'scalabilitySetup' is not defined in config file, output file for Kibana scalability run won't be generated`
+ );
}
const env = config.get(`kbnTestServer.env`);
diff --git a/packages/kbn-performance-testing-dataset-extractor/src/es_client.ts b/packages/kbn-performance-testing-dataset-extractor/src/es_client.ts
index 0bd8accd5fd59..948d410c8669e 100644
--- a/packages/kbn-performance-testing-dataset-extractor/src/es_client.ts
+++ b/packages/kbn-performance-testing-dataset-extractor/src/es_client.ts
@@ -17,11 +17,6 @@ interface ClientOptions {
password: string;
}
-interface Labels {
- journeyName: string;
- maxUsersCount: string;
-}
-
export interface Headers {
readonly [key: string]: string[];
}
@@ -44,21 +39,33 @@ interface Transaction {
}
export interface Document {
- labels: Labels;
- character: string;
- quote: string;
- service: { version: string };
+ '@timestamp': string;
+ labels?: { journeyName: string; maxUsersCount: string };
parent?: { id: string };
- processor: string;
+ service: { name: string; environment: string };
trace: { id: string };
- '@timestamp': string;
- environment: string;
+ transaction: Transaction;
+}
+
+export interface SpanDocument extends Omit {
+ transaction: { id: string };
+ span: {
+ id: string;
+ name: string;
+ action: string;
+ duration: { us: number };
+ db?: { statement?: string };
+ };
+}
+
+export interface TransactionDocument extends Omit {
+ service: { name: string; environment: string; version: string };
+ processor: string;
url: { path: string };
http: {
request: Request;
response: Response;
};
- transaction: Transaction;
}
const addBooleanFilter = (filter: { field: string; value: string }): QueryDslQueryContainer => {
@@ -88,81 +95,86 @@ const addRangeFilter = (range: { startTime: string; endTime: string }): QueryDsl
};
};
-export function initClient(options: ClientOptions, log: ToolingLog) {
- const client = new Client({
- node: options.node,
- auth: {
- username: options.username,
- password: options.password,
- },
- });
+export class ESClient {
+ client: Client;
+ log: ToolingLog;
- return {
- async getKibanaServerTransactions(
- buildId: string,
- journeyName: string,
- range?: { startTime: string; endTime: string }
- ) {
- const filters = [
- { field: 'transaction.type', value: 'request' },
- { field: 'processor.event', value: 'transaction' },
- { field: 'labels.testBuildId', value: buildId },
- { field: 'labels.journeyName', value: journeyName },
- ];
- const queryFilters = filters.map((filter) => addBooleanFilter(filter));
- if (range) {
- queryFilters.push(addRangeFilter(range));
- }
- return await this.getTransactions(queryFilters);
- },
- async getFtrTransactions(buildId: string, journeyName: string) {
- const filters = [
- { field: 'service.name', value: 'functional test runner' },
- { field: 'processor.event', value: 'transaction' },
- { field: 'labels.testBuildId', value: buildId },
- { field: 'labels.journeyName', value: journeyName },
- { field: 'labels.performancePhase', value: 'TEST' },
- ];
- const queryFilters = filters.map((filter) => addBooleanFilter(filter));
- return await this.getTransactions(queryFilters);
- },
+ constructor(options: ClientOptions, log: ToolingLog) {
+ this.client = new Client({
+ node: options.node,
+ auth: {
+ username: options.username,
+ password: options.password,
+ },
+ });
+ this.log = log;
+ }
- async getTransactions(queryFilters: QueryDslQueryContainer[]) {
- const searchRequest: SearchRequest = {
- body: {
- track_total_hits: true,
- sort: [
- {
- '@timestamp': {
- order: 'asc',
- unmapped_type: 'boolean',
- },
+ async getTransactions(queryFilters: QueryDslQueryContainer[]) {
+ const searchRequest: SearchRequest = {
+ body: {
+ sort: [
+ {
+ '@timestamp': {
+ order: 'asc',
+ unmapped_type: 'boolean',
},
- ],
- size: 10000,
- stored_fields: ['*'],
- _source: true,
- query: {
- bool: {
- must: [],
- filter: [
- {
- bool: {
- filter: queryFilters,
- },
+ },
+ ],
+ size: 10000,
+ query: {
+ bool: {
+ filter: [
+ {
+ bool: {
+ filter: queryFilters,
},
- ],
- should: [],
- must_not: [],
- },
+ },
+ ],
},
},
- };
+ },
+ };
- log.debug(`Search request: ${JSON.stringify(searchRequest)}`);
- const result = await client.search(searchRequest);
- log.debug(`Search result: ${JSON.stringify(result)}`);
- return result?.hits?.hits;
- },
- };
+ this.log.debug(`Search request: ${JSON.stringify(searchRequest)}`);
+ const result = await this.client.search(searchRequest);
+ this.log.debug(`Search result: ${JSON.stringify(result)}`);
+ return result?.hits?.hits;
+ }
+
+ async getFtrServiceTransactions(buildId: string, journeyName: string) {
+ const filters = [
+ { field: 'service.name', value: 'functional test runner' },
+ { field: 'processor.event', value: 'transaction' },
+ { field: 'labels.testBuildId', value: buildId },
+ { field: 'labels.journeyName', value: journeyName },
+ { field: 'labels.performancePhase', value: 'TEST' },
+ ];
+ const queryFilters = filters.map((filter) => addBooleanFilter(filter));
+ return await this.getTransactions(queryFilters);
+ }
+
+ async getKibanaServerTransactions(
+ buildId: string,
+ journeyName: string,
+ range?: { startTime: string; endTime: string }
+ ) {
+ const filters = [
+ { field: 'transaction.type', value: 'request' },
+ { field: 'processor.event', value: 'transaction' },
+ { field: 'labels.testBuildId', value: buildId },
+ { field: 'labels.journeyName', value: journeyName },
+ ];
+ const queryFilters = filters.map((filter) => addBooleanFilter(filter));
+ if (range) {
+ queryFilters.push(addRangeFilter(range));
+ }
+ return await this.getTransactions(queryFilters);
+ }
+
+ async getSpans(transactionId: string) {
+ const filters = [{ field: 'parent.id', value: transactionId }];
+ const queryFilters = filters.map((filter) => addBooleanFilter(filter));
+ return await this.getTransactions(queryFilters);
+ }
}
diff --git a/packages/kbn-performance-testing-dataset-extractor/src/es_request.ts b/packages/kbn-performance-testing-dataset-extractor/src/es_request.ts
new file mode 100644
index 0000000000000..5160d1cf1b0cc
--- /dev/null
+++ b/packages/kbn-performance-testing-dataset-extractor/src/es_request.ts
@@ -0,0 +1,139 @@
+/*
+ * Copyright 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 { ESClient, SpanDocument } from './es_client';
+import { KibanaRequest } from './server_request';
+
+const httpMethodRegExp = /(GET|POST|DELETE|HEAD|PUT|OPTIONS)/;
+const httpPathRegExp = /(?<=GET|POST|DELETE|HEAD|PUT|OPTIONS).*/;
+
+interface Request {
+ id: string;
+ transactionId: string;
+ name: string;
+ action: string;
+ request: {
+ method?: string;
+ path?: string;
+ params?: string;
+ body?: JSON;
+ };
+ date: string;
+ duration: number;
+}
+
+interface Stream {
+ startTime: number;
+ endTime: number;
+ requests: Request[];
+}
+
+const strToJSON = (str: string): JSON | undefined => {
+ try {
+ return JSON.parse(str);
+ } catch (e) {
+ return;
+ }
+};
+
+const findFirstMatch = (regExp: RegExp, testString: string) => {
+ const found = regExp.exec(testString);
+ return found ? found[0] : undefined;
+};
+
+const parseQueryStatement = (statement: string): { params?: string; body?: JSON } => {
+ // github.com/elastic/apm-agent-nodejs/blob/5ba1b2609d18b12a64e1e559236717dd38d64a51/lib/instrumentation/elasticsearch-shared.js#L27-L29
+ // Some ES endpoints support both query params and a body, statement string might contain both of it
+ const split = statement.split('\n\n');
+ if (split.length === 2) {
+ return { params: split[0], body: strToJSON(split[1]) };
+ } else {
+ const body = strToJSON(split[0]);
+ return body ? { body } : { params: split[0] };
+ }
+};
+
+export const fetchRequests = async (esClient: ESClient, requests: KibanaRequest[]) => {
+ const esRequests = new Array();
+ for (const request of requests) {
+ const transactionId = request.transaction.id;
+ const hits = await esClient.getSpans(transactionId);
+ const spans = hits
+ .map((hit) => hit!._source as SpanDocument)
+ .map((hit) => {
+ const query = hit?.span.db?.statement ? parseQueryStatement(hit?.span.db?.statement) : {};
+ return {
+ id: hit.span.id,
+ transactionId: hit.transaction.id,
+ name: hit.span.name,
+ action: hit.span?.action,
+ request: {
+ method: findFirstMatch(httpMethodRegExp, hit.span.name),
+ path: findFirstMatch(httpPathRegExp, hit.span.name.replace(/\s+/g, '')),
+ params: query?.params,
+ body: query?.body,
+ },
+ date: hit['@timestamp'],
+ duration: hit.span?.duration?.us,
+ };
+ })
+ // filter out requests without method, path and POST/PUT/DELETE without body
+ .filter(
+ (hit) =>
+ hit &&
+ hit.request?.method &&
+ hit.request?.path &&
+ (hit.request?.method === 'GET' || hit.request?.body)
+ );
+ esRequests.push(...spans);
+ }
+
+ return esRequests;
+};
+
+export const requestsToStreams = (requests: Request[]) => {
+ const sorted = requests.sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime());
+ const streams = new Map();
+
+ for (const request of sorted) {
+ const startTime = new Date(request.date).getTime();
+ const endTime = new Date(request.date).getTime() + request.duration / 1000;
+ // searching if query starts before any existing stream ended
+ const match = Array.from(streams.keys()).filter((key) => {
+ const streamEndTime = streams.get(key)?.endTime;
+ return streamEndTime ? startTime < streamEndTime : false;
+ });
+ const stream = streams.get(match[0]);
+ if (stream) {
+ // adding query to the existing stream
+ stream.requests.push(request);
+ // updating the stream endTime if needed
+ if (endTime > stream.endTime) {
+ stream.endTime = endTime;
+ }
+ // saving updated stream
+ streams.set(match[0], stream);
+ } else {
+ // add a new stream
+ streams.set(request.date, {
+ startTime,
+ endTime,
+ requests: [request],
+ });
+ }
+ }
+
+ const values = Array.from(streams.values());
+ return values.map((stream) => {
+ return {
+ startTime: new Date(stream.startTime).toISOString(),
+ endTime: new Date(stream.endTime).toISOString(),
+ requests: stream.requests,
+ };
+ });
+};
diff --git a/packages/kbn-performance-testing-dataset-extractor/src/extractor.ts b/packages/kbn-performance-testing-dataset-extractor/src/extractor.ts
index 957b6ad4669d7..e0587af1637d8 100644
--- a/packages/kbn-performance-testing-dataset-extractor/src/extractor.ts
+++ b/packages/kbn-performance-testing-dataset-extractor/src/extractor.ts
@@ -12,10 +12,11 @@ import { existsSync } from 'fs';
import path from 'path';
import { ToolingLog } from '@kbn/tooling-log';
import { SearchHit } from '@elastic/elasticsearch/lib/api/types';
-import { initClient, Document, Headers } from './es_client';
+import { ESClient, Document, TransactionDocument } from './es_client';
+import { getRequests } from './server_request';
+import { fetchRequests, requestsToStreams } from './es_request';
const DATE_FORMAT = `YYYY-MM-DD'T'HH:mm:ss.SSS'Z'`;
-const STATIC_RESOURCES_PATTERN = /\.(css|ico|js|json|jpeg|jpg|gif|png|otf|ttf|woff|woff2)$/;
interface CLIParams {
param: {
@@ -45,23 +46,6 @@ export interface ScalabilitySetup {
maxDuration: string;
}
-const parsePayload = (payload: string, traceId: string, log: ToolingLog): string | undefined => {
- let body;
- try {
- body = JSON.parse(payload);
- } catch (error) {
- log.error(`Failed to parse payload - trace_id: '${traceId}'`);
- }
- return body;
-};
-
-const combineHeaderFieldValues = (headers: Headers) => {
- return Object.assign(
- {},
- ...Object.keys(headers).map((key) => ({ [key]: headers[key].join(', ') }))
- );
-};
-
const calculateTransactionTimeRage = (hit: SearchHit) => {
const trSource = hit._source as Document;
const startTime = trSource['@timestamp'];
@@ -70,39 +54,14 @@ const calculateTransactionTimeRage = (hit: SearchHit) => {
return { startTime, endTime };
};
-const getTraceItems = (
- hits: Array>,
- withoutStaticResources: boolean,
- log: ToolingLog
-) => {
- const data = hits
- .map((hit) => hit!._source as Document)
- .map((hit) => {
- const payload = hit.http.request?.body?.original;
- return {
- traceId: hit.trace.id,
- parentId: hit?.parent?.id,
- processor: hit.processor,
- environment: hit.environment,
- request: {
- timestamp: hit['@timestamp'],
- method: hit.http.request.method,
- path: hit.url.path,
- headers: combineHeaderFieldValues(hit.http.request.headers),
- body: payload ? JSON.stringify(parsePayload(payload, hit.trace.id, log)) : undefined,
- statusCode: hit.http.response.status_code,
- },
- transaction: {
- id: hit.transaction.id,
- name: hit.transaction.name,
- type: hit.transaction.type,
- },
- };
- });
-
- return withoutStaticResources
- ? data.filter((item) => !STATIC_RESOURCES_PATTERN.test(item.request.path))
- : data;
+const saveFile = async (output: any, outputDir: string, fileName: string, log: ToolingLog) => {
+ const filePath = path.resolve(outputDir, fileName);
+
+ if (!existsSync(outputDir)) {
+ await fs.mkdir(outputDir, { recursive: true });
+ }
+ await fs.writeFile(filePath, JSON.stringify(output, null, 2), 'utf8');
+ log.info(`Output file saved: ${filePath}`);
};
export const extractor = async ({ param, client, log }: CLIParams) => {
@@ -115,11 +74,11 @@ export const extractor = async ({ param, client, log }: CLIParams) => {
log.info(
`Searching transactions with 'labels.testBuildId=${buildId}' and 'labels.journeyName=${journeyName}'`
);
- const esClient = initClient(authOptions, log);
- const ftrTransactionHits = await esClient.getFtrTransactions(buildId, journeyName);
+ const esClient = new ESClient(authOptions, log);
+ const ftrTransactionHits = await esClient.getFtrServiceTransactions(buildId, journeyName);
if (!ftrTransactionHits || ftrTransactionHits.length === 0) {
log.warning(
- `No transactions found. Can't calculate journey time range, output file won't be generated.`
+ `No 'functional test runner' transactions found. Can't calculate journey time range, output file won't be generated.`
);
return;
}
@@ -134,27 +93,45 @@ export const extractor = async ({ param, client, log }: CLIParams) => {
// Filtering out setup/teardown related transactions by time range from 'functional test runner' transaction
const hits = await esClient.getKibanaServerTransactions(buildId, journeyName, timeRange);
if (!hits || hits.length === 0) {
- log.warning(`No transactions found. Output file won't be generated.`);
+ log.warning(`No Kibana server transactions found. Output file won't be generated.`);
return;
}
- const source = hits[0]!._source as Document;
+ const source = hits[0]!._source as TransactionDocument;
const kibanaVersion = source.service.version;
- const output = {
- journeyName,
- kibanaVersion,
- scalabilitySetup,
- requests: getTraceItems(hits, withoutStaticResources, log),
- };
+ const kibanaRequests = getRequests(hits, withoutStaticResources, log);
+ const esRequests = await fetchRequests(esClient, kibanaRequests);
+ log.info(
+ `Found ${kibanaRequests.length} Kibana server and ${esRequests.length} Elasticsearch requests`
+ );
+ const streams = requestsToStreams(esRequests);
const outputDir = path.resolve('target/scalability_traces');
- const fileName = `${output.journeyName.replace(/ /g, '')}-${buildId}.json`;
- const filePath = path.resolve(outputDir, fileName);
-
- log.info(`Found ${output.requests.length} transactions, output file: ${filePath}`);
- if (!existsSync(outputDir)) {
- await fs.mkdir(outputDir, { recursive: true });
+ const fileName = `${journeyName.replace(/ /g, '')}-${buildId}.json`;
+
+ if (scalabilitySetup) {
+ await saveFile(
+ {
+ journeyName,
+ kibanaVersion,
+ scalabilitySetup,
+ requests: kibanaRequests,
+ },
+ path.resolve(outputDir, 'server'),
+ fileName,
+ log
+ );
}
- await fs.writeFile(filePath, JSON.stringify(output, null, 2), 'utf8');
+
+ await saveFile(
+ {
+ journeyName,
+ kibanaVersion,
+ streams: Array.from(streams.values()),
+ },
+ path.resolve(outputDir, 'es'),
+ fileName,
+ log
+ );
};
diff --git a/packages/kbn-performance-testing-dataset-extractor/src/server_request.ts b/packages/kbn-performance-testing-dataset-extractor/src/server_request.ts
new file mode 100644
index 0000000000000..dd553b83848c8
--- /dev/null
+++ b/packages/kbn-performance-testing-dataset-extractor/src/server_request.ts
@@ -0,0 +1,85 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { SearchHit } from '@elastic/elasticsearch/lib/api/types';
+import { ToolingLog } from '@kbn/tooling-log';
+import { TransactionDocument, Headers } from './es_client';
+
+const staticResourcesRegExp = /\.(css|ico|js|json|jpeg|jpg|gif|png|otf|ttf|woff|woff2)$/;
+
+export interface KibanaRequest {
+ traceId: string;
+ parentId?: string;
+ processor: string;
+ environment: string;
+ request: {
+ timestamp: string;
+ method: string;
+ path: string;
+ headers: { [key: string]: string };
+ body?: string;
+ statusCode: number;
+ };
+ transaction: {
+ id: string;
+ name: string;
+ type: string;
+ };
+}
+
+const parsePayload = (payload: string, traceId: string, log: ToolingLog): string | undefined => {
+ let body;
+ try {
+ body = JSON.parse(payload);
+ } catch (error) {
+ log.error(`Failed to parse payload - trace_id: '${traceId}'`);
+ }
+ return body;
+};
+
+const combineHeaderFieldValues = (headers: Headers): { [key: string]: string } => {
+ return Object.assign(
+ {},
+ ...Object.keys(headers).map((key) => ({ [key]: headers[key].join(', ') }))
+ );
+};
+
+export const getRequests = (
+ hits: Array>,
+ withoutStaticResources: boolean,
+ log: ToolingLog
+): KibanaRequest[] => {
+ const data = hits
+ .map((hit) => hit!._source as TransactionDocument)
+ .map((hit) => {
+ const payload = hit.http.request?.body?.original;
+ return {
+ traceId: hit.trace.id,
+ parentId: hit?.parent?.id,
+ processor: hit.processor,
+ environment: hit.service.environment,
+ request: {
+ timestamp: hit['@timestamp'],
+ method: hit.http.request.method,
+ path: hit.url.path,
+ headers: combineHeaderFieldValues(hit.http.request.headers),
+ body: payload ? JSON.stringify(parsePayload(payload, hit.trace.id, log)) : undefined,
+ statusCode: hit.http.response.status_code,
+ },
+ transaction: {
+ id: hit.transaction.id,
+ name: hit.transaction.name,
+ type: hit.transaction.type,
+ },
+ };
+ });
+
+ return withoutStaticResources
+ ? data.filter((item) => !staticResourcesRegExp.test(item.request.path))
+ : data;
+};
diff --git a/packages/kbn-plugin-discovery/src/find_kibana_json_files.js b/packages/kbn-plugin-discovery/src/find_files.js
similarity index 75%
rename from packages/kbn-plugin-discovery/src/find_kibana_json_files.js
rename to packages/kbn-plugin-discovery/src/find_files.js
index f1687859627a8..6f9e09cbfa3d1 100644
--- a/packages/kbn-plugin-discovery/src/find_kibana_json_files.js
+++ b/packages/kbn-plugin-discovery/src/find_files.js
@@ -27,19 +27,20 @@ function safeReadDir(path) {
}
/**
- * Given an iterable of paths with optoinal "*" segments, expand the path to the
- * list of actual absolute paths, removing all "*" segments, and then return the
- * set of paths which end up pointing to actual files.
+ * Search for files named `name` in `dir`, up to `depth` levels deep. If a directory has a
+ * matching file its children are not iterated, otherwise if depth > 0 then all child
+ * directories are checked recursively with depth-1
*
* @param {string} dir
* @param {number} depth
+ * @param {string} name
* @returns {string[]}
*/
-function findKibanaJsonFiles(dir, depth) {
+function findFiles(dir, depth, name) {
// if depth = 0 then we just need to determine if there is a kibana.json file in this directory
// and return either that path or an empty array
if (depth === 0) {
- const path = Path.resolve(dir, 'kibana.json');
+ const path = Path.resolve(dir, name);
return Fs.existsSync(path) ? [path] : [];
}
@@ -51,7 +52,7 @@ function findKibanaJsonFiles(dir, depth) {
const childDirs = [];
for (const ent of files) {
if (ent.isFile()) {
- if (ent.name === 'kibana.json') {
+ if (ent.name === name) {
return [Path.resolve(dir, ent.name)];
}
} else if (ent.isDirectory()) {
@@ -59,7 +60,7 @@ function findKibanaJsonFiles(dir, depth) {
}
}
- return childDirs.flatMap((dir) => findKibanaJsonFiles(dir, depth - 1));
+ return childDirs.flatMap((dir) => findFiles(dir, depth - 1, name));
}
-module.exports = { findKibanaJsonFiles };
+module.exports = { findFiles };
diff --git a/packages/kbn-plugin-discovery/src/simple_kibana_platform_plugin_discovery.js b/packages/kbn-plugin-discovery/src/simple_kibana_platform_plugin_discovery.js
index 8ea7bb6d563ab..8d5da4e519355 100644
--- a/packages/kbn-plugin-discovery/src/simple_kibana_platform_plugin_discovery.js
+++ b/packages/kbn-plugin-discovery/src/simple_kibana_platform_plugin_discovery.js
@@ -7,7 +7,7 @@
*/
const { parseKibanaPlatformPlugin } = require('./parse_kibana_platform_plugin');
-const { findKibanaJsonFiles } = require('./find_kibana_json_files');
+const { findFiles } = require('./find_files');
/**
* Helper to find the new platform plugins.
@@ -19,9 +19,9 @@ function simpleKibanaPlatformPluginDiscovery(scanDirs, pluginPaths) {
return Array.from(
new Set([
// find kibana.json files up to 5 levels within each scan dir
- ...scanDirs.flatMap((dir) => findKibanaJsonFiles(dir, 5)),
+ ...scanDirs.flatMap((dir) => findFiles(dir, 5, 'kibana.json')),
// find kibana.json files at the root of each plugin path
- ...pluginPaths.flatMap((path) => findKibanaJsonFiles(path, 0)),
+ ...pluginPaths.flatMap((path) => findFiles(path, 0, 'kibana.json')),
])
).map(parseKibanaPlatformPlugin);
}
diff --git a/packages/kbn-scalability-simulation-generator/README.md b/packages/kbn-scalability-simulation-generator/README.md
deleted file mode 100644
index 14bb68132b97c..0000000000000
--- a/packages/kbn-scalability-simulation-generator/README.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# @kbn/scalability-simulation-generator
-
-A library to generate scalability benchmarking simulation file, that can be run by Gatling performance testing tool.
-
-## Usage
-
-There are 2 ways to run auto-generated simulation files, using:
- - Gatling bundle
- - kibana-load-testing project
-
-If you plan to use Gatling-bundle, generate simulation using this command:
-
-```
- node scripts/generate_scalability_simulations.js \
- --dir "" \
- --baseUrl ""
-```
-
-If you plan to use [kibana-load-testing](https://github.com/elastic/kibana-load-testing), use the following command:
-
-```
- node scripts/generate_scalability_simulations.js \
- --dir "" \
- --baseUrl "" \
- --packageName "org.kibanaLoadTest"
-```
-
-To run the generated simulation:
-- Move file to `src/test/scala/org/kibanaLoadTest`
-- Compile source code `mvn clean compile`
-- Run simulation `mvn gatling:test -Dgatling.simulationClass=org.kibanaLoadTest.`
diff --git a/packages/kbn-scalability-simulation-generator/src/build_simulation.ts b/packages/kbn-scalability-simulation-generator/src/build_simulation.ts
deleted file mode 100644
index 7462ef13e5b2c..0000000000000
--- a/packages/kbn-scalability-simulation-generator/src/build_simulation.ts
+++ /dev/null
@@ -1,231 +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 { Stage } from './types/journey';
-import { Header, Request, Simulation } from './types/simulation';
-
-const AUTH_PATH = '/internal/security/login';
-const B_SEARCH_PATH = '/internal/bsearch';
-
-const getHeaders = (headers: readonly Header[]) =>
- headers
- .map(
- (header) =>
- `"${header.name}" -> ${JSON.stringify(
- header.name !== 'Cookie' ? header.value : '${Cookie}'
- )}`
- )
- .join(',')
- .replace(/^/, 'Map(') + ')';
-
-const getPayload = (body: string) => JSON.stringify(body).replace(/"/g, '\\"');
-
-const getDuration = (duration: string) => {
- const value = duration.replace(/\D+/, '');
- return duration.endsWith('m') ? `${value} * 60` : value;
-};
-
-/**
- * Builds Gatling simulation content from common template
- * @param packageName scala package name, where simulation file will be placed
- * @param simulationName scala class name
- * @param protocol Gatling protocol string
- * @param scenario Gatling scenario string
- * @param setup Gatling simulation injection setup string
- * @returns Gatling simulation content as string
- */
-const buildSimulation = (
- packageName: string,
- simulationName: string,
- protocol: string,
- scenario: string,
- setup: string
-) =>
- `package ${packageName}
-
-import scala.concurrent.duration._
-
-import io.gatling.core.Predef._
-import io.gatling.http.Predef._
-import io.gatling.jdbc.Predef._
-
-class ${simulationName} extends Simulation {
-${protocol}
-
-${scenario}
-
-${setup}
-}`;
-
-const buildAuthenticationExec = (path: string, headers: string, payload: string) =>
- ` .exec(
- http("${path}")
- .post("${path}")
- .body(StringBody("${payload}"))
- .asJson
- .headers(${headers})
- .check(headerRegex("set-cookie", ".+?(?=;)").saveAs("Cookie"))
- )`;
-
-const buildBSearchExec = (path: string, headers: string, payload: string) =>
- ` .exec(
- http("${path}")
- .post("${path}")
- .headers(${headers})
- .body(StringBody(${payload}))
- .asJson
- .check(status.is(200).saveAs("status"))
- .check(jsonPath("$.result.id").find.saveAs("requestId"))
- .check(jsonPath("$.result.isPartial").find.saveAs("isPartial"))
- )
- .exitHereIfFailed
- // First response might be “partial”. Then we continue to fetch for the results
- // using the request id returned from the first response
- .asLongAs(session =>
- session("status").as[Int] == 200
- && session("isPartial").as[Boolean]
- ) {
- exec(
- http("${path}")
- .post("${path}")
- .headers(${headers})
- .body(StringBody(${payload}))
- .asJson
- .check(status.is(200).saveAs("status"))
- .check(jsonPath("$.result.isPartial").saveAs("isPartial"))
- )
- .exitHereIfFailed
- .pause(1)
- }`;
-
-const buildCommonHttpExec = (path: string, method: string, headers: string) =>
- ` .exec(
- http("${path}")
- .${method}("${path}")
- .headers(${headers})
- )`;
-
-const buildCommonHttpBodyExec = (path: string, method: string, headers: string, payload: string) =>
- ` .exec(
- http("${path}")
- .${method}("${path}")
- .body(StringBody("${payload}"))
- .asJson
- .headers(${headers})
- )`;
-
-const addPause = (delay: number) => ` .pause(${delay}.milliseconds)`;
-
-const buildProtocol = (baseUrl: string) =>
- ` val httpProtocol = http
- .baseUrl("${baseUrl}")
- .inferHtmlResources()
- .acceptHeader("*/*")
- .acceptEncodingHeader("gzip, deflate")
- .acceptLanguageHeader("en-US,en;q=0.9,ru;q=0.8,de;q=0.7")
- .userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.83 Safari/537.36")`;
-
-const buildScenarioDefinition = (phase: string, scenarioName: string) =>
- ` val ${phase} = scenario("${scenarioName} ${phase}")
- .exec(steps)`;
-
-/**
- * Builds Gatling simulation setUp section, that defines injection for warmup and test scenarios
- * @param warmupStages
- * @param testStages
- * @param maxDuration
- * @returns Gatling simulation setUp as a string
- */
-const buildSetup = (warmupStages: string, testStages: string, maxDuration: string) =>
- ` setUp(
- warmup
- .inject(${warmupStages})
- .protocols(httpProtocol)
- .andThen(
- test
- .inject(${testStages})
- .protocols(httpProtocol)
- )
- ).maxDuration(${maxDuration})`;
-
-const buildExecStep = (request: Request) => {
- const headers = getHeaders(request.headers);
- const method = request.method.toLowerCase();
- if (!request.body) {
- return buildCommonHttpExec(request.path, method, headers);
- } else if (request.path.includes(AUTH_PATH)) {
- return buildAuthenticationExec(request.path, headers, getPayload(request.body));
- } else if (request.path.includes(B_SEARCH_PATH)) {
- return buildBSearchExec(request.path, headers, getPayload(request.body));
- } else {
- return buildCommonHttpBodyExec(request.path, method, headers, getPayload(request.body));
- }
-};
-
-/**
- * Builds Gatling scenario body
- * @param scenarioName scenario name
- * @param requests Kibana API requests
- * @returns Gatling scenario as a string
- */
-const buildScenario = (scenarioName: string, requests: readonly Request[]): string => {
- const warmupScn = buildScenarioDefinition('warmup', scenarioName);
- const testScn = buildScenarioDefinition('test', scenarioName);
- // convert requests into array of Gatling exec http calls
- const execs = requests.map((request, index, reqArray) => {
- // construct Gatling exec http calls
- const exec = buildExecStep(request);
- // add delay between requests
- if (index < reqArray.length - 1) {
- const delay = reqArray[index + 1].timestamp - request.timestamp;
- if (delay > 0) {
- return exec + '\n' + addPause(delay);
- }
- }
- return exec;
- });
- const steps = execs.join('\n');
- const finalSteps = steps.slice(0, steps.indexOf('.')) + steps.slice(steps.indexOf('.') + 1);
-
- return ' val steps =\n' + finalSteps + '\n\n' + warmupScn + '\n' + testScn + '\n';
-};
-
-/**
- * Builds injection setup for scenario
- * @param stages Array of actions to be executed with users count and duration
- * @returns scenario injection as a string
- */
-const buildBenchmarkingModel = (stages: readonly Stage[]) => {
- return stages
- .map((stage) => {
- return stage.action === 'constantConcurrentUsers'
- ? `${stage.action}(${stage.maxUsersCount}) during (${getDuration(stage.duration)})`
- : `${stage.action}(${stage.minUsersCount}) to ${stage.maxUsersCount} during (${getDuration(
- stage.duration
- )})`;
- })
- .join(', ');
-};
-
-/**
- * Generates Gatling-compatible simulation content
- * @param params Simulation parameters
- * @returns Gatling simulation content as string
- */
-export const generateSimulationContent = (params: Simulation) => {
- const { simulationName, packageName, scenarioName, baseUrl, requests, scalabilitySetup } = params;
- const protocol = buildProtocol(baseUrl);
- const scenario = buildScenario(scenarioName, requests);
- const setup = buildSetup(
- buildBenchmarkingModel(scalabilitySetup.warmup.stages),
- buildBenchmarkingModel(scalabilitySetup.test.stages),
- getDuration(scalabilitySetup.maxDuration)
- );
-
- return buildSimulation(packageName, simulationName, protocol, scenario, setup);
-};
diff --git a/packages/kbn-scalability-simulation-generator/src/cli.ts b/packages/kbn-scalability-simulation-generator/src/cli.ts
deleted file mode 100644
index b2386f7fbeaaf..0000000000000
--- a/packages/kbn-scalability-simulation-generator/src/cli.ts
+++ /dev/null
@@ -1,73 +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.
- */
-
-/** ***********************************************************
- *
- * Run `node scripts/generate_scalability_simulations --help` for usage information
- *
- *************************************************************/
-
-import { run } from '@kbn/dev-cli-runner';
-import { createFlagError } from '@kbn/dev-cli-errors';
-import path from 'path';
-import fs from 'fs';
-import { generator } from './generate_files';
-
-const gatlingBundlePackageName = 'computerdatabase';
-
-export async function generateScalabilitySimulations() {
- run(
- async ({ log, flags }) => {
- const baseUrl = flags.baseUrl;
- if (baseUrl && typeof baseUrl !== 'string') {
- throw createFlagError('--baseUrl must be a string');
- }
- if (!baseUrl) {
- throw createFlagError('--baseUrl must be defined');
- }
-
- if (typeof flags.dir !== 'string') {
- throw createFlagError('--dir must be a string');
- }
-
- const dir = path.resolve(flags.dir);
- if (!dir) {
- throw createFlagError('--dir must be defined');
- }
- if (!fs.existsSync(path.resolve(dir))) {
- throw createFlagError('--dir must be an existing folder path');
- }
-
- if (typeof flags.packageName !== 'undefined' && typeof flags.packageName !== 'string') {
- throw createFlagError('--packageName is optional, but must be a string');
- }
-
- const packageName = !flags.packageName ? gatlingBundlePackageName : flags.packageName;
-
- return generator({
- dir,
- baseUrl,
- packageName,
- log,
- });
- },
- {
- description: `CLI to get scalability simulation file out of single user performance journey APM traces`,
- flags: {
- string: ['dir', 'baseUrl', 'packageName'],
- help: `
- --dir Path to json files with APM traces, generated using kbn-performance-testing-dataset-extractor
- --baseUrl Kibana server base url to use for scalability testing
- --packageName Simulation file package reference: ${gatlingBundlePackageName} is used by default and assumes
- a run with Gatling bundle. Use 'org.kibanaLoadTest' to run with 'kibana-load-testing' project.
- `,
- },
- usage: '--dir target/scalability_traces --baseUrl http://localhost:5620',
- }
- );
-}
diff --git a/packages/kbn-scalability-simulation-generator/src/generate_files.ts b/packages/kbn-scalability-simulation-generator/src/generate_files.ts
deleted file mode 100644
index 48ab6033af4e6..0000000000000
--- a/packages/kbn-scalability-simulation-generator/src/generate_files.ts
+++ /dev/null
@@ -1,74 +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 { ToolingLog } from '@kbn/tooling-log';
-import fsp from 'fs/promises';
-import fs from 'fs';
-import path from 'path';
-
-import { generateSimulationContent } from './build_simulation';
-import { getHttpRequests } from './parse_traces';
-import { Journey } from './types/journey';
-
-export interface CLIParams {
- dir: string;
- baseUrl: string;
- packageName: string;
- log: ToolingLog;
-}
-
-export const generator = async ({ dir, baseUrl, packageName, log }: CLIParams) => {
- const jsonInDir = fs.readdirSync(dir).filter((file) => path.extname(file) === '.json');
- log.info(`Found ${jsonInDir.length} json files in path: ${jsonInDir}`);
-
- for (const file of jsonInDir) {
- const jsonPath = path.resolve(dir, file);
- const journey: Journey = JSON.parse(fs.readFileSync(jsonPath).toString());
-
- if (!journey.traceItems || journey.traceItems.length === 0) {
- log.error(`No 'traceItems' found in ${jsonPath}, skipping file`);
- return;
- }
-
- if (!journey.scalabilitySetup) {
- log.error(`No 'scalabilitySetup' found in ${jsonPath}, skipping file`);
- return;
- }
-
- const requests = getHttpRequests(journey.traceItems);
- requests.forEach((req) =>
- log.debug(`${req.date} ${req.transactionId} ${req.method} ${req.path}`)
- );
-
- const simulationName = journey.journeyName
- .replace(/[^a-zA-Z ]/g, ' ')
- .replace(/\b(\w)/g, (match, capture) => capture.toUpperCase())
- .replace(/\s+/g, '');
-
- const fileName = `${simulationName}.scala`;
- const outputDir = path.resolve('target/scalability_simulations');
- const filePath = path.resolve(outputDir, fileName);
-
- const fileContent = generateSimulationContent({
- simulationName,
- packageName,
- scenarioName: `${journey.journeyName} ${journey.kibanaVersion}`,
- baseUrl,
- scalabilitySetup: journey.scalabilitySetup,
- requests,
- });
-
- if (!fs.existsSync(outputDir)) {
- await fsp.mkdir(outputDir, { recursive: true });
- }
-
- const stream = fs.createWriteStream(filePath);
- stream.write(fileContent);
- stream.end(() => log.info(`Gatling simulation '${simulationName}' was saved in '${filePath}'`));
- }
-};
diff --git a/packages/kbn-scalability-simulation-generator/src/parse_traces.ts b/packages/kbn-scalability-simulation-generator/src/parse_traces.ts
deleted file mode 100644
index a6059a3b046dc..0000000000000
--- a/packages/kbn-scalability-simulation-generator/src/parse_traces.ts
+++ /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 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 { TraceItem } from './types/journey';
-import { Request } from './types/simulation';
-
-export const getHttpRequests = (traces: readonly TraceItem[]): Request[] => {
- return traces
- .map((trace) => {
- const timestamp = new Date(trace.timestamp).getTime();
- const date = trace.timestamp;
- const transactionId = trace.transaction.id;
- const method = trace.request.method;
- const path = trace.request.url.path;
- const rawHeaders = trace.request.headers;
- const headers = Object.keys(rawHeaders).map((key) => ({
- name: key,
- value: String(rawHeaders[key].join('')),
- }));
- const body = trace.request.body;
- return { timestamp, date, transactionId, method, path, headers, body };
- })
- .sort((a, b) => (a.timestamp > b.timestamp ? 1 : -1));
-};
diff --git a/packages/kbn-scalability-simulation-generator/src/types/journey.ts b/packages/kbn-scalability-simulation-generator/src/types/journey.ts
deleted file mode 100644
index a9e3d19657955..0000000000000
--- a/packages/kbn-scalability-simulation-generator/src/types/journey.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-
-export interface Headers {
- readonly [key: string]: string[];
-}
-
-export interface HttpRequest {
- readonly headers?: Headers[];
- readonly method?: string;
- readonly body?: string;
-}
-
-export interface HttpResponse {
- readonly headers?: Headers[];
- readonly status_code?: number;
-}
-
-export interface Http {
- readonly request?: HttpRequest;
- readonly response?: HttpResponse;
-}
-
-export interface Trace {
- readonly '@timestamp': string;
- readonly transaction_id: string;
- readonly url_path: string;
- readonly url_base: string;
- readonly span_id?: string;
- readonly http?: Http;
- readonly children?: readonly Trace[];
-}
-
-export interface Transaction {
- readonly transactionName: string;
- readonly transactionType: string;
- readonly service: string;
- readonly traces: readonly Trace[];
-}
-
-export interface Request {
- readonly url: {
- readonly path: string;
- };
- readonly headers: Headers;
- readonly method: string;
- readonly body?: string;
-}
-
-export interface TransactionItem {
- readonly id: string;
- readonly name: string;
- readonly type: string;
-}
-
-export interface TraceItem {
- readonly traceId: string;
- readonly timestamp: string;
- readonly request: Request;
- readonly response: {
- readonly status: string;
- };
- readonly transaction: TransactionItem;
-}
-
-export interface Stage {
- readonly action: string;
- readonly minUsersCount?: number;
- readonly maxUsersCount: number;
- readonly duration: string;
-}
-
-export interface Setup {
- readonly warmup: { readonly stages: readonly Stage[] };
- readonly test: { readonly stages: readonly Stage[] };
- readonly maxDuration: string;
-}
-
-export interface Journey {
- readonly journeyName: string;
- readonly kibanaVersion: string;
- readonly scalabilitySetup: Setup;
- readonly traceItems: readonly TraceItem[];
-}
diff --git a/packages/kbn-scalability-simulation-generator/src/types/simulation.ts b/packages/kbn-scalability-simulation-generator/src/types/simulation.ts
deleted file mode 100644
index c5fa394ebcc0c..0000000000000
--- a/packages/kbn-scalability-simulation-generator/src/types/simulation.ts
+++ /dev/null
@@ -1,33 +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 { Setup } from './journey';
-
-export interface Header {
- readonly name: string;
- readonly value: string;
-}
-
-export interface Request {
- readonly timestamp: number;
- readonly date: string;
- readonly transactionId: string;
- readonly method: string;
- readonly path: string;
- readonly headers: readonly Header[];
- readonly body?: string;
-}
-
-export interface Simulation {
- readonly simulationName: string;
- readonly packageName: string;
- readonly scenarioName: string;
- readonly baseUrl: string;
- readonly scalabilitySetup: Setup;
- readonly requests: readonly Request[];
-}
diff --git a/packages/kbn-user-profile-components/BUILD.bazel b/packages/kbn-user-profile-components/BUILD.bazel
new file mode 100644
index 0000000000000..876d6d2c84dd0
--- /dev/null
+++ b/packages/kbn-user-profile-components/BUILD.bazel
@@ -0,0 +1,115 @@
+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_BASE_NAME = "kbn-user-profile-components"
+PKG_REQUIRE_NAME = "@kbn/user-profile-components"
+
+SOURCE_FILES = glob(
+ [
+ "src/**/*.ts",
+ "src/**/*.tsx",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+]
+
+RUNTIME_DEPS = [
+ "//packages/kbn-i18n",
+ "//packages/kbn-i18n-react",
+ "@npm//@elastic/eui",
+]
+
+TYPES_DEPS = [
+ "//packages/kbn-i18n:npm_module_types",
+ "//packages/kbn-i18n-react:npm_module_types",
+ "@npm//@elastic/eui",
+ "@npm//@types/node",
+ "@npm//@types/jest",
+ "@npm//@types/enzyme",
+ "@npm//tslib",
+]
+
+jsts_transpiler(
+ name = "target_node",
+ srcs = SRCS,
+ build_pkg_name = package_name(),
+)
+
+jsts_transpiler(
+ name = "target_web",
+ srcs = SRCS,
+ build_pkg_name = package_name(),
+ web = True,
+)
+
+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,
+ declaration_map = True,
+ emit_declaration_only = True,
+ out_dir = "target_types",
+ root_dir = "src",
+ tsconfig = ":tsconfig",
+)
+
+js_library(
+ name = PKG_BASE_NAME,
+ srcs = NPM_MODULE_EXTRA_FILES,
+ deps = RUNTIME_DEPS + [":target_node", ":target_web"],
+ package_name = PKG_REQUIRE_NAME,
+ visibility = ["//visibility:public"],
+)
+
+pkg_npm(
+ name = "npm_module",
+ deps = [
+ ":%s" % PKG_BASE_NAME,
+ ]
+)
+
+filegroup(
+ name = "build",
+ srcs = [
+ ":npm_module",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+pkg_npm_types(
+ name = "npm_module_types",
+ srcs = SRCS,
+ deps = [":tsc_types"],
+ package_name = PKG_REQUIRE_NAME,
+ tsconfig = ":tsconfig",
+ visibility = ["//visibility:public"],
+)
+
+filegroup(
+ name = "build_types",
+ srcs = [
+ ":npm_module_types",
+ ],
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/kbn-user-profile-components/jest.config.js b/packages/kbn-user-profile-components/jest.config.js
new file mode 100644
index 0000000000000..2f8c630fc3e21
--- /dev/null
+++ b/packages/kbn-user-profile-components/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-user-profile-components'],
+};
diff --git a/packages/kbn-user-profile-components/package.json b/packages/kbn-user-profile-components/package.json
new file mode 100644
index 0000000000000..86d4c48e2e163
--- /dev/null
+++ b/packages/kbn-user-profile-components/package.json
@@ -0,0 +1,9 @@
+{
+ "name": "@kbn/user-profile-components",
+ "version": "1.0.0",
+ "private": true,
+ "main": "./target_node/index.js",
+ "browser": "./target_web/index.js",
+ "types": "./target_types/index.d.ts",
+ "license": "SSPL-1.0 OR Elastic License 2.0"
+}
diff --git a/packages/kbn-user-profile-components/src/index.ts b/packages/kbn-user-profile-components/src/index.ts
new file mode 100644
index 0000000000000..e36215e36896a
--- /dev/null
+++ b/packages/kbn-user-profile-components/src/index.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 type { UserAvatarProps, UserProfileWithAvatar } from './user_avatar';
+export type { UserProfilesSelectableProps } from './user_profiles_selectable';
+export type { UserProfilesPopoverProps } from './user_profiles_popover';
+export { UserAvatar } from './user_avatar';
+export { UserProfilesSelectable } from './user_profiles_selectable';
+export { UserProfilesPopover } from './user_profiles_popover';
+export type { UserProfile, UserProfileUserInfo, UserProfileAvatarData } from './user_profile';
diff --git a/packages/kbn-user-profile-components/src/user_avatar.test.tsx b/packages/kbn-user-profile-components/src/user_avatar.test.tsx
new file mode 100644
index 0000000000000..9c654d25f70fe
--- /dev/null
+++ b/packages/kbn-user-profile-components/src/user_avatar.test.tsx
@@ -0,0 +1,94 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { shallow } from 'enzyme';
+import React from 'react';
+
+import { UserAvatar } from './user_avatar';
+
+describe('UserAvatar', () => {
+ it('should render `EuiAvatar` correctly with image avatar', () => {
+ const wrapper = shallow(
+
+ );
+ expect(wrapper).toMatchInlineSnapshot(`
+
+ `);
+ });
+
+ it('should render `EuiAvatar` correctly with initials avatar', () => {
+ const wrapper = shallow(
+
+ );
+ expect(wrapper).toMatchInlineSnapshot(`
+
+ `);
+ });
+
+ it('should render `EuiAvatar` correctly without avatar data', () => {
+ const wrapper = shallow(
+
+ );
+ expect(wrapper).toMatchInlineSnapshot(`
+
+ `);
+ });
+
+ it('should render `EuiAvatar` correctly without user data', () => {
+ const wrapper = shallow( );
+ expect(wrapper).toMatchInlineSnapshot(`
+
+ `);
+ });
+});
diff --git a/x-pack/plugins/security/public/components/user_avatar.tsx b/packages/kbn-user-profile-components/src/user_avatar.tsx
similarity index 53%
rename from x-pack/plugins/security/public/components/user_avatar.tsx
rename to packages/kbn-user-profile-components/src/user_avatar.tsx
index c15792382f299..2413694317c27 100644
--- a/x-pack/plugins/security/public/components/user_avatar.tsx
+++ b/packages/kbn-user-profile-components/src/user_avatar.tsx
@@ -1,30 +1,59 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
+ * 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 { EuiAvatarProps } from '@elastic/eui';
import { EuiAvatar, useEuiTheme } from '@elastic/eui';
-import type { FunctionComponent, HTMLAttributes } from 'react';
+import type { FunctionComponent } from 'react';
import React from 'react';
-import type { UserProfileAvatarData, UserProfileUserInfoWithSecurity } from '../../common';
+import type { UserProfile, UserProfileUserInfo, UserProfileAvatarData } from './user_profile';
import {
getUserAvatarColor,
getUserAvatarInitials,
getUserDisplayName,
USER_AVATAR_MAX_INITIALS,
-} from '../../common/model';
+} from './user_profile';
-export interface UserAvatarProps extends Omit, 'color'> {
- user?: Pick;
+/**
+ * Convenience type for a {@link UserProfile} with avatar data
+ */
+export type UserProfileWithAvatar = UserProfile<{ avatar?: UserProfileAvatarData }>;
+
+/**
+ * Props of {@link UserAvatar} component
+ */
+export interface UserAvatarProps
+ extends Omit<
+ EuiAvatarProps,
+ | 'initials'
+ | 'initialsLength'
+ | 'imageUrl'
+ | 'iconType'
+ | 'iconSize'
+ | 'iconColor'
+ | 'name'
+ | 'color'
+ | 'type'
+ > {
+ /**
+ * User to be rendered
+ */
+ user?: UserProfileUserInfo;
+
+ /**
+ * Avatar data of user to be rendered
+ */
avatar?: UserProfileAvatarData;
- size?: EuiAvatarProps['size'];
- isDisabled?: EuiAvatarProps['isDisabled'];
}
+/**
+ * Renders an avatar given a user profile
+ */
export const UserAvatar: FunctionComponent = ({ user, avatar, ...rest }) => {
const { euiTheme } = useEuiTheme();
diff --git a/packages/kbn-user-profile-components/src/user_profile.ts b/packages/kbn-user-profile-components/src/user_profile.ts
new file mode 100644
index 0000000000000..59c5f2f5a12a8
--- /dev/null
+++ b/packages/kbn-user-profile-components/src/user_profile.ts
@@ -0,0 +1,140 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 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 { VISUALIZATION_COLORS } from '@elastic/eui';
+
+/**
+ * IMPORTANT:
+ *
+ * The types in this file have been imported from
+ * `x-pack/plugins/security/common/model/user_profile.ts`
+ *
+ * When making changes please ensure to keep both files in sync.
+ */
+
+/**
+ * Describes basic properties stored in user profile.
+ */
+export interface UserProfile {
+ /**
+ * Unique ID for of the user profile.
+ */
+ uid: string;
+
+ /**
+ * Information about the user that owns profile.
+ */
+ user: UserProfileUserInfo;
+
+ /**
+ * User specific data associated with the profile.
+ */
+ data: Partial;
+}
+
+/**
+ * Basic user information returned in user profile.
+ */
+export interface UserProfileUserInfo {
+ /**
+ * Username of the user.
+ */
+ username: string;
+ /**
+ * Optional email of the user.
+ */
+ email?: string;
+ /**
+ * Optional full name of the user.
+ */
+ full_name?: string;
+ /**
+ * Optional display name of the user.
+ */
+ display_name?: string;
+}
+
+/**
+ * Placeholder for data stored in user profile.
+ */
+export type UserProfileData = Record;
+
+/**
+ * Avatar stored in user profile.
+ */
+export interface UserProfileAvatarData {
+ /**
+ * Optional initials (two letters) of the user to use as avatar if avatar picture isn't specified.
+ */
+ initials?: string;
+ /**
+ * Background color of the avatar when initials are used.
+ */
+ color?: string;
+ /**
+ * Base64 data URL for the user avatar image.
+ */
+ imageUrl?: string;
+}
+
+export const USER_AVATAR_FALLBACK_CODE_POINT = 97; // code point for lowercase "a"
+export const USER_AVATAR_MAX_INITIALS = 2;
+
+/**
+ * Determines the color for the provided user profile.
+ * If a color is present on the user profile itself, then that is used.
+ * Otherwise, a color is provided from EUI's Visualization Colors based on the display name.
+ *
+ * @param {UserProfileUserInfo} user User info
+ * @param {UserProfileAvatarData} avatar User avatar
+ */
+export function getUserAvatarColor(
+ user: Pick,
+ avatar?: UserProfileAvatarData
+) {
+ if (avatar && avatar.color) {
+ return avatar.color;
+ }
+
+ const firstCodePoint = getUserDisplayName(user).codePointAt(0) || USER_AVATAR_FALLBACK_CODE_POINT;
+
+ return VISUALIZATION_COLORS[firstCodePoint % VISUALIZATION_COLORS.length];
+}
+
+/**
+ * Determines the initials for the provided user profile.
+ * If initials are present on the user profile itself, then that is used.
+ * Otherwise, the initials are calculated based off the words in the display name, with a max length of 2 characters.
+ *
+ * @param {UserProfileUserInfo} user User info
+ * @param {UserProfileAvatarData} avatar User avatar
+ */
+export function getUserAvatarInitials(
+ user: Pick,
+ avatar?: UserProfileAvatarData
+) {
+ if (avatar && avatar.initials) {
+ return avatar.initials;
+ }
+
+ const words = getUserDisplayName(user).split(' ');
+ const numInitials = Math.min(USER_AVATAR_MAX_INITIALS, words.length);
+
+ words.splice(numInitials, words.length);
+
+ return words.map((word) => word.substring(0, 1)).join('');
+}
+
+/**
+ * Determines the display name for the provided user profile.
+ *
+ * @param {UserProfileUserInfo} user User info
+ */
+export function getUserDisplayName(user: Pick) {
+ return user.full_name || user.username;
+}
diff --git a/packages/kbn-user-profile-components/src/user_profiles_popover.test.tsx b/packages/kbn-user-profile-components/src/user_profiles_popover.test.tsx
new file mode 100644
index 0000000000000..608ea32f7caa6
--- /dev/null
+++ b/packages/kbn-user-profile-components/src/user_profiles_popover.test.tsx
@@ -0,0 +1,118 @@
+/*
+ * Copyright 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 { shallow } from 'enzyme';
+import React from 'react';
+
+import { UserProfilesPopover } from './user_profiles_popover';
+
+const userProfiles = [
+ {
+ uid: 'u_BOulL4QMPSyV9jg5lQI2JmCkUnokHTazBnet3xVHNv0_0',
+ data: {},
+ user: {
+ username: 'delighted_nightingale',
+ email: 'delighted_nightingale@profiles.elastic.co',
+ full_name: 'Delighted Nightingale',
+ },
+ },
+ {
+ uid: 'u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0',
+ data: {},
+ user: {
+ username: 'damaged_raccoon',
+ email: 'damaged_raccoon@profiles.elastic.co',
+ full_name: 'Damaged Raccoon',
+ },
+ },
+ {
+ uid: 'u_A_tM4n0wPkdiQ9smmd8o0Hr_h61XQfu8aRPh9GMoRoc_0',
+ data: {},
+ user: {
+ username: 'physical_dinosaur',
+ email: 'physical_dinosaur@profiles.elastic.co',
+ full_name: 'Physical Dinosaur',
+ },
+ },
+ {
+ uid: 'u_9xDEQqUqoYCnFnPPLq5mIRHKL8gBTo_NiKgOnd5gGk0_0',
+ data: {},
+ user: {
+ username: 'wet_dingo',
+ email: 'wet_dingo@profiles.elastic.co',
+ full_name: 'Wet Dingo',
+ },
+ },
+];
+
+describe('UserProfilesPopover', () => {
+ it('should render `EuiPopover` and `UserProfilesSelectable` correctly', () => {
+ const [firstOption, secondOption] = userProfiles;
+ const wrapper = shallow(
+ Toggle}
+ closePopover={jest.fn()}
+ selectableProps={{
+ selectedOptions: [firstOption],
+ defaultOptions: [secondOption],
+ }}
+ />
+ );
+ expect(wrapper).toMatchInlineSnapshot(`
+
+ Toggle
+
+ }
+ closePopover={[MockFunction]}
+ display="inlineBlock"
+ hasArrow={true}
+ isOpen={false}
+ ownFocus={true}
+ panelPaddingSize="none"
+ >
+
+
+
+
+ `);
+ });
+});
diff --git a/packages/kbn-user-profile-components/src/user_profiles_popover.tsx b/packages/kbn-user-profile-components/src/user_profiles_popover.tsx
new file mode 100644
index 0000000000000..9fc553d9be689
--- /dev/null
+++ b/packages/kbn-user-profile-components/src/user_profiles_popover.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 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 { EuiPopoverProps, EuiContextMenuPanelProps } from '@elastic/eui';
+import type { FunctionComponent } from 'react';
+import React from 'react';
+import { EuiPopover, EuiContextMenuPanel } from '@elastic/eui';
+
+import { UserProfilesSelectable, UserProfilesSelectableProps } from './user_profiles_selectable';
+
+/**
+ * Props of {@link UserProfilesPopover} component
+ */
+export interface UserProfilesPopoverProps extends EuiPopoverProps {
+ /**
+ * Title of the popover
+ * @see EuiContextMenuPanelProps
+ */
+ title?: EuiContextMenuPanelProps['title'];
+
+ /**
+ * Props forwarded to selectable component
+ * @see UserProfilesSelectableProps
+ */
+ selectableProps: UserProfilesSelectableProps;
+}
+
+/**
+ * Renders a selectable component inside a popover given a list of user profiles
+ */
+export const UserProfilesPopover: FunctionComponent = ({
+ title,
+ selectableProps,
+ ...popoverProps
+}) => {
+ return (
+
+
+
+
+
+ );
+};
diff --git a/packages/kbn-user-profile-components/src/user_profiles_selectable.test.tsx b/packages/kbn-user-profile-components/src/user_profiles_selectable.test.tsx
new file mode 100644
index 0000000000000..6231a3c2f1509
--- /dev/null
+++ b/packages/kbn-user-profile-components/src/user_profiles_selectable.test.tsx
@@ -0,0 +1,199 @@
+/*
+ * Copyright 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 { mount } from 'enzyme';
+import React from 'react';
+
+import { UserProfilesSelectable } from './user_profiles_selectable';
+
+const userProfiles = [
+ {
+ uid: 'u_BOulL4QMPSyV9jg5lQI2JmCkUnokHTazBnet3xVHNv0_0',
+ data: {},
+ user: {
+ username: 'delighted_nightingale',
+ email: 'delighted_nightingale@profiles.elastic.co',
+ full_name: 'Delighted Nightingale',
+ },
+ },
+ {
+ uid: 'u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0',
+ data: {},
+ user: {
+ username: 'damaged_raccoon',
+ email: 'damaged_raccoon@profiles.elastic.co',
+ full_name: 'Damaged Raccoon',
+ },
+ },
+ {
+ uid: 'u_A_tM4n0wPkdiQ9smmd8o0Hr_h61XQfu8aRPh9GMoRoc_0',
+ data: {},
+ user: {
+ username: 'physical_dinosaur',
+ email: 'physical_dinosaur@profiles.elastic.co',
+ full_name: 'Physical Dinosaur',
+ },
+ },
+ {
+ uid: 'u_9xDEQqUqoYCnFnPPLq5mIRHKL8gBTo_NiKgOnd5gGk0_0',
+ data: {},
+ user: {
+ username: 'wet_dingo',
+ email: 'wet_dingo@profiles.elastic.co',
+ full_name: 'Wet Dingo',
+ },
+ },
+];
+
+describe('UserProfilesSelectable', () => {
+ it('should render `selectedOptions` before `defaultOptions` separated by a group label', () => {
+ const [firstOption, secondOption, thirdOption] = userProfiles;
+ const wrapper = mount(
+
+ );
+ expect(wrapper.find('EuiSelectable').prop('options')).toEqual([
+ expect.objectContaining({
+ key: firstOption.uid,
+ checked: 'on',
+ }),
+ expect.objectContaining({
+ isGroupLabel: true,
+ label: 'Suggested',
+ }),
+ expect.objectContaining({
+ key: secondOption.uid,
+ checked: undefined,
+ }),
+ expect.objectContaining({
+ key: thirdOption.uid,
+ checked: undefined,
+ }),
+ ]);
+ });
+
+ it('should hide `selectedOptions` and `defaultOptions` when `options` has been provided', () => {
+ const [firstOption, secondOption, thirdOption] = userProfiles;
+ const wrapper = mount(
+
+ );
+ expect(wrapper.find('EuiSelectable').prop('options')).toEqual([
+ expect.objectContaining({
+ key: thirdOption.uid,
+ checked: undefined,
+ }),
+ ]);
+ });
+
+ it('should hide `selectedOptions` and `defaultOptions` when `options` gets updated', () => {
+ const [firstOption, secondOption, thirdOption] = userProfiles;
+ const wrapper = mount(
+
+ );
+ expect(wrapper.find('EuiSelectable').prop('options')).toEqual([
+ expect.objectContaining({
+ key: firstOption.uid,
+ checked: 'on',
+ }),
+ expect.objectContaining({
+ isGroupLabel: true,
+ label: 'Suggested',
+ }),
+ expect.objectContaining({
+ key: secondOption.uid,
+ checked: undefined,
+ }),
+ ]);
+
+ wrapper.setProps({ options: [thirdOption] }).update();
+
+ expect(wrapper.find('EuiSelectable').prop('options')).toEqual([
+ expect.objectContaining({
+ key: thirdOption.uid,
+ checked: undefined,
+ }),
+ ]);
+ });
+
+ it('should render `options` with correct checked status', () => {
+ const [firstOption, secondOption] = userProfiles;
+ const wrapper = mount(
+
+ );
+ expect(wrapper.find('EuiSelectable').prop('options')).toEqual([
+ expect.objectContaining({
+ key: firstOption.uid,
+ checked: 'on',
+ }),
+ expect.objectContaining({
+ key: secondOption.uid,
+ checked: undefined,
+ }),
+ ]);
+ });
+
+ it('should trigger `onChange` callback when selection changes', () => {
+ const onChange = jest.fn();
+ const [firstOption, secondOption] = userProfiles;
+ const wrapper = mount(
+
+ );
+ wrapper.find('EuiSelectableListItem').last().simulate('click');
+ expect(onChange).toHaveBeenCalledWith(
+ expect.arrayContaining([
+ expect.objectContaining({
+ uid: firstOption.uid,
+ }),
+ expect.objectContaining({
+ uid: secondOption.uid,
+ }),
+ ])
+ );
+ });
+
+ it('should continue to display `selectedOptions` when getting unchecked', () => {
+ const onChange = jest.fn();
+ const [firstOption] = userProfiles;
+ const wrapper = mount(
+
+ );
+ expect(wrapper.find('EuiSelectable').prop('options')).toEqual([
+ expect.objectContaining({
+ key: firstOption.uid,
+ checked: 'on',
+ }),
+ ]);
+ wrapper.setProps({ selectedOptions: [] }).update();
+ expect(wrapper.find('EuiSelectable').prop('options')).toEqual([
+ expect.objectContaining({
+ key: firstOption.uid,
+ checked: undefined,
+ }),
+ ]);
+ });
+
+ it('should trigger `onSearchChange` callback when search term changes', () => {
+ const onSearchChange = jest.fn();
+ const wrapper = mount( );
+ wrapper.find('input[type="search"]').simulate('change', { target: { value: 'search' } });
+ expect(onSearchChange).toHaveBeenCalledWith('search', []);
+ });
+});
diff --git a/packages/kbn-user-profile-components/src/user_profiles_selectable.tsx b/packages/kbn-user-profile-components/src/user_profiles_selectable.tsx
new file mode 100644
index 0000000000000..14a44f66650aa
--- /dev/null
+++ b/packages/kbn-user-profile-components/src/user_profiles_selectable.tsx
@@ -0,0 +1,311 @@
+/*
+ * Copyright 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 { EuiSelectableOption, EuiSelectableProps } from '@elastic/eui';
+import {
+ EuiButtonEmpty,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiHorizontalRule,
+ EuiPanel,
+ EuiSelectable,
+ EuiSpacer,
+ EuiText,
+ EuiTextColor,
+} from '@elastic/eui';
+import type { FunctionComponent, ReactNode } from 'react';
+import React, { useEffect, useState } from 'react';
+
+import { i18n } from '@kbn/i18n';
+import { FormattedMessage } from '@kbn/i18n-react';
+
+import { getUserDisplayName } from './user_profile';
+import type { UserProfileWithAvatar } from './user_avatar';
+import { UserAvatar } from './user_avatar';
+
+/**
+ * Props of {@link UserProfilesSelectable} component
+ */
+export interface UserProfilesSelectableProps
+ extends Pick<
+ EuiSelectableProps,
+ | 'height'
+ | 'singleSelection'
+ | 'loadingMessage'
+ | 'noMatchesMessage'
+ | 'emptyMessage'
+ | 'errorMessage'
+ > {
+ /**
+ * List of users to be rendered as suggestions.
+ */
+ defaultOptions?: UserProfileWithAvatar[];
+
+ /**
+ * List of selected users.
+ */
+ selectedOptions?: UserProfileWithAvatar[];
+
+ /**
+ * List of users from search results. Should be updated based on the search term provided by `onSearchChange` callback.
+ */
+ options?: UserProfileWithAvatar[];
+
+ /**
+ * Passes back the list of selected users.
+ * @param options List of selected users
+ */
+ onChange?(options: UserProfileWithAvatar[]): void;
+
+ /**
+ * Passes back the search term.
+ * @param searchTerm Search term
+ */
+ onSearchChange?(searchTerm: string): void;
+
+ /**
+ * Loading indicator for asynchronous search operations.
+ */
+ isLoading?: boolean;
+
+ /**
+ * Placeholder text for search box.
+ */
+ searchPlaceholder?: string;
+
+ /**
+ * Returns text for selected status.
+ * @param selectedCount Number of selected users
+ */
+ selectedStatusMessage?(selectedCount: number): ReactNode;
+
+ /**
+ * Text for label of clear button.
+ */
+ clearButtonLabel?: ReactNode;
+}
+
+/**
+ * Renders a selectable component given a list of user profiles
+ */
+export const UserProfilesSelectable: FunctionComponent = ({
+ selectedOptions,
+ defaultOptions,
+ options,
+ onChange,
+ onSearchChange,
+ isLoading = false,
+ singleSelection = false,
+ height,
+ loadingMessage,
+ noMatchesMessage,
+ emptyMessage,
+ errorMessage,
+ searchPlaceholder,
+ selectedStatusMessage,
+ clearButtonLabel,
+}) => {
+ const [displayedOptions, setDisplayedOptions] = useState([]);
+
+ // Resets all displayed options
+ const resetDisplayedOptions = () => {
+ if (options) {
+ setDisplayedOptions(options.map(toSelectableOption));
+ return;
+ }
+
+ setDisplayedOptions([]);
+ updateDisplayedOptions();
+ };
+
+ const ensureSeparator = (values: SelectableOption[]) => {
+ let index = values.findIndex((option) => option.isGroupLabel);
+ if (index === -1) {
+ const length = values.push({
+ label: i18n.translate('userProfileComponents.userProfilesSelectable.suggestedLabel', {
+ defaultMessage: 'Suggested',
+ }),
+ isGroupLabel: true,
+ } as SelectableOption);
+ index = length - 1;
+ }
+ return index;
+ };
+
+ // Updates displayed options without removing or resorting exiting options
+ const updateDisplayedOptions = () => {
+ if (options) {
+ return;
+ }
+
+ setDisplayedOptions((values) => {
+ // Copy all displayed options
+ const nextOptions: SelectableOption[] = [...values];
+
+ // Get any newly added selected options
+ const selectedOptionsToAdd: SelectableOption[] = selectedOptions
+ ? selectedOptions
+ .filter((profile) => !nextOptions.find((option) => option.key === profile.uid))
+ .map(toSelectableOption)
+ : [];
+
+ // Get any newly added default options
+ const defaultOptionsToAdd: SelectableOption[] = defaultOptions
+ ? defaultOptions
+ .filter(
+ (profile) =>
+ !nextOptions.find((option) => option.key === profile.uid) &&
+ !selectedOptionsToAdd.find((option) => option.key === profile.uid)
+ )
+ .map(toSelectableOption)
+ : [];
+
+ // Merge in any new options and add group separator if necessary
+ if (defaultOptionsToAdd.length) {
+ const separatorIndex = ensureSeparator(nextOptions);
+ nextOptions.splice(separatorIndex, 0, ...selectedOptionsToAdd);
+ nextOptions.push(...defaultOptionsToAdd);
+ } else {
+ nextOptions.push(...selectedOptionsToAdd);
+ }
+
+ return nextOptions;
+ });
+ };
+
+ // Marks displayed options as checked or unchecked depending on `props.selectedOptions`
+ const updateCheckedStatus = () => {
+ setDisplayedOptions((values) =>
+ values.map((option) => {
+ if (selectedOptions) {
+ const match = selectedOptions.find((p) => p.uid === option.key);
+ return { ...option, checked: match ? 'on' : undefined };
+ }
+ return { ...option, checked: undefined };
+ })
+ );
+ };
+
+ useEffect(resetDisplayedOptions, [options]); // eslint-disable-line react-hooks/exhaustive-deps
+ useEffect(updateDisplayedOptions, [defaultOptions, selectedOptions]); // eslint-disable-line react-hooks/exhaustive-deps
+ useEffect(updateCheckedStatus, [options, defaultOptions, selectedOptions]);
+
+ const selectedCount = selectedOptions ? selectedOptions.length : 0;
+
+ return (
+ >) => {
+ if (!onChange) {
+ return;
+ }
+
+ // Take all selected options from `nextOptions` unless already in `props.selectedOptions`
+ const values: UserProfileWithAvatar[] = nextOptions
+ .filter((option) => {
+ if (option.isGroupLabel || option.checked !== 'on') {
+ return false;
+ }
+ if (selectedOptions && selectedOptions.find((p) => p.uid === option.key)) {
+ return false;
+ }
+ return true;
+ })
+ .map((option) => option.data);
+
+ // Add all options from `props.selectedOptions` unless they have been deselected in `nextOptions`
+ if (selectedOptions && !singleSelection) {
+ selectedOptions.forEach((profile) => {
+ const match = nextOptions.find((o) => o.key === profile.uid);
+ if (!match || match.checked === 'on') {
+ values.push(profile);
+ }
+ });
+ }
+
+ onChange(values);
+ }}
+ style={{ maxHeight: height }}
+ singleSelection={singleSelection}
+ searchable
+ searchProps={{
+ placeholder:
+ searchPlaceholder ??
+ i18n.translate('userProfileComponents.userProfilesSelectable.searchPlaceholder', {
+ defaultMessage: 'Search',
+ }),
+ onChange: onSearchChange,
+ isLoading,
+ isClearable: !isLoading,
+ }}
+ isPreFiltered
+ listProps={{ onFocusBadge: false }}
+ loadingMessage={loadingMessage}
+ noMatchesMessage={noMatchesMessage}
+ emptyMessage={emptyMessage}
+ errorMessage={errorMessage}
+ >
+ {(list, search) => (
+ <>
+
+ {search}
+
+
+
+
+ {selectedStatusMessage ? (
+ selectedStatusMessage(selectedCount)
+ ) : (
+
+ )}
+
+
+
+ {selectedCount ? (
+ onChange?.([])}
+ style={{ height: '1rem' }}
+ >
+ {clearButtonLabel ?? (
+
+ )}
+
+ ) : undefined}
+
+
+
+
+ {list}
+ >
+ )}
+
+ );
+};
+
+type SelectableOption = EuiSelectableOption;
+
+function toSelectableOption(userProfile: UserProfileWithAvatar): SelectableOption {
+ // @ts-ignore: `isGroupLabel` is not required here but TS complains
+ return {
+ key: userProfile.uid,
+ prepend: ,
+ label: getUserDisplayName(userProfile.user),
+ append: {userProfile.user.email} ,
+ data: userProfile,
+ };
+}
diff --git a/packages/kbn-user-profile-components/tsconfig.json b/packages/kbn-user-profile-components/tsconfig.json
new file mode 100644
index 0000000000000..525d036bdcd49
--- /dev/null
+++ b/packages/kbn-user-profile-components/tsconfig.json
@@ -0,0 +1,15 @@
+{
+ "extends": "../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outDir": "./target_types",
+ "stripInternal": true,
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": ["src/**/*"]
+}
diff --git a/scripts/update_vscode_config.js b/scripts/update_vscode_config.js
index d39e4ce757ce5..2b23d8004f793 100644
--- a/scripts/update_vscode_config.js
+++ b/scripts/update_vscode_config.js
@@ -7,4 +7,4 @@
*/
require('../src/setup_node_env/no_transpilation');
-require('@kbn/dev-utils').runUpdateVscodeConfigCli();
+require('@kbn/managed-vscode-config-cli');
diff --git a/src/core/public/core_system.test.ts b/src/core/public/core_system.test.ts
index eb8b564c2e9ea..f9f9f6e90afdd 100644
--- a/src/core/public/core_system.test.ts
+++ b/src/core/public/core_system.test.ts
@@ -41,6 +41,15 @@ import {
} from './core_system.test.mocks';
import { CoreSystem } from './core_system';
+import {
+ KIBANA_LOADED_EVENT,
+ LOAD_START,
+ LOAD_BOOTSTRAP_START,
+ LOAD_CORE_CREATED,
+ LOAD_FIRST_NAV,
+ LOAD_SETUP_DONE,
+ LOAD_START_DONE,
+} from './events';
jest.spyOn(CoreSystem.prototype, 'stop');
@@ -75,12 +84,28 @@ beforeEach(() => {
window.performance.clearMarks = jest.fn();
window.performance.getEntriesByName = jest.fn().mockReturnValue([
{
- detail: 'load_started',
- startTime: 456,
+ detail: LOAD_START,
+ startTime: 111,
+ },
+ {
+ detail: LOAD_BOOTSTRAP_START,
+ startTime: 222,
+ },
+ {
+ detail: LOAD_CORE_CREATED,
+ startTime: 333,
},
{
- detail: 'bootstrap_started',
- startTime: 123,
+ detail: LOAD_SETUP_DONE,
+ startTime: 444,
+ },
+ {
+ detail: LOAD_START_DONE,
+ startTime: 555,
+ },
+ {
+ detail: LOAD_FIRST_NAV,
+ startTime: 666,
},
]);
});
@@ -248,38 +273,71 @@ describe('#start()', () => {
);
});
- it('reports the event Loaded Kibana and clears marks', async () => {
+ it('reports the deprecated event Loaded Kibana', async () => {
await startCore();
- expect(analyticsServiceStartMock.reportEvent).toHaveBeenCalledTimes(1);
- expect(analyticsServiceStartMock.reportEvent).toHaveBeenCalledWith('Loaded Kibana', {
+ expect(analyticsServiceStartMock.reportEvent).toHaveBeenCalledTimes(2);
+ expect(analyticsServiceStartMock.reportEvent).toHaveBeenNthCalledWith(1, 'Loaded Kibana', {
kibana_version: '1.2.3',
- load_started: 456,
- bootstrap_started: 123,
protocol: 'http:',
});
expect(window.performance.clearMarks).toHaveBeenCalledTimes(1);
});
- it('reports the event Loaded Kibana (with memory)', async () => {
- fetchOptionalMemoryInfoMock.mockReturnValue({
- load_started: 456,
- bootstrap_started: 123,
- memory_js_heap_size_limit: 3,
- memory_js_heap_size_total: 2,
- memory_js_heap_size_used: 1,
+ it('reports the metric event kibana-loaded and clears marks', async () => {
+ await startCore();
+ expect(analyticsServiceStartMock.reportEvent).toHaveBeenCalledTimes(2);
+ expect(analyticsServiceStartMock.reportEvent).toHaveBeenNthCalledWith(2, 'performance_metric', {
+ eventName: KIBANA_LOADED_EVENT,
+ meta: {
+ kibana_version: '1.2.3',
+ protocol: 'http:',
+ },
+ key1: LOAD_START,
+ key2: LOAD_BOOTSTRAP_START,
+ key3: LOAD_CORE_CREATED,
+ key4: LOAD_SETUP_DONE,
+ key5: LOAD_START_DONE,
+ value1: 111,
+ value2: 222,
+ value3: 333,
+ value4: 444,
+ value5: 555,
+ duration: 666,
});
+ expect(window.performance.clearMarks).toHaveBeenCalledTimes(1);
+ });
+
+ it('reports the event kibana-loaded (with memory)', async () => {
+ const performanceMemory = {
+ usedJSHeapSize: 1,
+ jsHeapSizeLimit: 3,
+ totalJSHeapSize: 4,
+ };
+ fetchOptionalMemoryInfoMock.mockReturnValue(performanceMemory);
+
await startCore();
- expect(analyticsServiceStartMock.reportEvent).toHaveBeenCalledTimes(1);
- expect(analyticsServiceStartMock.reportEvent).toHaveBeenCalledWith('Loaded Kibana', {
- load_started: 456,
- bootstrap_started: 123,
- kibana_version: '1.2.3',
- memory_js_heap_size_limit: 3,
- memory_js_heap_size_total: 2,
- memory_js_heap_size_used: 1,
- protocol: 'http:',
+
+ expect(analyticsServiceStartMock.reportEvent).toHaveBeenCalledTimes(2);
+ expect(analyticsServiceStartMock.reportEvent).toHaveBeenNthCalledWith(2, 'performance_metric', {
+ eventName: KIBANA_LOADED_EVENT,
+ meta: {
+ kibana_version: '1.2.3',
+ protocol: 'http:',
+ ...performanceMemory,
+ },
+ key1: LOAD_START,
+ key2: LOAD_BOOTSTRAP_START,
+ key3: LOAD_CORE_CREATED,
+ key4: LOAD_SETUP_DONE,
+ key5: LOAD_START_DONE,
+ value1: 111,
+ value2: 222,
+ value3: 333,
+ value4: 444,
+ value5: 555,
+ duration: 666,
});
});
diff --git a/src/core/public/core_system.ts b/src/core/public/core_system.ts
index 0ba7d4f1fc285..c32a10704db06 100644
--- a/src/core/public/core_system.ts
+++ b/src/core/public/core_system.ts
@@ -26,18 +26,29 @@ import { HttpService } from '@kbn/core-http-browser-internal';
import { 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';
import { OverlayService } from '@kbn/core-overlays-browser-internal';
import { KBN_LOAD_MARKS } from '@kbn/core-mount-utils-browser-internal';
+import { SavedObjectsService } from '@kbn/core-saved-objects-browser-internal';
import { NotificationsService } from '@kbn/core-notifications-browser-internal';
+import { fetchOptionalMemoryInfo } from './fetch_optional_memory_info';
import { CoreSetup, CoreStart } from '.';
import { ChromeService } from './chrome';
import { PluginsService } from './plugins';
import { ApplicationService } from './application';
import { RenderingService } from './rendering';
-import { SavedObjectsService } from './saved_objects';
import { CoreApp } from './core_app';
import type { InternalApplicationSetup, InternalApplicationStart } from './application/types';
-import { fetchOptionalMemoryInfo } from './fetch_optional_memory_info';
+
+import {
+ LOAD_SETUP_DONE,
+ LOAD_START_DONE,
+ KIBANA_LOADED_EVENT,
+ LOAD_CORE_CREATED,
+ LOAD_FIRST_NAV,
+ LOAD_BOOTSTRAP_START,
+ LOAD_START,
+} from './events';
interface Params {
rootDomElement: HTMLElement;
@@ -129,12 +140,12 @@ export class CoreSystem {
this.coreApp = new CoreApp(this.coreContext);
performance.mark(KBN_LOAD_MARKS, {
- detail: 'core_created',
+ detail: LOAD_CORE_CREATED,
});
}
- private getLoadMarksInfo() {
- if (!performance) return [];
+ private getLoadMarksInfo(): Record {
+ if (!performance) return {};
const reportData: Record = {};
const marks = performance.getEntriesByName(KBN_LOAD_MARKS);
for (const mark of marks) {
@@ -145,11 +156,33 @@ export class CoreSystem {
}
private reportKibanaLoadedEvent(analytics: AnalyticsServiceStart) {
+ /**
+ * @deprecated here for backwards compatibility in FullStory
+ **/
analytics.reportEvent('Loaded Kibana', {
kibana_version: this.coreContext.env.packageInfo.version,
protocol: window.location.protocol,
- ...fetchOptionalMemoryInfo(),
- ...this.getLoadMarksInfo(),
+ });
+
+ const timing = this.getLoadMarksInfo();
+ reportPerformanceMetricEvent(analytics, {
+ eventName: KIBANA_LOADED_EVENT,
+ meta: {
+ kibana_version: this.coreContext.env.packageInfo.version,
+ protocol: window.location.protocol,
+ ...fetchOptionalMemoryInfo(),
+ },
+ duration: timing[LOAD_FIRST_NAV],
+ key1: LOAD_START,
+ value1: timing[LOAD_START],
+ key2: LOAD_BOOTSTRAP_START,
+ value2: timing[LOAD_BOOTSTRAP_START],
+ key3: LOAD_CORE_CREATED,
+ value3: timing[LOAD_CORE_CREATED],
+ key4: LOAD_SETUP_DONE,
+ value4: timing[LOAD_SETUP_DONE],
+ key5: LOAD_START_DONE,
+ value5: timing[LOAD_START_DONE],
});
performance.clearMarks(KBN_LOAD_MARKS);
}
@@ -170,6 +203,7 @@ export class CoreSystem {
this.docLinks.setup();
const analytics = this.analytics.setup({ injectedMetadata });
+
this.registerLoadedKibanaEventType(analytics);
const executionContext = this.executionContext.setup({ analytics });
@@ -200,7 +234,7 @@ export class CoreSystem {
await this.plugins.setup(core);
performance.mark(KBN_LOAD_MARKS, {
- detail: 'setup_done',
+ detail: LOAD_SETUP_DONE,
});
return { fatalErrors: this.fatalErrorsSetup };
@@ -300,13 +334,13 @@ export class CoreSystem {
});
performance.mark(KBN_LOAD_MARKS, {
- detail: 'start_done',
+ detail: LOAD_START_DONE,
});
// Wait for the first app navigation to report Kibana Loaded
firstValueFrom(application.currentAppId$.pipe(filter(Boolean))).then(() => {
performance.mark(KBN_LOAD_MARKS, {
- detail: 'first_app_nav',
+ detail: LOAD_FIRST_NAV,
});
this.reportKibanaLoadedEvent(analytics);
});
@@ -342,6 +376,9 @@ export class CoreSystem {
this.rootDomElement.textContent = '';
}
+ /**
+ * @deprecated
+ */
private registerLoadedKibanaEventType(analytics: AnalyticsServiceSetup) {
analytics.registerEventType({
eventType: 'Loaded Kibana',
@@ -350,45 +387,6 @@ export class CoreSystem {
type: 'keyword',
_meta: { description: 'The version of Kibana' },
},
- memory_js_heap_size_limit: {
- type: 'long',
- _meta: { description: 'The maximum size of the heap', optional: true },
- },
- memory_js_heap_size_total: {
- type: 'long',
- _meta: { description: 'The total size of the heap', optional: true },
- },
- memory_js_heap_size_used: {
- type: 'long',
- _meta: { description: 'The used size of the heap', optional: true },
- },
- load_started: {
- type: 'long',
- _meta: { description: 'When the render template starts loading assets', optional: true },
- },
- bootstrap_started: {
- type: 'long',
- _meta: { description: 'When kbnBootstrap callback is called', optional: true },
- },
- core_created: {
- type: 'long',
- _meta: { description: 'When core system is created', optional: true },
- },
- setup_done: {
- type: 'long',
- _meta: { description: 'When core system setup is complete', optional: true },
- },
- start_done: {
- type: 'long',
- _meta: { description: 'When core system start is complete', optional: true },
- },
- first_app_nav: {
- type: 'long',
- _meta: {
- description: 'When the application emits the first app navigation',
- optional: true,
- },
- },
protocol: {
type: 'keyword',
_meta: {
diff --git a/src/core/public/events.ts b/src/core/public/events.ts
new file mode 100644
index 0000000000000..e2f5d48ddfe3d
--- /dev/null
+++ b/src/core/public/events.ts
@@ -0,0 +1,19 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+/** @internal */
+export const KBN_LOAD_MARKS = 'kbnLoad';
+
+export const KIBANA_LOADED_EVENT = 'kibana_loaded';
+
+export const LOAD_START = 'load_started';
+export const LOAD_BOOTSTRAP_START = 'bootstrap_started';
+export const LOAD_CORE_CREATED = 'core_created';
+export const LOAD_SETUP_DONE = 'setup_done';
+export const LOAD_START_DONE = 'start_done';
+export const LOAD_FIRST_NAV = 'first_app_nav';
diff --git a/src/core/public/fetch_optional_memory_info.test.ts b/src/core/public/fetch_optional_memory_info.test.ts
index f92fad9c14d63..4eca4cf0d11de 100644
--- a/src/core/public/fetch_optional_memory_info.test.ts
+++ b/src/core/public/fetch_optional_memory_info.test.ts
@@ -27,9 +27,9 @@ describe('fetchOptionalMemoryInfo', () => {
},
};
expect(fetchOptionalMemoryInfo()).toEqual({
- memory_js_heap_size_limit: 3,
- memory_js_heap_size_total: 2,
- memory_js_heap_size_used: 1,
+ jsHeapSizeLimit: 3,
+ totalJSHeapSize: 2,
+ usedJSHeapSize: 1,
});
});
});
diff --git a/src/core/public/fetch_optional_memory_info.ts b/src/core/public/fetch_optional_memory_info.ts
index b18f3ca2698da..957388d55453d 100644
--- a/src/core/public/fetch_optional_memory_info.ts
+++ b/src/core/public/fetch_optional_memory_info.ts
@@ -14,15 +14,15 @@ export interface BrowserPerformanceMemoryInfo {
/**
* The maximum size of the heap, in bytes, that is available to the context.
*/
- memory_js_heap_size_limit: number;
+ jsHeapSizeLimit: number;
/**
* The total allocated heap size, in bytes.
*/
- memory_js_heap_size_total: number;
+ totalJSHeapSize: number;
/**
* The currently active segment of JS heap, in bytes.
*/
- memory_js_heap_size_used: number;
+ usedJSHeapSize: number;
}
/**
@@ -34,9 +34,9 @@ export function fetchOptionalMemoryInfo(): BrowserPerformanceMemoryInfo | undefi
const memory = window.performance.memory;
if (memory) {
return {
- memory_js_heap_size_limit: memory.jsHeapSizeLimit,
- memory_js_heap_size_total: memory.totalJSHeapSize,
- memory_js_heap_size_used: memory.usedJSHeapSize,
+ jsHeapSizeLimit: memory.jsHeapSizeLimit,
+ totalJSHeapSize: memory.totalJSHeapSize,
+ usedJSHeapSize: memory.usedJSHeapSize,
};
}
}
diff --git a/src/core/public/index.ts b/src/core/public/index.ts
index fe18a711123e6..1cf8f30136d4b 100644
--- a/src/core/public/index.ts
+++ b/src/core/public/index.ts
@@ -46,6 +46,7 @@ import type { UiSettingsState, IUiSettingsClient } from '@kbn/core-ui-settings-b
import type { DeprecationsServiceStart } from '@kbn/core-deprecations-browser';
import type { Capabilities } from '@kbn/core-capabilities-common';
import type { OverlayStart } from '@kbn/core-overlays-browser';
+import type { SavedObjectsStart } from '@kbn/core-saved-objects-browser';
import type { NotificationsSetup, NotificationsStart } from '@kbn/core-notifications-browser';
import type {
ChromeBadge,
@@ -76,7 +77,6 @@ import type {
PluginOpaqueId,
} from './plugins';
import type { ApplicationSetup, ApplicationStart } from './application';
-import type { SavedObjectsStart } from './saved_objects';
export type { PackageInfo, EnvironmentMode } from '@kbn/config';
export type { DomainDeprecationDetails } from '@kbn/core-deprecations-common';
@@ -128,8 +128,6 @@ export type {
NavigateToAppOptions,
NavigateToUrlOptions,
} from './application';
-
-export { SimpleSavedObjectImpl } from './saved_objects';
export type {
SavedObjectsClientContract,
SimpleSavedObject,
diff --git a/src/core/public/kbn_bootstrap.ts b/src/core/public/kbn_bootstrap.ts
index e97c7e58a48d5..0359f9e4d6520 100644
--- a/src/core/public/kbn_bootstrap.ts
+++ b/src/core/public/kbn_bootstrap.ts
@@ -11,10 +11,12 @@ import { KBN_LOAD_MARKS } from '@kbn/core-mount-utils-browser-internal';
import { CoreSystem } from './core_system';
import { ApmSystem } from './apm_system';
+import { LOAD_BOOTSTRAP_START } from './events';
+
/** @internal */
export async function __kbnBootstrap__() {
performance.mark(KBN_LOAD_MARKS, {
- detail: 'bootstrap_started',
+ detail: LOAD_BOOTSTRAP_START,
});
const injectedMetadata = JSON.parse(
diff --git a/src/core/public/mocks.ts b/src/core/public/mocks.ts
index 38d9431e6d0e6..377bf7d7c6885 100644
--- a/src/core/public/mocks.ts
+++ b/src/core/public/mocks.ts
@@ -20,14 +20,13 @@ import { httpServiceMock } from '@kbn/core-http-browser-mocks';
import { uiSettingsServiceMock } 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';
import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks';
import type { PluginInitializerContext, AppMountParameters } from '.';
// Import values from their individual modules instead.
import { ScopedHistory } from './application';
import { applicationServiceMock } from './application/application_service.mock';
import { chromeServiceMock } from './chrome/chrome_service.mock';
-import { savedObjectsServiceMock } from './saved_objects/saved_objects_service.mock';
-
export { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks';
export { docLinksServiceMock } from '@kbn/core-doc-links-browser-mocks';
export { themeServiceMock } from '@kbn/core-theme-browser-mocks';
@@ -40,7 +39,10 @@ export { i18nServiceMock } from '@kbn/core-i18n-browser-mocks';
export { notificationServiceMock } from '@kbn/core-notifications-browser-mocks';
export { overlayServiceMock } from '@kbn/core-overlays-browser-mocks';
export { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks';
-export { savedObjectsServiceMock } from './saved_objects/saved_objects_service.mock';
+export {
+ savedObjectsServiceMock,
+ simpleSavedObjectMock,
+} from '@kbn/core-saved-objects-browser-mocks';
export { scopedHistoryMock } from './application/scoped_history.mock';
export { applicationServiceMock } from './application/application_service.mock';
export { deprecationsServiceMock } from '@kbn/core-deprecations-browser-mocks';
diff --git a/src/core/public/plugins/plugins_service.test.ts b/src/core/public/plugins/plugins_service.test.ts
index bd2c5f5fb9705..d2faa81231401 100644
--- a/src/core/public/plugins/plugins_service.test.ts
+++ b/src/core/public/plugins/plugins_service.test.ts
@@ -37,7 +37,7 @@ import { fatalErrorsServiceMock } from '@kbn/core-fatal-errors-browser-mocks';
import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks';
import { httpServiceMock } from '@kbn/core-http-browser-mocks';
import type { CoreSetup, CoreStart, PluginInitializerContext } from '..';
-import { savedObjectsServiceMock } from '../saved_objects/saved_objects_service.mock';
+import { savedObjectsServiceMock } from '@kbn/core-saved-objects-browser-mocks';
import { deprecationsServiceMock } from '@kbn/core-deprecations-browser-mocks';
export let mockPluginInitializers: Map;
diff --git a/src/core/server/integration_tests/saved_objects/migrations/incompatible_cluster_routing_allocation.test.ts b/src/core/server/integration_tests/saved_objects/migrations/incompatible_cluster_routing_allocation.test.ts
index cf00a15c795f2..95f6445812d81 100644
--- a/src/core/server/integration_tests/saved_objects/migrations/incompatible_cluster_routing_allocation.test.ts
+++ b/src/core/server/integration_tests/saved_objects/migrations/incompatible_cluster_routing_allocation.test.ts
@@ -91,8 +91,7 @@ async function updateRoutingAllocations(
});
}
-// FLAKY: https://github.com/elastic/kibana/issues/136990
-describe.skip('incompatible_cluster_routing_allocation', () => {
+describe('incompatible_cluster_routing_allocation', () => {
let client: ElasticsearchClient;
let root: Root;
diff --git a/src/core/server/server.ts b/src/core/server/server.ts
index 2b0180796b604..42878ca66e614 100644
--- a/src/core/server/server.ts
+++ b/src/core/server/server.ts
@@ -23,7 +23,8 @@ import {
} from '@kbn/core-config-server-internal';
import { NodeService, nodeConfig } from '@kbn/core-node-server-internal';
import { AnalyticsService } from '@kbn/core-analytics-server-internal';
-import type { AnalyticsServiceSetup } from '@kbn/core-analytics-server';
+import type { AnalyticsServiceSetup, AnalyticsServiceStart } from '@kbn/core-analytics-server';
+import { reportPerformanceMetricEvent } from '@kbn/ebt-tools';
import { EnvironmentService, pidConfig } from '@kbn/core-environment-server-internal';
import {
ExecutionContextService,
@@ -402,7 +403,7 @@ export class Server {
startTransaction?.end();
this.uptimePerStep.start = { start: startStartUptime, end: process.uptime() };
- analyticsStart.reportEvent(KIBANA_STARTED_EVENT, { uptime_per_step: this.uptimePerStep });
+ this.reportKibanaStartedEvents(analyticsStart);
return this.coreStart;
}
@@ -464,6 +465,11 @@ export class Server {
}
}
+ /**
+ * Register the legacy KIBANA_STARTED_EVENT.
+ * @param analyticsSetup The {@link AnalyticsServiceSetup}
+ * @private
+ */
private registerKibanaStartedEventType(analyticsSetup: AnalyticsServiceSetup) {
analyticsSetup.registerEventType<{ uptime_per_step: UptimeSteps }>({
eventType: KIBANA_STARTED_EVENT,
@@ -551,4 +557,33 @@ export class Server {
},
});
}
+
+ /**
+ * Reports the new and legacy KIBANA_STARTED_EVENT.
+ * @param analyticsStart The {@link AnalyticsServiceStart}.
+ * @private
+ */
+ private reportKibanaStartedEvents(analyticsStart: AnalyticsServiceStart) {
+ // Report the legacy KIBANA_STARTED_EVENT.
+ analyticsStart.reportEvent(KIBANA_STARTED_EVENT, { uptime_per_step: this.uptimePerStep });
+
+ const ups = this.uptimePerStep;
+
+ const toMs = (sec: number) => Math.round(sec * 1000);
+ // Report the metric-shaped KIBANA_STARTED_EVENT.
+ reportPerformanceMetricEvent(analyticsStart, {
+ eventName: KIBANA_STARTED_EVENT,
+ duration: toMs(ups.start!.end - ups.constructor!.start),
+ key1: 'time_to_constructor',
+ value1: toMs(ups.constructor!.start),
+ key2: 'constructor_time',
+ value2: toMs(ups.constructor!.end - ups.constructor!.start),
+ key3: 'preboot_time',
+ value3: toMs(ups.preboot!.end - ups.preboot!.start),
+ key4: 'setup_time',
+ value4: toMs(ups.setup!.end - ups.setup!.start),
+ key5: 'start_time',
+ value5: toMs(ups.start!.end - ups.start!.start),
+ });
+ }
}
diff --git a/src/dev/build/args.test.ts b/src/dev/build/args.test.ts
index 6361b6b618b11..6a7436284b2ea 100644
--- a/src/dev/build/args.test.ts
+++ b/src/dev/build/args.test.ts
@@ -27,6 +27,7 @@ it('build default and oss dist for current platform, without packages, by defaul
expect(readCliArgs(['node', 'scripts/build'])).toMatchInlineSnapshot(`
Object {
"buildOptions": Object {
+ "buildCanvasShareableRuntime": true,
"createArchives": true,
"createDebPackage": false,
"createDockerCloud": false,
@@ -60,6 +61,7 @@ it('builds packages if --all-platforms is passed', () => {
expect(readCliArgs(['node', 'scripts/build', '--all-platforms'])).toMatchInlineSnapshot(`
Object {
"buildOptions": Object {
+ "buildCanvasShareableRuntime": true,
"createArchives": true,
"createDebPackage": true,
"createDockerCloud": true,
@@ -93,6 +95,7 @@ it('limits packages if --rpm passed with --all-platforms', () => {
expect(readCliArgs(['node', 'scripts/build', '--all-platforms', '--rpm'])).toMatchInlineSnapshot(`
Object {
"buildOptions": Object {
+ "buildCanvasShareableRuntime": true,
"createArchives": true,
"createDebPackage": false,
"createDockerCloud": false,
@@ -126,6 +129,7 @@ it('limits packages if --deb passed with --all-platforms', () => {
expect(readCliArgs(['node', 'scripts/build', '--all-platforms', '--deb'])).toMatchInlineSnapshot(`
Object {
"buildOptions": Object {
+ "buildCanvasShareableRuntime": true,
"createArchives": true,
"createDebPackage": true,
"createDockerCloud": false,
@@ -160,6 +164,7 @@ it('limits packages if --docker passed with --all-platforms', () => {
.toMatchInlineSnapshot(`
Object {
"buildOptions": Object {
+ "buildCanvasShareableRuntime": true,
"createArchives": true,
"createDebPackage": false,
"createDockerCloud": true,
@@ -201,6 +206,7 @@ it('limits packages if --docker passed with --skip-docker-ubi and --all-platform
).toMatchInlineSnapshot(`
Object {
"buildOptions": Object {
+ "buildCanvasShareableRuntime": true,
"createArchives": true,
"createDebPackage": false,
"createDockerCloud": true,
@@ -235,6 +241,7 @@ it('limits packages if --all-platforms passed with --skip-docker-ubuntu', () =>
.toMatchInlineSnapshot(`
Object {
"buildOptions": Object {
+ "buildCanvasShareableRuntime": true,
"createArchives": true,
"createDebPackage": true,
"createDockerCloud": true,
diff --git a/src/dev/build/args.ts b/src/dev/build/args.ts
index 42274cda867a7..c3d1a19f82a3e 100644
--- a/src/dev/build/args.ts
+++ b/src/dev/build/args.ts
@@ -20,6 +20,7 @@ export function readCliArgs(argv: string[]) {
'skip-generic-folders',
'skip-platform-folders',
'skip-os-packages',
+ 'skip-canvas-shareable-runtime',
'rpm',
'deb',
'docker-context-use-local-artifact',
@@ -136,6 +137,7 @@ export function readCliArgs(argv: string[]) {
createDockerContexts: !Boolean(flags['skip-docker-contexts']),
targetAllPlatforms: Boolean(flags['all-platforms']),
eprRegistry: flags['epr-registry'],
+ buildCanvasShareableRuntime: !Boolean(flags['skip-canvas-shareable-runtime']),
};
return {
diff --git a/src/dev/build/build_distributables.ts b/src/dev/build/build_distributables.ts
index 893985926bd78..a9a7a5c571a7c 100644
--- a/src/dev/build/build_distributables.ts
+++ b/src/dev/build/build_distributables.ts
@@ -20,6 +20,7 @@ export interface BuildOptions {
downloadFreshNode: boolean;
downloadCloudDependencies: boolean;
initialize: boolean;
+ buildCanvasShareableRuntime: boolean;
createGenericFolders: boolean;
createPlatformFolders: boolean;
createArchives: boolean;
@@ -74,7 +75,9 @@ export async function buildDistributables(log: ToolingLog, options: BuildOptions
await run(Tasks.CreateEmptyDirsAndFiles);
await run(Tasks.CreateReadme);
await run(Tasks.BuildBazelPackages);
- await run(Tasks.BuildXpack);
+ if (options.buildCanvasShareableRuntime) {
+ await run(Tasks.BuildCanvasShareableRuntime);
+ }
await run(Tasks.BuildKibanaPlatformPlugins);
await run(Tasks.TranspileBabel);
await run(Tasks.CreatePackageJson);
diff --git a/src/dev/build/cli.ts b/src/dev/build/cli.ts
index 5acdc4b37423f..b7c3c32d496fb 100644
--- a/src/dev/build/cli.ts
+++ b/src/dev/build/cli.ts
@@ -42,6 +42,7 @@ if (showHelp) {
--docker-context-use-local-artifact {dim Use a local artifact when building the Docker context}
--docker-cross-compile {dim Produce arm64 and amd64 Docker images}
--docker-contexts {dim Only build the Docker build contexts}
+ --skip-canvas-shareable-runtime {dim Don't build the Canvas shareable runtime}
--skip-docker-ubi {dim Don't build the docker ubi image}
--skip-docker-ubuntu {dim Don't build the docker ubuntu image}
--release {dim Produce a release-ready distributable}
diff --git a/src/dev/build/tasks/build_canvas_shareable_runtime.ts b/src/dev/build/tasks/build_canvas_shareable_runtime.ts
new file mode 100644
index 0000000000000..6eb43b4dc7070
--- /dev/null
+++ b/src/dev/build/tasks/build_canvas_shareable_runtime.ts
@@ -0,0 +1,23 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import del from 'del';
+import { Task, exec } from '../lib';
+
+export const BuildCanvasShareableRuntime: Task = {
+ description: 'Build Canvas shareable runtime',
+
+ async run(config, log, build) {
+ await del(config.resolveFromRepo('x-pack/plugins/canvas/shareable_runtime/build'));
+
+ await exec(log, process.execPath, ['plugins/canvas/scripts/shareable_runtime'], {
+ cwd: config.resolveFromRepo('x-pack'),
+ level: 'info',
+ });
+ },
+};
diff --git a/src/dev/build/tasks/build_packages_task.ts b/src/dev/build/tasks/build_packages_task.ts
index bae1807f1f4c3..607e0ac0f08ba 100644
--- a/src/dev/build/tasks/build_packages_task.ts
+++ b/src/dev/build/tasks/build_packages_task.ts
@@ -6,13 +6,12 @@
* Side Public License, v 1.
*/
-import cpy from 'cpy';
import Path from 'path';
import { discoverBazelPackages } from '@kbn/bazel-packages';
import { runBazel } from '@kbn/bazel-runner';
-import { Task, scanCopy, write, exec } from '../lib';
+import { Task, scanCopy, write } from '../lib';
export const BuildBazelPackages: Task = {
description: 'Building distributable versions of Bazel packages',
@@ -40,20 +39,3 @@ export const BuildBazelPackages: Task = {
}
},
};
-
-export const BuildXpack: Task = {
- description: 'Building distributable versions of x-pack',
- async run(config, log, build) {
- log.info('running x-pack build task');
- await exec(log, 'yarn', ['build'], {
- level: 'debug',
- cwd: config.resolveFromRepo('x-pack'),
- });
-
- log.info('copying built x-pack into build dir');
- await cpy('**/{.,}*', build.resolvePath('x-pack'), {
- cwd: config.resolveFromRepo('x-pack/build/plugin/kibana/x-pack'),
- parents: true,
- });
- },
-};
diff --git a/src/dev/build/tasks/copy_source_task.ts b/src/dev/build/tasks/copy_source_task.ts
index a970ae0e456eb..4140b142d177f 100644
--- a/src/dev/build/tasks/copy_source_task.ts
+++ b/src/dev/build/tasks/copy_source_task.ts
@@ -19,35 +19,49 @@ export const CopySource: Task = {
select: [
'yarn.lock',
'.npmrc',
+ 'kibana.d.ts',
+ 'config/kibana.yml',
+ 'config/node.options',
+ 'typings/**',
+ 'tsconfig*.json',
+ '.i18nrc.json',
'src/**',
- '!src/**/*.{test,test.mocks,mock}.{js,ts,tsx}',
- '!src/**/mocks.ts', // special file who imports .mock files
- '!src/**/{target,tests,__jest__,test_data,__tests__,__snapshots__,__mocks__,integration_tests,__fixtures__}/**',
- '!src/core/server/core_app/assets/favicons/favicon.distribution.ico',
- '!src/core/server/core_app/assets/favicons/favicon.distribution.png',
- '!src/core/server/core_app/assets/favicons/favicon.distribution.svg',
- '!src/test_utils/**',
- '!src/fixtures/**',
+
+ 'x-pack/plugins/**',
+ 'x-pack/.i18nrc.json',
+ 'x-pack/package.json',
+
+ '!{src,x-pack}/**/*.{test,test.mocks,mock,mocks}.*',
+ '!{src,x-pack}/**/target/**',
+ '!{src,x-pack}/**/{__stories__,storybook,.storybook}/**',
+ '!{src,x-pack}/**/{test,tests,test_resources,test_data,__tests__,manual_tests,__jest__,__snapshots__,__mocks__,mock_responses,mocks,fixtures,__fixtures__,cypress,integration_tests}/**',
+
+ '!src/dev/**',
+ '!src/**/mocks.{js,ts}',
'!src/cli/repl/**',
'!src/cli*/dev.js',
+ '!src/plugins/telemetry/schema/**',
+ '!src/core/server/core_app/assets/favicons/favicon.distribution.{ico,png,svg}',
'!src/functional_test_runner/**',
- '!src/dev/**',
+ '!src/setup_node_env/index.js',
+
+ '!x-pack/plugins/**/{ftr_e2e,e2e}/**',
+ '!x-pack/plugins/**/scripts/**',
+ '!x-pack/plugins/telemetry_collection_xpack/schema/**',
+
'!**/jest.config.js',
+ '!**/jest.config.dev.js',
'!**/jest.integration.config.js',
- '!**/mocks.js',
- '!**/test_utils.js',
- '!**/test_helpers.js',
- '!**/*.{md,mdx,asciidoc}',
- '!src/plugins/telemetry/schema/**', // Skip telemetry schemas
- // this is the dev-only entry
- '!src/setup_node_env/index.js',
- '!**/public/**/*.{js,ts,tsx,json,scss}',
- 'typings/**',
- 'config/kibana.yml',
- 'config/node.options',
- 'tsconfig*.json',
- '.i18nrc.json',
- 'kibana.d.ts',
+ '!**/jest_setup.{js,ts}',
+ '!**/*.{story,stories}.{js,ts}',
+ '!**/test_mocks.ts',
+ '!**/*.{sh,md,mdx,asciidoc}',
+ '!**/*.console',
+ '!**/*.scss',
+ '!**/*.docnav.json',
+ '!**/{dev_docs,docs}/**',
+ '!**/public/**/*.{js,ts,tsx,json}',
+
// explicitly ignore all bazel package locations, even if they're not selected by previous patterns
...(await discoverBazelPackages()).map((pkg) => `!${pkg.normalizedRepoRelativeDir}/**`),
],
diff --git a/src/dev/build/tasks/index.ts b/src/dev/build/tasks/index.ts
index 94e6d107ff8da..22bf499ec24ba 100644
--- a/src/dev/build/tasks/index.ts
+++ b/src/dev/build/tasks/index.ts
@@ -7,6 +7,7 @@
*/
export * from './bin';
+export * from './build_canvas_shareable_runtime';
export * from './build_kibana_example_plugins';
export * from './build_kibana_platform_plugins';
export * from './build_packages_task';
diff --git a/src/dev/build/tasks/nodejs/clean_node_builds_task.ts b/src/dev/build/tasks/nodejs/clean_node_builds_task.ts
index 42d2cedc51e09..350395f94c355 100644
--- a/src/dev/build/tasks/nodejs/clean_node_builds_task.ts
+++ b/src/dev/build/tasks/nodejs/clean_node_builds_task.ts
@@ -18,6 +18,7 @@ export const CleanNodeBuilds: Task = {
build.resolvePathForPlatform(platform, 'node/lib/node_modules'),
build.resolvePathForPlatform(platform, 'node/bin/npm'),
build.resolvePathForPlatform(platform, 'node/bin/npx'),
+ build.resolvePathForPlatform(platform, 'node/bin/corepack'),
],
log
);
diff --git a/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.tsx b/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.tsx
index ed32735800bc6..232b522838b8e 100644
--- a/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.tsx
+++ b/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.tsx
@@ -27,6 +27,7 @@ import {
getValueFromAccessor,
getSubtypeByGaugeType,
getGoalConfig,
+ computeMinMax,
} from './utils';
import './index.scss';
import { GaugeCentralMajorMode } from '../../common/types';
@@ -119,27 +120,6 @@ function getTitle(
return major || fallbackTitle || '';
}
-const calculateRealRangeValueMin = (
- relativeRangeValue: number,
- { min, max }: { min: number; max: number }
-) => {
- if (isFinite(relativeRangeValue)) {
- return relativeRangeValue * ((max - min) / 100);
- }
- return min;
-};
-
-const calculateRealRangeValueMax = (
- relativeRangeValue: number,
- { min, max }: { min: number; max: number }
-) => {
- if (isFinite(relativeRangeValue)) {
- return relativeRangeValue * ((max - min) / 100);
- }
-
- return max;
-};
-
const getPreviousSectionValue = (value: number, bands: number[]) => {
// bands value is equal to the stop. The purpose of this value is coloring the previous section, which is smaller, then the band.
// So, the smaller value should be taken. For the first element -1, for the next - middle value of the previous section.
@@ -176,24 +156,13 @@ export const GaugeComponent: FC = memo(
bands: number[],
percentageMode?: boolean
) => {
- const { rangeMin, rangeMax, range }: CustomPaletteState = paletteConfig.params!;
- const minRealValue = bands[0];
- const maxRealValue = bands[bands.length - 1];
- let min = rangeMin;
- let max = rangeMax;
-
let stops = paletteConfig.params?.stops ?? [];
if (percentageMode) {
stops = bands.map((v) => v * 100);
}
- if (range === 'percent') {
- const minMax = { min: minRealValue, max: maxRealValue };
-
- min = calculateRealRangeValueMin(min, minMax);
- max = calculateRealRangeValueMax(max, minMax);
- }
+ const { min, max } = computeMinMax(paletteConfig, bands);
return paletteService
.get(paletteConfig?.name ?? 'custom')
diff --git a/src/plugins/chart_expressions/expression_gauge/public/components/utils/helpers.test.ts b/src/plugins/chart_expressions/expression_gauge/public/components/utils/helpers.test.ts
new file mode 100644
index 0000000000000..825f74d3b68cb
--- /dev/null
+++ b/src/plugins/chart_expressions/expression_gauge/public/components/utils/helpers.test.ts
@@ -0,0 +1,80 @@
+/*
+ * Copyright 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 { PaletteOutput } from '@kbn/coloring';
+import type { CustomPaletteState } from '@kbn/charts-plugin/public';
+import { computeMinMax } from './helpers';
+
+describe('computeMinMax', () => {
+ it('returns the correct min max for percent palette', () => {
+ const palette = {
+ type: 'palette' as const,
+ name: 'custom',
+ params: {
+ colors: ['#aaa', '#bbb', '#ccc'],
+ gradient: false,
+ stops: [20, 60, 80],
+ range: 'percent',
+ rangeMin: 0,
+ rangeMax: 100,
+ },
+ } as PaletteOutput;
+ const bands = [0, 2, 6, 8, 10];
+ expect(computeMinMax(palette, bands)).toEqual({ min: 0, max: 10 });
+ });
+
+ it('returns the correct min max for percent palette and Infinite bounds', () => {
+ const palette = {
+ type: 'palette' as const,
+ name: 'custom',
+ params: {
+ colors: ['#aaa', '#bbb', '#ccc'],
+ gradient: false,
+ stops: [],
+ range: 'percent',
+ rangeMin: -Infinity,
+ rangeMax: Infinity,
+ },
+ } as PaletteOutput;
+ const bands = [0, 2, 6, 8, 10];
+ expect(computeMinMax(palette, bands)).toEqual({ min: 0, max: 10 });
+ });
+
+ it('returns the correct min max for number palette', () => {
+ const palette = {
+ type: 'palette' as const,
+ name: 'custom',
+ params: {
+ colors: ['#aaa', '#bbb', '#ccc'],
+ gradient: false,
+ stops: [0, 6, 10],
+ range: 'number',
+ rangeMin: 0,
+ rangeMax: 20,
+ },
+ } as PaletteOutput;
+ const bands = [0, 2, 6, 8, 10];
+ expect(computeMinMax(palette, bands)).toEqual({ min: 0, max: 20 });
+ });
+
+ it('returns the correct min max for number palette and Infinite bounds', () => {
+ const palette = {
+ type: 'palette' as const,
+ name: 'custom',
+ params: {
+ colors: ['#aaa', '#bbb', '#ccc'],
+ gradient: false,
+ stops: [],
+ range: 'number',
+ rangeMin: -Infinity,
+ rangeMax: Infinity,
+ },
+ } as PaletteOutput;
+ const bands = [0, 2, 6, 8, 10];
+ expect(computeMinMax(palette, bands)).toEqual({ min: 0, max: 10 });
+ });
+});
diff --git a/src/plugins/chart_expressions/expression_gauge/public/components/utils/helpers.ts b/src/plugins/chart_expressions/expression_gauge/public/components/utils/helpers.ts
new file mode 100644
index 0000000000000..59ebc6b9a1b61
--- /dev/null
+++ b/src/plugins/chart_expressions/expression_gauge/public/components/utils/helpers.ts
@@ -0,0 +1,58 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 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 { PaletteOutput } from '@kbn/coloring';
+import type { CustomPaletteState } from '@kbn/charts-plugin/public';
+
+const calculateRealRangeValueMin = (
+ relativeRangeValue: number,
+ { min, max }: { min: number; max: number }
+) => {
+ if (isFinite(relativeRangeValue)) {
+ return relativeRangeValue * ((max - min) / 100);
+ }
+ return min;
+};
+
+const calculateRealRangeValueMax = (
+ relativeRangeValue: number,
+ { min, max }: { min: number; max: number }
+) => {
+ if (isFinite(relativeRangeValue)) {
+ return relativeRangeValue * ((max - min) / 100);
+ }
+
+ return max;
+};
+
+export const computeMinMax = (
+ paletteConfig: PaletteOutput,
+ bands: number[]
+) => {
+ const { rangeMin, rangeMax, range }: CustomPaletteState = paletteConfig.params!;
+ const minRealValue = bands[0];
+ const maxRealValue = bands[bands.length - 1];
+ let min = rangeMin;
+ let max = rangeMax;
+
+ if (range === 'percent') {
+ const minMax = { min: minRealValue, max: maxRealValue };
+
+ min = calculateRealRangeValueMin(min, minMax);
+ max = calculateRealRangeValueMax(max, minMax);
+ }
+
+ if (range === 'number') {
+ min = isFinite(min) ? min : minRealValue;
+ max = isFinite(max) ? max : maxRealValue;
+ }
+
+ return {
+ min,
+ max,
+ };
+};
diff --git a/src/plugins/chart_expressions/expression_gauge/public/components/utils/index.ts b/src/plugins/chart_expressions/expression_gauge/public/components/utils/index.ts
index 8892863d625d7..87f6a520ff9eb 100644
--- a/src/plugins/chart_expressions/expression_gauge/public/components/utils/index.ts
+++ b/src/plugins/chart_expressions/expression_gauge/public/components/utils/index.ts
@@ -10,3 +10,5 @@ export * from './accessors';
export * from './icons';
export * from './gauge_types';
export * from './goal_config';
+
+export { computeMinMax } from './helpers';
diff --git a/src/plugins/console/public/application/models/legacy_core_editor/legacy_core_editor.ts b/src/plugins/console/public/application/models/legacy_core_editor/legacy_core_editor.ts
index 45d6eb42a9693..5def8a696df2f 100644
--- a/src/plugins/console/public/application/models/legacy_core_editor/legacy_core_editor.ts
+++ b/src/plugins/console/public/application/models/legacy_core_editor/legacy_core_editor.ts
@@ -229,7 +229,10 @@ export class LegacyCoreEditor implements CoreEditor {
}
detachCompleter() {
- return (this.editor as unknown as { completer: { detach(): void } }).completer.detach();
+ // In some situations we need to detach the autocomplete suggestions element manually,
+ // such as when navigating away from Console when the suggestions list is open.
+ const completer = (this.editor as unknown as { completer: { detach(): void } }).completer;
+ return completer?.detach();
}
private forceRetokenize() {
diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx b/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx
index aa2588c1b3b54..9f59e8637ba1c 100644
--- a/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx
+++ b/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx
@@ -12,6 +12,7 @@ import { I18nProvider } from '@kbn/i18n-react';
import uuid from 'uuid';
import { CoreStart, IUiSettingsClient, KibanaExecutionContext } from '@kbn/core/public';
import { Start as InspectorStartContract } from '@kbn/inspector-plugin/public';
+import { reportPerformanceMetricEvent } from '@kbn/ebt-tools';
import { ControlGroupContainer } from '@kbn/controls-plugin/public';
import { Filter, TimeRange } from '@kbn/es-query';
@@ -31,7 +32,7 @@ import {
} from '../../services/embeddable';
import { DASHBOARD_CONTAINER_TYPE } from './dashboard_constants';
import { createPanelState } from './panel';
-import { DashboardLoadedEvent, DashboardPanelState } from './types';
+import { DashboardPanelState } from './types';
import { DashboardViewport } from './viewport/dashboard_viewport';
import {
KibanaContextProvider,
@@ -40,6 +41,7 @@ import {
KibanaThemeProvider,
} from '../../services/kibana_react';
import { PLACEHOLDER_EMBEDDABLE } from './placeholder';
+import { DASHBOARD_LOADED_EVENT } from '../../events';
import { DashboardAppCapabilities, DashboardContainerInput } from '../../types';
import { PresentationUtilPluginStart } from '../../services/presentation_util';
import type { ScreenshotModePluginStart } from '../../services/screenshot_mode';
@@ -66,6 +68,13 @@ export interface DashboardContainerServices {
analytics?: CoreStart['analytics'];
}
+export interface DashboardLoadedInfo {
+ timeToData: number;
+ timeToDone: number;
+ numOfPanels: number;
+ status: string;
+}
+
interface IndexSignature {
[key: string]: unknown;
}
@@ -155,10 +164,17 @@ export class DashboardContainer extends Container void;
+ onDataLoaded?: (data: DashboardLoadedInfo) => void;
}
interface State {
@@ -270,7 +274,7 @@ class DashboardGridUi extends React.Component {
doneCount++;
if (doneCount === panelsInOrder.length) {
const doneTime = performance.now();
- const data: DashboardLoadedEvent = {
+ const data: DashboardLoadedInfo = {
timeToData: (lastTimeToData || doneTime) - loadStartTime,
timeToDone: doneTime - loadStartTime,
numOfPanels: panelsInOrder.length,
diff --git a/src/plugins/dashboard/public/application/embeddable/types.ts b/src/plugins/dashboard/public/application/embeddable/types.ts
index f8e37b07d721c..b64fe70f9eb9c 100644
--- a/src/plugins/dashboard/public/application/embeddable/types.ts
+++ b/src/plugins/dashboard/public/application/embeddable/types.ts
@@ -10,11 +10,6 @@ export * from '../../../common/types';
export type DashboardLoadedEventStatus = 'done' | 'error';
-export interface DashboardLoadedEvent {
- // Time from start to when data is loaded
- timeToData: number;
- // Time from start until render or error
- timeToDone: number;
- numOfPanels: number;
+export interface DashboardLoadedEventMeta {
status: DashboardLoadedEventStatus;
}
diff --git a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx
index 318db746fbe42..ebb91ba57fd46 100644
--- a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx
+++ b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx
@@ -14,18 +14,21 @@ import {
LazyControlsCallout,
} from '@kbn/controls-plugin/public';
import { ViewMode } from '../../../services/embeddable';
-import { DashboardContainer, DashboardReactContextValue } from '../dashboard_container';
+import {
+ DashboardContainer,
+ DashboardReactContextValue,
+ DashboardLoadedInfo,
+} from '../dashboard_container';
import { DashboardGrid } from '../grid';
import { context } from '../../../services/kibana_react';
import { DashboardEmptyScreen } from '../empty_screen/dashboard_empty_screen';
import { withSuspense } from '../../../services/presentation_util';
-import { DashboardLoadedEvent } from '../types';
export interface DashboardViewportProps {
container: DashboardContainer;
controlGroup?: ControlGroupContainer;
controlsEnabled?: boolean;
- onDataLoaded?: (data: DashboardLoadedEvent) => void;
+ onDataLoaded?: (data: DashboardLoadedInfo) => void;
}
interface State {
diff --git a/src/plugins/dashboard/public/application/listing/__snapshots__/dashboard_listing.test.tsx.snap b/src/plugins/dashboard/public/application/listing/__snapshots__/dashboard_listing.test.tsx.snap
index d4513837efa11..006ddb9595a97 100644
--- a/src/plugins/dashboard/public/application/listing/__snapshots__/dashboard_listing.test.tsx.snap
+++ b/src/plugins/dashboard/public/application/listing/__snapshots__/dashboard_listing.test.tsx.snap
@@ -60,7 +60,7 @@ exports[`after fetch When given a title that matches multiple dashboards, filter
Create your first dashboard
@@ -208,7 +209,7 @@ exports[`after fetch initialFilter 1`] = `
Create your first dashboard
@@ -355,7 +357,7 @@ exports[`after fetch renders all table rows 1`] = `
Create your first dashboard
@@ -502,7 +505,7 @@ exports[`after fetch renders call to action when no dashboards exist 1`] = `
Create your first dashboard
@@ -673,7 +677,7 @@ exports[`after fetch renders call to action with continue when no dashboards exi
Dashboard in progress
@@ -807,7 +812,7 @@ exports[`after fetch renders warning when listingLimit is exceeded 1`] = `
Create your first dashboard
@@ -957,6 +963,7 @@ exports[`after fetch showWriteControls 1`] = `
iconType="glasses"
title={
No dashboards to view
diff --git a/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx b/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx
index 80005b3bebdd3..17433562bcdab 100644
--- a/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx
+++ b/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx
@@ -151,7 +151,11 @@ export const DashboardListing = ({
return (
{noItemsStrings.getReadonlyTitle()} }
+ title={
+
+ {noItemsStrings.getReadonlyTitle()}
+
+ }
body={{noItemsStrings.getReadonlyBody()}
}
/>
);
@@ -183,7 +187,7 @@ export const DashboardListing = ({
iconType="pencil"
color="primary"
onClick={() => redirectTo({ destination: 'dashboard' })}
- data-test-subj="createDashboardPromptButton"
+ data-test-subj="newItemButton"
aria-label={dashboardUnsavedListingStrings.getEditAriaLabel(getNewDashboardTitle())}
>
{dashboardUnsavedListingStrings.getEditTitle()}
@@ -191,12 +195,7 @@ export const DashboardListing = ({
) : (
-
+
{noItemsStrings.getCreateNewDashboardText()}
);
@@ -205,7 +204,7 @@ export const DashboardListing = ({
+
{isEditingFirstDashboard
? noItemsStrings.getReadEditInProgressTitle()
: noItemsStrings.getReadEditTitle()}
diff --git a/src/plugins/dashboard/public/events.ts b/src/plugins/dashboard/public/events.ts
new file mode 100644
index 0000000000000..aa28cb109abec
--- /dev/null
+++ b/src/plugins/dashboard/public/events.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 const DASHBOARD_LOADED_EVENT = 'dashboard_loaded';
diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx
index a9564ac0db49a..ba06709d69f7b 100644
--- a/src/plugins/dashboard/public/plugin.tsx
+++ b/src/plugins/dashboard/public/plugin.tsx
@@ -71,7 +71,6 @@ import {
LibraryNotificationAction,
CopyToDashboardAction,
DashboardCapabilities,
- DashboardLoadedEvent,
} from './application';
import { DashboardAppLocatorDefinition, DashboardAppLocator } from './locator';
import { createSavedDashboardLoader } from './saved_dashboards';
@@ -139,30 +138,6 @@ export class DashboardPlugin
private dashboardFeatureFlagConfig?: DashboardFeatureFlagConfig;
private locator?: DashboardAppLocator;
- private registerEvents(analytics: CoreSetup['analytics']) {
- analytics.registerEventType({
- eventType: 'dashboard-data-loaded',
- schema: {
- timeToData: {
- type: 'long',
- _meta: { description: 'Time all embeddables took to load data' },
- },
- timeToDone: {
- type: 'long',
- _meta: { description: 'Time all embeddables took to load data' },
- },
- status: {
- type: 'keyword',
- _meta: { description: 'Error ok' },
- },
- numOfPanels: {
- type: 'long',
- _meta: { description: 'Number of panels loaded' },
- },
- },
- });
- }
-
public setup(
core: CoreSetup,
{
@@ -312,8 +287,6 @@ export class DashboardPlugin
},
};
- this.registerEvents(core.analytics);
-
core.application.register(app);
urlForwarding.forwardApp(
DashboardConstants.DASHBOARDS_ID,
diff --git a/src/plugins/data/common/search/aggs/buckets/filter.test.ts b/src/plugins/data/common/search/aggs/buckets/filter.test.ts
new file mode 100644
index 0000000000000..79089013e08b1
--- /dev/null
+++ b/src/plugins/data/common/search/aggs/buckets/filter.test.ts
@@ -0,0 +1,142 @@
+/*
+ * Copyright 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 { AggConfigs } from '../agg_configs';
+import { mockAggTypesRegistry } from '../test_helpers';
+import { BUCKET_TYPES } from './bucket_agg_types';
+import moment from 'moment';
+import { SerializableRecord } from '@kbn/utility-types';
+
+describe('Filter Agg', () => {
+ let aggConfigs: AggConfigs;
+
+ const depMocks = {
+ getConfig: () => ({} as T),
+ calculateBounds: () => {
+ return {
+ max: moment('2022-05-05T00:00:00.000Z'),
+ min: undefined,
+ };
+ },
+ getFieldFormatsStart: jest.fn(),
+ };
+
+ function init(params?: SerializableRecord) {
+ const indexPattern = {
+ id: '1234',
+ title: 'logstash-*',
+ timeFieldName: 'timestamp',
+ fields: {
+ getByName: () => field,
+ filter: () => [field],
+ find: () => field,
+ },
+ } as any;
+
+ const field = {
+ name: 'A',
+ indexPattern,
+ };
+
+ aggConfigs = new AggConfigs(
+ indexPattern,
+ [
+ {
+ id: BUCKET_TYPES.FILTER,
+ type: BUCKET_TYPES.FILTER,
+ schema: 'segment',
+ params,
+ },
+ ],
+ {
+ typesRegistry: mockAggTypesRegistry(depMocks),
+ },
+ jest.fn()
+ );
+ aggConfigs.setTimeRange({
+ from: '2022-05-01T00:00:00.000Z',
+ to: '2022-05-05T00:00:00.000Z',
+ });
+ }
+
+ it('should build filter agg with time window and filter and time shift', () => {
+ init({
+ filter: {
+ language: 'kuery',
+ query: 'A: B',
+ },
+ timeWindow: '5m',
+ timeShift: '1d',
+ });
+ expect(aggConfigs.aggs[0].write(aggConfigs)).toMatchInlineSnapshot(`
+ Object {
+ "params": Object {
+ "bool": Object {
+ "filter": Array [
+ Object {
+ "range": Object {
+ "timestamp": Object {
+ "format": "strict_date_optional_time",
+ "gte": "2022-05-03T23:55:00.000Z",
+ "lte": "2022-05-04T00:00:00.000Z",
+ },
+ },
+ },
+ Object {
+ "bool": Object {
+ "filter": Array [
+ Object {
+ "bool": Object {
+ "minimum_should_match": 1,
+ "should": Array [
+ Object {
+ "match": Object {
+ "A": "B",
+ },
+ },
+ ],
+ },
+ },
+ ],
+ "must": Array [],
+ "must_not": Array [],
+ "should": Array [],
+ },
+ },
+ ],
+ },
+ },
+ }
+ `);
+ });
+
+ it('should build filter agg with only time window', () => {
+ init({
+ timeWindow: '5m',
+ });
+ expect(aggConfigs.aggs[0].write(aggConfigs)).toMatchInlineSnapshot(`
+ Object {
+ "params": Object {
+ "bool": Object {
+ "filter": Array [
+ Object {
+ "range": Object {
+ "timestamp": Object {
+ "format": "strict_date_optional_time",
+ "gte": "2022-05-04T23:55:00.000Z",
+ "lte": "2022-05-05T00:00:00.000Z",
+ },
+ },
+ },
+ ],
+ },
+ },
+ }
+ `);
+ });
+});
diff --git a/src/plugins/data/common/search/aggs/buckets/filter.ts b/src/plugins/data/common/search/aggs/buckets/filter.ts
index 66a702d06144b..0edba29c24094 100644
--- a/src/plugins/data/common/search/aggs/buckets/filter.ts
+++ b/src/plugins/data/common/search/aggs/buckets/filter.ts
@@ -10,12 +10,15 @@ import { cloneDeep } from 'lodash';
import { i18n } from '@kbn/i18n';
import { buildEsQuery, Query } from '@kbn/es-query';
+import moment from 'moment';
import { GeoBoundingBox, QueryFilter, geoBoundingBoxToAst, queryToAst } from '../../expressions';
import { BucketAggType } from './bucket_agg_type';
import { BUCKET_TYPES } from './bucket_agg_types';
import { aggFilterFnName } from './filter_fn';
import { BaseAggParams } from '../types';
import { getEsQueryConfig } from '../../../es_query';
+import { parseInterval } from '../utils';
+import { CalculateBoundsFn } from '.';
const filterTitle = i18n.translate('data.search.aggs.buckets.filterTitle', {
defaultMessage: 'Filter',
@@ -24,9 +27,16 @@ const filterTitle = i18n.translate('data.search.aggs.buckets.filterTitle', {
export interface AggParamsFilter extends BaseAggParams {
geo_bounding_box?: GeoBoundingBox;
filter?: QueryFilter;
+ timeWindow?: string;
}
-export const getFilterBucketAgg = ({ getConfig }: { getConfig: (key: string) => any }) =>
+export const getFilterBucketAgg = ({
+ getConfig,
+ calculateBounds,
+}: {
+ getConfig: (key: string) => T;
+ calculateBounds: CalculateBoundsFn;
+}) =>
new BucketAggType({
name: BUCKET_TYPES.FILTER,
expressionName: aggFilterFnName,
@@ -37,26 +47,73 @@ export const getFilterBucketAgg = ({ getConfig }: { getConfig: (key: st
name: 'geo_bounding_box',
toExpressionAst: geoBoundingBoxToAst,
},
+ {
+ name: 'timeShift',
+ type: 'string',
+ write: () => {},
+ },
+ {
+ name: 'timeWindow',
+ write: () => {},
+ },
{
name: 'filter',
- write(aggConfig, output) {
+ write(aggConfig, output, aggConfigs) {
const filter: Query = aggConfig.params.filter;
+ const timeWindow: string | undefined = aggConfig.params.timeWindow;
const input = cloneDeep(filter);
- if (!input) {
+ if (!input && !timeWindow) {
return;
}
- const esQueryConfigs = getEsQueryConfig({ get: getConfig });
- const query = buildEsQuery(aggConfig.getIndexPattern(), [input], [], esQueryConfigs);
-
- if (!query) {
- console.log('malformed filter agg params, missing "query" on input'); // eslint-disable-line no-console
+ if (!aggConfigs) {
return;
}
- output.params = query;
+ let query: object | undefined;
+
+ if (input) {
+ const esQueryConfigs = getEsQueryConfig({ get: getConfig });
+ query = buildEsQuery(aggConfig.getIndexPattern(), [input], [], esQueryConfigs);
+
+ if (!query) {
+ console.log('malformed filter agg params, missing "query" on input'); // eslint-disable-line no-console
+ return;
+ }
+ }
+
+ const timeRangeAnchor = aggConfigs.timeRange
+ ? moment(calculateBounds(aggConfigs.timeRange).max)
+ : undefined;
+
+ output.params =
+ !timeWindow || !timeRangeAnchor || !aggConfig.getIndexPattern().timeFieldName
+ ? query
+ : {
+ bool: {
+ filter: [
+ {
+ range: {
+ [aggConfig.getIndexPattern().timeFieldName!]: {
+ format: 'strict_date_optional_time',
+ gte: timeRangeAnchor
+ .clone()
+ .subtract(parseInterval(timeWindow))
+ .subtract(aggConfig.getTimeShift())
+ .toISOString(),
+ lte: timeRangeAnchor
+ .clone()
+ .subtract(aggConfig.getTimeShift())
+ .toISOString(),
+ },
+ },
+ },
+ query ? query : undefined,
+ ].filter(Boolean),
+ },
+ };
},
toExpressionAst: queryToAst,
},
diff --git a/src/plugins/data/common/search/aggs/buckets/filter_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/filter_fn.test.ts
index f00c654fa7b27..ae97f95615e47 100644
--- a/src/plugins/data/common/search/aggs/buckets/filter_fn.test.ts
+++ b/src/plugins/data/common/search/aggs/buckets/filter_fn.test.ts
@@ -26,6 +26,8 @@ describe('agg_expression_functions', () => {
"filter": undefined,
"geo_bounding_box": undefined,
"json": undefined,
+ "timeShift": undefined,
+ "timeWindow": undefined,
},
"schema": undefined,
"type": "filter",
@@ -53,6 +55,8 @@ describe('agg_expression_functions', () => {
"wkt": "BBOX (-74.1, -71.12, 40.73, 40.01)",
},
"json": undefined,
+ "timeShift": undefined,
+ "timeWindow": undefined,
},
"schema": undefined,
"type": "filter",
diff --git a/src/plugins/data/common/search/aggs/buckets/filter_fn.ts b/src/plugins/data/common/search/aggs/buckets/filter_fn.ts
index 0390213f6c16c..01aa8ab630e73 100644
--- a/src/plugins/data/common/search/aggs/buckets/filter_fn.ts
+++ b/src/plugins/data/common/search/aggs/buckets/filter_fn.ts
@@ -71,6 +71,14 @@ export const aggFilter = (): FunctionDefinition => ({
'Filter results based on a kql or lucene query. Do not use together with geo_bounding_box',
}),
},
+ timeWindow: {
+ types: ['string'],
+ help: '',
+ },
+ timeShift: {
+ types: ['string'],
+ help: '',
+ },
json: {
types: ['string'],
help: i18n.translate('data.search.aggs.buckets.filter.json.help', {
diff --git a/src/plugins/data/common/search/aggs/metrics/filtered_metric.ts b/src/plugins/data/common/search/aggs/metrics/filtered_metric.ts
index beddf6b623110..22ae42b9130a5 100644
--- a/src/plugins/data/common/search/aggs/metrics/filtered_metric.ts
+++ b/src/plugins/data/common/search/aggs/metrics/filtered_metric.ts
@@ -46,6 +46,7 @@ export const getFilteredMetricAgg = ({ getConfig }: FiltersMetricAggDependencies
hasNoDslParams: true,
getSerializedFormat,
createFilter: (agg, inputState) => {
+ if (!agg.params.customBucket.params.filter) return;
const esQueryConfigs = getEsQueryConfig({ get: getConfig });
return buildQueryFilter(
buildEsQuery(
diff --git a/src/plugins/data_views/common/constants.ts b/src/plugins/data_views/common/constants.ts
index b79eef45e7fc8..2c766115bac7c 100644
--- a/src/plugins/data_views/common/constants.ts
+++ b/src/plugins/data_views/common/constants.ts
@@ -22,15 +22,16 @@ export const RUNTIME_FIELD_TYPES = [
] as const;
/**
- * Used to determine if the instance has some user created index patterns by filtering index patterns
- * that are created and backed only by Fleet server data
- * Should be revised after https://github.com/elastic/kibana/issues/82851 is fixed
- * For more background see: https://github.com/elastic/kibana/issues/107020
+ * Used to optimize on-boarding experience to determine if the instance has some user created data views or data indices/streams by filtering data sources
+ * that are created by default by elastic in ese.
+ * We should somehow prevent creating initial data for the users without their explicit action
+ * instead of relying on these hardcoded assets
*/
export const DEFAULT_ASSETS_TO_IGNORE = {
- LOGS_INDEX_PATTERN: 'logs-*',
- LOGS_DATA_STREAM_TO_IGNORE: 'logs-elastic_agent', // ignore ds created by Fleet server itself
- ENT_SEARCH_LOGS_DATA_STREAM_TO_IGNORE: 'logs-enterprise_search.api-default', // ignore ds created by enterprise search
+ DATA_STREAMS_TO_IGNORE: [
+ 'logs-enterprise_search.api-default', // https://github.com/elastic/kibana/issues/134918
+ `logs-enterprise_search.audit-default`, // https://github.com/elastic/kibana/issues/134918
+ ],
};
/**
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 8c98f7f18f0de..02c9278c6d88f 100644
--- a/src/plugins/data_views/common/data_views/data_views.ts
+++ b/src/plugins/data_views/common/data_views/data_views.ts
@@ -468,7 +468,7 @@ export class DataViewsService {
* Checks if current user has a user created index pattern ignoring fleet's server default index patterns.
*/
async hasUserDataView(): Promise {
- return this.apiClient.hasUserIndexPattern();
+ return this.apiClient.hasUserDataView();
}
/**
diff --git a/src/plugins/data_views/common/types.ts b/src/plugins/data_views/common/types.ts
index ee39678761023..25f3564aa1eb8 100644
--- a/src/plugins/data_views/common/types.ts
+++ b/src/plugins/data_views/common/types.ts
@@ -319,7 +319,7 @@ export interface GetFieldsOptions {
export interface IDataViewsApiClient {
getFieldsForWildcard: (options: GetFieldsOptions) => Promise;
- hasUserIndexPattern: () => Promise;
+ hasUserDataView: () => Promise;
}
export type AggregationRestrictions = Record<
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 b02894d1afb63..b2b8c169c3257 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
@@ -63,7 +63,7 @@ export class DataViewsApiClient implements IDataViewsApiClient {
/**
* Does a user created data view exist?
*/
- async hasUserIndexPattern(): Promise {
+ async hasUserDataView(): Promise {
const response = await this._request<{ result: boolean }>(
this._getUrl(['has_user_index_pattern'])
);
diff --git a/src/plugins/data_views/public/services/has_data.test.ts b/src/plugins/data_views/public/services/has_data.test.ts
index c13fffe9fc475..b2ccf3828af6b 100644
--- a/src/plugins/data_views/public/services/has_data.test.ts
+++ b/src/plugins/data_views/public/services/has_data.test.ts
@@ -32,11 +32,11 @@ describe('when calling hasData service', () => {
const hasData = new HasData();
const hasDataService = hasData.start(coreStart);
- const reponse = hasDataService.hasESData();
+ const response = hasDataService.hasESData();
expect(spy).toHaveBeenCalledTimes(1);
- expect(await reponse).toBe(true);
+ expect(await response).toBe(true);
});
it('should return false for hasESData when no indices exist', async () => {
@@ -54,11 +54,83 @@ describe('when calling hasData service', () => {
const hasData = new HasData();
const hasDataService = hasData.start(coreStart);
- const reponse = hasDataService.hasESData();
+ const response = hasDataService.hasESData();
expect(spy).toHaveBeenCalledTimes(1);
- expect(await reponse).toBe(false);
+ expect(await response).toBe(false);
+ });
+
+ it('should return false for hasESData when only automatically created sources exist', async () => {
+ const coreStart = coreMock.createStart();
+ const http = coreStart.http;
+
+ // Mock getIndices
+ const spy = jest.spyOn(http, 'get').mockImplementation((path: any) =>
+ Promise.resolve({
+ aliases: [],
+ data_streams: path.includes('*:*')
+ ? [] // return empty on remote cluster call
+ : [
+ {
+ name: 'logs-enterprise_search.api-default',
+ timestamp_field: '@timestamp',
+ backing_indices: ['.ds-logs-enterprise_search.api-default-2022.03.07-000001'],
+ },
+ ],
+ indices: [],
+ })
+ );
+
+ const hasData = new HasData();
+ const hasDataService = hasData.start(coreStart);
+ const response = hasDataService.hasESData();
+
+ expect(spy).toHaveBeenCalledTimes(1);
+
+ expect(await response).toBe(false);
+ });
+
+ it('should hit search api in case resolve api throws', async () => {
+ const coreStart = coreMock.createStart();
+ const http = coreStart.http;
+
+ const spyGetIndices = jest
+ .spyOn(http, 'get')
+ .mockImplementation(() => Promise.reject(new Error('oops')));
+
+ const spySearch = jest
+ .spyOn(http, 'post')
+ .mockImplementation(() => Promise.resolve({ total: 10 }));
+ const hasData = new HasData();
+ const hasDataService = hasData.start(coreStart);
+ const response = await hasDataService.hasESData();
+
+ expect(response).toBe(true);
+
+ expect(spyGetIndices).toHaveBeenCalledTimes(1);
+ expect(spySearch).toHaveBeenCalledTimes(1);
+ });
+
+ it('should return false in case search api throws', async () => {
+ const coreStart = coreMock.createStart();
+ const http = coreStart.http;
+
+ const spyGetIndices = jest
+ .spyOn(http, 'get')
+ .mockImplementation(() => Promise.reject(new Error('oops')));
+
+ const spySearch = jest
+ .spyOn(http, 'post')
+ .mockImplementation(() => Promise.reject(new Error('oops')));
+ const hasData = new HasData();
+ const hasDataService = hasData.start(coreStart);
+ const response = await hasDataService.hasESData();
+
+ expect(response).toBe(true);
+
+ expect(spyGetIndices).toHaveBeenCalledTimes(1);
+ expect(spySearch).toHaveBeenCalledTimes(1);
});
it('should return true for hasDataView when server returns true', async () => {
@@ -75,11 +147,11 @@ describe('when calling hasData service', () => {
const hasData = new HasData();
const hasDataService = hasData.start(coreStart);
- const reponse = hasDataService.hasDataView();
+ const response = hasDataService.hasDataView();
expect(spy).toHaveBeenCalledTimes(1);
- expect(await reponse).toBe(true);
+ expect(await response).toBe(true);
});
it('should return false for hasDataView when server returns false', async () => {
@@ -96,11 +168,27 @@ describe('when calling hasData service', () => {
const hasData = new HasData();
const hasDataService = hasData.start(coreStart);
- const reponse = hasDataService.hasDataView();
+ const response = hasDataService.hasDataView();
+
+ expect(spy).toHaveBeenCalledTimes(1);
+
+ expect(await response).toBe(false);
+ });
+
+ it('should return true for hasDataView when server throws an error', async () => {
+ const coreStart = coreMock.createStart();
+ const http = coreStart.http;
+
+ // Mock getIndices
+ const spy = jest.spyOn(http, 'get').mockImplementation(() => Promise.reject(new Error('Oops')));
+
+ const hasData = new HasData();
+ const hasDataService = hasData.start(coreStart);
+ const response = hasDataService.hasDataView();
expect(spy).toHaveBeenCalledTimes(1);
- expect(await reponse).toBe(false);
+ expect(await response).toBe(true);
});
it('should return false for hasUserDataView when server returns false', async () => {
@@ -117,11 +205,11 @@ describe('when calling hasData service', () => {
const hasData = new HasData();
const hasDataService = hasData.start(coreStart);
- const reponse = hasDataService.hasUserDataView();
+ const response = hasDataService.hasUserDataView();
expect(spy).toHaveBeenCalledTimes(1);
- expect(await reponse).toBe(false);
+ expect(await response).toBe(false);
});
it('should return true for hasUserDataView when server returns true', async () => {
@@ -138,10 +226,26 @@ describe('when calling hasData service', () => {
const hasData = new HasData();
const hasDataService = hasData.start(coreStart);
- const reponse = hasDataService.hasUserDataView();
+ const response = hasDataService.hasUserDataView();
+
+ expect(spy).toHaveBeenCalledTimes(1);
+
+ expect(await response).toBe(true);
+ });
+
+ it('should return true for hasUserDataView when server throws an error', async () => {
+ const coreStart = coreMock.createStart();
+ const http = coreStart.http;
+
+ // Mock getIndices
+ const spy = jest.spyOn(http, 'get').mockImplementation(() => Promise.reject(new Error('Oops')));
+
+ const hasData = new HasData();
+ const hasDataService = hasData.start(coreStart);
+ const response = hasDataService.hasUserDataView();
expect(spy).toHaveBeenCalledTimes(1);
- expect(await reponse).toBe(true);
+ expect(await response).toBe(true);
});
});
diff --git a/src/plugins/data_views/public/services/has_data.ts b/src/plugins/data_views/public/services/has_data.ts
index 45f44e04e23a8..64a561620c82e 100644
--- a/src/plugins/data_views/public/services/has_data.ts
+++ b/src/plugins/data_views/public/services/has_data.ts
@@ -14,14 +14,12 @@ import { IndicesResponse, IndicesResponseModified } from '../types';
export class HasData {
private removeAliases = (source: IndicesResponseModified): boolean => !source.item.indices;
- private isUserDataIndex = (source: IndicesResponseModified): boolean => {
+ private isUserDataSource = (source: IndicesResponseModified): boolean => {
// filter out indices that start with `.`
if (source.name.startsWith('.')) return false;
// filter out sources from DEFAULT_ASSETS_TO_IGNORE
- if (source.name === DEFAULT_ASSETS_TO_IGNORE.LOGS_DATA_STREAM_TO_IGNORE) return false;
- if (source.name === DEFAULT_ASSETS_TO_IGNORE.ENT_SEARCH_LOGS_DATA_STREAM_TO_IGNORE)
- return false;
+ if (DEFAULT_ASSETS_TO_IGNORE.DATA_STREAMS_TO_IGNORE.includes(source.name)) return false; // filter out data streams that we know are created automatically during on-boarding
return true;
};
@@ -44,14 +42,14 @@ export class HasData {
* Check to see if a data view exists
*/
hasDataView: async (): Promise => {
- const dataViewsCheck = await this.findDataViews(http);
+ const dataViewsCheck = await this.hasDataViews(http);
return dataViewsCheck;
},
/**
* Check to see if user created data views exist
*/
hasUserDataView: async (): Promise => {
- const userDataViewsCheck = await this.findUserDataViews(http);
+ const userDataViewsCheck = await this.hasUserDataViews(http);
return userDataViewsCheck;
},
};
@@ -106,7 +104,11 @@ export class HasData {
.then((resp) => {
return !!(resp && resp.total >= 0);
})
- .catch(() => false);
+ .catch((e) => {
+ // eslint-disable-next-line no-console
+ console.warn(`getIndicesViaSearch failed with error, assuming there is data`, e);
+ return true;
+ });
private getIndices = async ({
http,
@@ -136,7 +138,7 @@ export class HasData {
showAllIndices: false,
})
.then((dataSources: IndicesResponseModified[]) => {
- return dataSources.some(this.isUserDataIndex);
+ return dataSources.some(this.isUserDataSource);
})
.catch(() => this.getIndicesViaSearch({ http, pattern: '*', showAllIndices: false }));
@@ -156,22 +158,33 @@ export class HasData {
private getHasDataViews = async ({ http }: { http: HttpStart }): Promise =>
http.get(`/internal/data_views/has_data_views`);
- private findDataViews = (http: HttpStart): Promise => {
+ private hasDataViews = (http: HttpStart): Promise => {
return this.getHasDataViews({ http })
.then((response: HasDataViewsResponse) => {
const { hasDataView } = response;
return hasDataView;
})
- .catch(() => false);
+ .catch((e) => {
+ // eslint-disable-next-line no-console
+ console.warn(`hasDataViews failed with error, assuming there are data views`, e);
+ return true;
+ });
};
- private findUserDataViews = (http: HttpStart): Promise => {
+ private hasUserDataViews = (http: HttpStart): Promise => {
return this.getHasDataViews({ http })
.then((response: HasDataViewsResponse) => {
const { hasUserDataView } = response;
return hasUserDataView;
})
- .catch(() => false);
+ .catch((e) => {
+ // eslint-disable-next-line no-console
+ console.warn(
+ `hasUserDataViews failed with error, assuming there are user-created data views`,
+ e
+ );
+ return true;
+ });
};
}
diff --git a/src/plugins/data_views/server/has_user_data_view.test.ts b/src/plugins/data_views/server/has_user_data_view.test.ts
new file mode 100644
index 0000000000000..a5f3dbb1ced24
--- /dev/null
+++ b/src/plugins/data_views/server/has_user_data_view.test.ts
@@ -0,0 +1,64 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { hasUserDataView } from './has_user_data_view';
+import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks';
+
+describe('hasUserDataView', () => {
+ const esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser;
+ const soClient = savedObjectsClientMock.create();
+
+ beforeEach(() => jest.resetAllMocks());
+
+ it('returns false when there are no data views', async () => {
+ soClient.find.mockResolvedValue({
+ page: 1,
+ per_page: 100,
+ total: 0,
+ saved_objects: [],
+ });
+ expect(await hasUserDataView({ esClient, soClient })).toEqual(false);
+ });
+
+ it('returns true when there are data views', async () => {
+ soClient.find.mockResolvedValue({
+ page: 1,
+ per_page: 100,
+ total: 1,
+ saved_objects: [
+ {
+ id: '1',
+ references: [],
+ type: 'index-pattern',
+ score: 99,
+ attributes: { title: 'my-pattern-*' },
+ },
+ ],
+ });
+ expect(await hasUserDataView({ esClient, soClient })).toEqual(true);
+ });
+
+ it('can shortcut using api internally', async () => {
+ const dataViewsFindResponse = {
+ page: 1,
+ per_page: 100,
+ total: 1,
+ saved_objects: [
+ {
+ id: '1',
+ references: [],
+ type: 'index-pattern',
+ score: 99,
+ attributes: { title: 'my-pattern-*' },
+ },
+ ],
+ };
+ expect(await hasUserDataView({ esClient, soClient }, dataViewsFindResponse)).toEqual(true);
+ expect(soClient.find).not.toBeCalled();
+ });
+});
diff --git a/src/plugins/data_views/server/has_user_index_pattern.ts b/src/plugins/data_views/server/has_user_data_view.ts
similarity index 52%
rename from src/plugins/data_views/server/has_user_index_pattern.ts
rename to src/plugins/data_views/server/has_user_data_view.ts
index fd0c856c285c7..e822b7cb35a49 100644
--- a/src/plugins/data_views/server/has_user_index_pattern.ts
+++ b/src/plugins/data_views/server/has_user_data_view.ts
@@ -12,14 +12,13 @@ import {
SavedObjectsFindResponse,
} from '@kbn/core/server';
import { DataViewSavedObjectAttrs } from '../common/data_views';
-import { DEFAULT_ASSETS_TO_IGNORE } from '../common/constants';
interface Deps {
esClient: ElasticsearchClient;
soClient: SavedObjectsClientContract;
}
-export const getIndexPattern = async ({
+export const getDataViews = async ({
soClient,
}: Deps): Promise> =>
soClient.find({
@@ -30,31 +29,27 @@ export const getIndexPattern = async ({
perPage: 100,
});
-export const hasUserIndexPattern = async (
+/**
+ * Checks if user has access to any data view,
+ * excluding those that are automatically created by ese (hardcoded)
+ * @param esClient
+ * @param soClient
+ * @param dataViews
+ */
+export const hasUserDataView = async (
{ esClient, soClient }: Deps,
- indexPatterns?: SavedObjectsFindResponse
+ dataViews?: SavedObjectsFindResponse
): Promise => {
- if (!indexPatterns) {
- indexPatterns = await getIndexPattern({ esClient, soClient });
+ if (!dataViews) {
+ dataViews = await getDataViews({ esClient, soClient });
}
- if (indexPatterns.total > 0) {
- return true;
- }
+ if (dataViews.total === 0) {
+ return false;
+ } else {
+ // filter here data views that we know are not created by user during on-boarding for smoother on-boarding experience
+ // currently there is no such data views,
- const resolveResponse = await esClient.indices.resolveIndex({
- name: `${DEFAULT_ASSETS_TO_IGNORE.LOGS_INDEX_PATTERN}`,
- });
-
- if (resolveResponse) {
- if (resolveResponse.indices.length > 0) return true;
-
- const hasAnyNonDefaultFleetDataStreams = resolveResponse.data_streams.some(
- (ds) =>
- ds.name !== DEFAULT_ASSETS_TO_IGNORE.LOGS_DATA_STREAM_TO_IGNORE &&
- ds.name !== DEFAULT_ASSETS_TO_IGNORE.ENT_SEARCH_LOGS_DATA_STREAM_TO_IGNORE
- );
- if (hasAnyNonDefaultFleetDataStreams) return true;
+ return true;
}
- return false;
};
diff --git a/src/plugins/data_views/server/has_user_index_pattern.test.ts b/src/plugins/data_views/server/has_user_index_pattern.test.ts
deleted file mode 100644
index 3560d9bfec8d2..0000000000000
--- a/src/plugins/data_views/server/has_user_index_pattern.test.ts
+++ /dev/null
@@ -1,138 +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 { hasUserIndexPattern } from './has_user_index_pattern';
-import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks';
-
-describe('hasUserIndexPattern', () => {
- const esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser;
- const soClient = savedObjectsClientMock.create();
-
- beforeEach(() => jest.resetAllMocks());
-
- it('returns false when there are no index patterns', async () => {
- soClient.find.mockResolvedValue({
- page: 1,
- per_page: 100,
- total: 0,
- saved_objects: [],
- });
- expect(await hasUserIndexPattern({ esClient, soClient })).toEqual(false);
- });
-
- describe('when no index patterns exist', () => {
- beforeEach(() => {
- soClient.find.mockResolvedValue({
- page: 1,
- per_page: 100,
- total: 0,
- saved_objects: [],
- });
- });
-
- it('calls indices.resolveIndex for the index patterns', async () => {
- esClient.indices.resolveIndex.mockResponse({
- indices: [],
- data_streams: [],
- aliases: [],
- });
- await hasUserIndexPattern({ esClient, soClient });
- expect(esClient.indices.resolveIndex).toHaveBeenCalledWith({
- name: 'logs-*',
- });
- });
-
- it('returns false if no data_streams exists', async () => {
- esClient.indices.resolveIndex.mockResponse({
- indices: [],
- data_streams: [],
- aliases: [],
- });
- expect(await hasUserIndexPattern({ esClient, soClient })).toEqual(false);
- });
-
- it('returns true if any index exists', async () => {
- esClient.indices.resolveIndex.mockResponse({
- indices: [{ name: 'logs', attributes: [] }],
- data_streams: [],
- aliases: [],
- });
- expect(await hasUserIndexPattern({ esClient, soClient })).toEqual(true);
- });
-
- it('returns false if only logs-elastic_agent data stream exists', async () => {
- esClient.indices.resolveIndex.mockResponse({
- indices: [],
- data_streams: [
- {
- name: 'logs-elastic_agent',
- timestamp_field: '@timestamp',
- backing_indices: ['.ds-logs-elastic_agent'],
- },
- ],
- aliases: [],
- });
- expect(await hasUserIndexPattern({ esClient, soClient })).toEqual(false);
- });
-
- it('returns false if only logs-enterprise_search.api-default data stream exists', async () => {
- esClient.indices.resolveIndex.mockResponse({
- indices: [],
- data_streams: [
- {
- name: 'logs-enterprise_search.api-default',
- timestamp_field: '@timestamp',
- backing_indices: ['.ds-logs-enterprise_search.api-default-2022.03.07-000001'],
- },
- ],
- aliases: [],
- });
- expect(await hasUserIndexPattern({ esClient, soClient })).toEqual(false);
- });
-
- it('returns true if any other data stream exists', async () => {
- esClient.indices.resolveIndex.mockResponse({
- indices: [],
- data_streams: [
- {
- name: 'other',
- timestamp_field: '@timestamp',
- backing_indices: ['.ds-other'],
- },
- ],
- aliases: [],
- });
- expect(await hasUserIndexPattern({ esClient, soClient })).toEqual(true);
- });
-
- it('returns true if any other data stream exists with logs-enterprise_search.api-default and logs-elastic_agent', async () => {
- esClient.indices.resolveIndex.mockResponse({
- indices: [],
- data_streams: [
- {
- name: 'other',
- timestamp_field: '@timestamp',
- backing_indices: ['.ds-other'],
- },
- {
- name: 'logs-enterprise_search.api-default',
- timestamp_field: '@timestamp',
- backing_indices: ['.ds-logs-enterprise_search.api-default-2022.03.07-000001'],
- },
- {
- name: 'logs-elastic_agent',
- timestamp_field: '@timestamp',
- backing_indices: ['.ds-logs-elastic_agent'],
- },
- ],
- aliases: [],
- });
- expect(await hasUserIndexPattern({ esClient, soClient })).toEqual(true);
- });
- });
-});
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 0cdcb55a61667..787d3330b6285 100644
--- a/src/plugins/data_views/server/index_patterns_api_client.ts
+++ b/src/plugins/data_views/server/index_patterns_api_client.ts
@@ -10,7 +10,7 @@ import { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/serve
import { GetFieldsOptions, IDataViewsApiClient } from '../common/types';
import { DataViewMissingIndices } from '../common/lib';
import { IndexPatternsFetcher } from './fetcher';
-import { hasUserIndexPattern } from './has_user_index_pattern';
+import { hasUserDataView } from './has_user_data_view';
export class IndexPatternsApiServer implements IDataViewsApiClient {
esClient: ElasticsearchClient;
@@ -52,8 +52,8 @@ export class IndexPatternsApiServer implements IDataViewsApiClient {
/**
* Is there a user created data view?
*/
- async hasUserIndexPattern() {
- return hasUserIndexPattern({
+ async hasUserDataView() {
+ return hasUserDataView({
esClient: this.esClient,
soClient: this.savedObjectsClient,
});
diff --git a/src/plugins/data_views/server/routes/has_data_views.ts b/src/plugins/data_views/server/routes/has_data_views.ts
index c4982311ce156..97295939aec63 100644
--- a/src/plugins/data_views/server/routes/has_data_views.ts
+++ b/src/plugins/data_views/server/routes/has_data_views.ts
@@ -7,7 +7,7 @@
*/
import { IRouter } from '@kbn/core/server';
-import { getIndexPattern, hasUserIndexPattern } from '../has_user_index_pattern';
+import { getDataViews, hasUserDataView } from '../has_user_data_view';
export const registerHasDataViewsRoute = (router: IRouter): void => {
router.get(
@@ -19,11 +19,11 @@ export const registerHasDataViewsRoute = (router: IRouter): void => {
const core = await ctx.core;
const savedObjectsClient = core.savedObjects.client;
const elasticsearchClient = core.elasticsearch.client.asCurrentUser;
- const dataViews = await getIndexPattern({
+ const dataViews = await getDataViews({
esClient: elasticsearchClient,
soClient: savedObjectsClient,
});
- const checkDataPattern = await hasUserIndexPattern(
+ const hasUserDataViewResult = await hasUserDataView(
{
esClient: elasticsearchClient,
soClient: savedObjectsClient,
@@ -31,8 +31,8 @@ export const registerHasDataViewsRoute = (router: IRouter): void => {
dataViews
);
const response = {
- hasDataView: !!dataViews.total,
- hasUserDataView: !!checkDataPattern,
+ hasDataView: dataViews.total > 0,
+ hasUserDataView: hasUserDataViewResult,
};
return res.ok({ body: response });
}
diff --git a/src/plugins/discover/public/application/main/discover_main_route.test.tsx b/src/plugins/discover/public/application/main/discover_main_route.test.tsx
new file mode 100644
index 0000000000000..6734864210ee6
--- /dev/null
+++ b/src/plugins/discover/public/application/main/discover_main_route.test.tsx
@@ -0,0 +1,105 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+import React from 'react';
+import { mountWithIntl } from '@kbn/test-jest-helpers';
+import { waitFor } from '@testing-library/react';
+import { setHeaderActionMenuMounter } from '../../kibana_services';
+import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
+import { discoverServiceMock } from '../../__mocks__/services';
+import { DiscoverMainRoute } from './discover_main_route';
+import { MemoryRouter } from 'react-router-dom';
+import { dataViewMock } from '../../__mocks__/data_view';
+import { SavedObject } from '@kbn/core/public';
+import { DataViewSavedObjectAttrs } from '@kbn/data-views-plugin/common';
+import { DiscoverMainApp } from './discover_main_app';
+import { SearchSource } from '@kbn/data-plugin/common';
+import { searchSourceInstanceMock } from '@kbn/data-plugin/common/search/search_source/mocks';
+import { findTestSubject } from '@elastic/eui/lib/test';
+jest.mock('./discover_main_app', () => {
+ return {
+ DiscoverMainApp: jest.fn(),
+ };
+});
+
+describe('DiscoverMainRoute', () => {
+ test('renders the main app when hasESData=true & hasUserDataView=true ', async () => {
+ const component = mountComponent(true, true);
+
+ await waitFor(() => {
+ component.update();
+ expect(component.find(DiscoverMainApp).exists()).toBe(true);
+ });
+ });
+
+ test('renders no data page when hasESData=false & hasUserDataView=false', async () => {
+ const component = mountComponent(false, false);
+
+ await waitFor(() => {
+ component.update();
+ expect(findTestSubject(component, 'kbnNoDataPage').length).toBe(1);
+ });
+ });
+ test('renders no data view when hasESData=true & hasUserDataView=false', async () => {
+ const component = mountComponent(true, false);
+
+ await waitFor(() => {
+ component.update();
+ expect(findTestSubject(component, 'noDataViewsPrompt').length).toBe(1);
+ });
+ });
+ // skipped because this is the case that never ever should happen, it happened once and was fixed in
+ // https://github.com/elastic/kibana/pull/137824
+ test.skip('renders no data page when hasESData=false & hasUserDataView=true', async () => {
+ const component = mountComponent(false, true);
+
+ await waitFor(() => {
+ component.update();
+ expect(findTestSubject(component, 'kbnNoDataPage').length).toBe(1);
+ });
+ });
+});
+const mountComponent = (hasESData = true, hasUserDataView = true) => {
+ const props = {
+ isDev: false,
+ };
+
+ return mountWithIntl(
+
+
+
+
+
+ );
+};
+function getServicesMock(hasESData = true, hasUserDataView = true) {
+ const dataViewsMock = discoverServiceMock.data.dataViews;
+ dataViewsMock.getCache = jest.fn(() => {
+ return Promise.resolve([dataViewMock as unknown as SavedObject]);
+ });
+ dataViewsMock.get = jest.fn(() => Promise.resolve(dataViewMock));
+ dataViewsMock.getDefaultDataView = jest.fn(() => Promise.resolve(dataViewMock));
+ dataViewsMock.hasData = {
+ hasESData: jest.fn(() => Promise.resolve(hasESData)),
+ hasUserDataView: jest.fn(() => Promise.resolve(hasUserDataView)),
+ hasDataView: jest.fn(() => Promise.resolve(true)),
+ };
+ dataViewsMock.refreshFields = jest.fn();
+
+ discoverServiceMock.data.search.searchSource.createEmpty = jest.fn(() => {
+ const fields: Record = {};
+ const empty = {
+ ...searchSourceInstanceMock,
+ setField: (key: string, value: unknown) => (fields[key] = value),
+ getField: (key: string) => fields[key],
+ };
+ return empty as unknown as SearchSource;
+ });
+ return discoverServiceMock;
+}
+
+setHeaderActionMenuMounter(jest.fn());
diff --git a/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx b/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx
index 6cb8ef93d360e..af8d5800fdae5 100644
--- a/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx
+++ b/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx
@@ -165,6 +165,7 @@ export class SavedSearchEmbeddable
const { searchSource } = this.savedSearch;
+ const prevAbortController = this.abortController;
// Abort any in-progress requests
if (this.abortController) this.abortController.abort();
this.abortController = new AbortController();
@@ -266,7 +267,8 @@ export class SavedSearchEmbeddable
this.searchProps!.totalHitCount = resp.hits.total as number;
this.searchProps!.isLoading = false;
} catch (error) {
- if (!this.destroyed) {
+ const cancelled = !!prevAbortController?.signal.aborted;
+ if (!this.destroyed && !cancelled) {
this.updateOutput({
...this.getOutput(),
loading: false,
diff --git a/src/plugins/home/public/assets/activemq_logs/screenshot.png b/src/plugins/home/public/assets/activemq_logs/screenshot.png
deleted file mode 100644
index 3b75889a1bb13..0000000000000
Binary files a/src/plugins/home/public/assets/activemq_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/activemq_logs/screenshot.webp b/src/plugins/home/public/assets/activemq_logs/screenshot.webp
new file mode 100644
index 0000000000000..d748b0609b331
Binary files /dev/null and b/src/plugins/home/public/assets/activemq_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/apache_logs/screenshot.png b/src/plugins/home/public/assets/apache_logs/screenshot.png
deleted file mode 100644
index a2039096ce041..0000000000000
Binary files a/src/plugins/home/public/assets/apache_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/apache_logs/screenshot.webp b/src/plugins/home/public/assets/apache_logs/screenshot.webp
new file mode 100644
index 0000000000000..f52ecc6dafa3f
Binary files /dev/null and b/src/plugins/home/public/assets/apache_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/apache_metrics/screenshot.png b/src/plugins/home/public/assets/apache_metrics/screenshot.png
deleted file mode 100644
index ac40d5a637a5f..0000000000000
Binary files a/src/plugins/home/public/assets/apache_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/apache_metrics/screenshot.webp b/src/plugins/home/public/assets/apache_metrics/screenshot.webp
new file mode 100644
index 0000000000000..a5c9c17c5a266
Binary files /dev/null and b/src/plugins/home/public/assets/apache_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/auditbeat/screenshot.png b/src/plugins/home/public/assets/auditbeat/screenshot.png
deleted file mode 100644
index 2d70cc274a2e8..0000000000000
Binary files a/src/plugins/home/public/assets/auditbeat/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/auditbeat/screenshot.webp b/src/plugins/home/public/assets/auditbeat/screenshot.webp
new file mode 100644
index 0000000000000..3485ebace7400
Binary files /dev/null and b/src/plugins/home/public/assets/auditbeat/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/auditd_logs/screenshot.png b/src/plugins/home/public/assets/auditd_logs/screenshot.png
deleted file mode 100644
index 732afa18dc11c..0000000000000
Binary files a/src/plugins/home/public/assets/auditd_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/auditd_logs/screenshot.webp b/src/plugins/home/public/assets/auditd_logs/screenshot.webp
new file mode 100644
index 0000000000000..fc6242eeefd9e
Binary files /dev/null and b/src/plugins/home/public/assets/auditd_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/aws_logs/screenshot.png b/src/plugins/home/public/assets/aws_logs/screenshot.png
deleted file mode 100644
index fc895ceab20ba..0000000000000
Binary files a/src/plugins/home/public/assets/aws_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/aws_logs/screenshot.webp b/src/plugins/home/public/assets/aws_logs/screenshot.webp
new file mode 100644
index 0000000000000..5753725b66155
Binary files /dev/null and b/src/plugins/home/public/assets/aws_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/aws_metrics/screenshot.png b/src/plugins/home/public/assets/aws_metrics/screenshot.png
deleted file mode 100644
index 9d179622189a2..0000000000000
Binary files a/src/plugins/home/public/assets/aws_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/aws_metrics/screenshot.webp b/src/plugins/home/public/assets/aws_metrics/screenshot.webp
new file mode 100644
index 0000000000000..625f48d9c461c
Binary files /dev/null and b/src/plugins/home/public/assets/aws_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/azure_logs/screenshot.png b/src/plugins/home/public/assets/azure_logs/screenshot.png
deleted file mode 100644
index 32c5a7202d883..0000000000000
Binary files a/src/plugins/home/public/assets/azure_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/azure_logs/screenshot.webp b/src/plugins/home/public/assets/azure_logs/screenshot.webp
new file mode 100644
index 0000000000000..60732c0532480
Binary files /dev/null and b/src/plugins/home/public/assets/azure_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/azure_metrics/screenshot.png b/src/plugins/home/public/assets/azure_metrics/screenshot.png
deleted file mode 100644
index 22136049b494a..0000000000000
Binary files a/src/plugins/home/public/assets/azure_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/azure_metrics/screenshot.webp b/src/plugins/home/public/assets/azure_metrics/screenshot.webp
new file mode 100644
index 0000000000000..e15201a7efd53
Binary files /dev/null and b/src/plugins/home/public/assets/azure_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/cisco_logs/screenshot.png b/src/plugins/home/public/assets/cisco_logs/screenshot.png
deleted file mode 100644
index 6108b1a99ecfd..0000000000000
Binary files a/src/plugins/home/public/assets/cisco_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/cisco_logs/screenshot.webp b/src/plugins/home/public/assets/cisco_logs/screenshot.webp
new file mode 100644
index 0000000000000..2ae994d65c00a
Binary files /dev/null and b/src/plugins/home/public/assets/cisco_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/cockroachdb_metrics/screenshot.png b/src/plugins/home/public/assets/cockroachdb_metrics/screenshot.png
deleted file mode 100644
index 4b3020d91d57d..0000000000000
Binary files a/src/plugins/home/public/assets/cockroachdb_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/cockroachdb_metrics/screenshot.webp b/src/plugins/home/public/assets/cockroachdb_metrics/screenshot.webp
new file mode 100644
index 0000000000000..eafe75da03e34
Binary files /dev/null and b/src/plugins/home/public/assets/cockroachdb_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/consul_metrics/screenshot.png b/src/plugins/home/public/assets/consul_metrics/screenshot.png
deleted file mode 100644
index 90aaa7477e8eb..0000000000000
Binary files a/src/plugins/home/public/assets/consul_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/consul_metrics/screenshot.webp b/src/plugins/home/public/assets/consul_metrics/screenshot.webp
new file mode 100644
index 0000000000000..a426cb181c003
Binary files /dev/null and b/src/plugins/home/public/assets/consul_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/coredns_logs/screenshot.jpg b/src/plugins/home/public/assets/coredns_logs/screenshot.jpg
deleted file mode 100644
index 70921fa9bafb2..0000000000000
Binary files a/src/plugins/home/public/assets/coredns_logs/screenshot.jpg and /dev/null differ
diff --git a/src/plugins/home/public/assets/coredns_logs/screenshot.png b/src/plugins/home/public/assets/coredns_logs/screenshot.png
deleted file mode 100644
index 70921fa9bafb2..0000000000000
Binary files a/src/plugins/home/public/assets/coredns_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/coredns_logs/screenshot.webp b/src/plugins/home/public/assets/coredns_logs/screenshot.webp
new file mode 100644
index 0000000000000..b27c4a6277695
Binary files /dev/null and b/src/plugins/home/public/assets/coredns_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/coredns_metrics/screenshot.png b/src/plugins/home/public/assets/coredns_metrics/screenshot.png
deleted file mode 100644
index c30d35d0cca8a..0000000000000
Binary files a/src/plugins/home/public/assets/coredns_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/coredns_metrics/screenshot.webp b/src/plugins/home/public/assets/coredns_metrics/screenshot.webp
new file mode 100644
index 0000000000000..25a1627a6d230
Binary files /dev/null and b/src/plugins/home/public/assets/coredns_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/couchdb_metrics/screenshot.png b/src/plugins/home/public/assets/couchdb_metrics/screenshot.png
deleted file mode 100644
index cccd14189491b..0000000000000
Binary files a/src/plugins/home/public/assets/couchdb_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/couchdb_metrics/screenshot.webp b/src/plugins/home/public/assets/couchdb_metrics/screenshot.webp
new file mode 100644
index 0000000000000..dba62b5d3fbb8
Binary files /dev/null and b/src/plugins/home/public/assets/couchdb_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/crowdstrike_logs/screenshot.png b/src/plugins/home/public/assets/crowdstrike_logs/screenshot.png
deleted file mode 100644
index b74edfe2293f9..0000000000000
Binary files a/src/plugins/home/public/assets/crowdstrike_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/crowdstrike_logs/screenshot.webp b/src/plugins/home/public/assets/crowdstrike_logs/screenshot.webp
new file mode 100644
index 0000000000000..984ef12e0563e
Binary files /dev/null and b/src/plugins/home/public/assets/crowdstrike_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/docker_metrics/screenshot.png b/src/plugins/home/public/assets/docker_metrics/screenshot.png
deleted file mode 100644
index 9dc1a229ef142..0000000000000
Binary files a/src/plugins/home/public/assets/docker_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/docker_metrics/screenshot.webp b/src/plugins/home/public/assets/docker_metrics/screenshot.webp
new file mode 100644
index 0000000000000..254660288372d
Binary files /dev/null and b/src/plugins/home/public/assets/docker_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/envoyproxy_logs/screenshot.png b/src/plugins/home/public/assets/envoyproxy_logs/screenshot.png
deleted file mode 100644
index 87f589b4e3c66..0000000000000
Binary files a/src/plugins/home/public/assets/envoyproxy_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/envoyproxy_logs/screenshot.webp b/src/plugins/home/public/assets/envoyproxy_logs/screenshot.webp
new file mode 100644
index 0000000000000..ff46ef4e622af
Binary files /dev/null and b/src/plugins/home/public/assets/envoyproxy_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/googlecloud_logs/screenshot.png b/src/plugins/home/public/assets/googlecloud_logs/screenshot.png
deleted file mode 100644
index 4f68932e9f709..0000000000000
Binary files a/src/plugins/home/public/assets/googlecloud_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/googlecloud_logs/screenshot.webp b/src/plugins/home/public/assets/googlecloud_logs/screenshot.webp
new file mode 100644
index 0000000000000..902c1323a5b6d
Binary files /dev/null and b/src/plugins/home/public/assets/googlecloud_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/googlecloud_metrics/screenshot.png b/src/plugins/home/public/assets/googlecloud_metrics/screenshot.png
deleted file mode 100644
index d4d90d27ad302..0000000000000
Binary files a/src/plugins/home/public/assets/googlecloud_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/googlecloud_metrics/screenshot.webp b/src/plugins/home/public/assets/googlecloud_metrics/screenshot.webp
new file mode 100644
index 0000000000000..d46b47ca2baf1
Binary files /dev/null and b/src/plugins/home/public/assets/googlecloud_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/haproxy_logs/screenshot.png b/src/plugins/home/public/assets/haproxy_logs/screenshot.png
deleted file mode 100644
index 85a24bf01f3aa..0000000000000
Binary files a/src/plugins/home/public/assets/haproxy_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/haproxy_logs/screenshot.webp b/src/plugins/home/public/assets/haproxy_logs/screenshot.webp
new file mode 100644
index 0000000000000..def39259c19aa
Binary files /dev/null and b/src/plugins/home/public/assets/haproxy_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/ibmmq_logs/screenshot.png b/src/plugins/home/public/assets/ibmmq_logs/screenshot.png
deleted file mode 100644
index 100a8b6ae367c..0000000000000
Binary files a/src/plugins/home/public/assets/ibmmq_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/ibmmq_logs/screenshot.webp b/src/plugins/home/public/assets/ibmmq_logs/screenshot.webp
new file mode 100644
index 0000000000000..db12cd433dfad
Binary files /dev/null and b/src/plugins/home/public/assets/ibmmq_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/ibmmq_metrics/screenshot.png b/src/plugins/home/public/assets/ibmmq_metrics/screenshot.png
deleted file mode 100644
index c4f202ad13bb7..0000000000000
Binary files a/src/plugins/home/public/assets/ibmmq_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/ibmmq_metrics/screenshot.webp b/src/plugins/home/public/assets/ibmmq_metrics/screenshot.webp
new file mode 100644
index 0000000000000..6579c13fb0152
Binary files /dev/null and b/src/plugins/home/public/assets/ibmmq_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/icinga_logs/screenshot.png b/src/plugins/home/public/assets/icinga_logs/screenshot.png
deleted file mode 100644
index 013b20fcf166e..0000000000000
Binary files a/src/plugins/home/public/assets/icinga_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/icinga_logs/screenshot.webp b/src/plugins/home/public/assets/icinga_logs/screenshot.webp
new file mode 100644
index 0000000000000..a74d945845d6c
Binary files /dev/null and b/src/plugins/home/public/assets/icinga_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/iis_logs/screenshot.png b/src/plugins/home/public/assets/iis_logs/screenshot.png
deleted file mode 100644
index 1e30a2d5c90fa..0000000000000
Binary files a/src/plugins/home/public/assets/iis_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/iis_logs/screenshot.webp b/src/plugins/home/public/assets/iis_logs/screenshot.webp
new file mode 100644
index 0000000000000..8d76366c0fe75
Binary files /dev/null and b/src/plugins/home/public/assets/iis_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/iis_metrics/screenshot.png b/src/plugins/home/public/assets/iis_metrics/screenshot.png
deleted file mode 100644
index 35e04c49b43f0..0000000000000
Binary files a/src/plugins/home/public/assets/iis_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/iis_metrics/screenshot.webp b/src/plugins/home/public/assets/iis_metrics/screenshot.webp
new file mode 100644
index 0000000000000..c7009a1afb6ee
Binary files /dev/null and b/src/plugins/home/public/assets/iis_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/iptables_logs/screenshot.png b/src/plugins/home/public/assets/iptables_logs/screenshot.png
deleted file mode 100644
index e01ba5275c762..0000000000000
Binary files a/src/plugins/home/public/assets/iptables_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/iptables_logs/screenshot.webp b/src/plugins/home/public/assets/iptables_logs/screenshot.webp
new file mode 100644
index 0000000000000..3eceae76c1f32
Binary files /dev/null and b/src/plugins/home/public/assets/iptables_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/kafka_logs/screenshot.png b/src/plugins/home/public/assets/kafka_logs/screenshot.png
deleted file mode 100644
index ba485093c127f..0000000000000
Binary files a/src/plugins/home/public/assets/kafka_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/kafka_logs/screenshot.webp b/src/plugins/home/public/assets/kafka_logs/screenshot.webp
new file mode 100644
index 0000000000000..c67ebf961bb4a
Binary files /dev/null and b/src/plugins/home/public/assets/kafka_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/kubernetes_metrics/screenshot.png b/src/plugins/home/public/assets/kubernetes_metrics/screenshot.png
deleted file mode 100644
index ffebda1c21d32..0000000000000
Binary files a/src/plugins/home/public/assets/kubernetes_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/kubernetes_metrics/screenshot.webp b/src/plugins/home/public/assets/kubernetes_metrics/screenshot.webp
new file mode 100644
index 0000000000000..6a2c9861a7a70
Binary files /dev/null and b/src/plugins/home/public/assets/kubernetes_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/logstash_logs/screenshot.png b/src/plugins/home/public/assets/logstash_logs/screenshot.png
deleted file mode 100644
index 392a2fb9c89eb..0000000000000
Binary files a/src/plugins/home/public/assets/logstash_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/logstash_logs/screenshot.webp b/src/plugins/home/public/assets/logstash_logs/screenshot.webp
new file mode 100644
index 0000000000000..47615bbc0f1e6
Binary files /dev/null and b/src/plugins/home/public/assets/logstash_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/microsoft_logs/screenshot.png b/src/plugins/home/public/assets/microsoft_logs/screenshot.png
deleted file mode 100644
index 7df250e2ae885..0000000000000
Binary files a/src/plugins/home/public/assets/microsoft_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/microsoft_logs/screenshot.webp b/src/plugins/home/public/assets/microsoft_logs/screenshot.webp
new file mode 100644
index 0000000000000..25cc6d5d8c4df
Binary files /dev/null and b/src/plugins/home/public/assets/microsoft_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/misp_logs/screenshot.png b/src/plugins/home/public/assets/misp_logs/screenshot.png
deleted file mode 100644
index a02068ddf3038..0000000000000
Binary files a/src/plugins/home/public/assets/misp_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/misp_logs/screenshot.webp b/src/plugins/home/public/assets/misp_logs/screenshot.webp
new file mode 100644
index 0000000000000..91fc636919743
Binary files /dev/null and b/src/plugins/home/public/assets/misp_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/mongodb_logs/screenshot.png b/src/plugins/home/public/assets/mongodb_logs/screenshot.png
deleted file mode 100644
index c77c37d5ce05b..0000000000000
Binary files a/src/plugins/home/public/assets/mongodb_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/mongodb_logs/screenshot.webp b/src/plugins/home/public/assets/mongodb_logs/screenshot.webp
new file mode 100644
index 0000000000000..c86617566f3c1
Binary files /dev/null and b/src/plugins/home/public/assets/mongodb_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/mongodb_metrics/screenshot.png b/src/plugins/home/public/assets/mongodb_metrics/screenshot.png
deleted file mode 100644
index 88ec14c8caf26..0000000000000
Binary files a/src/plugins/home/public/assets/mongodb_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/mongodb_metrics/screenshot.webp b/src/plugins/home/public/assets/mongodb_metrics/screenshot.webp
new file mode 100644
index 0000000000000..4bb6dd7f5d34e
Binary files /dev/null and b/src/plugins/home/public/assets/mongodb_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/mssql_metrics/screenshot.png b/src/plugins/home/public/assets/mssql_metrics/screenshot.png
deleted file mode 100644
index fdb99617689a4..0000000000000
Binary files a/src/plugins/home/public/assets/mssql_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/mssql_metrics/screenshot.webp b/src/plugins/home/public/assets/mssql_metrics/screenshot.webp
new file mode 100644
index 0000000000000..f76c59c78bf98
Binary files /dev/null and b/src/plugins/home/public/assets/mssql_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/mysql_logs/screenshot.png b/src/plugins/home/public/assets/mysql_logs/screenshot.png
deleted file mode 100644
index d380042ca72e8..0000000000000
Binary files a/src/plugins/home/public/assets/mysql_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/mysql_logs/screenshot.webp b/src/plugins/home/public/assets/mysql_logs/screenshot.webp
new file mode 100644
index 0000000000000..2bd300b7c3d83
Binary files /dev/null and b/src/plugins/home/public/assets/mysql_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/mysql_metrics/screenshot.png b/src/plugins/home/public/assets/mysql_metrics/screenshot.png
deleted file mode 100644
index e3091f5156c5a..0000000000000
Binary files a/src/plugins/home/public/assets/mysql_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/mysql_metrics/screenshot.webp b/src/plugins/home/public/assets/mysql_metrics/screenshot.webp
new file mode 100644
index 0000000000000..5c77a70eca5b4
Binary files /dev/null and b/src/plugins/home/public/assets/mysql_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/nats_logs/screenshot.png b/src/plugins/home/public/assets/nats_logs/screenshot.png
deleted file mode 100644
index 9aa5b4c129ac0..0000000000000
Binary files a/src/plugins/home/public/assets/nats_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/nats_logs/screenshot.webp b/src/plugins/home/public/assets/nats_logs/screenshot.webp
new file mode 100644
index 0000000000000..d2c24b7962a12
Binary files /dev/null and b/src/plugins/home/public/assets/nats_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/nats_metrics/screenshot.png b/src/plugins/home/public/assets/nats_metrics/screenshot.png
deleted file mode 100644
index 04f71345ef494..0000000000000
Binary files a/src/plugins/home/public/assets/nats_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/nats_metrics/screenshot.webp b/src/plugins/home/public/assets/nats_metrics/screenshot.webp
new file mode 100644
index 0000000000000..39aef55bdf544
Binary files /dev/null and b/src/plugins/home/public/assets/nats_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/nginx_logs/screenshot.png b/src/plugins/home/public/assets/nginx_logs/screenshot.png
deleted file mode 100644
index 10522377112cb..0000000000000
Binary files a/src/plugins/home/public/assets/nginx_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/nginx_logs/screenshot.webp b/src/plugins/home/public/assets/nginx_logs/screenshot.webp
new file mode 100644
index 0000000000000..e8cbc9157cd59
Binary files /dev/null and b/src/plugins/home/public/assets/nginx_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/nginx_metrics/screenshot.png b/src/plugins/home/public/assets/nginx_metrics/screenshot.png
deleted file mode 100644
index 003ea39191cdf..0000000000000
Binary files a/src/plugins/home/public/assets/nginx_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/nginx_metrics/screenshot.webp b/src/plugins/home/public/assets/nginx_metrics/screenshot.webp
new file mode 100644
index 0000000000000..851b9fd9a414e
Binary files /dev/null and b/src/plugins/home/public/assets/nginx_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/o365_logs/screenshot.png b/src/plugins/home/public/assets/o365_logs/screenshot.png
deleted file mode 100644
index a2413e7b909bc..0000000000000
Binary files a/src/plugins/home/public/assets/o365_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/o365_logs/screenshot.webp b/src/plugins/home/public/assets/o365_logs/screenshot.webp
new file mode 100644
index 0000000000000..11ce5a8627db6
Binary files /dev/null and b/src/plugins/home/public/assets/o365_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/okta_logs/screenshot.png b/src/plugins/home/public/assets/okta_logs/screenshot.png
deleted file mode 100644
index 6a28b4363b05b..0000000000000
Binary files a/src/plugins/home/public/assets/okta_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/okta_logs/screenshot.webp b/src/plugins/home/public/assets/okta_logs/screenshot.webp
new file mode 100644
index 0000000000000..4797663acd94b
Binary files /dev/null and b/src/plugins/home/public/assets/okta_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/osquery_logs/screenshot.png b/src/plugins/home/public/assets/osquery_logs/screenshot.png
deleted file mode 100644
index 4082d04001c16..0000000000000
Binary files a/src/plugins/home/public/assets/osquery_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/osquery_logs/screenshot.webp b/src/plugins/home/public/assets/osquery_logs/screenshot.webp
new file mode 100644
index 0000000000000..7aaef4a6dd228
Binary files /dev/null and b/src/plugins/home/public/assets/osquery_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/panw_logs/screenshot.png b/src/plugins/home/public/assets/panw_logs/screenshot.png
deleted file mode 100644
index ef9d5f706eca6..0000000000000
Binary files a/src/plugins/home/public/assets/panw_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/panw_logs/screenshot.webp b/src/plugins/home/public/assets/panw_logs/screenshot.webp
new file mode 100644
index 0000000000000..cb025f7452142
Binary files /dev/null and b/src/plugins/home/public/assets/panw_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/postgresql_logs/screenshot.png b/src/plugins/home/public/assets/postgresql_logs/screenshot.png
deleted file mode 100644
index 8185dcd54c510..0000000000000
Binary files a/src/plugins/home/public/assets/postgresql_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/postgresql_logs/screenshot.webp b/src/plugins/home/public/assets/postgresql_logs/screenshot.webp
new file mode 100644
index 0000000000000..b8992f795232b
Binary files /dev/null and b/src/plugins/home/public/assets/postgresql_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/rabbitmq_metrics/screenshot.png b/src/plugins/home/public/assets/rabbitmq_metrics/screenshot.png
deleted file mode 100644
index b4b84cae7267c..0000000000000
Binary files a/src/plugins/home/public/assets/rabbitmq_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/rabbitmq_metrics/screenshot.webp b/src/plugins/home/public/assets/rabbitmq_metrics/screenshot.webp
new file mode 100644
index 0000000000000..8877a740d073c
Binary files /dev/null and b/src/plugins/home/public/assets/rabbitmq_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/redis_logs/screenshot.png b/src/plugins/home/public/assets/redis_logs/screenshot.png
deleted file mode 100644
index 9c79dd42317fc..0000000000000
Binary files a/src/plugins/home/public/assets/redis_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/redis_logs/screenshot.webp b/src/plugins/home/public/assets/redis_logs/screenshot.webp
new file mode 100644
index 0000000000000..e272effe20f0d
Binary files /dev/null and b/src/plugins/home/public/assets/redis_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/redis_metrics/screenshot.png b/src/plugins/home/public/assets/redis_metrics/screenshot.png
deleted file mode 100644
index 0e8f7cb3e645a..0000000000000
Binary files a/src/plugins/home/public/assets/redis_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/redis_metrics/screenshot.webp b/src/plugins/home/public/assets/redis_metrics/screenshot.webp
new file mode 100644
index 0000000000000..5504f51a291fe
Binary files /dev/null and b/src/plugins/home/public/assets/redis_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/redisenterprise_metrics/screenshot.png b/src/plugins/home/public/assets/redisenterprise_metrics/screenshot.png
deleted file mode 100644
index cc6ef0ce509eb..0000000000000
Binary files a/src/plugins/home/public/assets/redisenterprise_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/redisenterprise_metrics/screenshot.webp b/src/plugins/home/public/assets/redisenterprise_metrics/screenshot.webp
new file mode 100644
index 0000000000000..689e52f86a03b
Binary files /dev/null and b/src/plugins/home/public/assets/redisenterprise_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard.png b/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard.png
deleted file mode 100644
index 37214a219a377..0000000000000
Binary files a/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard.webp b/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard.webp
new file mode 100644
index 0000000000000..f6720bf0e3e51
Binary files /dev/null and b/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard.webp differ
diff --git a/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard_dark.png b/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard_dark.png
deleted file mode 100644
index 0c0e5b6f01205..0000000000000
Binary files a/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard_dark.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard_dark.webp b/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard_dark.webp
new file mode 100644
index 0000000000000..b9263441d1f22
Binary files /dev/null and b/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard_dark.webp differ
diff --git a/src/plugins/home/public/assets/sample_data_resources/flights/dashboard.png b/src/plugins/home/public/assets/sample_data_resources/flights/dashboard.png
deleted file mode 100644
index a7b66ceeb288d..0000000000000
Binary files a/src/plugins/home/public/assets/sample_data_resources/flights/dashboard.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/sample_data_resources/flights/dashboard.webp b/src/plugins/home/public/assets/sample_data_resources/flights/dashboard.webp
new file mode 100644
index 0000000000000..f73ae849befc9
Binary files /dev/null and b/src/plugins/home/public/assets/sample_data_resources/flights/dashboard.webp differ
diff --git a/src/plugins/home/public/assets/sample_data_resources/flights/dashboard_dark.png b/src/plugins/home/public/assets/sample_data_resources/flights/dashboard_dark.png
deleted file mode 100644
index 18487d5c44bff..0000000000000
Binary files a/src/plugins/home/public/assets/sample_data_resources/flights/dashboard_dark.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/sample_data_resources/flights/dashboard_dark.webp b/src/plugins/home/public/assets/sample_data_resources/flights/dashboard_dark.webp
new file mode 100644
index 0000000000000..3cea45093ddac
Binary files /dev/null and b/src/plugins/home/public/assets/sample_data_resources/flights/dashboard_dark.webp differ
diff --git a/src/plugins/home/public/assets/sample_data_resources/logs/dashboard.png b/src/plugins/home/public/assets/sample_data_resources/logs/dashboard.png
deleted file mode 100644
index ab33a93e30400..0000000000000
Binary files a/src/plugins/home/public/assets/sample_data_resources/logs/dashboard.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/sample_data_resources/logs/dashboard.webp b/src/plugins/home/public/assets/sample_data_resources/logs/dashboard.webp
new file mode 100644
index 0000000000000..c5b2250190ae0
Binary files /dev/null and b/src/plugins/home/public/assets/sample_data_resources/logs/dashboard.webp differ
diff --git a/src/plugins/home/public/assets/sample_data_resources/logs/dashboard_dark.png b/src/plugins/home/public/assets/sample_data_resources/logs/dashboard_dark.png
deleted file mode 100644
index 8586c7741e373..0000000000000
Binary files a/src/plugins/home/public/assets/sample_data_resources/logs/dashboard_dark.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/sample_data_resources/logs/dashboard_dark.webp b/src/plugins/home/public/assets/sample_data_resources/logs/dashboard_dark.webp
new file mode 100644
index 0000000000000..0c5ff2f6cd9f1
Binary files /dev/null and b/src/plugins/home/public/assets/sample_data_resources/logs/dashboard_dark.webp differ
diff --git a/src/plugins/home/public/assets/santa_logs/screenshot.png b/src/plugins/home/public/assets/santa_logs/screenshot.png
deleted file mode 100644
index 31abdeb270a35..0000000000000
Binary files a/src/plugins/home/public/assets/santa_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/santa_logs/screenshot.webp b/src/plugins/home/public/assets/santa_logs/screenshot.webp
new file mode 100644
index 0000000000000..a9f6f01cf1730
Binary files /dev/null and b/src/plugins/home/public/assets/santa_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/stan_metrics/screenshot.png b/src/plugins/home/public/assets/stan_metrics/screenshot.png
deleted file mode 100644
index a6ed419fe885b..0000000000000
Binary files a/src/plugins/home/public/assets/stan_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/stan_metrics/screenshot.webp b/src/plugins/home/public/assets/stan_metrics/screenshot.webp
new file mode 100644
index 0000000000000..b2c43e3a19d5d
Binary files /dev/null and b/src/plugins/home/public/assets/stan_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/suricata_logs/screenshot.png b/src/plugins/home/public/assets/suricata_logs/screenshot.png
deleted file mode 100644
index 68193524d8748..0000000000000
Binary files a/src/plugins/home/public/assets/suricata_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/suricata_logs/screenshot.webp b/src/plugins/home/public/assets/suricata_logs/screenshot.webp
new file mode 100644
index 0000000000000..41625df5c9aa5
Binary files /dev/null and b/src/plugins/home/public/assets/suricata_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/system_logs/screenshot.png b/src/plugins/home/public/assets/system_logs/screenshot.png
deleted file mode 100644
index dfb1d832e3a86..0000000000000
Binary files a/src/plugins/home/public/assets/system_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/system_logs/screenshot.webp b/src/plugins/home/public/assets/system_logs/screenshot.webp
new file mode 100644
index 0000000000000..25da6b13eadc1
Binary files /dev/null and b/src/plugins/home/public/assets/system_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/system_metrics/screenshot.png b/src/plugins/home/public/assets/system_metrics/screenshot.png
deleted file mode 100644
index 2ee3d14f164b6..0000000000000
Binary files a/src/plugins/home/public/assets/system_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/system_metrics/screenshot.webp b/src/plugins/home/public/assets/system_metrics/screenshot.webp
new file mode 100644
index 0000000000000..d8e059513f249
Binary files /dev/null and b/src/plugins/home/public/assets/system_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/traefik_logs/screenshot.png b/src/plugins/home/public/assets/traefik_logs/screenshot.png
deleted file mode 100644
index c4149b9cd545e..0000000000000
Binary files a/src/plugins/home/public/assets/traefik_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/traefik_logs/screenshot.webp b/src/plugins/home/public/assets/traefik_logs/screenshot.webp
new file mode 100644
index 0000000000000..cc221b8b45e68
Binary files /dev/null and b/src/plugins/home/public/assets/traefik_logs/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/uptime_monitors/screenshot.png b/src/plugins/home/public/assets/uptime_monitors/screenshot.png
deleted file mode 100644
index 9983667c83ec2..0000000000000
Binary files a/src/plugins/home/public/assets/uptime_monitors/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/uptime_monitors/screenshot.webp b/src/plugins/home/public/assets/uptime_monitors/screenshot.webp
new file mode 100644
index 0000000000000..f9dd9605a5f2e
Binary files /dev/null and b/src/plugins/home/public/assets/uptime_monitors/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/uwsgi_metrics/screenshot.png b/src/plugins/home/public/assets/uwsgi_metrics/screenshot.png
deleted file mode 100644
index 9d197bc88568b..0000000000000
Binary files a/src/plugins/home/public/assets/uwsgi_metrics/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/uwsgi_metrics/screenshot.webp b/src/plugins/home/public/assets/uwsgi_metrics/screenshot.webp
new file mode 100644
index 0000000000000..33666d43c5402
Binary files /dev/null and b/src/plugins/home/public/assets/uwsgi_metrics/screenshot.webp differ
diff --git a/src/plugins/home/public/assets/zeek_logs/screenshot.png b/src/plugins/home/public/assets/zeek_logs/screenshot.png
deleted file mode 100644
index 7c8458f19afb0..0000000000000
Binary files a/src/plugins/home/public/assets/zeek_logs/screenshot.png and /dev/null differ
diff --git a/src/plugins/home/public/assets/zeek_logs/screenshot.webp b/src/plugins/home/public/assets/zeek_logs/screenshot.webp
new file mode 100644
index 0000000000000..b49b6fdbac763
Binary files /dev/null and b/src/plugins/home/public/assets/zeek_logs/screenshot.webp differ
diff --git a/src/plugins/home/server/services/sample_data/data_sets/ecommerce/index.ts b/src/plugins/home/server/services/sample_data/data_sets/ecommerce/index.ts
index 08747f08fc923..e995510c99fee 100644
--- a/src/plugins/home/server/services/sample_data/data_sets/ecommerce/index.ts
+++ b/src/plugins/home/server/services/sample_data/data_sets/ecommerce/index.ts
@@ -24,8 +24,9 @@ export const ecommerceSpecProvider = function (): SampleDatasetSchema {
id: 'ecommerce',
name: ecommerceName,
description: ecommerceDescription,
- previewImagePath: '/plugins/home/assets/sample_data_resources/ecommerce/dashboard.png',
- darkPreviewImagePath: '/plugins/home/assets/sample_data_resources/ecommerce/dashboard_dark.png',
+ previewImagePath: '/plugins/home/assets/sample_data_resources/ecommerce/dashboard.webp',
+ darkPreviewImagePath:
+ '/plugins/home/assets/sample_data_resources/ecommerce/dashboard_dark.webp',
overviewDashboard: '722b74f0-b882-11e8-a6d9-e546fe2bba5f',
defaultIndex: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f',
savedObjects: getSavedObjects(),
diff --git a/src/plugins/home/server/services/sample_data/data_sets/flights/index.ts b/src/plugins/home/server/services/sample_data/data_sets/flights/index.ts
index ac0987559eb79..691ac8334cbc3 100644
--- a/src/plugins/home/server/services/sample_data/data_sets/flights/index.ts
+++ b/src/plugins/home/server/services/sample_data/data_sets/flights/index.ts
@@ -24,8 +24,8 @@ export const flightsSpecProvider = function (): SampleDatasetSchema {
id: 'flights',
name: flightsName,
description: flightsDescription,
- previewImagePath: '/plugins/home/assets/sample_data_resources/flights/dashboard.png',
- darkPreviewImagePath: '/plugins/home/assets/sample_data_resources/flights/dashboard_dark.png',
+ previewImagePath: '/plugins/home/assets/sample_data_resources/flights/dashboard.webp',
+ darkPreviewImagePath: '/plugins/home/assets/sample_data_resources/flights/dashboard_dark.webp',
overviewDashboard: '7adfa750-4c81-11e8-b3d7-01146121b73d',
defaultIndex: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
savedObjects: getSavedObjects(),
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 77d5f868ad285..e33d49e3f9a83 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
@@ -25,8 +25,8 @@ export const logsSpecProvider = function (): SampleDatasetSchema {
id: 'logs',
name: logsName,
description: logsDescription,
- previewImagePath: '/plugins/home/assets/sample_data_resources/logs/dashboard.png',
- darkPreviewImagePath: '/plugins/home/assets/sample_data_resources/logs/dashboard_dark.png',
+ previewImagePath: '/plugins/home/assets/sample_data_resources/logs/dashboard.webp',
+ darkPreviewImagePath: '/plugins/home/assets/sample_data_resources/logs/dashboard_dark.webp',
overviewDashboard: 'edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b',
defaultIndex: '90943e30-9a47-11e8-b64d-95841ca0b247',
savedObjects: getSavedObjects(),
diff --git a/src/plugins/home/server/tutorials/activemq_logs/index.ts b/src/plugins/home/server/tutorials/activemq_logs/index.ts
index cc84f9a536b22..5e1b4c2370451 100644
--- a/src/plugins/home/server/tutorials/activemq_logs/index.ts
+++ b/src/plugins/home/server/tutorials/activemq_logs/index.ts
@@ -54,7 +54,7 @@ export function activemqLogsSpecProvider(context: TutorialContext): TutorialSche
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/activemq_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/activemq_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/apache_logs/index.ts b/src/plugins/home/server/tutorials/apache_logs/index.ts
index aea8e3c188d94..b9b7c1732f831 100644
--- a/src/plugins/home/server/tutorials/apache_logs/index.ts
+++ b/src/plugins/home/server/tutorials/apache_logs/index.ts
@@ -55,7 +55,7 @@ export function apacheLogsSpecProvider(context: TutorialContext): TutorialSchema
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/apache_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/apache_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/apache_metrics/index.ts b/src/plugins/home/server/tutorials/apache_metrics/index.ts
index 0af719610c24d..a09cbac364d19 100644
--- a/src/plugins/home/server/tutorials/apache_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/apache_metrics/index.ts
@@ -54,7 +54,7 @@ export function apacheMetricsSpecProvider(context: TutorialContext): TutorialSch
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/apache_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/apache_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/auditbeat/index.ts b/src/plugins/home/server/tutorials/auditbeat/index.ts
index 666fcf15635c3..1e5e44ed77160 100644
--- a/src/plugins/home/server/tutorials/auditbeat/index.ts
+++ b/src/plugins/home/server/tutorials/auditbeat/index.ts
@@ -54,7 +54,7 @@ processes, users, logins, sockets information, file accesses, and more. \
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/auditbeat/screenshot.png',
+ previewImagePath: '/plugins/home/assets/auditbeat/screenshot.webp',
onPrem: onPremInstructions(platforms, context),
elasticCloud: cloudInstructions(platforms, context),
onPremElasticCloud: onPremCloudInstructions(platforms, context),
diff --git a/src/plugins/home/server/tutorials/auditd_logs/index.ts b/src/plugins/home/server/tutorials/auditd_logs/index.ts
index 24857045ccc28..6d18dcace5845 100644
--- a/src/plugins/home/server/tutorials/auditd_logs/index.ts
+++ b/src/plugins/home/server/tutorials/auditd_logs/index.ts
@@ -55,7 +55,7 @@ export function auditdLogsSpecProvider(context: TutorialContext): TutorialSchema
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/auditd_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/auditd_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/aws_logs/index.ts b/src/plugins/home/server/tutorials/aws_logs/index.ts
index 60187490318ae..f0c291f3dd344 100644
--- a/src/plugins/home/server/tutorials/aws_logs/index.ts
+++ b/src/plugins/home/server/tutorials/aws_logs/index.ts
@@ -55,7 +55,7 @@ export function awsLogsSpecProvider(context: TutorialContext): TutorialSchema {
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/aws_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/aws_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/aws_metrics/index.ts b/src/plugins/home/server/tutorials/aws_metrics/index.ts
index 6541b4f5f29c8..5e4608e7104ed 100644
--- a/src/plugins/home/server/tutorials/aws_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/aws_metrics/index.ts
@@ -56,7 +56,7 @@ export function awsMetricsSpecProvider(context: TutorialContext): TutorialSchema
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/aws_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/aws_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/azure_logs/index.ts b/src/plugins/home/server/tutorials/azure_logs/index.ts
index 163496813567a..1ddaf49bcaa7d 100644
--- a/src/plugins/home/server/tutorials/azure_logs/index.ts
+++ b/src/plugins/home/server/tutorials/azure_logs/index.ts
@@ -56,7 +56,7 @@ export function azureLogsSpecProvider(context: TutorialContext): TutorialSchema
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/azure_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/azure_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/azure_metrics/index.ts b/src/plugins/home/server/tutorials/azure_metrics/index.ts
index edf4062812b42..ab8a29dec8c36 100644
--- a/src/plugins/home/server/tutorials/azure_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/azure_metrics/index.ts
@@ -55,7 +55,7 @@ export function azureMetricsSpecProvider(context: TutorialContext): TutorialSche
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/azure_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/azure_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/cisco_logs/index.ts b/src/plugins/home/server/tutorials/cisco_logs/index.ts
index 3c855996873af..098819c14297f 100644
--- a/src/plugins/home/server/tutorials/cisco_logs/index.ts
+++ b/src/plugins/home/server/tutorials/cisco_logs/index.ts
@@ -55,7 +55,7 @@ export function ciscoLogsSpecProvider(context: TutorialContext): TutorialSchema
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/cisco_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/cisco_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts b/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts
index d53fd7f1f73aa..65b18c04de879 100644
--- a/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts
@@ -57,7 +57,7 @@ export function cockroachdbMetricsSpecProvider(context: TutorialContext): Tutori
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/cockroachdb_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/cockroachdb_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/consul_metrics/index.ts b/src/plugins/home/server/tutorials/consul_metrics/index.ts
index 26fff9e58f511..9f696671a0659 100644
--- a/src/plugins/home/server/tutorials/consul_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/consul_metrics/index.ts
@@ -54,7 +54,7 @@ export function consulMetricsSpecProvider(context: TutorialContext): TutorialSch
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/consul_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/consul_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/coredns_logs/index.ts b/src/plugins/home/server/tutorials/coredns_logs/index.ts
index 876e6e09d61d6..dbec4483ace5c 100644
--- a/src/plugins/home/server/tutorials/coredns_logs/index.ts
+++ b/src/plugins/home/server/tutorials/coredns_logs/index.ts
@@ -55,7 +55,7 @@ export function corednsLogsSpecProvider(context: TutorialContext): TutorialSchem
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/coredns_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/coredns_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/coredns_metrics/index.ts b/src/plugins/home/server/tutorials/coredns_metrics/index.ts
index b854f4d448361..efadd93b1ddc5 100644
--- a/src/plugins/home/server/tutorials/coredns_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/coredns_metrics/index.ts
@@ -52,7 +52,7 @@ export function corednsMetricsSpecProvider(context: TutorialContext): TutorialSc
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/coredns_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/coredns_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/couchdb_metrics/index.ts b/src/plugins/home/server/tutorials/couchdb_metrics/index.ts
index a379b3b04f4c7..f9c1becf83be4 100644
--- a/src/plugins/home/server/tutorials/couchdb_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/couchdb_metrics/index.ts
@@ -57,7 +57,7 @@ export function couchdbMetricsSpecProvider(context: TutorialContext): TutorialSc
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/couchdb_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/couchdb_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/docker_metrics/index.ts b/src/plugins/home/server/tutorials/docker_metrics/index.ts
index e36d590650454..20a184f2fbe78 100644
--- a/src/plugins/home/server/tutorials/docker_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/docker_metrics/index.ts
@@ -54,7 +54,7 @@ export function dockerMetricsSpecProvider(context: TutorialContext): TutorialSch
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/docker_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/docker_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts b/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts
index a1df2d8a4085e..bef2a28e5072f 100644
--- a/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts
+++ b/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts
@@ -54,7 +54,7 @@ export function elasticsearchLogsSpecProvider(context: TutorialContext): Tutoria
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/elasticsearch_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/elasticsearch_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts
index f83ca467b1fde..b0d40c254677e 100644
--- a/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts
+++ b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts
@@ -58,7 +58,7 @@ export function envoyproxyLogsSpecProvider(context: TutorialContext): TutorialSc
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/envoyproxy_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/envoyproxy_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/f5_logs/index.ts b/src/plugins/home/server/tutorials/f5_logs/index.ts
index 381fdd487eb24..0980b14d93f72 100644
--- a/src/plugins/home/server/tutorials/f5_logs/index.ts
+++ b/src/plugins/home/server/tutorials/f5_logs/index.ts
@@ -53,7 +53,7 @@ export function f5LogsSpecProvider(context: TutorialContext): TutorialSchema {
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/f5_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/f5_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/gcp_logs/index.ts b/src/plugins/home/server/tutorials/gcp_logs/index.ts
index d02c08cd2be9a..b4a5765b87d30 100644
--- a/src/plugins/home/server/tutorials/gcp_logs/index.ts
+++ b/src/plugins/home/server/tutorials/gcp_logs/index.ts
@@ -57,7 +57,7 @@ export function gcpLogsSpecProvider(context: TutorialContext): TutorialSchema {
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/gcp_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/gcp_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/gcp_metrics/index.ts b/src/plugins/home/server/tutorials/gcp_metrics/index.ts
index ea5351d010a42..57d3a1434ec98 100644
--- a/src/plugins/home/server/tutorials/gcp_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/gcp_metrics/index.ts
@@ -55,7 +55,7 @@ export function gcpMetricsSpecProvider(context: TutorialContext): TutorialSchema
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/gcp_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/gcp_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/haproxy_logs/index.ts b/src/plugins/home/server/tutorials/haproxy_logs/index.ts
index 05fc23fa16bcd..1cd429b688e7d 100644
--- a/src/plugins/home/server/tutorials/haproxy_logs/index.ts
+++ b/src/plugins/home/server/tutorials/haproxy_logs/index.ts
@@ -55,7 +55,7 @@ export function haproxyLogsSpecProvider(context: TutorialContext): TutorialSchem
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/haproxy_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/haproxy_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/ibmmq_logs/index.ts b/src/plugins/home/server/tutorials/ibmmq_logs/index.ts
index 90b35d0e78842..b6348a5a6ccdd 100644
--- a/src/plugins/home/server/tutorials/ibmmq_logs/index.ts
+++ b/src/plugins/home/server/tutorials/ibmmq_logs/index.ts
@@ -54,7 +54,7 @@ export function ibmmqLogsSpecProvider(context: TutorialContext): TutorialSchema
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/ibmmq_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/ibmmq_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/ibmmq_metrics/index.ts b/src/plugins/home/server/tutorials/ibmmq_metrics/index.ts
index 6329df6836b06..f488638b8af24 100644
--- a/src/plugins/home/server/tutorials/ibmmq_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/ibmmq_metrics/index.ts
@@ -53,7 +53,7 @@ export function ibmmqMetricsSpecProvider(context: TutorialContext): TutorialSche
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/ibmmq_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/ibmmq_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/icinga_logs/index.ts b/src/plugins/home/server/tutorials/icinga_logs/index.ts
index c65e92d0fe856..63ecd6db5d548 100644
--- a/src/plugins/home/server/tutorials/icinga_logs/index.ts
+++ b/src/plugins/home/server/tutorials/icinga_logs/index.ts
@@ -55,7 +55,7 @@ export function icingaLogsSpecProvider(context: TutorialContext): TutorialSchema
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/icinga_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/icinga_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/iis_logs/index.ts b/src/plugins/home/server/tutorials/iis_logs/index.ts
index 423f2f917c84e..3d6d6e009959a 100644
--- a/src/plugins/home/server/tutorials/iis_logs/index.ts
+++ b/src/plugins/home/server/tutorials/iis_logs/index.ts
@@ -56,7 +56,7 @@ export function iisLogsSpecProvider(context: TutorialContext): TutorialSchema {
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/iis_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/iis_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/iis_metrics/index.ts b/src/plugins/home/server/tutorials/iis_metrics/index.ts
index 3c3159c2838d1..d2e193f38b16f 100644
--- a/src/plugins/home/server/tutorials/iis_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/iis_metrics/index.ts
@@ -55,7 +55,7 @@ export function iisMetricsSpecProvider(context: TutorialContext): TutorialSchema
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/iis_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/iis_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/iptables_logs/index.ts b/src/plugins/home/server/tutorials/iptables_logs/index.ts
index f4469de3336cc..082b0a239714a 100644
--- a/src/plugins/home/server/tutorials/iptables_logs/index.ts
+++ b/src/plugins/home/server/tutorials/iptables_logs/index.ts
@@ -58,7 +58,7 @@ export function iptablesLogsSpecProvider(context: TutorialContext): TutorialSche
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/iptables_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/iptables_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/kafka_logs/index.ts b/src/plugins/home/server/tutorials/kafka_logs/index.ts
index 6e377f3c1f295..6db95424fa967 100644
--- a/src/plugins/home/server/tutorials/kafka_logs/index.ts
+++ b/src/plugins/home/server/tutorials/kafka_logs/index.ts
@@ -55,7 +55,7 @@ export function kafkaLogsSpecProvider(context: TutorialContext): TutorialSchema
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/kafka_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/kafka_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts b/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts
index acd65e0bdc69d..8eea49daac559 100644
--- a/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts
@@ -57,7 +57,7 @@ export function kubernetesMetricsSpecProvider(context: TutorialContext): Tutoria
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/kubernetes_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/kubernetes_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/microsoft_logs/index.ts b/src/plugins/home/server/tutorials/microsoft_logs/index.ts
index 39400f4661071..aacac3a3f1299 100644
--- a/src/plugins/home/server/tutorials/microsoft_logs/index.ts
+++ b/src/plugins/home/server/tutorials/microsoft_logs/index.ts
@@ -55,7 +55,7 @@ export function microsoftLogsSpecProvider(context: TutorialContext): TutorialSch
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/microsoft_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/microsoft_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/misp_logs/index.ts b/src/plugins/home/server/tutorials/misp_logs/index.ts
index 4fb70aa1018f7..fcb080459627a 100644
--- a/src/plugins/home/server/tutorials/misp_logs/index.ts
+++ b/src/plugins/home/server/tutorials/misp_logs/index.ts
@@ -55,7 +55,7 @@ export function mispLogsSpecProvider(context: TutorialContext): TutorialSchema {
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/misp_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/misp_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/mongodb_logs/index.ts b/src/plugins/home/server/tutorials/mongodb_logs/index.ts
index 28e323a2b15a9..e9378479b3dbb 100644
--- a/src/plugins/home/server/tutorials/mongodb_logs/index.ts
+++ b/src/plugins/home/server/tutorials/mongodb_logs/index.ts
@@ -55,7 +55,7 @@ export function mongodbLogsSpecProvider(context: TutorialContext): TutorialSchem
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/mongodb_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/mongodb_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/mongodb_metrics/index.ts b/src/plugins/home/server/tutorials/mongodb_metrics/index.ts
index db843d09abfd8..18dcaf4fe78e9 100644
--- a/src/plugins/home/server/tutorials/mongodb_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/mongodb_metrics/index.ts
@@ -57,7 +57,7 @@ export function mongodbMetricsSpecProvider(context: TutorialContext): TutorialSc
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/mongodb_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/mongodb_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/mssql_metrics/index.ts b/src/plugins/home/server/tutorials/mssql_metrics/index.ts
index 3e73714784f0f..321dfce1f8fa7 100644
--- a/src/plugins/home/server/tutorials/mssql_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/mssql_metrics/index.ts
@@ -55,7 +55,7 @@ export function mssqlMetricsSpecProvider(context: TutorialContext): TutorialSche
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/mssql_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/mssql_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/mysql_logs/index.ts b/src/plugins/home/server/tutorials/mysql_logs/index.ts
index 9af0a3d078cab..1bc6b5dae7ddc 100644
--- a/src/plugins/home/server/tutorials/mysql_logs/index.ts
+++ b/src/plugins/home/server/tutorials/mysql_logs/index.ts
@@ -55,7 +55,7 @@ export function mysqlLogsSpecProvider(context: TutorialContext): TutorialSchema
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/mysql_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/mysql_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/mysql_metrics/index.ts b/src/plugins/home/server/tutorials/mysql_metrics/index.ts
index 8339561d060d6..933f7f0547bac 100644
--- a/src/plugins/home/server/tutorials/mysql_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/mysql_metrics/index.ts
@@ -54,7 +54,7 @@ export function mysqlMetricsSpecProvider(context: TutorialContext): TutorialSche
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/mysql_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/mysql_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/nats_logs/index.ts b/src/plugins/home/server/tutorials/nats_logs/index.ts
index 971f0c2849bda..78af445234f25 100644
--- a/src/plugins/home/server/tutorials/nats_logs/index.ts
+++ b/src/plugins/home/server/tutorials/nats_logs/index.ts
@@ -56,7 +56,7 @@ export function natsLogsSpecProvider(context: TutorialContext): TutorialSchema {
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/nats_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/nats_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/nats_metrics/index.ts b/src/plugins/home/server/tutorials/nats_metrics/index.ts
index cdd633d88140c..56a4a6e83b197 100644
--- a/src/plugins/home/server/tutorials/nats_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/nats_metrics/index.ts
@@ -54,7 +54,7 @@ export function natsMetricsSpecProvider(context: TutorialContext): TutorialSchem
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/nats_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/nats_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/nginx_logs/index.ts b/src/plugins/home/server/tutorials/nginx_logs/index.ts
index 3797f2496ee17..c41597a4c7edb 100644
--- a/src/plugins/home/server/tutorials/nginx_logs/index.ts
+++ b/src/plugins/home/server/tutorials/nginx_logs/index.ts
@@ -55,7 +55,7 @@ export function nginxLogsSpecProvider(context: TutorialContext): TutorialSchema
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/nginx_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/nginx_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/nginx_metrics/index.ts b/src/plugins/home/server/tutorials/nginx_metrics/index.ts
index f32e9388c1f5b..d8779611e54aa 100644
--- a/src/plugins/home/server/tutorials/nginx_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/nginx_metrics/index.ts
@@ -59,7 +59,7 @@ which must be enabled in your Nginx installation. \
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/nginx_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/nginx_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/o365_logs/index.ts b/src/plugins/home/server/tutorials/o365_logs/index.ts
index cbdabc7223b32..b1151d1807ed7 100644
--- a/src/plugins/home/server/tutorials/o365_logs/index.ts
+++ b/src/plugins/home/server/tutorials/o365_logs/index.ts
@@ -58,7 +58,7 @@ export function o365LogsSpecProvider(context: TutorialContext): TutorialSchema {
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/o365_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/o365_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/okta_logs/index.ts b/src/plugins/home/server/tutorials/okta_logs/index.ts
index f45ffbfb800b5..1e73cf63bd9a8 100644
--- a/src/plugins/home/server/tutorials/okta_logs/index.ts
+++ b/src/plugins/home/server/tutorials/okta_logs/index.ts
@@ -56,7 +56,7 @@ export function oktaLogsSpecProvider(context: TutorialContext): TutorialSchema {
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/okta_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/okta_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/panw_logs/index.ts b/src/plugins/home/server/tutorials/panw_logs/index.ts
index 4b44038c07ade..5bc2537821764 100644
--- a/src/plugins/home/server/tutorials/panw_logs/index.ts
+++ b/src/plugins/home/server/tutorials/panw_logs/index.ts
@@ -58,7 +58,7 @@ export function panwLogsSpecProvider(context: TutorialContext): TutorialSchema {
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/panw_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/panw_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/postgresql_logs/index.ts b/src/plugins/home/server/tutorials/postgresql_logs/index.ts
index a628f422dfb72..bfcf64c809e54 100644
--- a/src/plugins/home/server/tutorials/postgresql_logs/index.ts
+++ b/src/plugins/home/server/tutorials/postgresql_logs/index.ts
@@ -58,7 +58,7 @@ export function postgresqlLogsSpecProvider(context: TutorialContext): TutorialSc
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/postgresql_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/postgresql_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts b/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts
index 4487a187fa373..7aa31fd6ff277 100644
--- a/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts
@@ -58,7 +58,7 @@ export function rabbitmqMetricsSpecProvider(context: TutorialContext): TutorialS
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/rabbitmq_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/rabbitmq_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/redis_logs/index.ts b/src/plugins/home/server/tutorials/redis_logs/index.ts
index bb5d902d089e2..a80513f57d15c 100644
--- a/src/plugins/home/server/tutorials/redis_logs/index.ts
+++ b/src/plugins/home/server/tutorials/redis_logs/index.ts
@@ -61,7 +61,7 @@ Note that the `slowlog` fileset is experimental. \
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/redis_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/redis_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/redis_metrics/index.ts b/src/plugins/home/server/tutorials/redis_metrics/index.ts
index d2e8ed1efb779..d9614639e7033 100644
--- a/src/plugins/home/server/tutorials/redis_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/redis_metrics/index.ts
@@ -54,7 +54,7 @@ export function redisMetricsSpecProvider(context: TutorialContext): TutorialSche
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/redis_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/redis_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/redisenterprise_metrics/index.ts b/src/plugins/home/server/tutorials/redisenterprise_metrics/index.ts
index 85d6dce9adc52..52394a5274dc1 100644
--- a/src/plugins/home/server/tutorials/redisenterprise_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/redisenterprise_metrics/index.ts
@@ -53,7 +53,7 @@ export function redisenterpriseMetricsSpecProvider(context: TutorialContext): Tu
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/redisenterprise_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/redisenterprise_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/santa_logs/index.ts b/src/plugins/home/server/tutorials/santa_logs/index.ts
index 65a7bb0bd26cb..1db34e2245535 100644
--- a/src/plugins/home/server/tutorials/santa_logs/index.ts
+++ b/src/plugins/home/server/tutorials/santa_logs/index.ts
@@ -56,7 +56,7 @@ export function santaLogsSpecProvider(context: TutorialContext): TutorialSchema
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/santa_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/santa_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/stan_metrics/index.ts b/src/plugins/home/server/tutorials/stan_metrics/index.ts
index 50f2b9dbd2e87..cb39bd5f91e34 100644
--- a/src/plugins/home/server/tutorials/stan_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/stan_metrics/index.ts
@@ -54,7 +54,7 @@ export function stanMetricsSpecProvider(context: TutorialContext): TutorialSchem
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/stan_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/stan_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/suricata_logs/index.ts b/src/plugins/home/server/tutorials/suricata_logs/index.ts
index a511be4a7a968..b60521b71452e 100644
--- a/src/plugins/home/server/tutorials/suricata_logs/index.ts
+++ b/src/plugins/home/server/tutorials/suricata_logs/index.ts
@@ -56,7 +56,7 @@ export function suricataLogsSpecProvider(context: TutorialContext): TutorialSche
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/suricata_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/suricata_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/home/server/tutorials/system_metrics/index.ts b/src/plugins/home/server/tutorials/system_metrics/index.ts
index 10a6c741721b8..7bbc341c47746 100644
--- a/src/plugins/home/server/tutorials/system_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/system_metrics/index.ts
@@ -56,7 +56,7 @@ It collects system wide statistics and statistics per process and filesystem. \
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/system_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/system_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/uptime_monitors/index.ts b/src/plugins/home/server/tutorials/uptime_monitors/index.ts
index 9015cb4783163..29610f603aed5 100644
--- a/src/plugins/home/server/tutorials/uptime_monitors/index.ts
+++ b/src/plugins/home/server/tutorials/uptime_monitors/index.ts
@@ -53,7 +53,7 @@ export function uptimeMonitorsSpecProvider(context: TutorialContext): TutorialSc
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/uptime_monitors/screenshot.png',
+ previewImagePath: '/plugins/home/assets/uptime_monitors/screenshot.webp',
onPrem: onPremInstructions([], context),
elasticCloud: cloudInstructions(context),
onPremElasticCloud: onPremCloudInstructions(context),
diff --git a/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts b/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts
index bb288ba72ab02..ff47974287c57 100644
--- a/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts
@@ -55,7 +55,7 @@ export function uwsgiMetricsSpecProvider(context: TutorialContext): TutorialSche
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/uwsgi_metrics/screenshot.png',
+ previewImagePath: '/plugins/home/assets/uwsgi_metrics/screenshot.webp',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, context),
diff --git a/src/plugins/home/server/tutorials/zeek_logs/index.ts b/src/plugins/home/server/tutorials/zeek_logs/index.ts
index 3eded8336df74..d61a265d7e79f 100644
--- a/src/plugins/home/server/tutorials/zeek_logs/index.ts
+++ b/src/plugins/home/server/tutorials/zeek_logs/index.ts
@@ -56,7 +56,7 @@ export function zeekLogsSpecProvider(context: TutorialContext): TutorialSchema {
},
},
completionTimeMinutes: 10,
- previewImagePath: '/plugins/home/assets/zeek_logs/screenshot.png',
+ previewImagePath: '/plugins/home/assets/zeek_logs/screenshot.webp',
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms, context),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms, context),
diff --git a/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts b/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts
index a6479bbbefeb0..8c8bda93ce13e 100644
--- a/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts
+++ b/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts
@@ -7,7 +7,8 @@
*/
import { findObjectByTitle } from './find_object_by_title';
-import { SimpleSavedObjectImpl, SavedObjectsClientContract, SavedObject } from '@kbn/core/public';
+import { SavedObjectsClientContract, SavedObject } from '@kbn/core/public';
+import { simpleSavedObjectMock } from '@kbn/core/public/mocks';
describe('findObjectByTitle', () => {
const savedObjectsClient: SavedObjectsClientContract = {} as SavedObjectsClientContract;
@@ -22,7 +23,7 @@ describe('findObjectByTitle', () => {
});
it('matches any case', async () => {
- const indexPattern = new SimpleSavedObjectImpl(savedObjectsClient, {
+ const indexPattern = simpleSavedObjectMock.create(savedObjectsClient, {
attributes: { title: 'foo' },
} as SavedObject);
savedObjectsClient.find = jest.fn().mockImplementation(() =>
diff --git a/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/handlebars.ts b/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/handlebars.ts
index 62b8c01c72880..9dbeb270a9d72 100644
--- a/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/handlebars.ts
+++ b/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/handlebars.ts
@@ -49,12 +49,13 @@ handlebars.registerHelper(
handlebars.registerHelper('date', (...args) => {
const values = args.slice(0, -1) as [string | Date, string | undefined];
+ const { hash } = args.slice(-1)[0] as Handlebars.HelperOptions;
// eslint-disable-next-line prefer-const
let [date, format] = values;
if (typeof date === 'undefined') throw new Error(`[date]: unknown variable`);
let momentDate: Moment | undefined;
if (typeof date === 'string') {
- momentDate = dateMath.parse(date);
+ momentDate = dateMath.parse(date, { roundUp: hash.roundUp === true });
if (!momentDate || !momentDate.isValid()) {
const ts = Number(date);
if (!Number.isNaN(ts)) {
diff --git a/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/url_template.test.ts b/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/url_template.test.ts
index fefbe03327956..1868f48d033c2 100644
--- a/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/url_template.test.ts
+++ b/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/url_template.test.ts
@@ -108,6 +108,13 @@ describe('date helper', () => {
);
});
+ test('can configure roundUp for dateMath', async () => {
+ const url = 'https://elastic.co/from={{date from}}&to={{date to roundUp=true}}';
+ expect(await compile(url, { from: 'now/d', to: 'now/d' })).toMatchInlineSnapshot(
+ `"https://elastic.co/from=2020-08-18T00:00:00.000Z&to=2020-08-18T23:59:59.999Z"`
+ );
+ });
+
test('can use format', async () => {
const url = 'https://elastic.co/{{date time "dddd, MMMM Do YYYY, h:mm:ss a"}}';
expect(await compile(url, { time: 'now' })).toMatchInlineSnapshot(
diff --git a/src/plugins/unified_search/public/__stories__/search_bar.stories.tsx b/src/plugins/unified_search/public/__stories__/search_bar.stories.tsx
index 551915a34b11f..bff5becf3c743 100644
--- a/src/plugins/unified_search/public/__stories__/search_bar.stories.tsx
+++ b/src/plugins/unified_search/public/__stories__/search_bar.stories.tsx
@@ -430,6 +430,24 @@ storiesOf('SearchBar', module)
showSubmitButton: false,
} as SearchBarProps)
)
+ .add('show only datepicker without submit', () =>
+ wrapSearchBarInContext({
+ showDatePicker: true,
+ showFilterBar: false,
+ showAutoRefreshOnly: false,
+ showQueryInput: false,
+ showSubmitButton: false,
+ } as SearchBarProps)
+ )
+ .add('show only query bar and timepicker without submit', () =>
+ wrapSearchBarInContext({
+ showDatePicker: true,
+ showFilterBar: false,
+ showAutoRefreshOnly: false,
+ showQueryInput: true,
+ showSubmitButton: false,
+ } as SearchBarProps)
+ )
.add('with filter bar on but pinning option is hidden from menus', () =>
wrapSearchBarInContext({
showDatePicker: false,
diff --git a/src/plugins/unified_search/public/dataview_picker/change_dataview.test.tsx b/src/plugins/unified_search/public/dataview_picker/change_dataview.test.tsx
index 3513900c68dd1..9a5f5bf565959 100644
--- a/src/plugins/unified_search/public/dataview_picker/change_dataview.test.tsx
+++ b/src/plugins/unified_search/public/dataview_picker/change_dataview.test.tsx
@@ -14,7 +14,6 @@ import { findTestSubject } from '@elastic/eui/lib/test';
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
import { dataPluginMock } from '@kbn/data-plugin/public/mocks';
import { ChangeDataView } from './change_dataview';
-import { EuiTourStep } from '@elastic/eui';
import { DataViewPickerPropsExtended, TextBasedLanguages } from '.';
describe('DataView component', () => {
@@ -83,25 +82,6 @@ describe('DataView component', () => {
onTextLangQuerySubmit: jest.fn(),
};
});
- it('should not render the tour component by default', async () => {
- await act(async () => {
- const component = mount(wrapDataViewComponentInContext(props, true));
- expect(component.find(EuiTourStep).prop('isStepOpen')).toBe(false);
- });
- });
- it('should render the tour component if the showNewMenuTour is true', async () => {
- const component = mount(
- wrapDataViewComponentInContext({ ...props, showNewMenuTour: true }, false)
- );
- expect(component.find(EuiTourStep).prop('isStepOpen')).toBe(true);
- });
-
- it('should not render the tour component if the showNewMenuTour is true but the hideAnnouncements setting is on', async () => {
- const component = mount(
- wrapDataViewComponentInContext({ ...props, showNewMenuTour: true }, false, true)
- );
- expect(component.find(EuiTourStep).prop('isStepOpen')).toBe(false);
- });
it('should not render the add runtime field menu if addField is not given', async () => {
await act(async () => {
@@ -114,10 +94,7 @@ describe('DataView component', () => {
it('should render the add runtime field menu if addField is given', async () => {
const addFieldSpy = jest.fn();
const component = mount(
- wrapDataViewComponentInContext(
- { ...props, onAddField: addFieldSpy, showNewMenuTour: true },
- false
- )
+ wrapDataViewComponentInContext({ ...props, onAddField: addFieldSpy }, false)
);
findTestSubject(component, 'dataview-trigger').simulate('click');
expect(component.find('[data-test-subj="indexPattern-add-field"]').at(0).text()).toContain(
@@ -138,10 +115,7 @@ describe('DataView component', () => {
it('should render the add datavuew menu if onDataViewCreated is given', async () => {
const addDataViewSpy = jest.fn();
const component = mount(
- wrapDataViewComponentInContext(
- { ...props, onDataViewCreated: addDataViewSpy, showNewMenuTour: true },
- false
- )
+ wrapDataViewComponentInContext({ ...props, onDataViewCreated: addDataViewSpy }, false)
);
findTestSubject(component, 'dataview-trigger').simulate('click');
expect(component.find('[data-test-subj="dataview-create-new"]').at(0).text()).toContain(
@@ -156,7 +130,6 @@ describe('DataView component', () => {
wrapDataViewComponentInContext(
{
...props,
- showNewMenuTour: true,
textBasedLanguages: [TextBasedLanguages.ESQL, TextBasedLanguages.SQL],
textBasedLanguage: TextBasedLanguages.SQL,
},
diff --git a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx
index d2762f0d27b2f..39ccfb44e7def 100644
--- a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx
+++ b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx
@@ -18,9 +18,7 @@ import {
useEuiTheme,
useGeneratedHtmlId,
EuiIcon,
- EuiLink,
EuiText,
- EuiTourStep,
EuiContextMenuPanelProps,
EuiFlexGroup,
EuiFlexItem,
@@ -36,31 +34,9 @@ import type { TextBasedLanguagesListProps } from './text_languages_list';
import type { TextBasedLanguagesTransitionModalProps } from './text_languages_transition_modal';
import { changeDataViewStyles } from './change_dataview.styles';
-const hideAnnouncementsUISetting = 'hideAnnouncements';
-// local storage key for the tour component
-const NEW_DATA_VIEW_MENU_STORAGE_KEY = 'data.newDataViewMenu';
// local storage key for the text based languages transition modal
const TEXT_LANG_TRANSITION_MODAL_KEY = 'data.textLangTransitionModal';
-const newMenuTourTitle = i18n.translate('unifiedSearch.query.dataViewMenu.newMenuTour.title', {
- defaultMessage: 'A better data view menu',
-});
-
-const newMenuTourDescription = i18n.translate(
- 'unifiedSearch.query.dataViewMenu.newMenuTour.description',
- {
- defaultMessage:
- 'This menu now offers all the tools you need to create, find, and edit your data views.',
- }
-);
-
-const newMenuTourDismissLabel = i18n.translate(
- 'unifiedSearch.query.dataViewMenu.newMenuTour.dismissLabel',
- {
- defaultMessage: 'Got it',
- }
-);
-
const Fallback = () =>
;
const LazyTextBasedLanguagesTransitionModal = React.lazy(
@@ -89,7 +65,6 @@ export function ChangeDataView({
onDataViewCreated,
trigger,
selectableProps,
- showNewMenuTour = false,
textBasedLanguages,
onSaveTextLanguageQuery,
onTextLangQuerySubmit,
@@ -106,40 +81,11 @@ export function ChangeDataView({
const [selectedDataViewId, setSelectedDataViewId] = useState(currentDataViewId);
const kibana = useKibana();
- const { application, data, storage, uiSettings } = kibana.services;
+ const { application, data, storage } = kibana.services;
const styles = changeDataViewStyles({ fullWidth: trigger.fullWidth });
const [isTextLangTransitionModalDismissed, setIsTextLangTransitionModalDismissed] = useState(() =>
Boolean(storage.get(TEXT_LANG_TRANSITION_MODAL_KEY))
);
- const isHideAnnouncementSettingsOn = Boolean(uiSettings.get(hideAnnouncementsUISetting));
-
- const [isTourDismissed, setIsTourDismissed] = useState(() =>
- Boolean(storage.get(NEW_DATA_VIEW_MENU_STORAGE_KEY))
- );
- const [isTourOpen, setIsTourOpen] = useState(false);
-
- useEffect(() => {
- if (
- showNewMenuTour &&
- !isTourDismissed &&
- !isHideAnnouncementSettingsOn &&
- !isTextBasedLangSelected
- ) {
- setIsTourOpen(true);
- }
- }, [
- isHideAnnouncementSettingsOn,
- isTextBasedLangSelected,
- isTourDismissed,
- setIsTourOpen,
- showNewMenuTour,
- ]);
-
- const onTourDismiss = () => {
- storage.set(NEW_DATA_VIEW_MENU_STORAGE_KEY, true);
- setIsTourDismissed(true);
- setIsTourOpen(false);
- };
// Create a reusable id to ensure search input is the first focused item in the popover even though it's not the first item
const searchListInputId = useGeneratedHtmlId({ prefix: 'dataviewPickerListSearchInput' });
@@ -176,8 +122,6 @@ export function ChangeDataView({
data-test-subj={dataTestSubj}
onClick={() => {
setPopoverIsOpen(!isPopoverOpen);
- setIsTourOpen(false);
- // onTourDismiss(); TODO: Decide if opening the menu should also dismiss the tour
}}
color={isMissingCurrent ? 'danger' : 'primary'}
iconSide="right"
@@ -427,47 +371,23 @@ export function ChangeDataView({
return (
<>
-
- {newMenuTourTitle}
- >
- }
- content={
-
- {newMenuTourDescription}
-
- }
- isStepOpen={isTourOpen}
- onFinish={onTourDismiss}
- step={1}
- stepsTotal={1}
- footerAction={
-
- {newMenuTourDismissLabel}
-
- }
- repositionOnScroll
+ setPopoverIsOpen(false)}
+ panelPaddingSize="none"
+ initialFocus={!isTextBasedLangSelected ? `#${searchListInputId}` : false}
display="block"
+ buffer={8}
>
- setPopoverIsOpen(false)}
- panelPaddingSize="none"
- initialFocus={!isTextBasedLangSelected ? `#${searchListInputId}` : false}
- display="block"
- buffer={8}
- >
-
-
-
-
-
+
+
+
+
{modal}
>
);
diff --git a/src/plugins/unified_search/public/dataview_picker/index.tsx b/src/plugins/unified_search/public/dataview_picker/index.tsx
index 40ced3b6f4d47..82909714cffad 100644
--- a/src/plugins/unified_search/public/dataview_picker/index.tsx
+++ b/src/plugins/unified_search/public/dataview_picker/index.tsx
@@ -58,10 +58,6 @@ export interface DataViewPickerProps {
* Also works as a flag to show the create dataview button.
*/
onDataViewCreated?: () => void;
- /**
- * Flag to show the tour component for the first time.
- */
- showNewMenuTour?: boolean;
/**
* List of the supported text based languages (SQL, ESQL) etc.
* Defined per application, if not provided, no text based languages
@@ -93,7 +89,6 @@ export const DataViewPicker = ({
onDataViewCreated,
trigger,
selectableProps,
- showNewMenuTour,
textBasedLanguages,
onSaveTextLanguageQuery,
onTextLangQuerySubmit,
@@ -108,7 +103,6 @@ export const DataViewPicker = ({
onDataViewCreated={onDataViewCreated}
trigger={trigger}
selectableProps={selectableProps}
- showNewMenuTour={showNewMenuTour}
textBasedLanguages={textBasedLanguages}
onSaveTextLanguageQuery={onSaveTextLanguageQuery}
onTextLangQuerySubmit={onTextLangQuerySubmit}
diff --git a/src/plugins/unified_search/public/query_string_input/query_bar_top_row.test.tsx b/src/plugins/unified_search/public/query_string_input/query_bar_top_row.test.tsx
index fd1ea2e9bce78..1f879ebcae9a8 100644
--- a/src/plugins/unified_search/public/query_string_input/query_bar_top_row.test.tsx
+++ b/src/plugins/unified_search/public/query_string_input/query_bar_top_row.test.tsx
@@ -113,6 +113,7 @@ function wrapQueryBarTopRowInContext(testProps: any) {
describe('QueryBarTopRowTopRow', () => {
const QUERY_INPUT_SELECTOR = 'QueryStringInputUI';
const TIMEPICKER_SELECTOR = 'Memo(EuiSuperDatePicker)';
+ const REFRESH_BUTTON_SELECTOR = 'EuiSuperUpdateButton';
const TIMEPICKER_DURATION = '[data-shared-timefilter-duration]';
beforeEach(() => {
@@ -195,6 +196,23 @@ describe('QueryBarTopRowTopRow', () => {
expect(component.find(TIMEPICKER_SELECTOR).length).toBe(1);
});
+ it('Should render timepicker without the submit button if showSubmitButton is false', () => {
+ const component = mount(
+ wrapQueryBarTopRowInContext({
+ isDirty: false,
+ screenTitle: 'Another Screen',
+ showDatePicker: true,
+ showSubmitButton: false,
+ dateRangeFrom: 'now-7d',
+ dateRangeTo: 'now',
+ timeHistory: mockTimeHistory,
+ })
+ );
+
+ expect(component.find(REFRESH_BUTTON_SELECTOR).length).toBe(0);
+ expect(component.find(TIMEPICKER_SELECTOR).length).toBe(1);
+ });
+
it('Should render the timefilter duration container for sharing', () => {
const component = mount(
wrapQueryBarTopRowInContext({
diff --git a/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx b/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx
index 22c6765368c42..acad2a39d4c4f 100644
--- a/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx
+++ b/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx
@@ -375,10 +375,9 @@ export const QueryBarTopRow = React.memo(
}
function renderUpdateButton() {
- if (!shouldRenderUpdatebutton()) {
+ if (!shouldRenderUpdatebutton() && !shouldRenderDatePicker()) {
return null;
}
-
const buttonLabelUpdate = i18n.translate('unifiedSearch.queryBarTopRow.submitButton.update', {
defaultMessage: 'Needs updating',
});
@@ -421,7 +420,8 @@ export const QueryBarTopRow = React.memo(
);
- if (!shouldRenderDatePicker()) {
+ // allows to render the button without the datepicker
+ if (!shouldRenderDatePicker() && shouldRenderUpdatebutton()) {
return button;
}
@@ -429,8 +429,8 @@ export const QueryBarTopRow = React.memo(
- {renderDatePicker()}
- {button}
+ {shouldRenderDatePicker() ? renderDatePicker() : null}
+ {shouldRenderUpdatebutton() ? button : null}
@@ -447,7 +447,6 @@ export const QueryBarTopRow = React.memo(
return (
= {
test1: { id: 'test1', title: 'test1', timeFieldName: 'timeField1' } as DataView,
@@ -60,13 +60,13 @@ const model = {
],
} as Panel;
-describe('triggerTSVBtoLensConfiguration', () => {
+describe('convertTSVBtoLensConfiguration', () => {
test('should return null for a non timeseries chart', async () => {
const metricModel = {
...model,
type: 'metric',
} as Panel;
- const triggerOptions = await triggerTSVBtoLensConfiguration(metricModel);
+ const triggerOptions = await convertTSVBtoLensConfiguration(metricModel);
expect(triggerOptions).toBeNull();
});
@@ -75,7 +75,7 @@ describe('triggerTSVBtoLensConfiguration', () => {
...model,
use_kibana_indexes: false,
};
- const triggerOptions = await triggerTSVBtoLensConfiguration(stringIndexPatternModel);
+ const triggerOptions = await convertTSVBtoLensConfiguration(stringIndexPatternModel);
expect(triggerOptions).toBeNull();
});
@@ -93,12 +93,12 @@ describe('triggerTSVBtoLensConfiguration', () => {
},
],
};
- const triggerOptions = await triggerTSVBtoLensConfiguration(nonSupportedAggModel);
+ const triggerOptions = await convertTSVBtoLensConfiguration(nonSupportedAggModel);
expect(triggerOptions).toBeNull();
});
test('should return options for a supported aggregation', async () => {
- const triggerOptions = await triggerTSVBtoLensConfiguration(model);
+ const triggerOptions = await convertTSVBtoLensConfiguration(model);
expect(triggerOptions).toStrictEqual({
configuration: {
extents: { yLeftExtent: { mode: 'full' }, yRightExtent: { mode: 'full' } },
@@ -152,7 +152,7 @@ describe('triggerTSVBtoLensConfiguration', () => {
},
],
};
- const triggerOptions = await triggerTSVBtoLensConfiguration(modelWithFill);
+ const triggerOptions = await convertTSVBtoLensConfiguration(modelWithFill);
expect(triggerOptions?.layers[0].chartType).toBe('area');
});
@@ -166,7 +166,7 @@ describe('triggerTSVBtoLensConfiguration', () => {
},
],
};
- const triggerOptions = await triggerTSVBtoLensConfiguration(modelWithFill);
+ const triggerOptions = await convertTSVBtoLensConfiguration(modelWithFill);
expect(triggerOptions?.layers[0]?.metrics?.[0]?.params?.shift).toBe('1h');
});
@@ -183,7 +183,7 @@ describe('triggerTSVBtoLensConfiguration', () => {
},
],
};
- const triggerOptions = await triggerTSVBtoLensConfiguration(modelWithFill);
+ const triggerOptions = await convertTSVBtoLensConfiguration(modelWithFill);
expect(triggerOptions?.layers[0]?.metrics?.[0]?.params?.kql).toBe('test');
});
@@ -207,7 +207,7 @@ describe('triggerTSVBtoLensConfiguration', () => {
},
],
};
- const triggerOptions = await triggerTSVBtoLensConfiguration(modelWithSplitFilters);
+ const triggerOptions = await convertTSVBtoLensConfiguration(modelWithSplitFilters);
expect(triggerOptions?.layers[0]?.splitFilters).toStrictEqual([
{
color: 'rgba(188,0,85,1)',
@@ -240,7 +240,7 @@ describe('triggerTSVBtoLensConfiguration', () => {
},
] as unknown as Series[],
};
- const triggerOptions = await triggerTSVBtoLensConfiguration(modelWithTerms);
+ const triggerOptions = await convertTSVBtoLensConfiguration(modelWithTerms);
expect(triggerOptions?.layers[0]?.collapseFn).toStrictEqual('sum');
expect(triggerOptions?.layers[0]?.termsParams).toStrictEqual({
size: 6,
@@ -269,7 +269,7 @@ describe('triggerTSVBtoLensConfiguration', () => {
},
] as unknown as Series[],
};
- const triggerOptions = await triggerTSVBtoLensConfiguration(modelWithTerms);
+ const triggerOptions = await convertTSVBtoLensConfiguration(modelWithTerms);
expect(triggerOptions?.layers[0]?.termsParams).toStrictEqual({
size: 6,
otherBucket: false,
@@ -289,7 +289,7 @@ describe('triggerTSVBtoLensConfiguration', () => {
...model,
interval: '1h',
};
- const triggerOptions = await triggerTSVBtoLensConfiguration(modelWithTerms);
+ const triggerOptions = await convertTSVBtoLensConfiguration(modelWithTerms);
expect(triggerOptions?.layers[0]?.timeInterval).toBe('1h');
});
@@ -298,7 +298,7 @@ describe('triggerTSVBtoLensConfiguration', () => {
...model,
drop_last_bucket: 1,
};
- const triggerOptions = await triggerTSVBtoLensConfiguration(modelWithDropBuckets);
+ const triggerOptions = await convertTSVBtoLensConfiguration(modelWithDropBuckets);
expect(triggerOptions?.layers[0]?.dropPartialBuckets).toBe(true);
});
@@ -311,7 +311,7 @@ describe('triggerTSVBtoLensConfiguration', () => {
show_grid: 1,
series: [{ ...model.series[0], fill: '0.3', separate_axis: 1, axis_position: 'right' }],
};
- const triggerOptions = await triggerTSVBtoLensConfiguration(modelWithConfig);
+ const triggerOptions = await convertTSVBtoLensConfiguration(modelWithConfig);
expect(triggerOptions).toStrictEqual({
configuration: {
extents: { yLeftExtent: { mode: 'full' }, yRightExtent: { mode: 'full' } },
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/index.ts
new file mode 100644
index 0000000000000..071001381f0f1
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/index.ts
@@ -0,0 +1,39 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type { Panel } from '../../common/types';
+import { PANEL_TYPES } from '../../common/enums';
+import { ConvertTsvbToLensVisualization } from './types';
+
+const getConvertFnByType = (
+ type: PANEL_TYPES
+): Promise | undefined => {
+ const convertionFns: { [key in PANEL_TYPES]?: () => Promise } = {
+ [PANEL_TYPES.TIMESERIES]: async () => {
+ const { convertToLens } = await import('./timeseries');
+ return convertToLens;
+ },
+ };
+
+ return convertionFns[type]?.();
+};
+
+/*
+ * This function is used to convert the TSVB model to compatible Lens model.
+ * Returns the Lens model, only if it is supported. If not, it returns null.
+ * In case of null, the menu item is disabled and the user can't navigate to Lens.
+ */
+export const convertTSVBtoLensConfiguration = async (model: Panel) => {
+ // Disables the option for not timeseries charts, for the string mode and for series with annotations
+ if (!model.use_kibana_indexes || (model.annotations && model.annotations.length > 0)) {
+ return null;
+ }
+ const convertFn = await getConvertFnByType(model.type);
+
+ return (await convertFn?.(model)) ?? null;
+};
diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/get_datasource_info.test.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts
similarity index 75%
rename from src/plugins/vis_types/timeseries/public/trigger_action/get_datasource_info.test.ts
rename to src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts
index 8405a685122ed..33052a25190d1 100644
--- a/src/plugins/vis_types/timeseries/public/trigger_action/get_datasource_info.test.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts
@@ -5,8 +5,10 @@
* 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 type { DataView } from '@kbn/data-plugin/common';
import { getDataSourceInfo } from './get_datasource_info';
+
const dataViewsMap: Record = {
test1: { id: 'test1', title: 'test1', timeFieldName: 'timeField1' } as DataView,
test2: {
@@ -17,27 +19,26 @@ const dataViewsMap: Record = {
test3: { id: 'test3', title: 'test3', timeFieldName: 'timeField3' } as DataView,
};
-const getDataview = (id: string): DataView | undefined => dataViewsMap[id];
-jest.mock('../services', () => {
- return {
- getDataViewsStart: jest.fn(() => {
- return {
- getDefault: jest.fn(() => {
- return { id: '12345', title: 'default', timeFieldName: '@timestamp' };
- }),
- get: getDataview,
- };
- }),
- };
-});
+const getDataview = async (id: string): Promise => dataViewsMap[id];
describe('getDataSourceInfo', () => {
+ let dataViews: DataViewsPublicPluginStart;
+ beforeAll(() => {
+ dataViews = {
+ getDefault: jest.fn(async () => {
+ return { id: '12345', title: 'default', timeFieldName: '@timestamp' };
+ }),
+ get: getDataview,
+ } as unknown as DataViewsPublicPluginStart;
+ });
+
test('should return the default dataview if model_indexpattern is string', async () => {
const { indexPatternId, timeField } = await getDataSourceInfo(
'test',
undefined,
false,
- undefined
+ undefined,
+ dataViews
);
expect(indexPatternId).toBe('12345');
expect(timeField).toBe('@timestamp');
@@ -48,7 +49,8 @@ describe('getDataSourceInfo', () => {
{ id: 'dataview-1-id' },
'timeField-1',
false,
- undefined
+ undefined,
+ dataViews
);
expect(indexPatternId).toBe('dataview-1-id');
expect(timeField).toBe('timeField-1');
@@ -59,7 +61,8 @@ describe('getDataSourceInfo', () => {
{ id: 'dataview-1-id' },
'timeField-1',
true,
- { id: 'test2' }
+ { id: 'test2' },
+ dataViews
);
expect(indexPatternId).toBe('test2');
expect(timeField).toBe('timeField2');
diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/get_datasource_info.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.ts
similarity index 78%
rename from src/plugins/vis_types/timeseries/public/trigger_action/get_datasource_info.ts
rename to src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.ts
index b5c9addd81435..8377ddafe1926 100644
--- a/src/plugins/vis_types/timeseries/public/trigger_action/get_datasource_info.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.ts
@@ -5,17 +5,20 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
-import { fetchIndexPattern, isStringTypeIndexPattern } from '../../common/index_patterns_utils';
-import type { IndexPatternValue } from '../../common/types';
-import { getDataViewsStart } from '../services';
+import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
+import {
+ fetchIndexPattern,
+ isStringTypeIndexPattern,
+} from '../../../../common/index_patterns_utils';
+import type { IndexPatternValue } from '../../../../common/types';
export const getDataSourceInfo = async (
modelIndexPattern: IndexPatternValue,
modelTimeField: string | undefined,
isOverwritten: boolean,
- overwrittenIndexPattern: IndexPatternValue | undefined
+ overwrittenIndexPattern: IndexPatternValue | undefined,
+ dataViews: DataViewsPublicPluginStart
) => {
- const dataViews = getDataViewsStart();
let indexPatternId =
modelIndexPattern && !isStringTypeIndexPattern(modelIndexPattern) ? modelIndexPattern.id : '';
diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/get_field_type.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_field_type.ts
similarity index 62%
rename from src/plugins/vis_types/timeseries/public/trigger_action/get_field_type.ts
rename to src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_field_type.ts
index 9e508f895e914..07ab80fd33ec1 100644
--- a/src/plugins/vis_types/timeseries/public/trigger_action/get_field_type.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_field_type.ts
@@ -5,11 +5,14 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
-import { getDataViewsStart } from '../services';
+import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
-export const getFieldType = async (indexPatternId: string, fieldName: string) => {
- const dataViews = getDataViewsStart();
+export const getFieldType = async (
+ indexPatternId: string,
+ fieldName: string,
+ dataViews: DataViewsPublicPluginStart
+) => {
const dataView = await dataViews.get(indexPatternId);
- const field = await dataView.getFieldByName(fieldName);
+ const field = dataView.getFieldByName(fieldName);
return field?.type;
};
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/index.ts
new file mode 100644
index 0000000000000..befb8af63a745
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/index.ts
@@ -0,0 +1,10 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+export * from './get_datasource_info';
+export * from './get_field_type';
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/formatters/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/formatters/index.ts
new file mode 100644
index 0000000000000..04d55dd0ba52e
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/formatters/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 { SUPPORTED_FORMATTERS } from './supported_formatters';
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/formatters/supported_formatters.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/formatters/supported_formatters.ts
new file mode 100644
index 0000000000000..8c92686933de7
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/formatters/supported_formatters.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 const SUPPORTED_FORMATTERS = ['bytes', 'percent', 'number'];
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/layers/get_layer.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/layers/get_layer.ts
new file mode 100644
index 0000000000000..8483c6f2c3191
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/layers/get_layer.ts
@@ -0,0 +1,76 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { VisualizeEditorLayersContext } from '@kbn/visualizations-plugin/public';
+import { PaletteOutput } from '@kbn/coloring';
+import { SUPPORTED_FORMATTERS } from '../formatters';
+import { convertSplitFilters } from '../split_chart';
+import { convertMetrics, convertFilter } from '../metrics';
+import type { Panel, Series } from '../../../../common/types';
+import { VisSeries } from '../series';
+
+function getTermParams(layer: Series) {
+ return {
+ size: layer.terms_size ?? 10,
+ ...(layer.terms_include && { include: [layer.terms_include] }),
+ includeIsRegex: Boolean(layer.terms_include),
+ ...(layer.terms_exclude && { exclude: [layer.terms_exclude] }),
+ excludeIsRegex: Boolean(layer.terms_exclude),
+ otherBucket: false,
+ orderDirection: layer.terms_direction ?? 'desc',
+ orderBy: layer.terms_order_by === '_key' ? { type: 'alphabetical' } : { type: 'column' },
+ parentFormat: { id: 'terms' },
+ };
+}
+
+function getPalette(palette: PaletteOutput): PaletteOutput {
+ return !palette || palette.name === 'gradient' || palette.name === 'rainbow'
+ ? { name: 'default', type: 'palette' }
+ : palette;
+}
+
+export const getLayerConfiguration = (
+ indexPatternId: string,
+ layerIdx: number,
+ chartType: string,
+ model: Panel,
+ series: VisSeries,
+ splitFields: string[],
+ timeField?: string,
+ splitWithDateHistogram?: boolean
+): VisualizeEditorLayersContext => {
+ const layer = model.series[layerIdx];
+ const palette = layer.palette as PaletteOutput;
+ const splitFilters = convertSplitFilters(layer);
+ const { metrics: metricsArray, seriesAgg } = series;
+ const filter = convertFilter(layer);
+ const metrics = convertMetrics(layer, metricsArray, filter);
+ return {
+ indexPatternId,
+ timeFieldName: timeField,
+ chartType,
+ axisPosition: layer.separate_axis ? layer.axis_position : model.axis_position,
+ ...(layer.terms_field && { splitFields }),
+ splitWithDateHistogram,
+ ...(layer.split_mode !== 'everything' && { splitMode: layer.split_mode }),
+ ...(splitFilters.length > 0 && { splitFilters }),
+ // for non supported palettes, we will use the default palette
+ palette: getPalette(palette),
+ ...(layer.split_mode === 'terms' && {
+ termsParams: getTermParams(layer),
+ }),
+ collapseFn: seriesAgg,
+ metrics,
+ timeInterval: model.interval && !model.interval?.includes('=') ? model.interval : 'auto',
+ ...(SUPPORTED_FORMATTERS.includes(layer.formatter) && { format: layer.formatter }),
+ ...(layer.label && { label: layer.label }),
+ dropPartialBuckets: layer.override_index_pattern
+ ? layer.series_drop_last_bucket > 0
+ : model.drop_last_bucket > 0,
+ };
+};
diff --git a/packages/kbn-dev-utils/src/vscode_config/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/layers/index.ts
similarity index 88%
rename from packages/kbn-dev-utils/src/vscode_config/index.ts
rename to src/plugins/vis_types/timeseries/public/convert_to_lens/lib/layers/index.ts
index 1b08881273edc..eaef2f964f94a 100644
--- a/packages/kbn-dev-utils/src/vscode_config/index.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/layers/index.ts
@@ -6,4 +6,4 @@
* Side Public License, v 1.
*/
-export * from './update_vscode_config_cli';
+export * from './get_layer';
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/filter_ratio_formula.test.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/filter_ratio_formula.test.ts
new file mode 100644
index 0000000000000..1d5ae66ce958b
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/filter_ratio_formula.test.ts
@@ -0,0 +1,53 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type { Metric } from '../../../../common/types';
+import { getFilterRatioFormula } from './filter_ratio_formula';
+
+describe('getFilterRatioFormula', () => {
+ test('should return correct formula for filter ratio', () => {
+ const metric = {
+ id: '12345',
+ type: 'filter_ratio',
+ field: 'day_of_week_i',
+ numerator: {
+ query: 'category.keyword : "Men\'s Clothing" ',
+ language: 'kuery',
+ },
+ denominator: {
+ query: 'customer_gender : "FEMALE" ',
+ language: 'kuery',
+ },
+ } as Metric;
+ const formula = getFilterRatioFormula(metric);
+ expect(formula).toStrictEqual(
+ "count(kql='category.keyword : \"Men\\'s Clothing\" ') / count(kql='customer_gender : \"FEMALE\" ')"
+ );
+ });
+
+ test('should return correct formula for positive rate', () => {
+ const metric = {
+ id: '12345',
+ type: 'filter_ratio',
+ field: 'day_of_week_i',
+ numerator: {
+ query: 'category.keyword : "Men\'s Clothing" ',
+ language: 'kuery',
+ },
+ denominator: {
+ query: 'customer_gender : "FEMALE" ',
+ language: 'kuery',
+ },
+ metric_agg: 'positive_rate',
+ } as Metric;
+ const formula = getFilterRatioFormula(metric);
+ expect(formula).toStrictEqual(
+ "counter_rate(max('day_of_week_i',kql='category.keyword : \"Men\\'s Clothing\" ')) / counter_rate(max('day_of_week_i',kql='customer_gender : \"FEMALE\" '))"
+ );
+ });
+});
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/filter_ratio_formula.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/filter_ratio_formula.ts
new file mode 100644
index 0000000000000..a132b861889fa
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/filter_ratio_formula.ts
@@ -0,0 +1,53 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type { Query } from '@kbn/es-query';
+import type { Metric } from '../../../../common/types';
+import { SUPPORTED_METRICS } from './supported_metrics';
+
+const escapeQuotes = (str: string) => {
+ return str?.replace(/'/g, "\\'");
+};
+
+const constructFilterRationFormula = (operation: string, metric?: Query) => {
+ return `${operation}${metric?.language === 'lucene' ? 'lucene' : 'kql'}='${
+ metric?.query && typeof metric?.query === 'string'
+ ? escapeQuotes(metric?.query)
+ : metric?.query ?? '*'
+ }')`;
+};
+
+export const getFilterRatioFormula = (currentMetric: Metric) => {
+ // eslint-disable-next-line @typescript-eslint/naming-convention
+ const { numerator, denominator, metric_agg, field } = currentMetric;
+ let aggregation = SUPPORTED_METRICS.count;
+ if (metric_agg) {
+ aggregation = SUPPORTED_METRICS[metric_agg];
+ if (!aggregation) {
+ return null;
+ }
+ }
+ const operation =
+ metric_agg && metric_agg !== 'count' ? `${aggregation.name}('${field}',` : 'count(';
+
+ if (aggregation.name === 'counter_rate') {
+ const numeratorFormula = constructFilterRationFormula(
+ `${aggregation.name}(max('${field}',`,
+ numerator
+ );
+ const denominatorFormula = constructFilterRationFormula(
+ `${aggregation.name}(max('${field}',`,
+ denominator
+ );
+ return `${numeratorFormula}) / ${denominatorFormula})`;
+ } else {
+ const numeratorFormula = constructFilterRationFormula(operation, numerator);
+ const denominatorFormula = constructFilterRationFormula(operation, denominator);
+ return `${numeratorFormula} / ${denominatorFormula}`;
+ }
+};
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/index.ts
new file mode 100644
index 0000000000000..9a79fb804e3ba
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/index.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 * from './supported_metrics';
+export * from './metrics_helpers';
+export * from './metrics_converter';
+export * from './parent_pipeline_formula';
+export * from './sibling_pipeline_formula';
+export * from './filter_ratio_formula';
+export * from './parent_pipeline_series';
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/metrics_converter.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/metrics_converter.ts
new file mode 100644
index 0000000000000..65427bfa2a268
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/metrics_converter.ts
@@ -0,0 +1,45 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { VisualizeEditorLayersContext } from '@kbn/visualizations-plugin/public';
+import { Series } from '../../../../common/types';
+import { Filter } from '../../types';
+
+export const convertFilter = (series: Series): Filter | void => {
+ if (!series.filter) {
+ return;
+ }
+
+ if (series.filter.language === 'kuery') {
+ return { kql: series.filter.query };
+ }
+
+ if (series.filter.language === 'lucene') {
+ return { lucene: series.filter.query };
+ }
+};
+
+const convertMetric = (
+ series: Series,
+ metric: VisualizeEditorLayersContext['metrics'][number],
+ filter: Filter | void
+) => ({
+ ...metric,
+ color: metric.color ?? series.color,
+ params: {
+ ...metric.params,
+ ...(series.offset_time && { shift: series.offset_time }),
+ ...(filter && filter),
+ },
+});
+
+export const convertMetrics = (
+ series: Series,
+ metrics: VisualizeEditorLayersContext['metrics'],
+ filter: Filter | void
+) => metrics.map((metric) => convertMetric(series, metric, filter));
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/metrics_helpers.test.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/metrics_helpers.test.ts
new file mode 100644
index 0000000000000..83922a54aa111
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/metrics_helpers.test.ts
@@ -0,0 +1,110 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 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 { Metric } from '../../../../common/types';
+import { getPercentilesSeries, getPercentileRankSeries } from './metrics_helpers';
+
+describe('getPercentilesSeries', () => {
+ test('should return correct config for multiple percentiles', () => {
+ const percentiles = [
+ {
+ color: '#68BC00',
+ id: 'aef159f0-7db8-11ec-9d0c-e57521cec076',
+ mode: 'line',
+ shade: 0.2,
+ value: 50,
+ },
+ {
+ color: 'rgba(0,63,188,1)',
+ id: 'b0e0a6d0-7db8-11ec-9d0c-e57521cec076',
+ mode: 'line',
+ percentile: '',
+ shade: 0.2,
+ value: '70',
+ },
+ {
+ color: 'rgba(188,38,0,1)',
+ id: 'b2e04760-7db8-11ec-9d0c-e57521cec076',
+ mode: 'line',
+ percentile: '',
+ shade: 0.2,
+ value: '80',
+ },
+ {
+ color: 'rgba(188,0,3,1)',
+ id: 'b503eab0-7db8-11ec-9d0c-e57521cec076',
+ mode: 'line',
+ percentile: '',
+ shade: 0.2,
+ value: '90',
+ },
+ ] as Metric['percentiles'];
+ const config = getPercentilesSeries(percentiles, 'bytes');
+ expect(config).toStrictEqual([
+ {
+ agg: 'percentile',
+ color: '#68BC00',
+ fieldName: 'bytes',
+ isFullReference: false,
+ params: { percentile: 50 },
+ },
+ {
+ agg: 'percentile',
+ color: 'rgba(0,63,188,1)',
+ fieldName: 'bytes',
+ isFullReference: false,
+ params: { percentile: '70' },
+ },
+ {
+ agg: 'percentile',
+ color: 'rgba(188,38,0,1)',
+ fieldName: 'bytes',
+ isFullReference: false,
+ params: { percentile: '80' },
+ },
+ {
+ agg: 'percentile',
+ color: 'rgba(188,0,3,1)',
+ fieldName: 'bytes',
+ isFullReference: false,
+ params: { percentile: '90' },
+ },
+ ]);
+ });
+});
+
+describe('getPercentileRankSeries', () => {
+ test('should return correct config for multiple percentile ranks', () => {
+ const values = ['1', '5', '7'] as Metric['values'];
+ const colors = ['#68BC00', 'rgba(0,63,188,1)', 'rgba(188,38,0,1)'] as Metric['colors'];
+ const config = getPercentileRankSeries(values, colors, 'day_of_week_i');
+ expect(config).toStrictEqual([
+ {
+ agg: 'percentile_rank',
+ color: '#68BC00',
+ fieldName: 'day_of_week_i',
+ isFullReference: false,
+ params: { value: '1' },
+ },
+ {
+ agg: 'percentile_rank',
+ color: 'rgba(0,63,188,1)',
+ fieldName: 'day_of_week_i',
+ isFullReference: false,
+ params: { value: '5' },
+ },
+ {
+ agg: 'percentile_rank',
+ color: 'rgba(188,38,0,1)',
+ fieldName: 'day_of_week_i',
+ isFullReference: false,
+ params: { value: '7' },
+ },
+ ]);
+ });
+});
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/metrics_helpers.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/metrics_helpers.ts
new file mode 100644
index 0000000000000..fdc7f4ca2f6d0
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/metrics_helpers.ts
@@ -0,0 +1,129 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type { Metric } from '../../../../common/types';
+import { SUPPORTED_METRICS } from './supported_metrics';
+import { getFilterRatioFormula } from './filter_ratio_formula';
+import { getParentPipelineSeriesFormula } from './parent_pipeline_formula';
+import { getSiblingPipelineSeriesFormula } from './sibling_pipeline_formula';
+
+export const getPercentilesSeries = (percentiles: Metric['percentiles'], fieldName?: string) => {
+ return percentiles?.map((percentile) => {
+ return {
+ agg: 'percentile',
+ isFullReference: false,
+ color: percentile.color,
+ fieldName: fieldName ?? 'document',
+ params: { percentile: percentile.value },
+ };
+ });
+};
+
+export const getPercentileRankSeries = (
+ values: Metric['values'],
+ colors: Metric['colors'],
+ fieldName?: string
+) => {
+ return values?.map((value, index) => {
+ return {
+ agg: 'percentile_rank',
+ isFullReference: false,
+ color: colors?.[index],
+ fieldName: fieldName ?? 'document',
+ params: { value },
+ };
+ });
+};
+
+export const getTimeScale = (metric: Metric) => {
+ const supportedTimeScales = ['1s', '1m', '1h', '1d'];
+ let timeScale;
+ if (metric.unit && supportedTimeScales.includes(metric.unit)) {
+ timeScale = metric.unit.replace('1', '');
+ }
+ return timeScale;
+};
+
+export const getFormulaSeries = (script: string) => {
+ return [
+ {
+ agg: 'formula',
+ isFullReference: true,
+ fieldName: 'document',
+ params: { formula: script },
+ },
+ ];
+};
+
+export const getPipelineAgg = (subFunctionMetric: Metric) => {
+ const pipelineAggMap = SUPPORTED_METRICS[subFunctionMetric.type];
+ if (!pipelineAggMap) {
+ return null;
+ }
+ return pipelineAggMap.name;
+};
+
+export const getFormulaEquivalent = (
+ currentMetric: Metric,
+ metrics: Metric[],
+ metaValue?: number
+) => {
+ const aggregation = SUPPORTED_METRICS[currentMetric.type]?.name;
+ switch (currentMetric.type) {
+ case 'avg_bucket':
+ case 'max_bucket':
+ case 'min_bucket':
+ case 'sum_bucket':
+ case 'positive_only': {
+ return getSiblingPipelineSeriesFormula(currentMetric.type, currentMetric, metrics);
+ }
+ case 'count': {
+ return `${aggregation}()`;
+ }
+ case 'percentile': {
+ return `${aggregation}(${currentMetric.field}${
+ metaValue ? `, percentile=${metaValue}` : ''
+ })`;
+ }
+ case 'percentile_rank': {
+ return `${aggregation}(${currentMetric.field}${metaValue ? `, value=${metaValue}` : ''})`;
+ }
+ case 'cumulative_sum':
+ case 'derivative':
+ case 'moving_average': {
+ const [fieldId, _] = currentMetric?.field?.split('[') ?? [];
+ const subFunctionMetric = metrics.find((metric) => metric.id === fieldId);
+ if (!subFunctionMetric) {
+ return null;
+ }
+ const pipelineAgg = getPipelineAgg(subFunctionMetric);
+ if (!pipelineAgg) {
+ return null;
+ }
+ return getParentPipelineSeriesFormula(
+ metrics,
+ subFunctionMetric,
+ pipelineAgg,
+ currentMetric.type,
+ metaValue
+ );
+ }
+ case 'positive_rate': {
+ return `${aggregation}(max(${currentMetric.field}))`;
+ }
+ case 'filter_ratio': {
+ return getFilterRatioFormula(currentMetric);
+ }
+ case 'static': {
+ return `${currentMetric.value}`;
+ }
+ default: {
+ return `${aggregation}(${currentMetric.field})`;
+ }
+ }
+};
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/parent_pipeline_formula.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/parent_pipeline_formula.ts
new file mode 100644
index 0000000000000..e00fe505df1fd
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/parent_pipeline_formula.ts
@@ -0,0 +1,69 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type { Metric, MetricType } from '../../../../common/types';
+import { SUPPORTED_METRICS } from './supported_metrics';
+import { getFilterRatioFormula } from './filter_ratio_formula';
+
+export const getParentPipelineSeriesFormula = (
+ metrics: Metric[],
+ subFunctionMetric: Metric,
+ pipelineAgg: string,
+ aggregation: MetricType,
+ percentileValue?: number
+) => {
+ let formula = '';
+ const aggregationMap = SUPPORTED_METRICS[aggregation];
+ const subMetricField = subFunctionMetric.field;
+ const [nestedFieldId, nestedMeta] = subMetricField?.split('[') ?? [];
+ // support nested aggs
+ const additionalSubFunction = metrics.find((metric) => metric.id === nestedFieldId);
+ if (additionalSubFunction) {
+ // support nested aggs with formula
+ const additionalPipelineAggMap = SUPPORTED_METRICS[additionalSubFunction.type];
+ if (!additionalPipelineAggMap) {
+ return null;
+ }
+ const nestedMetaValue = Number(nestedMeta?.replace(']', ''));
+ const aggMap = SUPPORTED_METRICS[aggregation];
+ let additionalFunctionArgs;
+ if (additionalPipelineAggMap.name === 'percentile' && nestedMetaValue) {
+ additionalFunctionArgs = `, percentile=${nestedMetaValue}`;
+ }
+ if (additionalPipelineAggMap.name === 'percentile_rank' && nestedMetaValue) {
+ additionalFunctionArgs = `, value=${nestedMetaValue}`;
+ }
+ formula = `${aggMap.name}(${pipelineAgg}(${additionalPipelineAggMap.name}(${
+ additionalSubFunction.field ?? ''
+ }${additionalFunctionArgs ?? ''})))`;
+ } else {
+ let additionalFunctionArgs;
+ if (pipelineAgg === 'percentile' && percentileValue) {
+ additionalFunctionArgs = `, percentile=${percentileValue}`;
+ }
+ if (pipelineAgg === 'percentile_rank' && percentileValue) {
+ additionalFunctionArgs = `, value=${percentileValue}`;
+ }
+ if (pipelineAgg === 'filter_ratio') {
+ const script = getFilterRatioFormula(subFunctionMetric);
+ if (!script) {
+ return null;
+ }
+ formula = `${aggregationMap.name}(${script}${additionalFunctionArgs ?? ''})`;
+ } else if (pipelineAgg === 'counter_rate') {
+ formula = `${aggregationMap.name}(${pipelineAgg}(max(${subFunctionMetric.field}${
+ additionalFunctionArgs ? `${additionalFunctionArgs}` : ''
+ })))`;
+ } else {
+ formula = `${aggregationMap.name}(${pipelineAgg}(${subFunctionMetric.field}${
+ additionalFunctionArgs ? `${additionalFunctionArgs}` : ''
+ }))`;
+ }
+ }
+ return formula;
+};
diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/metrics_helpers.test.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/parent_pipeline_series.test.ts
similarity index 61%
rename from src/plugins/vis_types/timeseries/public/trigger_action/metrics_helpers.test.ts
rename to src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/parent_pipeline_series.test.ts
index 292515adf21e6..40264b89491b7 100644
--- a/src/plugins/vis_types/timeseries/public/trigger_action/metrics_helpers.test.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/parent_pipeline_series.test.ts
@@ -5,113 +5,10 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
-import { METRIC_TYPES } from '@kbn/data-plugin/public';
-import type { Metric, MetricType } from '../../common/types';
-import {
- getPercentilesSeries,
- getPercentileRankSeries,
- getParentPipelineSeries,
-} from './metrics_helpers';
-describe('getPercentilesSeries', () => {
- test('should return correct config for multiple percentiles', () => {
- const percentiles = [
- {
- color: '#68BC00',
- id: 'aef159f0-7db8-11ec-9d0c-e57521cec076',
- mode: 'line',
- shade: 0.2,
- value: 50,
- },
- {
- color: 'rgba(0,63,188,1)',
- id: 'b0e0a6d0-7db8-11ec-9d0c-e57521cec076',
- mode: 'line',
- percentile: '',
- shade: 0.2,
- value: '70',
- },
- {
- color: 'rgba(188,38,0,1)',
- id: 'b2e04760-7db8-11ec-9d0c-e57521cec076',
- mode: 'line',
- percentile: '',
- shade: 0.2,
- value: '80',
- },
- {
- color: 'rgba(188,0,3,1)',
- id: 'b503eab0-7db8-11ec-9d0c-e57521cec076',
- mode: 'line',
- percentile: '',
- shade: 0.2,
- value: '90',
- },
- ] as Metric['percentiles'];
- const config = getPercentilesSeries(percentiles, 'bytes');
- expect(config).toStrictEqual([
- {
- agg: 'percentile',
- color: '#68BC00',
- fieldName: 'bytes',
- isFullReference: false,
- params: { percentile: 50 },
- },
- {
- agg: 'percentile',
- color: 'rgba(0,63,188,1)',
- fieldName: 'bytes',
- isFullReference: false,
- params: { percentile: '70' },
- },
- {
- agg: 'percentile',
- color: 'rgba(188,38,0,1)',
- fieldName: 'bytes',
- isFullReference: false,
- params: { percentile: '80' },
- },
- {
- agg: 'percentile',
- color: 'rgba(188,0,3,1)',
- fieldName: 'bytes',
- isFullReference: false,
- params: { percentile: '90' },
- },
- ]);
- });
-});
-
-describe('getPercentileRankSeries', () => {
- test('should return correct config for multiple percentile ranks', () => {
- const values = ['1', '5', '7'] as Metric['values'];
- const colors = ['#68BC00', 'rgba(0,63,188,1)', 'rgba(188,38,0,1)'] as Metric['colors'];
- const config = getPercentileRankSeries(values, colors, 'day_of_week_i');
- expect(config).toStrictEqual([
- {
- agg: 'percentile_rank',
- color: '#68BC00',
- fieldName: 'day_of_week_i',
- isFullReference: false,
- params: { value: '1' },
- },
- {
- agg: 'percentile_rank',
- color: 'rgba(0,63,188,1)',
- fieldName: 'day_of_week_i',
- isFullReference: false,
- params: { value: '5' },
- },
- {
- agg: 'percentile_rank',
- color: 'rgba(188,38,0,1)',
- fieldName: 'day_of_week_i',
- isFullReference: false,
- params: { value: '7' },
- },
- ]);
- });
-});
+import { METRIC_TYPES } from '@kbn/data-plugin/public';
+import type { Metric, MetricType } from '../../../../common/types';
+import { getParentPipelineSeries } from './parent_pipeline_series';
describe('getParentPipelineSeries', () => {
test('should return correct config for pipeline agg on percentiles', () => {
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/parent_pipeline_series.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/parent_pipeline_series.ts
new file mode 100644
index 0000000000000..6a263ca8bb44d
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/parent_pipeline_series.ts
@@ -0,0 +1,91 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type { Metric, MetricType } from '../../../../common/types';
+import { SUPPORTED_METRICS } from './supported_metrics';
+import { getParentPipelineSeriesFormula } from './parent_pipeline_formula';
+import { getFilterRatioFormula } from './filter_ratio_formula';
+import { getFormulaSeries, getTimeScale, getPipelineAgg } from './metrics_helpers';
+
+export const computeParentSeries = (
+ aggregation: MetricType,
+ currentMetric: Metric,
+ subFunctionMetric: Metric,
+ pipelineAgg: string,
+ meta?: number
+) => {
+ const aggregationMap = SUPPORTED_METRICS[aggregation];
+ if (subFunctionMetric.type === 'filter_ratio') {
+ const script = getFilterRatioFormula(subFunctionMetric);
+ if (!script) {
+ return null;
+ }
+ const formula = `${aggregationMap.name}(${script})`;
+ return getFormulaSeries(formula);
+ }
+ const timeScale = getTimeScale(currentMetric);
+ return [
+ {
+ agg: aggregationMap.name,
+ isFullReference: aggregationMap.isFullReference,
+ pipelineAggType: pipelineAgg,
+ fieldName:
+ subFunctionMetric?.field && pipelineAgg !== 'count' ? subFunctionMetric?.field : 'document',
+ params: {
+ ...(currentMetric.window && { window: currentMetric.window }),
+ ...(timeScale && { timeScale }),
+ ...(pipelineAgg === 'percentile' && meta && { percentile: meta }),
+ ...(pipelineAgg === 'percentile_rank' && meta && { value: meta }),
+ },
+ },
+ ];
+};
+
+export const getParentPipelineSeries = (
+ aggregation: MetricType,
+ currentMetricIdx: number,
+ metrics: Metric[]
+) => {
+ const currentMetric = metrics[currentMetricIdx];
+ // percentile value is derived from the field Id. It has the format xxx-xxx-xxx-xxx[percentile]
+ const [fieldId, meta] = currentMetric?.field?.split('[') ?? [];
+ const subFunctionMetric = metrics.find((metric) => metric.id === fieldId);
+ if (!subFunctionMetric || subFunctionMetric.type === 'static') {
+ return null;
+ }
+ const pipelineAgg = getPipelineAgg(subFunctionMetric);
+ if (!pipelineAgg) {
+ return null;
+ }
+ const metaValue = Number(meta?.replace(']', ''));
+ const subMetricField = subFunctionMetric.field;
+ const [nestedFieldId, _] = subMetricField?.split('[') ?? [];
+ // support nested aggs with formula
+ const additionalSubFunction = metrics.find((metric) => metric.id === nestedFieldId);
+ if (additionalSubFunction) {
+ const formula = getParentPipelineSeriesFormula(
+ metrics,
+ subFunctionMetric,
+ pipelineAgg,
+ aggregation,
+ metaValue
+ );
+ if (!formula) {
+ return null;
+ }
+ return getFormulaSeries(formula);
+ } else {
+ return computeParentSeries(
+ aggregation,
+ currentMetric,
+ subFunctionMetric,
+ pipelineAgg,
+ metaValue
+ );
+ }
+};
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/sibling_pipeline_formula.test.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/sibling_pipeline_formula.test.ts
new file mode 100644
index 0000000000000..c251f72c84a9f
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/sibling_pipeline_formula.test.ts
@@ -0,0 +1,88 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { METRIC_TYPES } from '@kbn/data-plugin/public';
+import type { Metric } from '../../../../common/types';
+import { TSVB_METRIC_TYPES } from '../../../../common/enums';
+import { getSiblingPipelineSeriesFormula } from './sibling_pipeline_formula';
+
+describe('getSiblingPipelineSeriesFormula', () => {
+ test('should return correct formula for sibling pipeline agg on positive only', () => {
+ const metrics = [
+ {
+ field: 'day_of_week_i',
+ id: '123456',
+ type: 'max',
+ },
+ {
+ id: '891011',
+ type: 'positive_only',
+ field: '123456',
+ },
+ ] as Metric[];
+ const formula = getSiblingPipelineSeriesFormula(
+ TSVB_METRIC_TYPES.POSITIVE_ONLY,
+ metrics[1],
+ metrics
+ );
+ expect(formula).toStrictEqual('pick_max(max(day_of_week_i), 0)');
+ });
+
+ test('should return correct config for sibling pipeline agg on percentile ranks', () => {
+ const metrics = [
+ {
+ field: 'AvgTicketPrice',
+ id: '04558549-f19f-4a87-9923-27df8b81af3e',
+ values: ['400', '500', '700'],
+ colors: ['rgba(211,96,134,1)', 'rgba(155,33,230,1)', '#68BC00'],
+ type: 'percentile_rank',
+ },
+ {
+ field: '04558549-f19f-4a87-9923-27df8b81af3e[400.0]',
+ id: '764f4110-7db9-11ec-9fdf-91a8881dd06b',
+ type: 'avg_bucket',
+ },
+ ] as Metric[];
+ const formula = getSiblingPipelineSeriesFormula(METRIC_TYPES.AVG_BUCKET, metrics[1], metrics);
+ expect(formula).toStrictEqual('overall_average(percentile_rank(AvgTicketPrice, value=400))');
+ });
+
+ test('should return correct config for sibling pipeline agg on percentile', () => {
+ const metrics = [
+ {
+ field: 'AvgTicketPrice',
+ id: '04558549-f19f-4a87-9923-27df8b81af3e',
+ percentiles: [
+ {
+ color: '#68BC00',
+ id: 'aef159f0-7db8-11ec-9d0c-e57521cec076',
+ mode: 'line',
+ shade: 0.2,
+ value: 50,
+ },
+ {
+ color: 'rgba(0,63,188,1)',
+ id: 'b0e0a6d0-7db8-11ec-9d0c-e57521cec076',
+ mode: 'line',
+ percentile: '',
+ shade: 0.2,
+ value: '70',
+ },
+ ],
+ type: 'percentile',
+ },
+ {
+ field: '04558549-f19f-4a87-9923-27df8b81af3e[70.0]',
+ id: '764f4110-7db9-11ec-9fdf-91a8881dd06b',
+ type: 'avg_bucket',
+ },
+ ] as Metric[];
+ const formula = getSiblingPipelineSeriesFormula(METRIC_TYPES.AVG_BUCKET, metrics[1], metrics);
+ expect(formula).toStrictEqual('overall_average(percentile(AvgTicketPrice, percentile=70))');
+ });
+});
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/sibling_pipeline_formula.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/sibling_pipeline_formula.ts
new file mode 100644
index 0000000000000..b3e141b11e598
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/sibling_pipeline_formula.ts
@@ -0,0 +1,60 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 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 { Metric, MetricType } from '../../../../common/types';
+import { SUPPORTED_METRICS } from './supported_metrics';
+
+export const getSiblingPipelineSeriesFormula = (
+ aggregation: MetricType,
+ currentMetric: Metric,
+ metrics: Metric[]
+) => {
+ const [nestedFieldId, nestedMeta] = currentMetric.field?.split('[') ?? [];
+ const subFunctionMetric = metrics.find((metric) => metric.id === nestedFieldId);
+ if (!subFunctionMetric || subFunctionMetric.type === 'static') {
+ return null;
+ }
+ const pipelineAggMap = SUPPORTED_METRICS[subFunctionMetric.type];
+ if (!pipelineAggMap) {
+ return null;
+ }
+ const aggregationMap = SUPPORTED_METRICS[aggregation];
+ const subMetricField = subFunctionMetric.type !== 'count' ? subFunctionMetric.field : '';
+ // support nested aggs with formula
+ const additionalSubFunction = metrics.find((metric) => metric.id === subMetricField);
+ let formula = `${aggregationMap.name}(`;
+ let minimumValue = '';
+ if (currentMetric.type === 'positive_only') {
+ minimumValue = `, 0`;
+ }
+ if (additionalSubFunction) {
+ const additionalPipelineAggMap = SUPPORTED_METRICS[additionalSubFunction.type];
+ if (!additionalPipelineAggMap) {
+ return null;
+ }
+ const additionalSubFunctionField =
+ additionalSubFunction.type !== 'count' ? additionalSubFunction.field : '';
+ formula += `${pipelineAggMap.name}(${additionalPipelineAggMap.name}(${
+ additionalSubFunctionField ?? ''
+ }))${minimumValue})`;
+ } else {
+ let additionalFunctionArgs;
+ // handle percentile and percentile_rank
+ const nestedMetaValue = Number(nestedMeta?.replace(']', ''));
+ if (pipelineAggMap.name === 'percentile' && nestedMetaValue) {
+ additionalFunctionArgs = `, percentile=${nestedMetaValue}`;
+ }
+ if (pipelineAggMap.name === 'percentile_rank' && nestedMetaValue) {
+ additionalFunctionArgs = `, value=${nestedMetaValue}`;
+ }
+ formula += `${pipelineAggMap.name}(${subMetricField ?? ''}${
+ additionalFunctionArgs ? `${additionalFunctionArgs}` : ''
+ })${minimumValue})`;
+ }
+ return formula;
+};
diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/supported_metrics.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/supported_metrics.ts
similarity index 100%
rename from src/plugins/vis_types/timeseries/public/trigger_action/supported_metrics.ts
rename to src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/supported_metrics.ts
diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/get_series.test.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/get_series.test.ts
similarity index 99%
rename from src/plugins/vis_types/timeseries/public/trigger_action/get_series.test.ts
rename to src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/get_series.test.ts
index fe51f034f70c8..aeb401e86dd01 100644
--- a/src/plugins/vis_types/timeseries/public/trigger_action/get_series.test.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/get_series.test.ts
@@ -5,7 +5,7 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
-import type { Metric } from '../../common/types';
+import type { Metric } from '../../../../common/types';
import { getSeries } from './get_series';
describe('getSeries', () => {
diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/get_series.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/get_series.ts
similarity index 96%
rename from src/plugins/vis_types/timeseries/public/trigger_action/get_series.ts
rename to src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/get_series.ts
index 74cbe3337af48..0db270b465719 100644
--- a/src/plugins/vis_types/timeseries/public/trigger_action/get_series.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/get_series.ts
@@ -6,10 +6,10 @@
* Side Public License, v 1.
*/
import type { VisualizeEditorLayersContext } from '@kbn/visualizations-plugin/public';
-import type { Metric } from '../../common/types';
-import { SUPPORTED_METRICS } from './supported_metrics';
+import type { Metric } from '../../../../common/types';
import { getSeriesAgg } from './get_series_agg';
import {
+ SUPPORTED_METRICS,
getPercentilesSeries,
getPercentileRankSeries,
getFormulaSeries,
@@ -21,12 +21,14 @@ import {
getParentPipelineSeriesFormula,
getFilterRatioFormula,
getTimeScale,
-} from './metrics_helpers';
+} from '../metrics';
-export const getSeries = (
- initialMetrics: Metric[],
- totalSeriesNum: number
-): { metrics: VisualizeEditorLayersContext['metrics']; seriesAgg?: string } | null => {
+export interface VisSeries {
+ metrics: VisualizeEditorLayersContext['metrics'];
+ seriesAgg?: string;
+}
+
+export const getSeries = (initialMetrics: Metric[], totalSeriesNum: number): VisSeries | null => {
const { metrics, seriesAgg } = getSeriesAgg(initialMetrics);
const metricIdx = metrics.length - 1;
const aggregation = metrics[metricIdx].type;
diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/get_series_agg.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/get_series_agg.ts
similarity index 93%
rename from src/plugins/vis_types/timeseries/public/trigger_action/get_series_agg.ts
rename to src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/get_series_agg.ts
index 07bfd071acbaa..030bcd887f9cb 100644
--- a/src/plugins/vis_types/timeseries/public/trigger_action/get_series_agg.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/get_series_agg.ts
@@ -5,7 +5,7 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
-import type { Metric } from '../../common/types';
+import type { Metric } from '../../../../common/types';
const functionMap: Partial> = {
mean: 'avg',
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/index.ts
new file mode 100644
index 0000000000000..6c111d50493e6
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/index.ts
@@ -0,0 +1,10 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+export * from './get_series';
+export * from './get_series_agg';
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/split_chart/date_histogram.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/split_chart/date_histogram.ts
new file mode 100644
index 0000000000000..bad2e476ecc85
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/split_chart/date_histogram.ts
@@ -0,0 +1,34 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
+import { Series } from '../../../../common/types';
+import { getFieldType } from '../datasource';
+
+export const isSplitWithDateHistogram = async (
+ series: Series,
+ splitFields: string[],
+ indexPatternId: string,
+ dataViews: DataViewsPublicPluginStart
+) => {
+ let splitWithDateHistogram = false;
+ if (series.terms_field && series.split_mode === 'terms' && splitFields) {
+ for (const f of splitFields) {
+ const fieldType = await getFieldType(indexPatternId, f, dataViews);
+
+ if (fieldType === 'date') {
+ if (splitFields.length === 1) {
+ splitWithDateHistogram = true;
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return splitWithDateHistogram;
+};
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/split_chart/filters.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/split_chart/filters.ts
new file mode 100644
index 0000000000000..3a22b3b70294f
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/split_chart/filters.ts
@@ -0,0 +1,23 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { VisualizeEditorLayersContext } from '@kbn/visualizations-plugin/public';
+import { Series } from '../../../../common/types';
+
+export const convertSplitFilters = (
+ series: Series
+): Exclude => {
+ const splitFilters = [];
+ if (series.split_mode === 'filter' && series.filter) {
+ splitFilters.push({ filter: series.filter });
+ }
+ if (series.split_filters) {
+ splitFilters.push(...series.split_filters);
+ }
+ return splitFilters;
+};
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/split_chart/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/split_chart/index.ts
new file mode 100644
index 0000000000000..109178cf4d959
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/split_chart/index.ts
@@ -0,0 +1,10 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+export * from './date_histogram';
+export * from './filters';
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/xy/chart_type.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/xy/chart_type.ts
new file mode 100644
index 0000000000000..f389568eed668
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/xy/chart_type.ts
@@ -0,0 +1,23 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { Series } from '../../../../common/types';
+
+export const convertChartType = (series: Series) => {
+ const layerChartType =
+ series.chart_type === 'line' && Number(series.fill) > 0 ? 'area' : series.chart_type;
+
+ if (series.stacked !== 'none' && series.stacked !== 'percent') {
+ return layerChartType !== 'line' ? `${layerChartType}_stacked` : 'line';
+ }
+ if (series.stacked === 'percent') {
+ return layerChartType !== 'line' ? `${layerChartType}_percentage_stacked` : 'line';
+ }
+
+ return layerChartType;
+};
diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/get_extents.test.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/xy/extents.test.ts
similarity index 97%
rename from src/plugins/vis_types/timeseries/public/trigger_action/get_extents.test.ts
rename to src/plugins/vis_types/timeseries/public/convert_to_lens/lib/xy/extents.test.ts
index 67ee8a1fb290c..e07aff3d3427f 100644
--- a/src/plugins/vis_types/timeseries/public/trigger_action/get_extents.test.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/xy/extents.test.ts
@@ -5,8 +5,8 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
-import type { Panel } from '../../common/types';
-import { getYExtents } from './get_extents';
+import type { Panel } from '../../../../common/types';
+import { getYExtents } from './extents';
const model = {
axis_position: 'left',
diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/get_extents.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/xy/extents.ts
similarity index 98%
rename from src/plugins/vis_types/timeseries/public/trigger_action/get_extents.ts
rename to src/plugins/vis_types/timeseries/public/convert_to_lens/lib/xy/extents.ts
index a0587671c7686..5e1b0ac4cac8e 100644
--- a/src/plugins/vis_types/timeseries/public/trigger_action/get_extents.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/xy/extents.ts
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import type { Panel, Series } from '../../common/types';
+import type { Panel, Series } from '../../../../common/types';
const lowerBoundShouldBeZero = (
lowerBound: number | null,
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/xy/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/xy/index.ts
new file mode 100644
index 0000000000000..08adee9f984a0
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/xy/index.ts
@@ -0,0 +1,10 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+export * from './extents';
+export * from './chart_type';
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/timeseries/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/timeseries/index.ts
new file mode 100644
index 0000000000000..2996ad19c42d9
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/timeseries/index.ts
@@ -0,0 +1,97 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { VisualizeEditorLayersContext } from '@kbn/visualizations-plugin/public';
+import { getDataViewsStart } from '../../services';
+import { getDataSourceInfo } from '../lib/datasource';
+import { getSeries } from '../lib/series';
+import { getFieldsForTerms } from '../../../common/fields_utils';
+import { ConvertTsvbToLensVisualization } from '../types';
+import { convertChartType, getYExtents } from '../lib/xy';
+import { getLayerConfiguration } from '../lib/layers';
+import { isSplitWithDateHistogram } from '../lib/split_chart';
+
+export const convertToLens: ConvertTsvbToLensVisualization = async (model) => {
+ const layersConfiguration: { [key: string]: VisualizeEditorLayersContext } = {};
+
+ // get the active series number
+ const seriesNum = model.series.filter((series) => !series.hidden).length;
+ const dataViews = getDataViewsStart();
+
+ // handle multiple layers/series
+ for (let layerIdx = 0; layerIdx < model.series.length; layerIdx++) {
+ const layer = model.series[layerIdx];
+ if (layer.hidden) {
+ continue;
+ }
+
+ const { indexPatternId, timeField } = await getDataSourceInfo(
+ model.index_pattern,
+ model.time_field,
+ Boolean(layer.override_index_pattern),
+ layer.series_index_pattern,
+ dataViews
+ );
+
+ // handle multiple metrics
+ const series = getSeries(layer.metrics, seriesNum);
+ if (!series || !series.metrics) {
+ return null;
+ }
+
+ const splitFields = getFieldsForTerms(layer.terms_field);
+
+ // in case of terms in a date field, we want to apply the date_histogram
+ const splitWithDateHistogram = await isSplitWithDateHistogram(
+ layer,
+ splitFields,
+ indexPatternId,
+ dataViews
+ );
+
+ if (splitWithDateHistogram === null) {
+ return null;
+ }
+
+ const chartType = convertChartType(layer);
+
+ layersConfiguration[layerIdx] = getLayerConfiguration(
+ indexPatternId,
+ layerIdx,
+ chartType,
+ model,
+ series,
+ splitFields,
+ timeField,
+ splitWithDateHistogram
+ );
+ }
+
+ const extents = getYExtents(model);
+
+ return {
+ layers: layersConfiguration,
+ type: 'lnsXY',
+ configuration: {
+ fill: model.series[0].fill ?? 0.3,
+ legend: {
+ isVisible: Boolean(model.show_legend),
+ showSingleSeries: Boolean(model.show_legend),
+ position: model.legend_position ?? 'right',
+ shouldTruncate: Boolean(model.truncate_legend),
+ maxLines: model.max_lines_legend ?? 1,
+ },
+ gridLinesVisibility: {
+ x: Boolean(model.show_grid),
+ yLeft: Boolean(model.show_grid),
+ yRight: Boolean(model.show_grid),
+ },
+ extents,
+ },
+ };
+};
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/types.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/types.ts
new file mode 100644
index 0000000000000..8c17b9ec6ce57
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/types.ts
@@ -0,0 +1,19 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { NavigateToLensContext } from '@kbn/visualizations-plugin/public';
+import type { Panel } from '../../common/types';
+
+export type ConvertTsvbToLensVisualization = (
+ model: Panel
+) => Promise;
+
+export interface Filter {
+ kql?: string | { [key: string]: any } | undefined;
+ lucene?: string | { [key: string]: any } | undefined;
+}
diff --git a/src/plugins/vis_types/timeseries/public/metrics_type.ts b/src/plugins/vis_types/timeseries/public/metrics_type.ts
index c013553e44197..10658b264c4a3 100644
--- a/src/plugins/vis_types/timeseries/public/metrics_type.ts
+++ b/src/plugins/vis_types/timeseries/public/metrics_type.ts
@@ -28,6 +28,7 @@ import { toExpressionAst } from './to_ast';
import { getDataViewsStart } from './services';
import type { TimeseriesVisDefaultParams, TimeseriesVisParams } from './types';
import type { IndexPatternValue, Panel } from '../common/types';
+import { convertTSVBtoLensConfiguration } from './convert_to_lens';
export const withReplacedIds = (
vis: Vis
@@ -167,14 +168,9 @@ export const metricsVisDefinition: VisTypeDefinition<
}
return [];
},
- navigateToLens: async (params?: VisParams) => {
- const { triggerTSVBtoLensConfiguration } = await import('./trigger_action');
+ navigateToLens: async (params?: VisParams) =>
+ params ? await convertTSVBtoLensConfiguration(params as Panel) : null,
- const triggerConfiguration = params
- ? await triggerTSVBtoLensConfiguration(params as Panel)
- : null;
- return triggerConfiguration;
- },
inspectorAdapters: () => ({
requests: new RequestAdapter(),
}),
diff --git a/src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx b/src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx
index c6a255164fb60..60b651f2df21b 100644
--- a/src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx
+++ b/src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx
@@ -65,8 +65,8 @@ export const getTimeseriesVisRenderer: (deps: {
const { visParams: model, visData, syncColors, syncTooltips } = config;
const showNoResult = !checkIfDataExists(visData, model);
- const { triggerTSVBtoLensConfiguration } = await import('./trigger_action');
- const canNavigateToLens = await triggerTSVBtoLensConfiguration(model);
+ const { convertTSVBtoLensConfiguration } = await import('./convert_to_lens');
+ const canNavigateToLens = await convertTSVBtoLensConfiguration(model);
const renderComplete = () => {
const usageCollection = getUsageCollectionStart();
diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/index.ts b/src/plugins/vis_types/timeseries/public/trigger_action/index.ts
deleted file mode 100644
index f384bc6d6562c..0000000000000
--- a/src/plugins/vis_types/timeseries/public/trigger_action/index.ts
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-import type { PaletteOutput } from '@kbn/coloring';
-import type {
- NavigateToLensContext,
- VisualizeEditorLayersContext,
-} from '@kbn/visualizations-plugin/public';
-import type { Panel } from '../../common/types';
-import { PANEL_TYPES } from '../../common/enums';
-import { getDataSourceInfo } from './get_datasource_info';
-import { getFieldType } from './get_field_type';
-import { getSeries } from './get_series';
-import { getYExtents } from './get_extents';
-import { getFieldsForTerms } from '../../common/fields_utils';
-
-const SUPPORTED_FORMATTERS = ['bytes', 'percent', 'number'];
-
-/*
- * This function is used to convert the TSVB model to compatible Lens model.
- * Returns the Lens model, only if it is supported. If not, it returns null.
- * In case of null, the menu item is disabled and the user can't navigate to Lens.
- */
-export const triggerTSVBtoLensConfiguration = async (
- model: Panel
-): Promise => {
- // Disables the option for not timeseries charts, for the string mode and for series with annotations
- if (
- model.type !== PANEL_TYPES.TIMESERIES ||
- !model.use_kibana_indexes ||
- (model.annotations && model.annotations.length > 0)
- ) {
- return null;
- }
- const layersConfiguration: { [key: string]: VisualizeEditorLayersContext } = {};
- // get the active series number
- let seriesNum = 0;
- model.series.forEach((series) => {
- if (!series.hidden) seriesNum++;
- });
-
- // handle multiple layers/series
- for (let layerIdx = 0; layerIdx < model.series.length; layerIdx++) {
- const layer = model.series[layerIdx];
- if (layer.hidden) continue;
-
- const { indexPatternId, timeField } = await getDataSourceInfo(
- model.index_pattern,
- model.time_field,
- Boolean(layer.override_index_pattern),
- layer.series_index_pattern
- );
-
- const timeShift = layer.offset_time;
- // translate to Lens seriesType
- const layerChartType =
- layer.chart_type === 'line' && Number(layer.fill) > 0 ? 'area' : layer.chart_type;
- let chartType = layerChartType;
-
- if (layer.stacked !== 'none' && layer.stacked !== 'percent') {
- chartType = layerChartType !== 'line' ? `${layerChartType}_stacked` : 'line';
- }
- if (layer.stacked === 'percent') {
- chartType = layerChartType !== 'line' ? `${layerChartType}_percentage_stacked` : 'line';
- }
-
- // handle multiple metrics
- const series = getSeries(layer.metrics, seriesNum);
- if (!series) {
- return null;
- }
- const { metrics: metricsArray, seriesAgg } = series;
- let filter: {
- kql?: string | { [key: string]: any } | undefined;
- lucene?: string | { [key: string]: any } | undefined;
- };
- if (layer.filter) {
- if (layer.filter.language === 'kuery') {
- filter = { kql: layer.filter.query };
- } else if (layer.filter.language === 'lucene') {
- filter = { lucene: layer.filter.query };
- }
- }
-
- const metricsWithParams = metricsArray.map((metric) => {
- return {
- ...metric,
- color: metric.color ?? layer.color,
- params: {
- ...metric.params,
- ...(timeShift && { shift: timeShift }),
- ...(filter && filter),
- },
- };
- });
- const splitFilters: VisualizeEditorLayersContext['splitFilters'] = [];
- if (layer.split_mode === 'filter' && layer.filter) {
- splitFilters.push({ filter: layer.filter });
- }
- if (layer.split_filters) {
- splitFilters.push(...layer.split_filters);
- }
-
- const palette = layer.palette as PaletteOutput;
- const splitFields = getFieldsForTerms(layer.terms_field);
-
- // in case of terms in a date field, we want to apply the date_histogram
- let splitWithDateHistogram = false;
- if (layer.terms_field && layer.split_mode === 'terms' && splitFields) {
- for (const f of splitFields) {
- const fieldType = await getFieldType(indexPatternId, f);
-
- if (fieldType === 'date') {
- if (splitFields.length === 1) {
- splitWithDateHistogram = true;
- } else {
- return null;
- }
- }
- }
- }
-
- const layerConfiguration: VisualizeEditorLayersContext = {
- indexPatternId,
- timeFieldName: timeField,
- chartType,
- axisPosition: layer.separate_axis ? layer.axis_position : model.axis_position,
- ...(layer.terms_field && { splitFields }),
- splitWithDateHistogram,
- ...(layer.split_mode !== 'everything' && { splitMode: layer.split_mode }),
- ...(splitFilters.length > 0 && { splitFilters }),
- // for non supported palettes, we will use the default palette
- palette:
- !palette || palette.name === 'gradient' || palette.name === 'rainbow'
- ? { name: 'default', type: 'palette' }
- : palette,
- ...(layer.split_mode === 'terms' && {
- termsParams: {
- size: layer.terms_size ?? 10,
- ...(layer.terms_include && { include: [layer.terms_include] }),
- includeIsRegex: Boolean(layer.terms_include),
- ...(layer.terms_exclude && { exclude: [layer.terms_exclude] }),
- excludeIsRegex: Boolean(layer.terms_exclude),
- otherBucket: false,
- orderDirection: layer.terms_direction ?? 'desc',
- orderBy: layer.terms_order_by === '_key' ? { type: 'alphabetical' } : { type: 'column' },
- parentFormat: { id: 'terms' },
- },
- }),
- collapseFn: seriesAgg,
- metrics: [...metricsWithParams],
- timeInterval: model.interval && !model.interval?.includes('=') ? model.interval : 'auto',
- ...(SUPPORTED_FORMATTERS.includes(layer.formatter) && { format: layer.formatter }),
- ...(layer.label && { label: layer.label }),
- dropPartialBuckets: layer.override_index_pattern
- ? layer.series_drop_last_bucket > 0
- : model.drop_last_bucket > 0,
- };
- layersConfiguration[layerIdx] = layerConfiguration;
- }
-
- const extents = getYExtents(model);
-
- return {
- layers: layersConfiguration,
- type: 'lnsXY',
- configuration: {
- fill: model.series[0].fill ?? 0.3,
- legend: {
- isVisible: Boolean(model.show_legend),
- showSingleSeries: Boolean(model.show_legend),
- position: model.legend_position ?? 'right',
- shouldTruncate: Boolean(model.truncate_legend),
- maxLines: model.max_lines_legend ?? 1,
- },
- gridLinesVisibility: {
- x: Boolean(model.show_grid),
- yLeft: Boolean(model.show_grid),
- yRight: Boolean(model.show_grid),
- },
- extents,
- },
- };
-};
diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/metrics_helpers.ts b/src/plugins/vis_types/timeseries/public/trigger_action/metrics_helpers.ts
deleted file mode 100644
index 7eebd9a5c440b..0000000000000
--- a/src/plugins/vis_types/timeseries/public/trigger_action/metrics_helpers.ts
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-import type { Query } from '@kbn/es-query';
-import type { Metric, MetricType } from '../../common/types';
-import { SUPPORTED_METRICS } from './supported_metrics';
-
-export const getPercentilesSeries = (percentiles: Metric['percentiles'], fieldName?: string) => {
- return percentiles?.map((percentile) => {
- return {
- agg: 'percentile',
- isFullReference: false,
- color: percentile.color,
- fieldName: fieldName ?? 'document',
- params: { percentile: percentile.value },
- };
- });
-};
-
-export const getPercentileRankSeries = (
- values: Metric['values'],
- colors: Metric['colors'],
- fieldName?: string
-) => {
- return values?.map((value, index) => {
- return {
- agg: 'percentile_rank',
- isFullReference: false,
- color: colors?.[index],
- fieldName: fieldName ?? 'document',
- params: { value },
- };
- });
-};
-
-export const getFormulaSeries = (script: string) => {
- return [
- {
- agg: 'formula',
- isFullReference: true,
- fieldName: 'document',
- params: { formula: script },
- },
- ];
-};
-
-export const getPipelineAgg = (subFunctionMetric: Metric) => {
- const pipelineAggMap = SUPPORTED_METRICS[subFunctionMetric.type];
- if (!pipelineAggMap) {
- return null;
- }
- return pipelineAggMap.name;
-};
-
-export const getTimeScale = (metric: Metric) => {
- const supportedTimeScales = ['1s', '1m', '1h', '1d'];
- let timeScale;
- if (metric.unit && supportedTimeScales.includes(metric.unit)) {
- timeScale = metric.unit.replace('1', '');
- }
- return timeScale;
-};
-
-export const computeParentSeries = (
- aggregation: MetricType,
- currentMetric: Metric,
- subFunctionMetric: Metric,
- pipelineAgg: string,
- meta?: number
-) => {
- const aggregationMap = SUPPORTED_METRICS[aggregation];
- if (subFunctionMetric.type === 'filter_ratio') {
- const script = getFilterRatioFormula(subFunctionMetric);
- if (!script) {
- return null;
- }
- const formula = `${aggregationMap.name}(${script})`;
- return getFormulaSeries(formula);
- }
- const timeScale = getTimeScale(currentMetric);
- return [
- {
- agg: aggregationMap.name,
- isFullReference: aggregationMap.isFullReference,
- pipelineAggType: pipelineAgg,
- fieldName:
- subFunctionMetric?.field && pipelineAgg !== 'count' ? subFunctionMetric?.field : 'document',
- params: {
- ...(currentMetric.window && { window: currentMetric.window }),
- ...(timeScale && { timeScale }),
- ...(pipelineAgg === 'percentile' && meta && { percentile: meta }),
- ...(pipelineAgg === 'percentile_rank' && meta && { value: meta }),
- },
- },
- ];
-};
-
-export const getParentPipelineSeries = (
- aggregation: MetricType,
- currentMetricIdx: number,
- metrics: Metric[]
-) => {
- const currentMetric = metrics[currentMetricIdx];
- // percentile value is derived from the field Id. It has the format xxx-xxx-xxx-xxx[percentile]
- const [fieldId, meta] = currentMetric?.field?.split('[') ?? [];
- const subFunctionMetric = metrics.find((metric) => metric.id === fieldId);
- if (!subFunctionMetric || subFunctionMetric.type === 'static') {
- return null;
- }
- const pipelineAgg = getPipelineAgg(subFunctionMetric);
- if (!pipelineAgg) {
- return null;
- }
- const metaValue = Number(meta?.replace(']', ''));
- const subMetricField = subFunctionMetric.field;
- const [nestedFieldId, _] = subMetricField?.split('[') ?? [];
- // support nested aggs with formula
- const additionalSubFunction = metrics.find((metric) => metric.id === nestedFieldId);
- if (additionalSubFunction) {
- const formula = getParentPipelineSeriesFormula(
- metrics,
- subFunctionMetric,
- pipelineAgg,
- aggregation,
- metaValue
- );
- if (!formula) {
- return null;
- }
- return getFormulaSeries(formula);
- } else {
- return computeParentSeries(
- aggregation,
- currentMetric,
- subFunctionMetric,
- pipelineAgg,
- metaValue
- );
- }
-};
-
-export const getParentPipelineSeriesFormula = (
- metrics: Metric[],
- subFunctionMetric: Metric,
- pipelineAgg: string,
- aggregation: MetricType,
- percentileValue?: number
-) => {
- let formula = '';
- const aggregationMap = SUPPORTED_METRICS[aggregation];
- const subMetricField = subFunctionMetric.field;
- const [nestedFieldId, nestedMeta] = subMetricField?.split('[') ?? [];
- // support nested aggs
- const additionalSubFunction = metrics.find((metric) => metric.id === nestedFieldId);
- if (additionalSubFunction) {
- // support nested aggs with formula
- const additionalPipelineAggMap = SUPPORTED_METRICS[additionalSubFunction.type];
- if (!additionalPipelineAggMap) {
- return null;
- }
- const nestedMetaValue = Number(nestedMeta?.replace(']', ''));
- const aggMap = SUPPORTED_METRICS[aggregation];
- let additionalFunctionArgs;
- if (additionalPipelineAggMap.name === 'percentile' && nestedMetaValue) {
- additionalFunctionArgs = `, percentile=${nestedMetaValue}`;
- }
- if (additionalPipelineAggMap.name === 'percentile_rank' && nestedMetaValue) {
- additionalFunctionArgs = `, value=${nestedMetaValue}`;
- }
- formula = `${aggMap.name}(${pipelineAgg}(${additionalPipelineAggMap.name}(${
- additionalSubFunction.field ?? ''
- }${additionalFunctionArgs ?? ''})))`;
- } else {
- let additionalFunctionArgs;
- if (pipelineAgg === 'percentile' && percentileValue) {
- additionalFunctionArgs = `, percentile=${percentileValue}`;
- }
- if (pipelineAgg === 'percentile_rank' && percentileValue) {
- additionalFunctionArgs = `, value=${percentileValue}`;
- }
- if (pipelineAgg === 'filter_ratio') {
- const script = getFilterRatioFormula(subFunctionMetric);
- if (!script) {
- return null;
- }
- formula = `${aggregationMap.name}(${script}${additionalFunctionArgs ?? ''})`;
- } else if (pipelineAgg === 'counter_rate') {
- formula = `${aggregationMap.name}(${pipelineAgg}(max(${subFunctionMetric.field}${
- additionalFunctionArgs ? `${additionalFunctionArgs}` : ''
- })))`;
- } else {
- formula = `${aggregationMap.name}(${pipelineAgg}(${subFunctionMetric.field}${
- additionalFunctionArgs ? `${additionalFunctionArgs}` : ''
- }))`;
- }
- }
- return formula;
-};
-
-export const getSiblingPipelineSeriesFormula = (
- aggregation: MetricType,
- currentMetric: Metric,
- metrics: Metric[]
-) => {
- const [nestedFieldId, nestedMeta] = currentMetric.field?.split('[') ?? [];
- const subFunctionMetric = metrics.find((metric) => metric.id === nestedFieldId);
- if (!subFunctionMetric || subFunctionMetric.type === 'static') {
- return null;
- }
- const pipelineAggMap = SUPPORTED_METRICS[subFunctionMetric.type];
- if (!pipelineAggMap) {
- return null;
- }
- const aggregationMap = SUPPORTED_METRICS[aggregation];
- const subMetricField = subFunctionMetric.type !== 'count' ? subFunctionMetric.field : '';
- // support nested aggs with formula
- const additionalSubFunction = metrics.find((metric) => metric.id === subMetricField);
- let formula = `${aggregationMap.name}(`;
- let minimumValue = '';
- if (currentMetric.type === 'positive_only') {
- minimumValue = `, 0`;
- }
- if (additionalSubFunction) {
- const additionalPipelineAggMap = SUPPORTED_METRICS[additionalSubFunction.type];
- if (!additionalPipelineAggMap) {
- return null;
- }
- const additionalSubFunctionField =
- additionalSubFunction.type !== 'count' ? additionalSubFunction.field : '';
- formula += `${pipelineAggMap.name}(${additionalPipelineAggMap.name}(${
- additionalSubFunctionField ?? ''
- }))${minimumValue})`;
- } else {
- let additionalFunctionArgs;
- // handle percentile and percentile_rank
- const nestedMetaValue = Number(nestedMeta?.replace(']', ''));
- if (pipelineAggMap.name === 'percentile' && nestedMetaValue) {
- additionalFunctionArgs = `, percentile=${nestedMetaValue}`;
- }
- if (pipelineAggMap.name === 'percentile_rank' && nestedMetaValue) {
- additionalFunctionArgs = `, value=${nestedMetaValue}`;
- }
- formula += `${pipelineAggMap.name}(${subMetricField ?? ''}${
- additionalFunctionArgs ? `${additionalFunctionArgs}` : ''
- })${minimumValue})`;
- }
- return formula;
-};
-
-const escapeQuotes = (str: string) => {
- return str?.replace(/'/g, "\\'");
-};
-
-const constructFilterRationFormula = (operation: string, metric?: Query) => {
- return `${operation}${metric?.language === 'lucene' ? 'lucene' : 'kql'}='${
- metric?.query && typeof metric?.query === 'string'
- ? escapeQuotes(metric?.query)
- : metric?.query ?? '*'
- }')`;
-};
-
-export const getFilterRatioFormula = (currentMetric: Metric) => {
- // eslint-disable-next-line @typescript-eslint/naming-convention
- const { numerator, denominator, metric_agg, field } = currentMetric;
- let aggregation = SUPPORTED_METRICS.count;
- if (metric_agg) {
- aggregation = SUPPORTED_METRICS[metric_agg];
- if (!aggregation) {
- return null;
- }
- }
- const operation =
- metric_agg && metric_agg !== 'count' ? `${aggregation.name}('${field}',` : 'count(';
-
- if (aggregation.name === 'counter_rate') {
- const numeratorFormula = constructFilterRationFormula(
- `${aggregation.name}(max('${field}',`,
- numerator
- );
- const denominatorFormula = constructFilterRationFormula(
- `${aggregation.name}(max('${field}',`,
- denominator
- );
- return `${numeratorFormula}) / ${denominatorFormula})`;
- } else {
- const numeratorFormula = constructFilterRationFormula(operation, numerator);
- const denominatorFormula = constructFilterRationFormula(operation, denominator);
- return `${numeratorFormula} / ${denominatorFormula}`;
- }
-};
-
-export const getFormulaEquivalent = (
- currentMetric: Metric,
- metrics: Metric[],
- metaValue?: number
-) => {
- const aggregation = SUPPORTED_METRICS[currentMetric.type]?.name;
- switch (currentMetric.type) {
- case 'avg_bucket':
- case 'max_bucket':
- case 'min_bucket':
- case 'sum_bucket':
- case 'positive_only': {
- return getSiblingPipelineSeriesFormula(currentMetric.type, currentMetric, metrics);
- }
- case 'count': {
- return `${aggregation}()`;
- }
- case 'percentile': {
- return `${aggregation}(${currentMetric.field}${
- metaValue ? `, percentile=${metaValue}` : ''
- })`;
- }
- case 'percentile_rank': {
- return `${aggregation}(${currentMetric.field}${metaValue ? `, value=${metaValue}` : ''})`;
- }
- case 'cumulative_sum':
- case 'derivative':
- case 'moving_average': {
- const [fieldId, _] = currentMetric?.field?.split('[') ?? [];
- const subFunctionMetric = metrics.find((metric) => metric.id === fieldId);
- if (!subFunctionMetric) {
- return null;
- }
- const pipelineAgg = getPipelineAgg(subFunctionMetric);
- if (!pipelineAgg) {
- return null;
- }
- return getParentPipelineSeriesFormula(
- metrics,
- subFunctionMetric,
- pipelineAgg,
- currentMetric.type,
- metaValue
- );
- }
- case 'positive_rate': {
- return `${aggregation}(max(${currentMetric.field}))`;
- }
- case 'filter_ratio': {
- return getFilterRatioFormula(currentMetric);
- }
- case 'static': {
- return `${currentMetric.value}`;
- }
- default: {
- return `${aggregation}(${currentMetric.field})`;
- }
- }
-};
diff --git a/src/plugins/visualizations/public/utils/saved_objects_utils/find_object_by_title.test.ts b/src/plugins/visualizations/public/utils/saved_objects_utils/find_object_by_title.test.ts
index a6479bbbefeb0..8c8bda93ce13e 100644
--- a/src/plugins/visualizations/public/utils/saved_objects_utils/find_object_by_title.test.ts
+++ b/src/plugins/visualizations/public/utils/saved_objects_utils/find_object_by_title.test.ts
@@ -7,7 +7,8 @@
*/
import { findObjectByTitle } from './find_object_by_title';
-import { SimpleSavedObjectImpl, SavedObjectsClientContract, SavedObject } from '@kbn/core/public';
+import { SavedObjectsClientContract, SavedObject } from '@kbn/core/public';
+import { simpleSavedObjectMock } from '@kbn/core/public/mocks';
describe('findObjectByTitle', () => {
const savedObjectsClient: SavedObjectsClientContract = {} as SavedObjectsClientContract;
@@ -22,7 +23,7 @@ describe('findObjectByTitle', () => {
});
it('matches any case', async () => {
- const indexPattern = new SimpleSavedObjectImpl(savedObjectsClient, {
+ const indexPattern = simpleSavedObjectMock.create(savedObjectsClient, {
attributes: { title: 'foo' },
} as SavedObject);
savedObjectsClient.find = jest.fn().mockImplementation(() =>
diff --git a/src/plugins/visualizations/public/visualize_app/components/visualize_top_nav.tsx b/src/plugins/visualizations/public/visualize_app/components/visualize_top_nav.tsx
index 8f19856bcdd40..ca373b31b6020 100644
--- a/src/plugins/visualizations/public/visualize_app/components/visualize_top_nav.tsx
+++ b/src/plugins/visualizations/public/visualize_app/components/visualize_top_nav.tsx
@@ -328,7 +328,6 @@ const TopNav = ({
},
isMissingCurrent: isMissingCurrentDataView,
onChangeDataView,
- showNewMenuTour: false,
}
: undefined
}
diff --git a/src/plugins/visualizations/public/visualize_app/utils/get_table_columns.tsx b/src/plugins/visualizations/public/visualize_app/utils/get_table_columns.tsx
index a2b75d5868b64..03cb64920879e 100644
--- a/src/plugins/visualizations/public/visualize_app/utils/get_table_columns.tsx
+++ b/src/plugins/visualizations/public/visualize_app/utils/get_table_columns.tsx
@@ -140,7 +140,7 @@ export const getNoItemsMessage = (createItem: () => void) => (
+
void) => (
}
actions={
-
+
{
- const { eventTypes = [], withTimeoutMs, fromTimestamp } = options;
+ const { eventTypes = [], withTimeoutMs, fromTimestamp, filters } = options;
const filteredEvents$ = events$.pipe(
filter((event) => {
@@ -39,6 +40,28 @@ export async function fetchEvents(
return new Date(event.timestamp).getTime() - new Date(fromTimestamp).getTime() > 0;
}
return true;
+ }),
+ filter((event) => {
+ if (filters) {
+ return Object.entries(filters).every(([key, comparison]) => {
+ const value = get(event, key);
+ return Object.entries(comparison).every(([operation, valueToCompare]) => {
+ switch (operation) {
+ case 'eq':
+ return value === valueToCompare;
+ case 'gte':
+ return value >= (valueToCompare as typeof value);
+ case 'gt':
+ return value > (valueToCompare as typeof value);
+ case 'lte':
+ return value <= (valueToCompare as typeof value);
+ case 'lt':
+ return value < (valueToCompare as typeof value);
+ }
+ });
+ });
+ }
+ return true;
})
);
diff --git a/test/analytics/fixtures/plugins/analytics_ftr_helpers/common/types.ts b/test/analytics/fixtures/plugins/analytics_ftr_helpers/common/types.ts
index 3f66cde1fa3ae..97e1faff823a4 100644
--- a/test/analytics/fixtures/plugins/analytics_ftr_helpers/common/types.ts
+++ b/test/analytics/fixtures/plugins/analytics_ftr_helpers/common/types.ts
@@ -8,6 +8,10 @@
import type { Event, EventType } from '@kbn/analytics-client';
+export type FiltersOptions = {
+ [key in 'eq' | 'gte' | 'gt' | 'lte' | 'lt']?: unknown;
+};
+
export interface GetEventsOptions {
/**
* eventTypes (optional) array of event types to return
@@ -24,6 +28,18 @@ export interface GetEventsOptions {
* @remarks Useful when we need to retrieve the events after a specific action, and we don't care about anything prior to that.
*/
fromTimestamp?: string;
+ /**
+ * List of internal keys to validate in the event with the validation comparison.
+ * @example
+ * {
+ * filters: {
+ * 'properties.my_key': {
+ * eq: 'my expected value',
+ * },
+ * },
+ * }
+ */
+ filters?: Record;
}
export interface EBTHelpersContract {
@@ -37,7 +53,10 @@ export interface EBTHelpersContract {
* @param takeNumberOfEvents - number of events to return
* @param options (optional) list of options to filter events or for advanced usage of the API {@link GetEventsOptions}.
*/
- getEvents: (takeNumberOfEvents: number, options?: GetEventsOptions) => Promise;
+ getEvents: (
+ takeNumberOfEvents: number,
+ options?: GetEventsOptions
+ ) => Promise>>>;
/**
* Count the number of events that match the filters.
* @param options list of options to filter the events {@link GetEventsOptions}. `withTimeoutMs` is required in this API.
diff --git a/test/analytics/fixtures/plugins/analytics_ftr_helpers/public/plugin.test.ts b/test/analytics/fixtures/plugins/analytics_ftr_helpers/public/plugin.test.ts
index c5cb6d4df1dd3..b3f86172b751b 100644
--- a/test/analytics/fixtures/plugins/analytics_ftr_helpers/public/plugin.test.ts
+++ b/test/analytics/fixtures/plugins/analytics_ftr_helpers/public/plugin.test.ts
@@ -127,5 +127,32 @@ describe('AnalyticsFTRHelpers', () => {
})
).resolves.toEqual([{ ...event, timestamp: '2022-06-10T00:00:00.000Z' }]);
});
+
+ test('should filter by `filters` when provided', async () => {
+ // 3 enqueued events
+ const events = [
+ { ...event, timestamp: '2022-01-10T00:00:00.000Z' },
+ { ...event, timestamp: '2022-03-10T00:00:00.000Z', properties: { my_property: 20 } },
+ { ...event, timestamp: '2022-06-10T00:00:00.000Z' },
+ ];
+ events.forEach((ev) => events$.next(ev));
+
+ await expect(
+ window.__analytics_ftr_helpers__.getEvents(1, {
+ eventTypes: [event.event_type],
+ filters: {
+ 'properties.my_property': {
+ eq: 20,
+ gte: 20,
+ lte: 20,
+ gt: 10,
+ lt: 30,
+ },
+ },
+ })
+ ).resolves.toEqual([
+ { ...event, timestamp: '2022-03-10T00:00:00.000Z', properties: { my_property: 20 } },
+ ]);
+ });
});
});
diff --git a/test/analytics/fixtures/plugins/analytics_ftr_helpers/server/plugin.ts b/test/analytics/fixtures/plugins/analytics_ftr_helpers/server/plugin.ts
index 88cacd2bfd36d..2e5d93345b07f 100644
--- a/test/analytics/fixtures/plugins/analytics_ftr_helpers/server/plugin.ts
+++ b/test/analytics/fixtures/plugins/analytics_ftr_helpers/server/plugin.ts
@@ -48,6 +48,21 @@ export class AnalyticsFTRHelpers implements Plugin {
eventTypes: schema.arrayOf(schema.string()),
withTimeoutMs: schema.maybe(schema.number()),
fromTimestamp: schema.maybe(schema.string()),
+ filters: schema.maybe(
+ schema.recordOf(
+ schema.string(),
+ schema.recordOf(
+ schema.oneOf([
+ schema.literal('eq'),
+ schema.literal('gte'),
+ schema.literal('gt'),
+ schema.literal('lte'),
+ schema.literal('lt'),
+ ]),
+ schema.any()
+ )
+ )
+ ),
}),
},
},
diff --git a/test/analytics/tests/instrumented_events/from_the_browser/core_context_providers.ts b/test/analytics/tests/instrumented_events/from_the_browser/core_context_providers.ts
index 6543b3c7955ef..3d0b018156ce7 100644
--- a/test/analytics/tests/instrumented_events/from_the_browser/core_context_providers.ts
+++ b/test/analytics/tests/instrumented_events/from_the_browser/core_context_providers.ts
@@ -16,7 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const { common } = getPageObjects(['common']);
describe('Core Context Providers', () => {
- let event: Event;
+ let event: Event>;
before(async () => {
await common.navigateToApp('home');
[event] = await ebtUIHelper.getEvents(1, { eventTypes: ['Loaded Kibana'] }); // Get the loaded Kibana event
diff --git a/test/analytics/tests/instrumented_events/from_the_browser/loaded_dashboard.ts b/test/analytics/tests/instrumented_events/from_the_browser/loaded_dashboard.ts
index 178bed7cbbbe5..0522ab5b41c2c 100644
--- a/test/analytics/tests/instrumented_events/from_the_browser/loaded_dashboard.ts
+++ b/test/analytics/tests/instrumented_events/from_the_browser/loaded_dashboard.ts
@@ -10,6 +10,8 @@ import { GetEventsOptions } from '@kbn/analytics-ftr-helpers-plugin/common/types
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../services';
+const DASHBOARD_LOADED_EVENT = 'dashboard_loaded';
+
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const ebtUIHelper = getService('kibana_ebt_ui');
const PageObjects = getPageObjects([
@@ -29,23 +31,26 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const getEvents = async (count: number, options?: GetEventsOptions) =>
ebtUIHelper.getEvents(count, {
- eventTypes: ['dashboard-data-loaded'],
+ eventTypes: ['performance_metric'],
fromTimestamp,
withTimeoutMs: 1000,
+ filters: { 'properties.eventName': { eq: DASHBOARD_LOADED_EVENT } },
...options,
});
const checkEmitsOnce = async (options?: GetEventsOptions) => {
const events = await getEvents(Number.MAX_SAFE_INTEGER, options);
- expect(events.length).to.be(1);
const event = events[0];
- expect(event.event_type).to.eql('dashboard-data-loaded');
+ expect(event.event_type).to.eql('performance_metric');
+ expect(event.properties.eventName).to.eql(DASHBOARD_LOADED_EVENT);
expect(event.context.applicationId).to.be('dashboards');
expect(event.context.page).to.be('app');
expect(event.context.pageName).to.be('application:dashboards:app');
- expect(event.properties.status).to.be('done');
- expect(event.properties.timeToData).to.be.a('number');
- expect(event.properties.timeToDone).to.be.a('number');
+ expect(event.properties.duration).to.be.a('number');
+ expect(event.properties.key1).to.eql('time_to_data');
+ expect(event.properties.value1).to.be.a('number');
+ expect(event.properties.key2).to.eql('num_of_panels');
+ expect(event.properties.value2).to.be.a('number');
// update fromTimestamp
fromTimestamp = event.timestamp;
@@ -81,7 +86,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.common.navigateToApp('dashboards');
});
- it('doesnt emit on empty dashboard', async () => {
+ it("doesn't emit on empty dashboard", async () => {
await PageObjects.dashboard.clickNewDashboard();
await checkDoesNotEmit();
});
@@ -100,7 +105,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const event = await checkEmitsOnce();
expect(event.context.entityId).to.be('new');
- expect(event.properties.numOfPanels).to.be(1);
+ expect(event.properties.key2).to.be('num_of_panels');
+ expect(event.properties.value2).to.be(1);
});
it('emits on saved search refreshed', async () => {
@@ -108,7 +114,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await checkEmitsOnce();
});
- it('doesnt emit when removing saved search panel', async () => {
+ it("doesn't emit when removing saved search panel", async () => {
await dashboardPanelActions.removePanelByTitle(SAVED_SEARCH_PANEL_TITLE);
await checkDoesNotEmit();
});
@@ -126,7 +132,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await checkEmitsOnce();
});
- it('doesnt emit when removing vis panel', async () => {
+ it("doesn't emit when removing vis panel", async () => {
await dashboardPanelActions.removePanelByTitle(VIS_PANEL_TITLE);
await checkDoesNotEmit();
});
@@ -150,7 +156,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await checkEmitsOnce();
});
- it('doesnt emit when removing markup panel', async () => {
+ it("doesn't emit when removing markup panel", async () => {
await dashboardPanelActions.removePanelByTitle(MARKDOWN_PANEL_TITLE);
await checkDoesNotEmit();
});
@@ -170,7 +176,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await checkEmitsOnce();
});
- it('doesnt emit when removing map panel', async () => {
+ it("doesn't emit when removing map panel", async () => {
await dashboardPanelActions.removePanelByTitle(MAP_PANEL_TITLE);
await checkDoesNotEmit();
});
@@ -187,10 +193,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const event = await checkEmitsOnce();
expect(event.context.entityId).to.be('7adfa750-4c81-11e8-b3d7-01146121b73d');
- expect(event.properties.numOfPanels).to.be(17);
- expect(event.properties.timeToDone as number).to.be.greaterThan(
- event.properties.timeToData as number
+
+ expect(event.properties.key1).to.be('time_to_data');
+ expect(event.properties.duration as number).to.be.greaterThan(
+ event.properties.value1 as number
);
+
+ expect(event.properties.key2).to.be('num_of_panels');
+ expect(event.properties.value2).to.be(17);
});
/**
diff --git a/test/analytics/tests/instrumented_events/from_the_browser/loaded_kibana.ts b/test/analytics/tests/instrumented_events/from_the_browser/loaded_kibana.ts
index 7ed47db35cbeb..e4ac2346b5893 100644
--- a/test/analytics/tests/instrumented_events/from_the_browser/loaded_kibana.ts
+++ b/test/analytics/tests/instrumented_events/from_the_browser/loaded_kibana.ts
@@ -19,36 +19,57 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await common.navigateToApp('home');
});
- it('should emit the "Loaded Kibana" event', async () => {
+ it('should emit the legacy "Loaded Kibana"', async () => {
const [event] = await ebtUIHelper.getEvents(1, { eventTypes: ['Loaded Kibana'] });
+
expect(event.event_type).to.eql('Loaded Kibana');
expect(event.properties).to.have.property('kibana_version');
expect(event.properties.kibana_version).to.be.a('string');
expect(event.properties).to.have.property('protocol');
expect(event.properties.protocol).to.be.a('string');
+ });
+
+ it('should emit the kibana_loaded event', async () => {
+ const [event] = await ebtUIHelper.getEvents(1, {
+ eventTypes: ['performance_metric'],
+ filters: { 'properties.eventName': { eq: 'kibana_loaded' } },
+ });
+
+ // New event
+ expect(event.event_type).to.eql('performance_metric');
+ expect(event.properties.eventName).to.eql('kibana_loaded');
+
+ // meta
+ expect(event.properties).to.have.property('meta');
+
+ const meta = event.properties.meta as Record;
+ expect(meta.kibana_version).to.be.a('string');
+ expect(meta.protocol).to.be.a('string');
// Kibana Loaded timings
- expect(event.properties).to.have.property('load_started');
- expect(event.properties.load_started).to.be.a('number');
- expect(event.properties).to.have.property('bootstrap_started');
- expect(event.properties.bootstrap_started).to.be.a('number');
- expect(event.properties).to.have.property('core_created');
- expect(event.properties.core_created).to.be.a('number');
- expect(event.properties).to.have.property('setup_done');
- expect(event.properties.setup_done).to.be.a('number');
- expect(event.properties).to.have.property('start_done');
- expect(event.properties.start_done).to.be.a('number');
- expect(event.properties).to.have.property('first_app_nav');
- expect(event.properties.start_done).to.be.a('number');
+ expect(event.properties).to.have.property('duration');
+ expect(event.properties.duration).to.be.a('number');
+
+ expect(event.properties).to.have.property('key1', 'load_started');
+ expect(event.properties).to.have.property('key2', 'bootstrap_started');
+ expect(event.properties).to.have.property('key3', 'core_created');
+ expect(event.properties).to.have.property('key4', 'setup_done');
+ expect(event.properties).to.have.property('key5', 'start_done');
+
+ expect(event.properties.value1).to.be.a('number');
+ expect(event.properties.value2).to.be.a('number');
+ expect(event.properties.value3).to.be.a('number');
+ expect(event.properties.value4).to.be.a('number');
+ expect(event.properties.value5).to.be.a('number');
if (browser.isChromium) {
// Kibana Loaded memory
- expect(event.properties).to.have.property('memory_js_heap_size_limit');
- expect(event.properties.memory_js_heap_size_limit).to.be.a('number');
- expect(event.properties).to.have.property('memory_js_heap_size_total');
- expect(event.properties.memory_js_heap_size_total).to.be.a('number');
- expect(event.properties).to.have.property('memory_js_heap_size_used');
- expect(event.properties.memory_js_heap_size_used).to.be.a('number');
+ expect(meta).to.have.property('jsHeapSizeLimit');
+ expect(meta.jsHeapSizeLimit).to.be.a('number');
+ expect(meta).to.have.property('totalJSHeapSize');
+ expect(meta.totalJSHeapSize).to.be.a('number');
+ expect(meta).to.have.property('usedJSHeapSize');
+ expect(meta.usedJSHeapSize).to.be.a('number');
}
});
});
diff --git a/test/analytics/tests/instrumented_events/from_the_server/core_context_providers.ts b/test/analytics/tests/instrumented_events/from_the_server/core_context_providers.ts
index 9a694c38b8b40..cf781bed5ad0e 100644
--- a/test/analytics/tests/instrumented_events/from_the_server/core_context_providers.ts
+++ b/test/analytics/tests/instrumented_events/from_the_server/core_context_providers.ts
@@ -15,7 +15,7 @@ export default function ({ getService }: FtrProviderContext) {
const ebtServerHelper = getService('kibana_ebt_server');
describe('Core Context Providers', () => {
- let event: Event;
+ let event: Event>;
before(async () => {
let i = 2;
do {
diff --git a/test/analytics/tests/instrumented_events/from_the_server/core_overall_status_changed.ts b/test/analytics/tests/instrumented_events/from_the_server/core_overall_status_changed.ts
index 07c03465f6c27..8f904c4c8844c 100644
--- a/test/analytics/tests/instrumented_events/from_the_server/core_overall_status_changed.ts
+++ b/test/analytics/tests/instrumented_events/from_the_server/core_overall_status_changed.ts
@@ -14,8 +14,8 @@ export default function ({ getService }: FtrProviderContext) {
const ebtServerHelper = getService('kibana_ebt_server');
describe('core-overall_status_changed', () => {
- let initialEvent: Event;
- let secondEvent: Event;
+ let initialEvent: Event>;
+ let secondEvent: Event>;
before(async () => {
[initialEvent, secondEvent] = await ebtServerHelper.getEvents(2, {
diff --git a/test/analytics/tests/instrumented_events/from_the_server/kibana_started.ts b/test/analytics/tests/instrumented_events/from_the_server/kibana_started.ts
index 5380d4e392e52..d1b59ce9d4e9c 100644
--- a/test/analytics/tests/instrumented_events/from_the_server/kibana_started.ts
+++ b/test/analytics/tests/instrumented_events/from_the_server/kibana_started.ts
@@ -13,7 +13,7 @@ export default function ({ getService }: FtrProviderContext) {
const ebtServerHelper = getService('kibana_ebt_server');
describe('kibana_started', () => {
- it('should emit the "kibana_started" event', async () => {
+ it('should emit the legacy "kibana_started" event', async () => {
const [event] = await ebtServerHelper.getEvents(1, { eventTypes: ['kibana_started'] });
expect(event.event_type).to.eql('kibana_started');
const uptimePerStep = event.properties.uptime_per_step as Record<
@@ -29,5 +29,25 @@ export default function ({ getService }: FtrProviderContext) {
expect(uptimePerStep.start.start).to.be.a('number');
expect(uptimePerStep.start.end).to.be.a('number');
});
+
+ it('should emit the "kibana_started" metric event', async () => {
+ const [event] = await ebtServerHelper.getEvents(1, {
+ eventTypes: ['performance_metric'],
+ filters: { 'properties.eventName': { eq: 'kibana_started' } },
+ });
+ expect(event.event_type).to.eql('performance_metric');
+ expect(event.properties.eventName).to.eql('kibana_started');
+ expect(event.properties.duration).to.be.a('number');
+ expect(event.properties.key1).to.eql('time_to_constructor');
+ expect(event.properties.value1).to.be.a('number');
+ expect(event.properties.key2).to.eql('constructor_time');
+ expect(event.properties.value2).to.be.a('number');
+ expect(event.properties.key3).to.eql('preboot_time');
+ expect(event.properties.value3).to.be.a('number');
+ expect(event.properties.key4).to.eql('setup_time');
+ expect(event.properties.value4).to.be.a('number');
+ expect(event.properties.key5).to.eql('start_time');
+ expect(event.properties.value5).to.be.a('number');
+ });
});
}
diff --git a/test/functional/apps/dashboard/group3/dashboard_state.ts b/test/functional/apps/dashboard/group3/dashboard_state.ts
index 79179b7c9d08b..33d5acceb00d8 100644
--- a/test/functional/apps/dashboard/group3/dashboard_state.ts
+++ b/test/functional/apps/dashboard/group3/dashboard_state.ts
@@ -48,7 +48,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
isNewChartsLibraryEnabled = await PageObjects.visChart.isNewChartsLibraryEnabled();
await PageObjects.dashboard.initTests();
await PageObjects.dashboard.preserveCrossAppState();
- await browser.setLocalStorageItem('data.newDataViewMenu', 'true');
if (!isNewChartsLibraryEnabled) {
await kibanaServer.uiSettings.update({
diff --git a/test/functional/apps/getting_started/_shakespeare.ts b/test/functional/apps/getting_started/_shakespeare.ts
index 8cdf4a5f2ff76..900121f1bcf0f 100644
--- a/test/functional/apps/getting_started/_shakespeare.ts
+++ b/test/functional/apps/getting_started/_shakespeare.ts
@@ -14,7 +14,6 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const log = getService('log');
- const esArchiver = getService('esArchiver');
const retry = getService('retry');
const security = getService('security');
const browser = getService('browser');
@@ -42,19 +41,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
let isNewChartsLibraryEnabled = true;
before(async function () {
- log.debug(
- 'Load empty_kibana and Shakespeare Getting Started data\n' +
- 'https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html'
- );
+ log.debug('https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html');
isNewChartsLibraryEnabled = await PageObjects.visChart.isNewChartsLibraryEnabled();
await security.testUser.setRoles(['kibana_admin', 'test_shakespeare_reader']);
- await esArchiver.load('test/functional/fixtures/es_archiver/empty_kibana', {
- skipExisting: true,
- });
+ await kibanaServer.savedObjects.cleanStandardList();
log.debug('Load shakespeare data');
- await esArchiver.loadIfNeeded(
- 'test/functional/fixtures/es_archiver/getting_started/shakespeare'
- );
if (!isNewChartsLibraryEnabled) {
await kibanaServer.uiSettings.update({
@@ -66,7 +57,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
after(async () => {
await security.testUser.restoreDefaults();
- await esArchiver.unload('test/functional/fixtures/es_archiver/getting_started/shakespeare');
+ kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.uiSettings.replace({});
});
diff --git a/test/functional/apps/getting_started/index.ts b/test/functional/apps/getting_started/index.ts
index dfda371c3eedf..9d4e3702dcf60 100644
--- a/test/functional/apps/getting_started/index.ts
+++ b/test/functional/apps/getting_started/index.ts
@@ -11,10 +11,18 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getService, loadTestFile }: FtrProviderContext) {
const browser = getService('browser');
const kibanaServer = getService('kibanaServer');
+ const esArchiver = getService('esArchiver');
describe('Getting Started ', function () {
before(async function () {
await browser.setWindowSize(1200, 800);
+ await esArchiver.loadIfNeeded(
+ 'test/functional/fixtures/es_archiver/getting_started/shakespeare'
+ );
+ });
+
+ after(async function () {
+ await esArchiver.unload('test/functional/fixtures/es_archiver/getting_started/shakespeare');
});
// TODO: Remove when vislib is removed
diff --git a/test/functional/apps/home/_navigation.ts b/test/functional/apps/home/_navigation.ts
index 1d9d02d5e94b5..016cead53f0c4 100644
--- a/test/functional/apps/home/_navigation.ts
+++ b/test/functional/apps/home/_navigation.ts
@@ -11,7 +11,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const browser = getService('browser');
- const PageObjects = getPageObjects(['common', 'header', 'home', 'timePicker', 'unifiedSearch']);
+ const PageObjects = getPageObjects(['common', 'header', 'home', 'timePicker']);
const appsMenu = getService('appsMenu');
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
@@ -37,7 +37,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
// Navigate to discover app
await appsMenu.clickLink('Discover');
- await PageObjects.unifiedSearch.closeTourPopoverByLocalStorage();
const discoverUrl = await browser.getCurrentUrl();
await PageObjects.timePicker.setDefaultAbsoluteRange();
const modifiedTimeDiscoverUrl = await browser.getCurrentUrl();
diff --git a/test/functional/page_objects/common_page.ts b/test/functional/page_objects/common_page.ts
index df6f04f7b4f5b..b3c0f7deda982 100644
--- a/test/functional/page_objects/common_page.ts
+++ b/test/functional/page_objects/common_page.ts
@@ -293,7 +293,6 @@ export class CommonPageObject extends FtrService {
}
if (appName === 'discover') {
await this.browser.setLocalStorageItem('data.autocompleteFtuePopover', 'true');
- await this.browser.setLocalStorageItem('data.newDataViewMenu', 'true');
}
return currentUrl;
});
diff --git a/test/functional/page_objects/dashboard_page.ts b/test/functional/page_objects/dashboard_page.ts
index 7ba25a89ce84a..6734690c4b3bd 100644
--- a/test/functional/page_objects/dashboard_page.ts
+++ b/test/functional/page_objects/dashboard_page.ts
@@ -333,7 +333,7 @@ export class DashboardPageObject extends FtrService {
await this.common.clickConfirmOnModal();
}
}
- await this.listingTable.clickNewButton('createDashboardPromptButton');
+ await this.listingTable.clickNewButton();
if (await this.testSubjects.exists('dashboardCreateConfirm')) {
if (continueEditing) {
await this.testSubjects.click('dashboardCreateConfirmContinue');
@@ -355,7 +355,7 @@ export class DashboardPageObject extends FtrService {
await this.common.clickConfirmOnModal();
}
}
- await this.listingTable.clickNewButton('createDashboardPromptButton');
+ await this.listingTable.clickNewButton();
await this.testSubjects.existOrFail('dashboardCreateConfirm');
if (continueEditing) {
await this.testSubjects.click('dashboardCreateConfirmContinue');
@@ -367,11 +367,11 @@ export class DashboardPageObject extends FtrService {
}
public async clickCreateDashboardPrompt() {
- await this.testSubjects.click('createDashboardPromptButton');
+ await this.testSubjects.click('newItemButton');
}
public async getCreateDashboardPromptExists() {
- return await this.testSubjects.exists('createDashboardPromptButton');
+ return this.testSubjects.exists('emptyListPrompt');
}
public async isOptionsOpen() {
diff --git a/test/functional/page_objects/discover_page.ts b/test/functional/page_objects/discover_page.ts
index 3f81384310eea..8700cc734d809 100644
--- a/test/functional/page_objects/discover_page.ts
+++ b/test/functional/page_objects/discover_page.ts
@@ -24,8 +24,6 @@ export class DiscoverPageObject extends FtrService {
private readonly kibanaServer = this.ctx.getService('kibanaServer');
private readonly queryBar = this.ctx.getService('queryBar');
- private readonly unifiedSearch = this.ctx.getPageObject('unifiedSearch');
-
private readonly defaultFindTimeout = this.config.get('timeouts.find');
public async getChartTimespan() {
@@ -570,7 +568,6 @@ export class DiscoverPageObject extends FtrService {
await this.retry.waitFor('Discover app on screen', async () => {
return await this.isDiscoverAppOnScreen();
});
- await this.unifiedSearch.closeTourPopoverByLocalStorage();
}
public async showAllFilterActions() {
diff --git a/test/functional/page_objects/unified_search_page.ts b/test/functional/page_objects/unified_search_page.ts
index af3cbd05c53e4..ab85d250a61e3 100644
--- a/test/functional/page_objects/unified_search_page.ts
+++ b/test/functional/page_objects/unified_search_page.ts
@@ -9,22 +9,9 @@
import { FtrService } from '../ftr_provider_context';
export class UnifiedSearchPageObject extends FtrService {
- private readonly browser = this.ctx.getService('browser');
private readonly retry = this.ctx.getService('retry');
private readonly testSubjects = this.ctx.getService('testSubjects');
- public async closeTour() {
- const tourPopoverIsOpen = await this.testSubjects.exists('dataViewPickerTourLink');
- if (tourPopoverIsOpen) {
- await this.testSubjects.click('dataViewPickerTourLink');
- }
- }
-
- public async closeTourPopoverByLocalStorage() {
- await this.browser.setLocalStorageItem('data.newDataViewMenu', 'true');
- await this.browser.refresh();
- }
-
public async switchDataView(switchButtonSelector: string, dataViewTitle: string) {
await this.testSubjects.click(switchButtonSelector);
diff --git a/test/functional/page_objects/visualize_page.ts b/test/functional/page_objects/visualize_page.ts
index e087d50f21003..95adb7e64b1ec 100644
--- a/test/functional/page_objects/visualize_page.ts
+++ b/test/functional/page_objects/visualize_page.ts
@@ -39,7 +39,6 @@ export class VisualizePageObject extends FtrService {
private readonly elasticChart = this.ctx.getService('elasticChart');
private readonly common = this.ctx.getPageObject('common');
private readonly header = this.ctx.getPageObject('header');
- private readonly unifiedSearch = this.ctx.getPageObject('unifiedSearch');
private readonly visEditor = this.ctx.getPageObject('visEditor');
private readonly visChart = this.ctx.getPageObject('visChart');
@@ -70,7 +69,7 @@ export class VisualizePageObject extends FtrService {
}
public async clickNewVisualization() {
- await this.listingTable.clickNewButton('createVisualizationPromptButton');
+ await this.listingTable.clickNewButton();
}
public async clickAggBasedVisualizations() {
@@ -82,7 +81,7 @@ export class VisualizePageObject extends FtrService {
}
public async createVisualizationPromptButton() {
- await this.testSubjects.click('createVisualizationPromptButton');
+ await this.testSubjects.click('newItemButton');
}
public async getChartTypes() {
@@ -155,10 +154,6 @@ export class VisualizePageObject extends FtrService {
public async clickVisType(type: string) {
await this.testSubjects.click(`visType-${type}`);
await this.header.waitUntilLoadingHasFinished();
-
- if (type === 'lens') {
- await this.unifiedSearch.closeTour();
- }
}
public async clickAreaChart() {
@@ -260,7 +255,7 @@ export class VisualizePageObject extends FtrService {
await this.listingTable.checkListingSelectAllCheckbox();
await this.listingTable.clickDeleteSelected();
await this.common.clickConfirmOnModal();
- await this.testSubjects.find('createVisualizationPromptButton');
+ await this.testSubjects.find('newItemButton');
});
}
diff --git a/test/functional/services/dashboard/visualizations.ts b/test/functional/services/dashboard/visualizations.ts
index 48828798a4efa..8688d375f7a7b 100644
--- a/test/functional/services/dashboard/visualizations.ts
+++ b/test/functional/services/dashboard/visualizations.ts
@@ -17,7 +17,6 @@ export class DashboardVisualizationsService extends FtrService {
private readonly visualize = this.ctx.getPageObject('visualize');
private readonly visEditor = this.ctx.getPageObject('visEditor');
private readonly header = this.ctx.getPageObject('header');
- private readonly unifiedSearch = this.ctx.getPageObject('unifiedSearch');
private readonly discover = this.ctx.getPageObject('discover');
private readonly timePicker = this.ctx.getPageObject('timePicker');
@@ -44,7 +43,6 @@ export class DashboardVisualizationsService extends FtrService {
}) {
this.log.debug(`createSavedSearch(${name})`);
await this.header.clickDiscover(true);
- await this.unifiedSearch.closeTourPopoverByLocalStorage();
await this.timePicker.setHistoricalDataRange();
if (query) {
diff --git a/test/functional/services/listing_table.ts b/test/functional/services/listing_table.ts
index 1cd4249df5050..8db68883715e2 100644
--- a/test/functional/services/listing_table.ts
+++ b/test/functional/services/listing_table.ts
@@ -180,21 +180,9 @@ export class ListingTableService extends FtrService {
/**
* Clicks NewItem button on Landing page
- * @param promptBtnTestSubj testSubj locator for Prompt button
*/
- public async clickNewButton(promptBtnTestSubj: string): Promise {
- await this.retry.tryForTime(20000, async () => {
- // newItemButton button is only visible when there are items in the listing table is displayed.
- const isnNewItemButtonPresent = await this.testSubjects.exists('newItemButton', {
- timeout: 10000,
- });
- if (isnNewItemButtonPresent) {
- await this.testSubjects.click('newItemButton');
- } else {
- // no items exist, click createPromptButton to create new dashboard/visualization
- await this.testSubjects.click(promptBtnTestSubj);
- }
- });
+ public async clickNewButton(): Promise {
+ await this.testSubjects.click('newItemButton');
}
public async onListingPage(appName: AppName) {
diff --git a/tsconfig.base.json b/tsconfig.base.json
index 297cb4101b6f6..c3a37ced8434e 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -47,6 +47,8 @@
"@kbn/ui-actions-examples-plugin/*": ["examples/ui_action_examples/*"],
"@kbn/ui-actions-explorer-plugin": ["examples/ui_actions_explorer"],
"@kbn/ui-actions-explorer-plugin/*": ["examples/ui_actions_explorer/*"],
+ "@kbn/user-profile-examples-plugin": ["examples/user_profile_examples"],
+ "@kbn/user-profile-examples-plugin/*": ["examples/user_profile_examples/*"],
"@kbn/advanced-settings-plugin": ["src/plugins/advanced_settings"],
"@kbn/advanced-settings-plugin/*": ["src/plugins/advanced_settings/*"],
"@kbn/bfetch-plugin": ["src/plugins/bfetch"],
diff --git a/x-pack/gulpfile.js b/x-pack/gulpfile.js
index 3b9263fdcea2e..f460d99af28f0 100644
--- a/x-pack/gulpfile.js
+++ b/x-pack/gulpfile.js
@@ -7,11 +7,9 @@
require('../src/setup_node_env');
-const { buildTask } = require('./tasks/build');
const { downloadChromium } = require('./tasks/download_chromium');
// export the tasks that are runnable from the CLI
module.exports = {
- build: buildTask,
downloadChromium,
};
diff --git a/x-pack/package.json b/x-pack/package.json
index dbec2f68b8dfa..2433a70c26123 100644
--- a/x-pack/package.json
+++ b/x-pack/package.json
@@ -8,7 +8,6 @@
"github-checks-reporter": "../node_modules/.bin/github-checks-reporter",
"kbn": "node ../scripts/kbn",
"start": "node ../scripts/kibana --dev",
- "build": "node --preserve-symlinks ../node_modules/.bin/gulp build",
"test:jest": "node ../scripts/jest"
},
"kibana": {
diff --git a/x-pack/packages/ml/aiops_components/src/dual_brush/dual_brush.tsx b/x-pack/packages/ml/aiops_components/src/dual_brush/dual_brush.tsx
index 1c03b909ded1c..b4eb2e0809f4e 100644
--- a/x-pack/packages/ml/aiops_components/src/dual_brush/dual_brush.tsx
+++ b/x-pack/packages/ml/aiops_components/src/dual_brush/dual_brush.tsx
@@ -12,6 +12,7 @@ import * as d3Scale from 'd3-scale';
import * as d3Selection from 'd3-selection';
import * as d3Transition from 'd3-transition';
+import { getSnappedWindowParameters } from '@kbn/aiops-utils';
import type { WindowParameters } from '@kbn/aiops-utils';
import './dual_brush.scss';
@@ -58,6 +59,7 @@ interface DualBrushProps {
max: number;
onChange?: (windowParameters: WindowParameters, windowPxParameters: WindowParameters) => void;
marginLeft: number;
+ snapTimestamps?: number[];
width: number;
}
@@ -67,6 +69,7 @@ export function DualBrush({
max,
onChange,
marginLeft,
+ snapTimestamps,
width,
}: DualBrushProps) {
const d3BrushContainer = useRef(null);
@@ -97,10 +100,10 @@ export function DualBrush({
const xMax = x(max) ?? 0;
const minExtentPx = Math.round((xMax - xMin) / 100);
- const baselineBrush = d3.select('#brush-baseline');
+ const baselineBrush = d3.select('#aiops-brush-baseline');
const baselineSelection = d3.brushSelection(baselineBrush.node() as SVGGElement);
- const deviationBrush = d3.select('#brush-deviation');
+ const deviationBrush = d3.select('#aiops-brush-deviation');
const deviationSelection = d3.brushSelection(deviationBrush.node() as SVGGElement);
if (!isBrushXSelection(deviationSelection) || !isBrushXSelection(baselineSelection)) {
@@ -129,12 +132,6 @@ export function DualBrush({
deviationMin: px2ts(deviationSelection[0]),
deviationMax: px2ts(deviationSelection[1]),
};
- const newBrushPx = {
- baselineMin: baselineSelection[0],
- baselineMax: baselineSelection[1],
- deviationMin: deviationSelection[0],
- deviationMax: deviationSelection[1],
- };
if (
id === 'deviation' &&
@@ -147,14 +144,6 @@ export function DualBrush({
newWindowParameters.deviationMin = px2ts(newDeviationMin);
newWindowParameters.deviationMax = px2ts(newDeviationMax);
- newBrushPx.deviationMin = newDeviationMin;
- newBrushPx.deviationMax = newDeviationMax;
-
- d3.select(this)
- .transition()
- .duration(200)
- // @ts-expect-error call doesn't allow the brush move function
- .call(brushes.current[1].brush.move, [newDeviationMin, newDeviationMax]);
} else if (
id === 'baseline' &&
deviationSelection &&
@@ -166,23 +155,56 @@ export function DualBrush({
newWindowParameters.baselineMin = px2ts(newBaselineMin);
newWindowParameters.baselineMax = px2ts(newBaselineMax);
- newBrushPx.baselineMin = newBaselineMin;
- newBrushPx.baselineMax = newBaselineMax;
+ }
+
+ const snappedWindowParameters = snapTimestamps
+ ? getSnappedWindowParameters(newWindowParameters, snapTimestamps)
+ : newWindowParameters;
+
+ const newBrushPx = {
+ baselineMin: x(snappedWindowParameters.baselineMin) ?? 0,
+ baselineMax: x(snappedWindowParameters.baselineMax) ?? 0,
+ deviationMin: x(snappedWindowParameters.deviationMin) ?? 0,
+ deviationMax: x(snappedWindowParameters.deviationMax) ?? 0,
+ };
+ if (
+ id === 'baseline' &&
+ (baselineSelection[0] !== newBrushPx.baselineMin ||
+ baselineSelection[1] !== newBrushPx.baselineMax)
+ ) {
+ d3.select(this)
+ .transition()
+ .duration(200)
+ // @ts-expect-error call doesn't allow the brush move function
+ .call(brushes.current[0].brush.move, [
+ newBrushPx.baselineMin,
+ newBrushPx.baselineMax,
+ ]);
+ }
+
+ if (
+ id === 'deviation' &&
+ (deviationSelection[0] !== newBrushPx.deviationMin ||
+ deviationSelection[1] !== newBrushPx.deviationMax)
+ ) {
d3.select(this)
.transition()
.duration(200)
// @ts-expect-error call doesn't allow the brush move function
- .call(brushes.current[0].brush.move, [newBaselineMin, newBaselineMax]);
+ .call(brushes.current[1].brush.move, [
+ newBrushPx.deviationMin,
+ newBrushPx.deviationMax,
+ ]);
}
- brushes.current[0].start = newWindowParameters.baselineMin;
- brushes.current[0].end = newWindowParameters.baselineMax;
- brushes.current[1].start = newWindowParameters.deviationMin;
- brushes.current[1].end = newWindowParameters.deviationMax;
+ brushes.current[0].start = snappedWindowParameters.baselineMin;
+ brushes.current[0].end = snappedWindowParameters.baselineMax;
+ brushes.current[1].start = snappedWindowParameters.deviationMin;
+ brushes.current[1].end = snappedWindowParameters.deviationMax;
if (onChange) {
- onChange(newWindowParameters, newBrushPx);
+ onChange(snappedWindowParameters, newBrushPx);
}
drawBrushes();
}
@@ -199,7 +221,7 @@ export function DualBrush({
.insert('g', '.brush')
.attr('class', 'brush')
.attr('id', (b: DualBrush) => {
- return 'brush-' + b.id;
+ return 'aiops-brush-' + b.id;
})
.each((brushObject: DualBrush, i, n) => {
const x = d3.scaleLinear().domain([min, max]).rangeRound([0, widthRef.current]);
@@ -255,7 +277,17 @@ export function DualBrush({
drawBrushes();
}
- }, [min, max, width, baselineMin, baselineMax, deviationMin, deviationMax, onChange]);
+ }, [
+ min,
+ max,
+ width,
+ baselineMin,
+ baselineMax,
+ deviationMin,
+ deviationMax,
+ snapTimestamps,
+ onChange,
+ ]);
return (
<>
diff --git a/x-pack/packages/ml/aiops_components/src/progress_controls/progress_controls.tsx b/x-pack/packages/ml/aiops_components/src/progress_controls/progress_controls.tsx
index 5130a511a92c3..be82f11f778b2 100644
--- a/x-pack/packages/ml/aiops_components/src/progress_controls/progress_controls.tsx
+++ b/x-pack/packages/ml/aiops_components/src/progress_controls/progress_controls.tsx
@@ -5,7 +5,14 @@
* 2.0.
*/
-import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiProgress, EuiText } from '@elastic/eui';
+import {
+ EuiButton,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiIconTip,
+ EuiProgress,
+ EuiText,
+} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import React from 'react';
@@ -19,6 +26,7 @@ interface ProgressControlProps {
onRefresh: () => void;
onCancel: () => void;
isRunning: boolean;
+ shouldRerunAnalysis: boolean;
}
export function ProgressControls({
@@ -27,6 +35,7 @@ export function ProgressControls({
onRefresh,
onCancel,
isRunning,
+ shouldRerunAnalysis,
}: ProgressControlProps) {
return (
@@ -56,11 +65,34 @@ export function ProgressControls({
{!isRunning && (
-
-
+
+
+
+
+
+ {shouldRerunAnalysis && (
+ <>
+
+
+
+ >
+ )}
+
)}
{isRunning && (
diff --git a/x-pack/packages/ml/aiops_utils/src/fetch_stream.ts b/x-pack/packages/ml/aiops_utils/src/fetch_stream.ts
index 4a1ed282c3ee7..d8d71adc81bc3 100644
--- a/x-pack/packages/ml/aiops_utils/src/fetch_stream.ts
+++ b/x-pack/packages/ml/aiops_utils/src/fetch_stream.ts
@@ -44,17 +44,24 @@ export async function* fetchStream | Array> | undefined]
> {
- const stream = await fetch(endpoint, {
- signal: abortCtrl.current.signal,
- method: 'POST',
- headers: {
- // This refers to the format of the request body,
- // not the response, which will be a uint8array Buffer.
- 'Content-Type': 'application/json',
- 'kbn-xsrf': 'stream',
- },
- ...(Object.keys(body).length > 0 ? { body: JSON.stringify(body) } : {}),
- });
+ let stream: Response;
+
+ try {
+ stream = await fetch(endpoint, {
+ signal: abortCtrl.current.signal,
+ method: 'POST',
+ headers: {
+ // This refers to the format of the request body,
+ // not the response, which will be a uint8array Buffer.
+ 'Content-Type': 'application/json',
+ 'kbn-xsrf': 'stream',
+ },
+ ...(Object.keys(body).length > 0 ? { body: JSON.stringify(body) } : {}),
+ });
+ } catch (error) {
+ yield [error.toString(), undefined];
+ return;
+ }
if (!stream.ok) {
yield [`Error ${stream.status}: ${stream.statusText}`, undefined];
diff --git a/x-pack/packages/ml/aiops_utils/src/get_window_parameters.ts b/x-pack/packages/ml/aiops_utils/src/get_window_parameters.ts
index 0cdcf891b053f..9408e360ba5eb 100644
--- a/x-pack/packages/ml/aiops_utils/src/get_window_parameters.ts
+++ b/x-pack/packages/ml/aiops_utils/src/get_window_parameters.ts
@@ -65,3 +65,63 @@ export const getWindowParameters = (
deviationMax: Math.round(deviationMax),
};
};
+
+/**
+ *
+ * Converts window paramaters from the brushes to “snap” the brushes to the chart histogram bar width and ensure timestamps
+ * correspond to bucket timestamps
+ *
+ * @param windowParameters time range definition for baseline and deviation to be used by spike log analysis
+ * @param snapTimestamps time range definition that always corresponds to histogram bucket timestamps
+ * @returns WindowParameters
+ */
+export const getSnappedWindowParameters = (
+ windowParameters: WindowParameters,
+ snapTimestamps: number[]
+): WindowParameters => {
+ const snappedBaselineMin = snapTimestamps.reduce((pts, cts) => {
+ if (
+ Math.abs(cts - windowParameters.baselineMin) < Math.abs(pts - windowParameters.baselineMin)
+ ) {
+ return cts;
+ }
+ return pts;
+ }, snapTimestamps[0]);
+ const baselineMaxTimestamps = snapTimestamps.filter((ts) => ts > snappedBaselineMin);
+
+ const snappedBaselineMax = baselineMaxTimestamps.reduce((pts, cts) => {
+ if (
+ Math.abs(cts - windowParameters.baselineMax) < Math.abs(pts - windowParameters.baselineMax)
+ ) {
+ return cts;
+ }
+ return pts;
+ }, baselineMaxTimestamps[0]);
+ const deviationMinTss = baselineMaxTimestamps.filter((ts) => ts > snappedBaselineMax);
+
+ const snappedDeviationMin = deviationMinTss.reduce((pts, cts) => {
+ if (
+ Math.abs(cts - windowParameters.deviationMin) < Math.abs(pts - windowParameters.deviationMin)
+ ) {
+ return cts;
+ }
+ return pts;
+ }, deviationMinTss[0]);
+ const deviationMaxTss = deviationMinTss.filter((ts) => ts > snappedDeviationMin);
+
+ const snappedDeviationMax = deviationMaxTss.reduce((pts, cts) => {
+ if (
+ Math.abs(cts - windowParameters.deviationMax) < Math.abs(pts - windowParameters.deviationMax)
+ ) {
+ return cts;
+ }
+ return pts;
+ }, deviationMaxTss[0]);
+
+ return {
+ baselineMin: snappedBaselineMin,
+ baselineMax: snappedBaselineMax,
+ deviationMin: snappedDeviationMin,
+ deviationMax: snappedDeviationMax,
+ };
+};
diff --git a/x-pack/packages/ml/aiops_utils/src/index.ts b/x-pack/packages/ml/aiops_utils/src/index.ts
index a02ecc2d41958..554d7cf23b0c2 100644
--- a/x-pack/packages/ml/aiops_utils/src/index.ts
+++ b/x-pack/packages/ml/aiops_utils/src/index.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-export { getWindowParameters } from './get_window_parameters';
+export { getSnappedWindowParameters, getWindowParameters } from './get_window_parameters';
export type { WindowParameters } from './get_window_parameters';
export { streamFactory } from './stream_factory';
export { useFetchStream } from './use_fetch_stream';
diff --git a/x-pack/packages/ml/aiops_utils/src/use_fetch_stream.ts b/x-pack/packages/ml/aiops_utils/src/use_fetch_stream.ts
index 13436efc6d471..516a63e165ffb 100644
--- a/x-pack/packages/ml/aiops_utils/src/use_fetch_stream.ts
+++ b/x-pack/packages/ml/aiops_utils/src/use_fetch_stream.ts
@@ -41,7 +41,7 @@ interface UseFetchStreamReturnType {
cancel: () => void;
data: Data;
dispatch: Dispatch;
- error: string | undefined;
+ errors: string[];
isCancelled: boolean;
isRunning: boolean;
start: () => Promise;
@@ -76,7 +76,7 @@ export function useFetchStream }
): UseFetchStreamReturnType, ReducerAction> {
- const [error, setError] = useState();
+ const [errors, setErrors] = useState([]);
const [isCancelled, setIsCancelled] = useState(false);
const [isRunning, setIsRunning] = useState(false);
@@ -87,13 +87,17 @@ export function useFetchStream {
+ setErrors((prevErrors) => [...prevErrors, error]);
+ };
+
const start = async () => {
if (isRunning) {
- setError('Restart not supported yet.');
+ addError('Restart not supported yet.');
return;
}
- setError(undefined);
+ setErrors([]);
setIsRunning(true);
setIsCancelled(false);
@@ -104,7 +108,7 @@ export function useFetchStream(endpoint, abortCtrl, body, options !== undefined)) {
if (fetchStreamError !== null) {
- setError(fetchStreamError);
+ addError(fetchStreamError);
} else if (actions.length > 0) {
dispatch(actions as ReducerAction);
}
@@ -128,7 +132,7 @@ export function useFetchStream {
let service: ExternalService;
@@ -66,8 +65,13 @@ describe('Cases webhook service', () => {
logger,
configurationUtilities
);
+ jest.useFakeTimers('modern');
+ jest.setSystemTime(mockTime);
});
+ afterAll(() => {
+ jest.useRealTimers();
+ });
beforeEach(() => {
jest.clearAllMocks();
});
@@ -130,8 +134,6 @@ describe('Cases webhook service', () => {
fields: {
title: 'title',
description: 'description',
- created: '2021-10-20T19:41:02.754+0300',
- updated: '2021-10-20T19:41:02.754+0300',
},
},
};
@@ -142,8 +144,6 @@ describe('Cases webhook service', () => {
expect(res).toEqual({
id: '1',
title: 'CK-1',
- createdAt: '2021-10-20T19:41:02.754+0300',
- updatedAt: '2021-10-20T19:41:02.754+0300',
});
});
@@ -186,7 +186,7 @@ describe('Cases webhook service', () => {
);
await expect(service.getIncident('1')).rejects.toThrow(
- '[Action][Webhook - Case Management]: Unable to get case with id 1. Error: Response is missing the expected fields: fields.created, key, fields.updated'
+ '[Action][Webhook - Case Management]: Unable to get case with id 1. Error: Response is missing the expected field: key'
);
});
});
@@ -215,7 +215,6 @@ describe('Cases webhook service', () => {
data: {
id: '1',
key: 'CK-1',
- fields: { created: '2020-04-27T10:59:46.202Z', updated: '2020-04-27T10:59:46.202Z' },
},
})
);
@@ -229,7 +228,7 @@ describe('Cases webhook service', () => {
expect(res).toEqual({
title: 'CK-1',
id: '1',
- pushedDate: '2020-04-27T10:59:46.202Z',
+ pushedDate: mockTime.toISOString(),
url: 'https://coolsite.net/browse/CK-1',
});
});
@@ -240,7 +239,6 @@ describe('Cases webhook service', () => {
data: {
id: '1',
key: 'CK-1',
- fields: { created: '2020-04-27T10:59:46.202Z' },
},
})
);
@@ -250,7 +248,6 @@ describe('Cases webhook service', () => {
data: {
id: '1',
key: 'CK-1',
- fields: { created: '2020-04-27T10:59:46.202Z', updated: '2020-04-27T10:59:46.202Z' },
},
})
);
@@ -314,7 +311,6 @@ describe('Cases webhook service', () => {
data: {
id: '1',
key: 'CK-1',
- fields: { created: '2020-04-27T10:59:46.202Z', updated: '2020-04-27T10:59:46.202Z' },
},
})
);
@@ -324,7 +320,7 @@ describe('Cases webhook service', () => {
expect(res).toEqual({
title: 'CK-1',
id: '1',
- pushedDate: '2020-04-27T10:59:46.202Z',
+ pushedDate: mockTime.toISOString(),
url: 'https://coolsite.net/browse/CK-1',
});
});
@@ -335,7 +331,6 @@ describe('Cases webhook service', () => {
data: {
id: '1',
key: 'CK-1',
- fields: { created: '2020-04-27T10:59:46.202Z', updated: '2020-04-27T10:59:46.202Z' },
},
})
);
@@ -397,7 +392,6 @@ describe('Cases webhook service', () => {
data: {
id: '1',
key: 'CK-1',
- created: '2020-04-27T10:59:46.202Z',
},
})
);
@@ -413,7 +407,6 @@ describe('Cases webhook service', () => {
data: {
id: '1',
key: 'CK-1',
- created: '2020-04-27T10:59:46.202Z',
},
})
);
@@ -648,10 +641,6 @@ describe('Cases webhook service', () => {
data: {
id: '../../malicious-app/malicious-endpoint/',
key: '../../malicious-app/malicious-endpoint/',
- fields: {
- updated: '2020-04-27T10:59:46.202Z',
- created: '2020-04-27T10:59:46.202Z',
- },
},
})
);
diff --git a/x-pack/plugins/actions/server/builtin_action_types/cases_webhook/service.ts b/x-pack/plugins/actions/server/builtin_action_types/cases_webhook/service.ts
index 26551200a3b69..ef8879b8e574b 100644
--- a/x-pack/plugins/actions/server/builtin_action_types/cases_webhook/service.ts
+++ b/x-pack/plugins/actions/server/builtin_action_types/cases_webhook/service.ts
@@ -14,7 +14,6 @@ import { renderMustacheStringNoEscape } from '../../lib/mustache_renderer';
import {
createServiceError,
getObjectValueByKeyAsString,
- getPushedDate,
stringifyObjValues,
removeSlash,
throwDescriptiveErrorIfResponseIsNotValid,
@@ -49,9 +48,7 @@ export const createExternalService = (
createIncidentMethod,
createIncidentResponseKey,
createIncidentUrl: createIncidentUrlConfig,
- getIncidentResponseCreatedDateKey,
getIncidentResponseExternalTitleKey,
- getIncidentResponseUpdatedDateKey,
getIncidentUrl,
hasAuth,
headers,
@@ -107,17 +104,11 @@ export const createExternalService = (
throwDescriptiveErrorIfResponseIsNotValid({
res,
- requiredAttributesToBeInTheResponse: [
- getIncidentResponseCreatedDateKey,
- getIncidentResponseExternalTitleKey,
- getIncidentResponseUpdatedDateKey,
- ],
+ requiredAttributesToBeInTheResponse: [getIncidentResponseExternalTitleKey],
});
const title = getObjectValueByKeyAsString(res.data, getIncidentResponseExternalTitleKey)!;
- const createdAt = getObjectValueByKeyAsString(res.data, getIncidentResponseCreatedDateKey)!;
- const updatedAt = getObjectValueByKeyAsString(res.data, getIncidentResponseUpdatedDateKey)!;
- return { id, title, createdAt, updatedAt };
+ return { id, title };
} catch (error) {
throw createServiceError(error, `Unable to get case with id ${id}`);
}
@@ -180,7 +171,7 @@ export const createExternalService = (
id: externalId,
title: insertedIncident.title,
url: normalizedViewUrl,
- pushedDate: getPushedDate(insertedIncident.createdAt),
+ pushedDate: new Date().toISOString(),
};
} catch (error) {
throw createServiceError(error, 'Unable to create case');
@@ -250,7 +241,7 @@ export const createExternalService = (
id: incidentId,
title: updatedIncident.title,
url: normalizedViewUrl,
- pushedDate: getPushedDate(updatedIncident.updatedAt),
+ pushedDate: new Date().toISOString(),
};
} catch (error) {
throw createServiceError(error, `Unable to update case with id ${incidentId}`);
diff --git a/x-pack/plugins/actions/server/builtin_action_types/cases_webhook/types.ts b/x-pack/plugins/actions/server/builtin_action_types/cases_webhook/types.ts
index 1ea2b515e3ecd..095b07fd4c9f7 100644
--- a/x-pack/plugins/actions/server/builtin_action_types/cases_webhook/types.ts
+++ b/x-pack/plugins/actions/server/builtin_action_types/cases_webhook/types.ts
@@ -108,8 +108,6 @@ export interface ExternalServiceCommentResponse {
export interface GetIncidentResponse {
id: string;
title: string;
- createdAt: string;
- updatedAt: string;
}
export interface ExternalServiceApi {
diff --git a/x-pack/plugins/actions/server/builtin_action_types/cases_webhook/utils.ts b/x-pack/plugins/actions/server/builtin_action_types/cases_webhook/utils.ts
index 5833db7b6358e..12a5ab0f64021 100644
--- a/x-pack/plugins/actions/server/builtin_action_types/cases_webhook/utils.ts
+++ b/x-pack/plugins/actions/server/builtin_action_types/cases_webhook/utils.ts
@@ -7,7 +7,7 @@
import { AxiosResponse, AxiosError } from 'axios';
import { isEmpty, isObjectLike, get } from 'lodash';
-import { addTimeZoneToDate, getErrorMessage } from '../lib/axios_utils';
+import { getErrorMessage } from '../lib/axios_utils';
import * as i18n from './translations';
export const createServiceError = (error: AxiosError, message: string) => {
@@ -24,17 +24,6 @@ export const createServiceError = (error: AxiosError, message: string) => {
);
};
-export const getPushedDate = (timestamp?: string) => {
- if (timestamp != null && new Date(timestamp).getTime() > 0) {
- try {
- return new Date(timestamp).toISOString();
- } catch (e) {
- return new Date(addTimeZoneToDate(timestamp)).toISOString();
- }
- }
- return new Date().toISOString();
-};
-
export const getObjectValueByKeyAsString = (
obj: Record | unknown>,
key: string
diff --git a/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/actions.ts b/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/actions.ts
index 78ec9c7c33432..74b004a0c7436 100644
--- a/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/actions.ts
+++ b/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/actions.ts
@@ -10,7 +10,7 @@ import type { ChangePoint, ChangePointHistogram } from '@kbn/ml-agg-utils';
export const API_ACTION_NAME = {
ADD_CHANGE_POINTS: 'add_change_points',
ADD_CHANGE_POINTS_HISTOGRAM: 'add_change_points_histogram',
- ERROR: 'error',
+ ADD_ERROR: 'add_error',
RESET: 'reset',
UPDATE_LOADING_STATE: 'update_loading_state',
} as const;
@@ -44,14 +44,14 @@ export function addChangePointsHistogramAction(
};
}
-interface ApiActionError {
- type: typeof API_ACTION_NAME.ERROR;
+interface ApiActionAddError {
+ type: typeof API_ACTION_NAME.ADD_ERROR;
payload: string;
}
-export function errorAction(payload: ApiActionError['payload']): ApiActionError {
+export function addErrorAction(payload: ApiActionAddError['payload']): ApiActionAddError {
return {
- type: API_ACTION_NAME.ERROR,
+ type: API_ACTION_NAME.ADD_ERROR,
payload,
};
}
@@ -85,6 +85,6 @@ export function updateLoadingStateAction(
export type AiopsExplainLogRateSpikesApiAction =
| ApiActionAddChangePoints
| ApiActionAddChangePointsHistogram
- | ApiActionError
+ | ApiActionAddError
| ApiActionReset
| ApiActionUpdateLoadingState;
diff --git a/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/index.ts b/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/index.ts
index e03a527eb576f..91b5e3acf2282 100644
--- a/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/index.ts
+++ b/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/index.ts
@@ -8,7 +8,7 @@
export {
addChangePointsAction,
addChangePointsHistogramAction,
- errorAction,
+ addErrorAction,
resetAction,
updateLoadingStateAction,
API_ACTION_NAME,
diff --git a/x-pack/plugins/aiops/common/api/stream_reducer.test.ts b/x-pack/plugins/aiops/common/api/stream_reducer.test.ts
index 483de40e685d6..260e3b12afaeb 100644
--- a/x-pack/plugins/aiops/common/api/stream_reducer.test.ts
+++ b/x-pack/plugins/aiops/common/api/stream_reducer.test.ts
@@ -24,6 +24,7 @@ describe('streamReducer', () => {
loaded: 50,
loadingState: 'Loaded 50%',
changePoints: [],
+ errors: [],
});
});
diff --git a/x-pack/plugins/aiops/common/api/stream_reducer.ts b/x-pack/plugins/aiops/common/api/stream_reducer.ts
index 597527e80daef..4a19ecfdd035e 100644
--- a/x-pack/plugins/aiops/common/api/stream_reducer.ts
+++ b/x-pack/plugins/aiops/common/api/stream_reducer.ts
@@ -12,6 +12,7 @@ import { API_ACTION_NAME, AiopsExplainLogRateSpikesApiAction } from './explain_l
interface StreamState {
ccsWarning: boolean;
changePoints: ChangePoint[];
+ errors: string[];
loaded: number;
loadingState: string;
}
@@ -19,6 +20,7 @@ interface StreamState {
export const initialState: StreamState = {
ccsWarning: false,
changePoints: [],
+ errors: [],
loaded: 0,
loadingState: '',
};
@@ -45,6 +47,8 @@ export function streamReducer(
return cp;
});
return { ...state, changePoints };
+ case API_ACTION_NAME.ADD_ERROR:
+ return { ...state, errors: [...state.errors, action.payload] };
case API_ACTION_NAME.RESET:
return initialState;
case API_ACTION_NAME.UPDATE_LOADING_STATE:
diff --git a/x-pack/plugins/aiops/public/components/document_count_content/document_count_chart/brush_badge.tsx b/x-pack/plugins/aiops/public/components/document_count_content/document_count_chart/brush_badge.tsx
new file mode 100644
index 0000000000000..3f1039a0365f3
--- /dev/null
+++ b/x-pack/plugins/aiops/public/components/document_count_content/document_count_chart/brush_badge.tsx
@@ -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; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import React, { FC } from 'react';
+
+import { EuiBadge, EuiText, EuiToolTip } from '@elastic/eui';
+// @ts-ignore
+import { formatDate } from '@elastic/eui/lib/services/format';
+
+const DATE_FORMAT = 'YYYY-MM-DD';
+const TIME_FORMAT = 'HH:mm:ss';
+
+interface BrushBadgeProps {
+ label: string;
+ marginLeft: number;
+ timestampFrom: number;
+ timestampTo: number;
+ width: number;
+}
+
+export const BrushBadge: FC = ({
+ label,
+ marginLeft,
+ timestampFrom,
+ timestampTo,
+ width,
+}) => {
+ // If "from" and "to" are on the same day, we skip displaying the date twice.
+ const dateFrom = formatDate(timestampFrom, DATE_FORMAT);
+ const dateTo = formatDate(timestampTo, DATE_FORMAT);
+ const timeFrom = formatDate(timestampFrom, TIME_FORMAT);
+ const timeTo = formatDate(timestampTo, TIME_FORMAT);
+
+ return (
+
+
+ {dateFrom} {timeFrom} -{' '}
+ {dateFrom !== dateTo && (
+ <>
+
+ {dateTo}{' '}
+ >
+ )}
+ {timeTo}
+
+ }
+ position="top"
+ >
+ {label}
+
+
+ );
+};
diff --git a/x-pack/plugins/aiops/public/components/document_count_content/document_count_chart/document_count_chart.tsx b/x-pack/plugins/aiops/public/components/document_count_content/document_count_chart/document_count_chart.tsx
index 4f2c723791e1c..79f5494b419ca 100644
--- a/x-pack/plugins/aiops/public/components/document_count_content/document_count_chart/document_count_chart.tsx
+++ b/x-pack/plugins/aiops/public/components/document_count_content/document_count_chart/document_count_chart.tsx
@@ -20,19 +20,19 @@ import {
XYChartElementEvent,
XYBrushEvent,
} from '@elastic/charts';
-import { EuiBadge } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
-import { FormattedMessage } from '@kbn/i18n-react';
import { IUiSettingsClient } from '@kbn/core/public';
import { DualBrush, DualBrushAnnotation } from '@kbn/aiops-components';
-import { getWindowParameters } from '@kbn/aiops-utils';
+import { getSnappedWindowParameters, getWindowParameters } from '@kbn/aiops-utils';
import type { WindowParameters } from '@kbn/aiops-utils';
import { MULTILAYER_TIME_AXIS_STYLE } from '@kbn/charts-plugin/common';
import type { ChangePoint } from '@kbn/ml-agg-utils';
import { useAiOpsKibana } from '../../../kibana_context';
+import { BrushBadge } from './brush_badge';
+
export interface DocumentCountChartPoint {
time: number | string;
value: number;
@@ -52,6 +52,9 @@ interface DocumentCountChartProps {
const SPEC_ID = 'document_count';
+const BADGE_HEIGHT = 20;
+const BADGE_WIDTH = 75;
+
enum VIEW_MODE {
ZOOM = 'zoom',
BRUSH = 'brush',
@@ -67,6 +70,19 @@ function getTimezone(uiSettings: IUiSettingsClient) {
}
}
+function getBaselineBadgeOverflow(
+ windowParametersAsPixels: WindowParameters,
+ baselineBadgeWidth: number
+) {
+ const { baselineMin, baselineMax, deviationMin } = windowParametersAsPixels;
+
+ const baselineBrushWidth = baselineMax - baselineMin;
+ const baselineBadgeActualMax = baselineMin + baselineBadgeWidth;
+ return deviationMin < baselineBadgeActualMax
+ ? Math.max(0, baselineBadgeWidth - baselineBrushWidth)
+ : 0;
+}
+
export const DocumentCountChart: FC = ({
brushSelectionUpdateHandler,
width,
@@ -148,6 +164,14 @@ export const DocumentCountChart: FC = ({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [chartPointsSplit, timeRangeEarliest, timeRangeLatest, interval]);
+ const snapTimestamps = useMemo(() => {
+ return adjustedChartPoints
+ .map((d) => d.time)
+ .filter(function (arg: unknown): arg is number {
+ return typeof arg === 'number';
+ });
+ }, [adjustedChartPoints]);
+
const timefilterUpdateHandler = useCallback(
(ranges: { from: number; to: number }) => {
data.query.timefilter.timefilter.setTime({
@@ -189,9 +213,10 @@ export const DocumentCountChart: FC = ({
xDomain.min,
xDomain.max + interval
);
- setOriginalWindowParameters(wp);
- setWindowParameters(wp);
- brushSelectionUpdateHandler(wp, true);
+ const wpSnap = getSnappedWindowParameters(wp, snapTimestamps);
+ setOriginalWindowParameters(wpSnap);
+ setWindowParameters(wpSnap);
+ brushSelectionUpdateHandler(wpSnap, true);
}
}
};
@@ -230,47 +255,45 @@ export const DocumentCountChart: FC = ({
}, [viewMode]);
const isBrushVisible =
- originalWindowParameters && mlBrushMarginLeft && mlBrushWidth && mlBrushWidth > 0;
+ originalWindowParameters &&
+ windowParameters &&
+ mlBrushMarginLeft &&
+ mlBrushWidth &&
+ mlBrushWidth > 0;
+
+ // Avoid overlap of brush badges when the brushes are quite narrow.
+ const baselineBadgeOverflow = windowParametersAsPixels
+ ? getBaselineBadgeOverflow(windowParametersAsPixels, BADGE_WIDTH)
+ : 0;
+ const baselineBadgeMarginLeft =
+ (mlBrushMarginLeft ?? 0) + (windowParametersAsPixels?.baselineMin ?? 0);
return (
<>
{isBrushVisible && (
-
-
-
-
-
-
-
-
-
+
+
+
@@ -280,6 +303,7 @@ export const DocumentCountChart: FC = ({
max={timeRangeLatest + interval}
onChange={onWindowParametersChange}
marginLeft={mlBrushMarginLeft}
+ snapTimestamps={snapTimestamps}
width={mlBrushWidth}
/>
diff --git a/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx b/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx
index 6bd060577a425..c9b74a634001e 100644
--- a/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx
+++ b/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx
@@ -5,12 +5,17 @@
* 2.0.
*/
-import React, { useEffect, FC } from 'react';
+import React, { useEffect, useMemo, useState, FC } from 'react';
+import { isEqual } from 'lodash';
+
+import { EuiCallOut, EuiEmptyPrompt, EuiSpacer, EuiText } from '@elastic/eui';
import type { DataView } from '@kbn/data-views-plugin/public';
import { ProgressControls } from '@kbn/aiops-components';
import { useFetchStream } from '@kbn/aiops-utils';
import type { WindowParameters } from '@kbn/aiops-utils';
+import { i18n } from '@kbn/i18n';
+import { FormattedMessage } from '@kbn/i18n-react';
import type { ChangePoint } from '@kbn/ml-agg-utils';
import type { Query } from '@kbn/es-query';
@@ -51,10 +56,17 @@ export const ExplainLogRateSpikesAnalysis: FC
const { services } = useAiOpsKibana();
const basePath = services.http?.basePath.get() ?? '';
- const { cancel, start, data, isRunning, error } = useFetchStream<
- ApiExplainLogRateSpikes,
- typeof basePath
- >(
+ const [currentAnalysisWindowParameters, setCurrentAnalysisWindowParameters] = useState<
+ WindowParameters | undefined
+ >();
+
+ const {
+ cancel,
+ start,
+ data,
+ isRunning,
+ errors: streamErrors,
+ } = useFetchStream(
`${basePath}/internal/aiops/explain_log_rate_spikes`,
{
start: earliest,
@@ -68,10 +80,7 @@ export const ExplainLogRateSpikesAnalysis: FC
{ reducer: streamReducer, initialState }
);
- useEffect(() => {
- start();
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, []);
+ const errors = useMemo(() => [...streamErrors, ...data.errors], [streamErrors, data.errors]);
// Start handler clears possibly hovered or pinned
// change points on analysis refresh.
@@ -82,9 +91,26 @@ export const ExplainLogRateSpikesAnalysis: FC
if (onSelectedChangePoint) {
onSelectedChangePoint(null);
}
+
+ setCurrentAnalysisWindowParameters(windowParameters);
start();
}
+ useEffect(() => {
+ setCurrentAnalysisWindowParameters(windowParameters);
+ start();
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, []);
+
+ const shouldRerunAnalysis = useMemo(
+ () =>
+ currentAnalysisWindowParameters !== undefined &&
+ !isEqual(currentAnalysisWindowParameters, windowParameters),
+ [currentAnalysisWindowParameters, windowParameters]
+ );
+
+ const showSpikeAnalysisTable = data?.changePoints.length > 0;
+
return (
<>
isRunning={isRunning}
onRefresh={startHandler}
onCancel={cancel}
+ shouldRerunAnalysis={shouldRerunAnalysis}
/>
- {data?.changePoints ? (
+
+ {!isRunning && !showSpikeAnalysisTable && (
+
+
+
+ }
+ titleSize="xs"
+ body={
+
+
+
+ }
+ />
+ )}
+ {errors.length > 0 && (
+ <>
+
+
+ {errors.length === 1 ? (
+ {errors[0]}
+ ) : (
+
+ {errors.map((e, i) => (
+ {e}
+ ))}
+
+ )}
+
+
+
+ >
+ )}
+ {showSpikeAnalysisTable && (
- ) : null}
+ )}
>
);
};
diff --git a/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table.tsx b/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table.tsx
index 7bb8049fe4dd1..4b7d2bb1d0597 100644
--- a/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table.tsx
+++ b/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table.tsx
@@ -29,15 +29,11 @@ import { getFailedTransactionsCorrelationImpactLabel } from './get_failed_transa
const NARROW_COLUMN_WIDTH = '120px';
const PAGINATION_SIZE_OPTIONS = [5, 10, 20, 50];
-const noDataText = i18n.translate('xpack.aiops.correlations.correlationsTable.noDataText', {
- defaultMessage: 'No data',
-});
const DEFAULT_SORT_FIELD = 'pValue';
const DEFAULT_SORT_DIRECTION = 'asc';
interface SpikeAnalysisTableProps {
changePoints: ChangePoint[];
- error?: string;
loading: boolean;
onPinnedChangePoint?: (changePoint: ChangePoint | null) => void;
onSelectedChangePoint?: (changePoint: ChangePoint | null) => void;
@@ -46,7 +42,6 @@ interface SpikeAnalysisTableProps {
export const SpikeAnalysisTable: FC = ({
changePoints,
- error,
loading,
onPinnedChangePoint,
onSelectedChangePoint,
@@ -206,16 +201,21 @@ export const SpikeAnalysisTable: FC = ({
};
}, [pageIndex, pageSize, sortField, sortDirection, changePoints]);
+ // Don't pass on the `loading` state to the table itself because
+ // it disables hovering events. Because the mini histograms take a while
+ // to load, hovering would not update the main chart. Instead,
+ // the loading state is shown by the progress bar on the outer component level.
+ // The outer component also will display a prompt when no data was returned
+ // running the analysis and will hide this table.
+
return (
}
rowProps={(changePoint) => {
return {
diff --git a/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts b/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts
index cb0911e1c53be..9fba2b9e100a5 100644
--- a/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts
+++ b/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts
@@ -21,7 +21,7 @@ import {
addChangePointsAction,
addChangePointsHistogramAction,
aiopsExplainLogRateSpikesSchema,
- errorAction,
+ addErrorAction,
resetAction,
updateLoadingStateAction,
AiopsExplainLogRateSpikesApiAction,
@@ -75,6 +75,23 @@ export const defineExplainLogRateSpikesRoute = (
logger
);
+ function endWithUpdatedLoadingState() {
+ push(
+ updateLoadingStateAction({
+ ccsWarning: false,
+ loaded: 1,
+ loadingState: i18n.translate(
+ 'xpack.aiops.explainLogRateSpikes.loadingState.doneMessage',
+ {
+ defaultMessage: 'Done.',
+ }
+ ),
+ })
+ );
+
+ end();
+ }
+
// Async IIFE to run the analysis while not blocking returning `responseWithHeaders`.
(async () => {
push(resetAction());
@@ -95,16 +112,12 @@ export const defineExplainLogRateSpikesRoute = (
try {
fieldCandidates = await fetchFieldCandidates(client, request.body);
} catch (e) {
- push(errorAction(e.toString()));
+ push(addErrorAction(e.toString()));
end();
return;
}
- if (fieldCandidates.length > 0) {
- loaded += LOADED_FIELD_CANDIDATES;
- } else {
- loaded = 1;
- }
+ loaded += LOADED_FIELD_CANDIDATES;
push(
updateLoadingStateAction({
@@ -123,7 +136,9 @@ export const defineExplainLogRateSpikesRoute = (
})
);
- if (shouldStop || fieldCandidates.length === 0) {
+ if (fieldCandidates.length === 0) {
+ endWithUpdatedLoadingState();
+ } else if (shouldStop) {
end();
return;
}
@@ -139,7 +154,7 @@ export const defineExplainLogRateSpikesRoute = (
try {
pValues = await fetchChangePointPValues(client, request.body, fieldCandidatesChunk);
} catch (e) {
- push(errorAction(e.toString()));
+ push(addErrorAction(e.toString()));
end();
return;
}
@@ -179,7 +194,7 @@ export const defineExplainLogRateSpikesRoute = (
}
if (changePoints?.length === 0) {
- end();
+ endWithUpdatedLoadingState();
return;
}
@@ -274,20 +289,7 @@ export const defineExplainLogRateSpikesRoute = (
});
}
- push(
- updateLoadingStateAction({
- ccsWarning: false,
- loaded: 1,
- loadingState: i18n.translate(
- 'xpack.aiops.explainLogRateSpikes.loadingState.doneMessage',
- {
- defaultMessage: 'Done.',
- }
- ),
- })
- );
-
- end();
+ endWithUpdatedLoadingState();
})();
return response.ok(responseWithHeaders);
diff --git a/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.test.ts b/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.test.ts
index f5be4f0fcd34e..c9f127a63d8c5 100644
--- a/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.test.ts
+++ b/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.test.ts
@@ -142,7 +142,35 @@ describe('getExecutionLogAggregation', () => {
},
},
aggs: {
- executionUuidCardinality: { cardinality: { field: 'kibana.alert.rule.execution.uuid' } },
+ executionUuidCardinality: {
+ aggs: {
+ executionUuidCardinality: {
+ cardinality: { field: 'kibana.alert.rule.execution.uuid' },
+ },
+ },
+ filter: {
+ bool: {
+ must: [
+ {
+ bool: {
+ must: [
+ {
+ match: {
+ 'event.action': 'execute',
+ },
+ },
+ {
+ match: {
+ 'event.provider': 'alerting',
+ },
+ },
+ ],
+ },
+ },
+ ],
+ },
+ },
+ },
executionUuid: {
terms: {
field: 'kibana.alert.rule.execution.uuid',
@@ -175,12 +203,28 @@ describe('getExecutionLogAggregation', () => {
},
aggs: { actionOutcomes: { terms: { field: 'event.outcome', size: 2 } } },
},
+ minExecutionUuidBucket: {
+ bucket_selector: {
+ buckets_path: {
+ count: 'ruleExecution._count',
+ },
+ script: {
+ source: 'params.count > 0',
+ },
+ },
+ },
ruleExecution: {
filter: {
bool: {
must: [
- { match: { 'event.action': 'execute' } },
- { match: { 'event.provider': 'alerting' } },
+ {
+ bool: {
+ must: [
+ { match: { 'event.action': 'execute' } },
+ { match: { 'event.provider': 'alerting' } },
+ ],
+ },
+ },
],
},
},
@@ -448,7 +492,9 @@ describe('formatExecutionLogResult', () => {
],
},
executionUuidCardinality: {
- value: 374,
+ executionUuidCardinality: {
+ value: 374,
+ },
},
},
},
@@ -683,7 +729,9 @@ describe('formatExecutionLogResult', () => {
],
},
executionUuidCardinality: {
- value: 374,
+ executionUuidCardinality: {
+ value: 374,
+ },
},
},
},
@@ -910,7 +958,9 @@ describe('formatExecutionLogResult', () => {
],
},
executionUuidCardinality: {
- value: 374,
+ executionUuidCardinality: {
+ value: 374,
+ },
},
},
},
@@ -1142,7 +1192,9 @@ describe('formatExecutionLogResult', () => {
],
},
executionUuidCardinality: {
- value: 417,
+ executionUuidCardinality: {
+ value: 417,
+ },
},
},
},
diff --git a/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.ts b/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.ts
index aa8a7f6de88cf..7365c9d125d00 100644
--- a/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.ts
+++ b/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.ts
@@ -9,6 +9,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import Boom from '@hapi/boom';
import { flatMap, get } from 'lodash';
import { AggregateEventsBySavedObjectResult } from '@kbn/event-log-plugin/server';
+import { fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query';
import { parseDuration } from '.';
import { IExecutionLog, IExecutionLogResult } from '../../common';
@@ -74,9 +75,12 @@ export interface ExecutionUuidAggResult
interface ExcludeExecuteStartAggResult extends estypes.AggregationsAggregateBase {
executionUuid: ExecutionUuidAggResult;
- executionUuidCardinality: estypes.AggregationsCardinalityAggregate;
+ executionUuidCardinality: {
+ executionUuidCardinality: estypes.AggregationsCardinalityAggregate;
+ };
}
export interface IExecutionLogAggOptions {
+ filter?: string;
page: number;
perPage: number;
sort: estypes.Sort;
@@ -95,7 +99,12 @@ const ExecutionLogSortFields: Record = {
num_new_alerts: 'ruleExecution>numNewAlerts',
};
-export function getExecutionLogAggregation({ page, perPage, sort }: IExecutionLogAggOptions) {
+export function getExecutionLogAggregation({
+ filter,
+ page,
+ perPage,
+ sort,
+}: IExecutionLogAggOptions) {
// Check if valid sort fields
const sortFields = flatMap(sort as estypes.SortCombinations[], (s) => Object.keys(s));
for (const field of sortFields) {
@@ -118,6 +127,13 @@ export function getExecutionLogAggregation({ page, perPage, sort }: IExecutionLo
throw Boom.badRequest(`Invalid perPage field "${perPage}" - must be greater than 0`);
}
+ let dslFilterQuery: estypes.QueryDslBoolQuery['filter'];
+ try {
+ dslFilterQuery = filter ? toElasticsearchQuery(fromKueryExpression(filter)) : undefined;
+ } catch (err) {
+ throw Boom.badRequest(`Invalid kuery syntax for filter ${filter}`);
+ }
+
return {
excludeExecuteStart: {
filter: {
@@ -134,8 +150,18 @@ export function getExecutionLogAggregation({ page, perPage, sort }: IExecutionLo
aggs: {
// Get total number of executions
executionUuidCardinality: {
- cardinality: {
- field: EXECUTION_UUID_FIELD,
+ filter: {
+ bool: {
+ ...(dslFilterQuery ? { filter: dslFilterQuery } : {}),
+ must: [getProviderAndActionFilter('alerting', 'execute')],
+ },
+ },
+ aggs: {
+ executionUuidCardinality: {
+ cardinality: {
+ field: EXECUTION_UUID_FIELD,
+ },
+ },
},
},
executionUuid: {
@@ -169,7 +195,12 @@ export function getExecutionLogAggregation({ page, perPage, sort }: IExecutionLo
},
// Filter by rule execute doc and get information from this event
ruleExecution: {
- filter: getProviderAndActionFilter('alerting', 'execute'),
+ filter: {
+ bool: {
+ ...(dslFilterQuery ? { filter: dslFilterQuery } : {}),
+ must: [getProviderAndActionFilter('alerting', 'execute')],
+ },
+ },
aggs: {
executeStartTime: {
min: {
@@ -235,6 +266,17 @@ export function getExecutionLogAggregation({ page, perPage, sort }: IExecutionLo
timeoutMessage: {
filter: getProviderAndActionFilter('alerting', 'execute-timeout'),
},
+ // Filter out execution UUID buckets where ruleExecution doc count is 0
+ minExecutionUuidBucket: {
+ bucket_selector: {
+ buckets_path: {
+ count: 'ruleExecution._count',
+ },
+ script: {
+ source: 'params.count > 0',
+ },
+ },
+ },
},
},
},
@@ -315,7 +357,7 @@ export function formatExecutionLogResult(
const aggs = aggregations.excludeExecuteStart as ExcludeExecuteStartAggResult;
- const total = aggs.executionUuidCardinality.value;
+ const total = aggs.executionUuidCardinality.executionUuidCardinality.value;
const buckets = aggs.executionUuid.buckets;
return {
diff --git a/x-pack/plugins/alerting/server/rules_client/rules_client.ts b/x-pack/plugins/alerting/server/rules_client/rules_client.ts
index f87f6a886eaf9..35462f9cc4e75 100644
--- a/x-pack/plugins/alerting/server/rules_client/rules_client.ts
+++ b/x-pack/plugins/alerting/server/rules_client/rules_client.ts
@@ -856,8 +856,8 @@ export class RulesClient {
{
start: parsedDateStart.toISOString(),
end: parsedDateEnd.toISOString(),
- filter,
aggs: getExecutionLogAggregation({
+ filter,
page,
perPage,
sort,
@@ -1796,7 +1796,7 @@ export class RulesClient {
let result;
try {
- result = await this.unsecuredSavedObjectsClient.bulkUpdate(rules);
+ result = await this.unsecuredSavedObjectsClient.bulkCreate(rules, { overwrite: true });
} catch (e) {
// avoid unused newly generated API keys
if (apiKeysMap.size > 0) {
diff --git a/x-pack/plugins/alerting/server/rules_client/tests/bulk_edit.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/bulk_edit.test.ts
index 78e56c7df3263..f0ac3781bce1e 100644
--- a/x-pack/plugins/alerting/server/rules_client/tests/bulk_edit.test.ts
+++ b/x-pack/plugins/alerting/server/rules_client/tests/bulk_edit.test.ts
@@ -124,7 +124,7 @@ describe('bulkEdit()', () => {
mockCreatePointInTimeFinderAsInternalUser();
- unsecuredSavedObjectsClient.bulkUpdate.mockResolvedValue({
+ unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({
saved_objects: [existingRule],
});
@@ -145,7 +145,7 @@ describe('bulkEdit()', () => {
});
describe('tags operations', () => {
test('should add new tag', async () => {
- unsecuredSavedObjectsClient.bulkUpdate.mockResolvedValue({
+ unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({
saved_objects: [
{
id: '1',
@@ -184,21 +184,23 @@ describe('bulkEdit()', () => {
expect(result.rules).toHaveLength(1);
expect(result.rules[0]).toHaveProperty('tags', ['foo', 'test-1']);
- expect(unsecuredSavedObjectsClient.bulkUpdate).toHaveBeenCalledTimes(1);
- expect(unsecuredSavedObjectsClient.bulkUpdate.mock.calls[0]).toHaveLength(1);
- expect(unsecuredSavedObjectsClient.bulkUpdate.mock.calls[0][0]).toEqual([
- expect.objectContaining({
- id: '1',
- type: 'alert',
- attributes: expect.objectContaining({
- tags: ['foo', 'test-1'],
+ expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledTimes(1);
+ expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledWith(
+ [
+ expect.objectContaining({
+ id: '1',
+ type: 'alert',
+ attributes: expect.objectContaining({
+ tags: ['foo', 'test-1'],
+ }),
}),
- }),
- ]);
+ ],
+ { overwrite: true }
+ );
});
test('should delete tag', async () => {
- unsecuredSavedObjectsClient.bulkUpdate.mockResolvedValue({
+ unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({
saved_objects: [
{
id: '1',
@@ -234,21 +236,23 @@ describe('bulkEdit()', () => {
expect(result.rules[0]).toHaveProperty('tags', []);
- expect(unsecuredSavedObjectsClient.bulkUpdate).toHaveBeenCalledTimes(1);
- expect(unsecuredSavedObjectsClient.bulkUpdate.mock.calls[0]).toHaveLength(1);
- expect(unsecuredSavedObjectsClient.bulkUpdate.mock.calls[0][0]).toEqual([
- expect.objectContaining({
- id: '1',
- type: 'alert',
- attributes: expect.objectContaining({
- tags: [],
+ expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledTimes(1);
+ expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledWith(
+ [
+ expect.objectContaining({
+ id: '1',
+ type: 'alert',
+ attributes: expect.objectContaining({
+ tags: [],
+ }),
}),
- }),
- ]);
+ ],
+ { overwrite: true }
+ );
});
test('should set tags', async () => {
- unsecuredSavedObjectsClient.bulkUpdate.mockResolvedValue({
+ unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({
saved_objects: [
{
id: '1',
@@ -284,17 +288,19 @@ describe('bulkEdit()', () => {
expect(result.rules[0]).toHaveProperty('tags', ['test-1', 'test-2']);
- expect(unsecuredSavedObjectsClient.bulkUpdate).toHaveBeenCalledTimes(1);
- expect(unsecuredSavedObjectsClient.bulkUpdate.mock.calls[0]).toHaveLength(1);
- expect(unsecuredSavedObjectsClient.bulkUpdate.mock.calls[0][0]).toEqual([
- expect.objectContaining({
- id: '1',
- type: 'alert',
- attributes: expect.objectContaining({
- tags: ['test-1', 'test-2'],
+ expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledTimes(1);
+ expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledWith(
+ [
+ expect.objectContaining({
+ id: '1',
+ type: 'alert',
+ attributes: expect.objectContaining({
+ tags: ['test-1', 'test-2'],
+ }),
}),
- }),
- ]);
+ ],
+ { overwrite: true }
+ );
});
});
@@ -574,7 +580,7 @@ describe('bulkEdit()', () => {
);
});
- test('should call bulkMarkApiKeysForInvalidation to invalidate unused keys if bulkUpdate failed', async () => {
+ test('should call bulkMarkApiKeysForInvalidation to invalidate unused keys if bulkCreate failed', async () => {
createAPIKeyMock.mockReturnValue({ apiKeysEnabled: true, result: { api_key: '111' } });
mockCreatePointInTimeFinderAsInternalUser({
saved_objects: [
@@ -585,7 +591,7 @@ describe('bulkEdit()', () => {
],
});
- unsecuredSavedObjectsClient.bulkUpdate.mockImplementation(() => {
+ unsecuredSavedObjectsClient.bulkCreate.mockImplementation(() => {
throw new Error('Fail');
});
@@ -621,7 +627,7 @@ describe('bulkEdit()', () => {
],
});
- unsecuredSavedObjectsClient.bulkUpdate.mockResolvedValue({
+ unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({
saved_objects: [
{
id: '1',
@@ -795,7 +801,7 @@ describe('bulkEdit()', () => {
minimumScheduleInterval: { value: '3m', enforce: true },
});
- unsecuredSavedObjectsClient.bulkUpdate.mockResolvedValue({
+ unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({
saved_objects: [],
});
@@ -819,7 +825,7 @@ describe('bulkEdit()', () => {
describe('paramsModifier', () => {
test('should update index pattern params', async () => {
- unsecuredSavedObjectsClient.bulkUpdate.mockResolvedValue({
+ unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({
saved_objects: [
{
id: '1',
@@ -856,19 +862,21 @@ describe('bulkEdit()', () => {
expect(result.rules).toHaveLength(1);
expect(result.rules[0]).toHaveProperty('params.index', ['test-index-*']);
- expect(unsecuredSavedObjectsClient.bulkUpdate).toHaveBeenCalledTimes(1);
- expect(unsecuredSavedObjectsClient.bulkUpdate.mock.calls[0]).toHaveLength(1);
- expect(unsecuredSavedObjectsClient.bulkUpdate.mock.calls[0][0]).toEqual([
- expect.objectContaining({
- id: '1',
- type: 'alert',
- attributes: expect.objectContaining({
- params: expect.objectContaining({
- index: ['test-index-*'],
+ expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledTimes(1);
+ expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledWith(
+ [
+ expect.objectContaining({
+ id: '1',
+ type: 'alert',
+ attributes: expect.objectContaining({
+ params: expect.objectContaining({
+ index: ['test-index-*'],
+ }),
}),
}),
- }),
- ]);
+ ],
+ { overwrite: true }
+ );
});
});
@@ -893,8 +901,8 @@ describe('bulkEdit()', () => {
});
describe('task manager', () => {
- test('should call task manager method bulkUpdateSchedules if operation set new schedules', async () => {
- unsecuredSavedObjectsClient.bulkUpdate.mockResolvedValue({
+ test('should call task manager method bulkCreateSchedules if operation set new schedules', async () => {
+ unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({
saved_objects: [
{
id: '1',
@@ -932,8 +940,8 @@ describe('bulkEdit()', () => {
});
});
- test('should not call task manager method bulkUpdateSchedules if operation is not set schedule', async () => {
- unsecuredSavedObjectsClient.bulkUpdate.mockResolvedValue({
+ test('should not call task manager method bulkCreateSchedules if operation is not set schedule', async () => {
+ unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({
saved_objects: [
{
id: '1',
diff --git a/x-pack/plugins/alerting/server/rules_client/tests/get_execution_log.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/get_execution_log.test.ts
index 7f14ec3681bb1..5cdf4c7744220 100644
--- a/x-pack/plugins/alerting/server/rules_client/tests/get_execution_log.test.ts
+++ b/x-pack/plugins/alerting/server/rules_client/tests/get_execution_log.test.ts
@@ -273,7 +273,9 @@ const aggregateResults = {
],
},
executionUuidCardinality: {
- value: 374,
+ executionUuidCardinality: {
+ value: 374,
+ },
},
},
},
@@ -453,9 +455,9 @@ describe('getExecutionLogForRule()', () => {
aggs: getExecutionLogAggregation({
page: 1,
perPage: 10,
+ filter: 'event.outcome: success',
sort: [{ timestamp: { order: 'desc' } }],
}),
- filter: 'event.outcome: success',
end: mockedDateString,
start: '2019-02-12T20:01:22.479Z',
},
diff --git a/x-pack/plugins/apm/ftr_e2e/apis/fixtures/package_registry_config.yml b/x-pack/plugins/apm/ftr_e2e/apis/fixtures/package_registry_config.yml
index 9f2300dedc82b..a6c51976af986 100644
--- a/x-pack/plugins/apm/ftr_e2e/apis/fixtures/package_registry_config.yml
+++ b/x-pack/plugins/apm/ftr_e2e/apis/fixtures/package_registry_config.yml
@@ -1,4 +1,2 @@
package_paths:
- - /packages/production
- - /packages/snapshot
- - /packages/test-packages
+ - /packages/package-storage
\ No newline at end of file
diff --git a/x-pack/plugins/apm/kibana.json b/x-pack/plugins/apm/kibana.json
index aa8a2e14e42c4..d8ff2086fd291 100644
--- a/x-pack/plugins/apm/kibana.json
+++ b/x-pack/plugins/apm/kibana.json
@@ -24,6 +24,7 @@
"optionalPlugins": [
"actions",
"alerting",
+ "cases",
"cloud",
"fleet",
"home",
diff --git a/x-pack/plugins/apm/server/routes/services/annotations/index.test.ts b/x-pack/plugins/apm/server/routes/services/annotations/index.test.ts
index 681bc5a8b5ded..481ab22ece4cc 100644
--- a/x-pack/plugins/apm/server/routes/services/annotations/index.test.ts
+++ b/x-pack/plugins/apm/server/routes/services/annotations/index.test.ts
@@ -16,7 +16,8 @@ import * as GetStoredAnnotations from './get_stored_annotations';
import { Annotation, AnnotationType } from '../../../../common/annotations';
import { errors } from '@elastic/elasticsearch';
-describe('getServiceAnnotations', () => {
+// FLAKY: https://github.com/elastic/kibana/issues/138039
+describe.skip('getServiceAnnotations', () => {
const storedAnnotations = [
{
type: AnnotationType.VERSION,
diff --git a/x-pack/plugins/canvas/shareable_runtime/webpack/ci_stats_plugin.ts b/x-pack/plugins/canvas/shareable_runtime/webpack/ci_stats_plugin.ts
index 20facc666f47c..fb1e93ddbe956 100644
--- a/x-pack/plugins/canvas/shareable_runtime/webpack/ci_stats_plugin.ts
+++ b/x-pack/plugins/canvas/shareable_runtime/webpack/ci_stats_plugin.ts
@@ -41,7 +41,7 @@ export class CiStatsPlugin {
return;
}
- compiler.hooks.emit.tapAsync('CiStatsPlugin', async (compilation) => {
+ compiler.hooks.emit.tapPromise('CiStatsPlugin', async (compilation) => {
const { entryName } = this.options;
const assets = Object.entries(compilation.assets)
diff --git a/x-pack/plugins/cases/common/api/cases/assignee.ts b/x-pack/plugins/cases/common/api/cases/assignee.ts
new file mode 100644
index 0000000000000..6f6a23870066b
--- /dev/null
+++ b/x-pack/plugins/cases/common/api/cases/assignee.ts
@@ -0,0 +1,13 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import * as rt from 'io-ts';
+import { CaseUserProfileRt } from './user_profiles';
+
+export const CaseAssigneesRt = rt.array(CaseUserProfileRt);
+
+export type CaseAssignees = rt.TypeOf;
diff --git a/x-pack/plugins/cases/common/api/cases/case.ts b/x-pack/plugins/cases/common/api/cases/case.ts
index ec855d98e7144..a6b81dc42af74 100644
--- a/x-pack/plugins/cases/common/api/cases/case.ts
+++ b/x-pack/plugins/cases/common/api/cases/case.ts
@@ -12,6 +12,7 @@ import { UserRT } from '../user';
import { CommentResponseRt } from './comment';
import { CasesStatusResponseRt, CaseStatusRt } from './status';
import { CaseConnectorRt } from '../connectors';
+import { CaseAssigneesRt } from './assignee';
const BucketsAggs = rt.array(
rt.type({
@@ -86,6 +87,10 @@ const CaseBasicRt = rt.type({
* The severity of the case
*/
severity: CaseSeverityRt,
+ /**
+ * The users assigned to this case
+ */
+ assignees: CaseAssigneesRt,
});
/**
@@ -153,6 +158,10 @@ export const CasePostRequestRt = rt.intersection([
owner: rt.string,
}),
rt.partial({
+ /**
+ * The users assigned to the case
+ */
+ assignees: CaseAssigneesRt,
/**
* The severity of the case. The severity is
* default it to "low" if not provided.
@@ -174,6 +183,10 @@ export const CasesFindRequestRt = rt.partial({
* The severity of the case
*/
severity: CaseSeverityRt,
+ /**
+ * The uids of the user profiles to filter by
+ */
+ assignees: rt.union([rt.array(rt.string), rt.string]),
/**
* The reporters to filter by
*/
diff --git a/x-pack/plugins/cases/common/api/cases/index.ts b/x-pack/plugins/cases/common/api/cases/index.ts
index 3a3eab2ca3198..2b561a1dff124 100644
--- a/x-pack/plugins/cases/common/api/cases/index.ts
+++ b/x-pack/plugins/cases/common/api/cases/index.ts
@@ -13,3 +13,4 @@ export * from './user_actions';
export * from './constants';
export * from './alerts';
export * from './user_profiles';
+export * from './assignee';
diff --git a/x-pack/plugins/cases/common/api/cases/suggest_user_profiles.ts b/x-pack/plugins/cases/common/api/cases/suggest_user_profiles.ts
new file mode 100644
index 0000000000000..75cd1f9cb9f94
--- /dev/null
+++ b/x-pack/plugins/cases/common/api/cases/suggest_user_profiles.ts
@@ -0,0 +1,18 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import * as rt from 'io-ts';
+
+export const SuggestUserProfilesRequestRt = rt.intersection([
+ rt.type({
+ name: rt.string,
+ owners: rt.array(rt.string),
+ }),
+ rt.partial({ size: rt.number }),
+]);
+
+export type SuggestUserProfilesRequest = rt.TypeOf;
diff --git a/x-pack/plugins/cases/common/api/cases/user_actions/assignees.ts b/x-pack/plugins/cases/common/api/cases/user_actions/assignees.ts
new file mode 100644
index 0000000000000..e4b8b8aa1f6e9
--- /dev/null
+++ b/x-pack/plugins/cases/common/api/cases/user_actions/assignees.ts
@@ -0,0 +1,19 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import * as rt from 'io-ts';
+import { CaseAssigneesRt } from '../assignee';
+import { ActionTypes, UserActionWithAttributes } from './common';
+
+export const AssigneesUserActionPayloadRt = rt.type({ assignees: CaseAssigneesRt });
+
+export const AssigneesUserActionRt = rt.type({
+ type: rt.literal(ActionTypes.assignees),
+ payload: AssigneesUserActionPayloadRt,
+});
+
+export type AssigneesUserAction = UserActionWithAttributes>;
diff --git a/x-pack/plugins/cases/common/api/cases/user_actions/common.ts b/x-pack/plugins/cases/common/api/cases/user_actions/common.ts
index 5665ab524071a..5297d2ca46833 100644
--- a/x-pack/plugins/cases/common/api/cases/user_actions/common.ts
+++ b/x-pack/plugins/cases/common/api/cases/user_actions/common.ts
@@ -9,6 +9,7 @@ import * as rt from 'io-ts';
import { UserRT } from '../../user';
export const ActionTypes = {
+ assignees: 'assignees',
comment: 'comment',
connector: 'connector',
description: 'description',
@@ -22,6 +23,9 @@ export const ActionTypes = {
delete_case: 'delete_case',
} as const;
+export type ActionTypeKeys = keyof typeof ActionTypes;
+export type ActionTypeValues = typeof ActionTypes[ActionTypeKeys];
+
export const Actions = {
add: 'add',
create: 'create',
@@ -30,6 +34,9 @@ export const Actions = {
push_to_service: 'push_to_service',
} as const;
+export type ActionOperationKeys = keyof typeof Actions;
+export type ActionOperationValues = typeof Actions[ActionOperationKeys];
+
/* To the next developer, if you add/removed fields here
* make sure to check this file (x-pack/plugins/cases/server/services/user_actions/helpers.ts) too
*/
diff --git a/x-pack/plugins/cases/common/api/cases/user_actions/create_case.ts b/x-pack/plugins/cases/common/api/cases/user_actions/create_case.ts
index 53d2320b5afd4..b4bc133ee73f3 100644
--- a/x-pack/plugins/cases/common/api/cases/user_actions/create_case.ts
+++ b/x-pack/plugins/cases/common/api/cases/user_actions/create_case.ts
@@ -6,6 +6,7 @@
*/
import * as rt from 'io-ts';
+import { AssigneesUserActionPayloadRt } from './assignees';
import { ActionTypes, UserActionWithAttributes } from './common';
import {
ConnectorUserActionPayloadRt,
@@ -21,6 +22,7 @@ export const CommonFieldsRt = rt.type({
});
const CommonPayloadAttributesRt = rt.type({
+ assignees: AssigneesUserActionPayloadRt.props.assignees,
description: DescriptionUserActionPayloadRt.props.description,
status: rt.string,
severity: rt.string,
diff --git a/x-pack/plugins/cases/common/api/cases/user_actions/index.ts b/x-pack/plugins/cases/common/api/cases/user_actions/index.ts
index d19ee5fcbe9f8..6312e670533b9 100644
--- a/x-pack/plugins/cases/common/api/cases/user_actions/index.ts
+++ b/x-pack/plugins/cases/common/api/cases/user_actions/index.ts
@@ -24,6 +24,7 @@ import { SettingsUserActionRt } from './settings';
import { StatusUserActionRt } from './status';
import { DeleteCaseUserActionRt } from './delete_case';
import { SeverityUserActionRt } from './severity';
+import { AssigneesUserActionRt } from './assignees';
export * from './common';
export * from './comment';
@@ -36,6 +37,7 @@ export * from './settings';
export * from './status';
export * from './tags';
export * from './title';
+export * from './assignees';
const CommonUserActionsRt = rt.union([
DescriptionUserActionRt,
@@ -45,6 +47,7 @@ const CommonUserActionsRt = rt.union([
SettingsUserActionRt,
StatusUserActionRt,
SeverityUserActionRt,
+ AssigneesUserActionRt,
]);
export const UserActionsRt = rt.union([
diff --git a/x-pack/plugins/cases/common/api/cases/user_profiles.ts b/x-pack/plugins/cases/common/api/cases/user_profiles.ts
index 75cd1f9cb9f94..d6ec5b05910f3 100644
--- a/x-pack/plugins/cases/common/api/cases/user_profiles.ts
+++ b/x-pack/plugins/cases/common/api/cases/user_profiles.ts
@@ -16,3 +16,9 @@ export const SuggestUserProfilesRequestRt = rt.intersection([
]);
export type SuggestUserProfilesRequest = rt.TypeOf;
+
+export const CaseUserProfileRt = rt.type({
+ uid: rt.string,
+});
+
+export type CaseUserProfile = rt.TypeOf;
diff --git a/x-pack/plugins/cases/common/constants.ts b/x-pack/plugins/cases/common/constants.ts
index e88a7baf2f583..9e85d6e4cbf7a 100644
--- a/x-pack/plugins/cases/common/constants.ts
+++ b/x-pack/plugins/cases/common/constants.ts
@@ -157,3 +157,9 @@ export const READ_CASES_CAPABILITY = 'read_cases' as const;
export const UPDATE_CASES_CAPABILITY = 'update_cases' as const;
export const DELETE_CASES_CAPABILITY = 'delete_cases' as const;
export const PUSH_CASES_CAPABILITY = 'push_cases' as const;
+
+/**
+ * User profiles
+ */
+
+export const DEFAULT_USER_SIZE = 10;
diff --git a/x-pack/plugins/cases/kibana.json b/x-pack/plugins/cases/kibana.json
index 00b630cb7cab7..d027023b7c96a 100644
--- a/x-pack/plugins/cases/kibana.json
+++ b/x-pack/plugins/cases/kibana.json
@@ -11,7 +11,6 @@
"kibanaVersion":"kibana",
"optionalPlugins":[
"home",
- "security",
"taskManager",
"usageCollection"
],
@@ -30,7 +29,8 @@
"kibanaUtils",
"triggersActionsUi",
"management",
- "spaces"
+ "spaces",
+ "security"
],
"requiredBundles": [
"savedObjects"
diff --git a/x-pack/plugins/cases/public/client/helpers/group_alerts_by_rule.ts b/x-pack/plugins/cases/public/client/helpers/group_alerts_by_rule.ts
index 0c1d73ba03b71..09e334cb3c848 100644
--- a/x-pack/plugins/cases/public/client/helpers/group_alerts_by_rule.ts
+++ b/x-pack/plugins/cases/public/client/helpers/group_alerts_by_rule.ts
@@ -8,7 +8,7 @@
import { CommentRequestAlertType } from '../../../common/api';
import { CommentType, Ecs } from '../../../common';
import { getRuleIdFromEvent } from './get_rule_id_from_event';
-import { CaseAttachments } from '../../types';
+import { CaseAttachmentsWithoutOwner } from '../../types';
type Maybe = T | null;
interface Event {
@@ -20,25 +20,29 @@ interface EventNonEcsData {
value?: Maybe;
}
-export const groupAlertsByRule = (items: Event[], owner: string): CaseAttachments => {
- const attachmentsByRule = items.reduce>((acc, item) => {
- const rule = getRuleIdFromEvent(item);
- if (!acc[rule.id]) {
- acc[rule.id] = {
- alertId: [],
- index: [],
- owner,
- type: CommentType.alert as const,
- rule,
- };
- }
- const alerts = acc[rule.id].alertId;
- const indexes = acc[rule.id].index;
- if (Array.isArray(alerts) && Array.isArray(indexes)) {
- alerts.push(item.ecs._id ?? '');
- indexes.push(item.ecs._index ?? '');
- }
- return acc;
- }, {});
+type CommentRequestAlertTypeWithoutOwner = Omit;
+
+export const groupAlertsByRule = (items: Event[]): CaseAttachmentsWithoutOwner => {
+ const attachmentsByRule = items.reduce>(
+ (acc, item) => {
+ const rule = getRuleIdFromEvent(item);
+ if (!acc[rule.id]) {
+ acc[rule.id] = {
+ alertId: [],
+ index: [],
+ type: CommentType.alert as const,
+ rule,
+ };
+ }
+ const alerts = acc[rule.id].alertId;
+ const indexes = acc[rule.id].index;
+ if (Array.isArray(alerts) && Array.isArray(indexes)) {
+ alerts.push(item.ecs._id ?? '');
+ indexes.push(item.ecs._index ?? '');
+ }
+ return acc;
+ },
+ {}
+ );
return Object.values(attachmentsByRule);
};
diff --git a/x-pack/plugins/cases/public/common/use_cases_toast.tsx b/x-pack/plugins/cases/public/common/use_cases_toast.tsx
index 36ca8340036a5..5e88831144b6b 100644
--- a/x-pack/plugins/cases/public/common/use_cases_toast.tsx
+++ b/x-pack/plugins/cases/public/common/use_cases_toast.tsx
@@ -12,7 +12,7 @@ import { toMountPoint } from '@kbn/kibana-react-plugin/public';
import { Case, CommentType } from '../../common';
import { useToasts } from './lib/kibana';
import { useCaseViewNavigation } from './navigation';
-import { CaseAttachments } from '../types';
+import { CaseAttachmentsWithoutOwner } from '../types';
import {
CASE_ALERT_SUCCESS_SYNC_TEXT,
CASE_ALERT_SUCCESS_TOAST,
@@ -34,7 +34,7 @@ const EuiTextStyled = styled(EuiText)`
`}
`;
-function getAlertsCount(attachments: CaseAttachments): number {
+function getAlertsCount(attachments: CaseAttachmentsWithoutOwner): number {
let alertsCount = 0;
for (const attachment of attachments) {
if (attachment.type === CommentType.alert) {
@@ -57,7 +57,7 @@ function getToastTitle({
}: {
theCase: Case;
title?: string;
- attachments?: CaseAttachments;
+ attachments?: CaseAttachmentsWithoutOwner;
}): string {
if (title !== undefined) {
return title;
@@ -78,7 +78,7 @@ function getToastContent({
}: {
theCase: Case;
content?: string;
- attachments?: CaseAttachments;
+ attachments?: CaseAttachmentsWithoutOwner;
}): string | undefined {
if (content !== undefined) {
return content;
@@ -106,7 +106,7 @@ export const useCasesToast = () => {
content,
}: {
theCase: Case;
- attachments?: CaseAttachments;
+ attachments?: CaseAttachmentsWithoutOwner;
title?: string;
content?: string;
}) => {
diff --git a/x-pack/plugins/cases/public/components/add_comment/index.test.tsx b/x-pack/plugins/cases/public/components/add_comment/index.test.tsx
index 8def93fef325d..d8bb10fce78fc 100644
--- a/x-pack/plugins/cases/public/components/add_comment/index.test.tsx
+++ b/x-pack/plugins/cases/public/components/add_comment/index.test.tsx
@@ -12,12 +12,13 @@ import { noop } from 'lodash/fp';
import { noCreateCasesPermissions, TestProviders } from '../../common/mock';
-import { CommentRequest, CommentType } from '../../../common/api';
+import { CommentType } from '../../../common/api';
import { SECURITY_SOLUTION_OWNER } from '../../../common/constants';
import { useCreateAttachments } from '../../containers/use_create_attachments';
import { AddComment, AddCommentProps, AddCommentRefObject } from '.';
import { CasesTimelineIntegrationProvider } from '../timeline_context';
import { timelineIntegrationMock } from '../__mock__/timeline';
+import { CaseAttachmentWithoutOwner } from '../../types';
jest.mock('../../containers/use_create_attachments');
@@ -41,10 +42,9 @@ const defaultResponse = {
createAttachments,
};
-const sampleData: CommentRequest = {
+const sampleData: CaseAttachmentWithoutOwner = {
comment: 'what a cool comment',
- type: CommentType.user,
- owner: SECURITY_SOLUTION_OWNER,
+ type: CommentType.user as const,
};
describe('AddComment ', () => {
@@ -73,6 +73,7 @@ describe('AddComment ', () => {
expect(onCommentSaving).toBeCalled();
expect(createAttachments).toBeCalledWith({
caseId: addCommentProps.caseId,
+ caseOwner: SECURITY_SOLUTION_OWNER,
data: [sampleData],
updateCase: onCommentPosted,
});
diff --git a/x-pack/plugins/cases/public/components/add_comment/index.tsx b/x-pack/plugins/cases/public/components/add_comment/index.tsx
index 98e505b113ecd..6710a4a4471e0 100644
--- a/x-pack/plugins/cases/public/components/add_comment/index.tsx
+++ b/x-pack/plugins/cases/public/components/add_comment/index.tsx
@@ -105,7 +105,8 @@ export const AddComment = React.memo(
}
createAttachments({
caseId,
- data: [{ ...data, type: CommentType.user, owner: owner[0] }],
+ caseOwner: owner[0],
+ data: [{ ...data, type: CommentType.user }],
updateCase: onCommentPosted,
});
reset();
diff --git a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx
index 35b15c4b21587..690849567f4f8 100644
--- a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx
@@ -581,6 +581,7 @@ describe('AllCasesListGeneric', () => {
wrapper.find('[data-test-subj="cases-table-row-select-1"]').first().simulate('click');
await waitFor(() => {
expect(onRowClick).toHaveBeenCalledWith({
+ assignees: [],
closedAt: null,
closedBy: null,
comments: [],
diff --git a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx
index 46ff28e96160e..3c056ccf996dd 100644
--- a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx
@@ -70,7 +70,7 @@ export const AllCasesList = React.memo(
const firstAvailableStatus = head(difference(caseStatuses, hiddenStatuses));
const initialFilterOptions = {
...(!isEmpty(hiddenStatuses) && firstAvailableStatus && { status: firstAvailableStatus }),
- owner: hasOwner ? owner : availableSolutions,
+ owner: hasOwner ? owner : [],
};
const [filterOptions, setFilterOptions] = useState({
...DEFAULT_FILTER_OPTIONS,
diff --git a/x-pack/plugins/cases/public/components/all_cases/columns.tsx b/x-pack/plugins/cases/public/components/all_cases/columns.tsx
index e4a6927c2e840..0929f8971cf06 100644
--- a/x-pack/plugins/cases/public/components/all_cases/columns.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/columns.tsx
@@ -250,7 +250,12 @@ export const useCasesColumns = ({
render: (caseOwner: CasesOwners) => {
const ownerInfo = OWNER_INFO[caseOwner];
return ownerInfo ? (
-
+
) : (
getEmptyTagValue()
);
diff --git a/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.tsx b/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.tsx
index 2e7a12ae6d68e..8152986e6c75b 100644
--- a/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.tsx
@@ -13,7 +13,7 @@ import { Case } from '../../../containers/types';
import { CasesContextStoreActionsList } from '../../cases_context/cases_context_reducer';
import { useCasesContext } from '../../cases_context/use_cases_context';
import { useCasesAddToNewCaseFlyout } from '../../create/flyout/use_cases_add_to_new_case_flyout';
-import { CaseAttachments } from '../../../types';
+import { CaseAttachmentsWithoutOwner } from '../../../types';
import { useCreateAttachments } from '../../../containers/use_create_attachments';
type AddToExistingFlyoutProps = AllCasesSelectorModalProps & {
@@ -51,7 +51,7 @@ export const useCasesAddToExistingCaseModal = (props: AddToExistingFlyoutProps =
}, [dispatch]);
const handleOnRowClick = useCallback(
- async (theCase: Case | undefined, attachments: CaseAttachments) => {
+ async (theCase: Case | undefined, attachments: CaseAttachmentsWithoutOwner) => {
// when the case is undefined in the modal
// the user clicked "create new case"
if (theCase === undefined) {
@@ -65,6 +65,7 @@ export const useCasesAddToExistingCaseModal = (props: AddToExistingFlyoutProps =
if (attachments !== undefined && attachments.length > 0) {
await createAttachments({
caseId: theCase.id,
+ caseOwner: theCase.owner,
data: attachments,
throwOnError: true,
});
@@ -89,7 +90,7 @@ export const useCasesAddToExistingCaseModal = (props: AddToExistingFlyoutProps =
);
const openModal = useCallback(
- ({ attachments }: { attachments?: CaseAttachments } = {}) => {
+ ({ attachments }: { attachments?: CaseAttachmentsWithoutOwner } = {}) => {
dispatch({
type: CasesContextStoreActionsList.OPEN_ADD_TO_CASE_MODAL,
payload: {
diff --git a/x-pack/plugins/cases/public/components/all_cases/table_filters.test.tsx b/x-pack/plugins/cases/public/components/all_cases/table_filters.test.tsx
index 63c5b55099cf3..9df5757525202 100644
--- a/x-pack/plugins/cases/public/components/all_cases/table_filters.test.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/table_filters.test.tsx
@@ -190,7 +190,7 @@ describe('CasesTableFilters ', () => {
);
});
- describe('dynamic Solution filter', () => {
+ describe('Solution filter', () => {
it('shows Solution filter when provided more than 1 availableSolutions', () => {
const wrapper = mount(
@@ -215,28 +215,58 @@ describe('CasesTableFilters ', () => {
wrapper.find(`[data-test-subj="options-filter-popover-button-Solution"]`).exists()
).toBeFalsy();
});
- });
- it('should call onFilterChange when selected solution changes', () => {
- const wrapper = mount(
-
-
-
- );
- wrapper
- .find(`[data-test-subj="options-filter-popover-button-Solution"]`)
- .last()
- .simulate('click');
+ it('should call onFilterChange when selected solution changes', () => {
+ const wrapper = mount(
+
+
+
+ );
+ wrapper
+ .find(`[data-test-subj="options-filter-popover-button-Solution"]`)
+ .last()
+ .simulate('click');
- wrapper
- .find(`[data-test-subj="options-filter-popover-item-${SECURITY_SOLUTION_OWNER}"]`)
- .last()
- .simulate('click');
+ wrapper
+ .find(`[data-test-subj="options-filter-popover-item-${SECURITY_SOLUTION_OWNER}"]`)
+ .last()
+ .simulate('click');
+
+ expect(onFilterChanged).toBeCalledWith({ owner: [SECURITY_SOLUTION_OWNER] });
+ });
- expect(onFilterChanged).toBeCalledWith({ owner: [SECURITY_SOLUTION_OWNER] });
+ it('should deselect all solutions', () => {
+ const wrapper = mount(
+
+
+
+ );
+
+ wrapper
+ .find(`[data-test-subj="options-filter-popover-button-Solution"]`)
+ .last()
+ .simulate('click');
+
+ wrapper
+ .find(`[data-test-subj="options-filter-popover-item-${SECURITY_SOLUTION_OWNER}"]`)
+ .last()
+ .simulate('click');
+
+ expect(onFilterChanged).toBeCalledWith({ owner: [SECURITY_SOLUTION_OWNER] });
+
+ wrapper
+ .find(`[data-test-subj="options-filter-popover-item-${SECURITY_SOLUTION_OWNER}"]`)
+ .last()
+ .simulate('click');
+
+ expect(onFilterChanged).toBeCalledWith({ owner: [] });
+ });
});
describe('create case button', () => {
diff --git a/x-pack/plugins/cases/public/components/all_cases/table_filters.tsx b/x-pack/plugins/cases/public/components/all_cases/table_filters.tsx
index 5d0d6ca0017a6..cedd7c9b64718 100644
--- a/x-pack/plugins/cases/public/components/all_cases/table_filters.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/table_filters.tsx
@@ -112,7 +112,7 @@ const CasesTableFiltersComponent = ({
const handleSelectedSolution = useCallback(
(newOwner) => {
- if (!isEqual(newOwner, selectedOwner) && newOwner.length) {
+ if (!isEqual(newOwner, selectedOwner)) {
setSelectedOwner(newOwner);
onFilterChanged({ owner: newOwner });
}
diff --git a/x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx b/x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx
index ac73444800dea..bc4df5265a3b0 100644
--- a/x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx
+++ b/x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx
@@ -371,6 +371,38 @@ describe('CaseViewPage', () => {
});
describe('Tabs', () => {
+ jest.mock('@kbn/kibana-react-plugin/public', () => ({
+ useKibana: () => ({
+ services: {
+ application: {
+ capabilities: {
+ fakeCases: {
+ create_cases: true,
+ read_cases: true,
+ update_cases: true,
+ delete_cases: true,
+ push_cases: true,
+ },
+ },
+ },
+ cases: {
+ ui: {
+ getCasesContext: () => null,
+ },
+ helpers: {
+ getUICapabilities: () => ({
+ all: true,
+ read: true,
+ create: true,
+ update: true,
+ delete: true,
+ push: true,
+ }),
+ },
+ },
+ },
+ }),
+ }));
it('renders tabs correctly', async () => {
const result = appMockRenderer.render( );
await act(async () => {
diff --git a/x-pack/plugins/cases/public/components/cases_context/use_application.tsx b/x-pack/plugins/cases/public/components/cases_context/use_application.tsx
index 86cfded0bc9d0..f21c40b6ee603 100644
--- a/x-pack/plugins/cases/public/components/cases_context/use_application.tsx
+++ b/x-pack/plugins/cases/public/components/cases_context/use_application.tsx
@@ -18,7 +18,9 @@ export const useApplication = (): UseApplicationReturn => {
const appId = useObservable(currentAppId$);
const applications = useObservable(applications$);
- const appTitle = appId ? applications?.get(appId)?.category?.label : undefined;
+ const appTitle = appId
+ ? applications?.get(appId)?.category?.label ?? applications?.get(appId)?.title
+ : undefined;
return { appId, appTitle };
};
diff --git a/x-pack/plugins/cases/public/components/create/flyout/create_case_flyout.tsx b/x-pack/plugins/cases/public/components/create/flyout/create_case_flyout.tsx
index 94e72c43f6ad9..be758e1718451 100644
--- a/x-pack/plugins/cases/public/components/create/flyout/create_case_flyout.tsx
+++ b/x-pack/plugins/cases/public/components/create/flyout/create_case_flyout.tsx
@@ -14,7 +14,7 @@ import * as i18n from '../translations';
import { Case } from '../../../../common/ui/types';
import { CreateCaseForm } from '../form';
import { UseCreateAttachments } from '../../../containers/use_create_attachments';
-import { CaseAttachments } from '../../../types';
+import { CaseAttachmentsWithoutOwner } from '../../../types';
import { casesQueryClient } from '../../cases_context/query_client';
export interface CreateCaseFlyoutProps {
@@ -24,7 +24,7 @@ export interface CreateCaseFlyoutProps {
) => Promise;
onClose?: () => void;
onSuccess?: (theCase: Case) => Promise;
- attachments?: CaseAttachments;
+ attachments?: CaseAttachmentsWithoutOwner;
}
const StyledFlyout = styled(EuiFlyout)`
diff --git a/x-pack/plugins/cases/public/components/create/flyout/use_cases_add_to_new_case_flyout.tsx b/x-pack/plugins/cases/public/components/create/flyout/use_cases_add_to_new_case_flyout.tsx
index 8dc49758695e5..8b2d2b02cce79 100644
--- a/x-pack/plugins/cases/public/components/create/flyout/use_cases_add_to_new_case_flyout.tsx
+++ b/x-pack/plugins/cases/public/components/create/flyout/use_cases_add_to_new_case_flyout.tsx
@@ -6,7 +6,7 @@
*/
import { useCallback } from 'react';
-import { CaseAttachments } from '../../../types';
+import { CaseAttachmentsWithoutOwner } from '../../../types';
import { useCasesToast } from '../../../common/use_cases_toast';
import { Case } from '../../../containers/types';
import { CasesContextStoreActionsList } from '../../cases_context/cases_context_reducer';
@@ -29,7 +29,7 @@ export const useCasesAddToNewCaseFlyout = (props: AddToNewCaseFlyoutProps = {})
}, [dispatch]);
const openFlyout = useCallback(
- ({ attachments }: { attachments?: CaseAttachments } = {}) => {
+ ({ attachments }: { attachments?: CaseAttachmentsWithoutOwner } = {}) => {
dispatch({
type: CasesContextStoreActionsList.OPEN_CREATE_CASE_FLYOUT,
payload: {
diff --git a/x-pack/plugins/cases/public/components/create/form.tsx b/x-pack/plugins/cases/public/components/create/form.tsx
index 50a3c69f2073e..78f5a4e9d5c54 100644
--- a/x-pack/plugins/cases/public/components/create/form.tsx
+++ b/x-pack/plugins/cases/public/components/create/form.tsx
@@ -34,7 +34,7 @@ import { useCasesFeatures } from '../cases_context/use_cases_features';
import { CreateCaseOwnerSelector } from './owner_selector';
import { useCasesContext } from '../cases_context/use_cases_context';
import { useAvailableCasesOwners } from '../app/use_available_owners';
-import { CaseAttachments } from '../../types';
+import { CaseAttachmentsWithoutOwner } from '../../types';
import { Severity } from './severity';
interface ContainerProps {
@@ -67,7 +67,7 @@ export interface CreateCaseFormProps extends Pick Promise;
timelineIntegration?: CasesTimelineIntegration;
- attachments?: CaseAttachments;
+ attachments?: CaseAttachmentsWithoutOwner;
}
const empty: ActionConnector[] = [];
diff --git a/x-pack/plugins/cases/public/components/create/form_context.test.tsx b/x-pack/plugins/cases/public/components/create/form_context.test.tsx
index bdc6f68ddf077..57bc23d9aaa02 100644
--- a/x-pack/plugins/cases/public/components/create/form_context.test.tsx
+++ b/x-pack/plugins/cases/public/components/create/form_context.test.tsx
@@ -822,7 +822,11 @@ describe('Create case', () => {
});
expect(createAttachments).toHaveBeenCalledTimes(1);
- expect(createAttachments).toHaveBeenCalledWith({ caseId: 'case-id', data: attachments });
+ expect(createAttachments).toHaveBeenCalledWith({
+ caseId: 'case-id',
+ data: attachments,
+ caseOwner: 'securitySolution',
+ });
});
it('should NOT call createAttachments if the attachments are an empty array', async () => {
diff --git a/x-pack/plugins/cases/public/components/create/form_context.tsx b/x-pack/plugins/cases/public/components/create/form_context.tsx
index 70b4fb4ec9ab0..dc8c3e593c87f 100644
--- a/x-pack/plugins/cases/public/components/create/form_context.tsx
+++ b/x-pack/plugins/cases/public/components/create/form_context.tsx
@@ -21,7 +21,7 @@ import {
import { useCasesContext } from '../cases_context/use_cases_context';
import { useCasesFeatures } from '../cases_context/use_cases_features';
import { getConnectorById } from '../utils';
-import { CaseAttachments } from '../../types';
+import { CaseAttachmentsWithoutOwner } from '../../types';
import { useGetConnectors } from '../../containers/configure/use_connectors';
const initialCaseValue: FormProps = {
@@ -33,6 +33,7 @@ const initialCaseValue: FormProps = {
fields: null,
syncAlerts: true,
selectedOwner: null,
+ assignees: [],
};
interface Props {
@@ -42,7 +43,7 @@ interface Props {
) => Promise;
children?: JSX.Element | JSX.Element[];
onSuccess?: (theCase: Case) => Promise;
- attachments?: CaseAttachments;
+ attachments?: CaseAttachmentsWithoutOwner;
}
export const FormContext: React.FC = ({
@@ -87,6 +88,7 @@ export const FormContext: React.FC = ({
if (updatedCase && Array.isArray(attachments) && attachments.length > 0) {
await createAttachments({
caseId: updatedCase.id,
+ caseOwner: updatedCase.owner,
data: attachments,
});
}
diff --git a/x-pack/plugins/cases/public/components/create/owner_selector.tsx b/x-pack/plugins/cases/public/components/create/owner_selector.tsx
index 34bef0b98ff78..bcc8709ee5c5d 100644
--- a/x-pack/plugins/cases/public/components/create/owner_selector.tsx
+++ b/x-pack/plugins/cases/public/components/create/owner_selector.tsx
@@ -19,7 +19,7 @@ import {
import { euiStyled } from '@kbn/kibana-react-plugin/common';
import { SECURITY_SOLUTION_OWNER } from '../../../common';
-import { OBSERVABILITY_OWNER, OWNER_INFO } from '../../../common/constants';
+import { OWNER_INFO } from '../../../common/constants';
import { FieldHook, getFieldValidityAndErrorMessage, UseField } from '../../common/shared_imports';
import * as i18n from './translations';
@@ -35,7 +35,7 @@ interface Props {
isLoading: boolean;
}
-const DEFAULT_SELECTABLE_OWNERS = [SECURITY_SOLUTION_OWNER, OBSERVABILITY_OWNER] as const;
+const DEFAULT_SELECTABLE_OWNERS = Object.keys(OWNER_INFO) as Array;
const FIELD_NAME = 'selectedOwner';
diff --git a/x-pack/plugins/cases/public/components/user_actions/assignees.tsx b/x-pack/plugins/cases/public/components/user_actions/assignees.tsx
new file mode 100644
index 0000000000000..42580ede0b3f2
--- /dev/null
+++ b/x-pack/plugins/cases/public/components/user_actions/assignees.tsx
@@ -0,0 +1,17 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { UserActionBuilder } from './types';
+
+export const createAssigneesUserActionBuilder: UserActionBuilder = ({
+ userAction,
+ handleOutlineComment,
+}) => ({
+ build: () => {
+ return [];
+ },
+});
diff --git a/x-pack/plugins/cases/public/components/user_actions/builder.tsx b/x-pack/plugins/cases/public/components/user_actions/builder.tsx
index 36298bbae601b..903c1c190d8dd 100644
--- a/x-pack/plugins/cases/public/components/user_actions/builder.tsx
+++ b/x-pack/plugins/cases/public/components/user_actions/builder.tsx
@@ -5,6 +5,7 @@
* 2.0.
*/
+import { createAssigneesUserActionBuilder } from './assignees';
import { createCommentUserActionBuilder } from './comment/comment';
import { createConnectorUserActionBuilder } from './connector';
import { createDescriptionUserActionBuilder } from './description';
@@ -26,4 +27,5 @@ export const builderMap: UserActionBuilderMap = {
comment: createCommentUserActionBuilder,
description: createDescriptionUserActionBuilder,
settings: createSettingsUserActionBuilder,
+ assignees: createAssigneesUserActionBuilder,
};
diff --git a/x-pack/plugins/cases/public/containers/constants.ts b/x-pack/plugins/cases/public/containers/constants.ts
index cfd7d5020e20f..3a04b411cb8e7 100644
--- a/x-pack/plugins/cases/public/containers/constants.ts
+++ b/x-pack/plugins/cases/public/containers/constants.ts
@@ -16,3 +16,11 @@ export const CASE_LIST_CACHE_KEY = 'case-list';
export const CASE_CONNECTORS_CACHE_KEY = 'case-connectors';
export const CASE_LICENSE_CACHE_KEY = 'case-license-action';
export const CASE_TAGS_CACHE_KEY = 'case-tags';
+
+/**
+ * User profiles
+ */
+
+export const USER_PROFILES_CACHE_KEY = 'user-profiles';
+export const USER_PROFILES_SUGGEST_CACHE_KEY = 'suggest';
+export const USER_PROFILES_BULK_GET_CACHE_KEY = 'bulk-get';
diff --git a/x-pack/plugins/cases/public/containers/mock.ts b/x-pack/plugins/cases/public/containers/mock.ts
index b09420c59800f..0236175557adb 100644
--- a/x-pack/plugins/cases/public/containers/mock.ts
+++ b/x-pack/plugins/cases/public/containers/mock.ts
@@ -228,6 +228,7 @@ export const basicCase: Case = {
settings: {
syncAlerts: true,
},
+ assignees: [],
};
export const caseWithAlerts = {
@@ -329,6 +330,7 @@ export const mockCase: Case = {
settings: {
syncAlerts: true,
},
+ assignees: [],
};
export const basicCasePost: Case = {
@@ -631,6 +633,7 @@ export const getUserAction = (
tags: ['a tag'],
settings: { syncAlerts: true },
owner: SECURITY_SOLUTION_OWNER,
+ assignees: [],
},
...overrides,
};
diff --git a/x-pack/plugins/cases/public/containers/use_create_attachments.test.tsx b/x-pack/plugins/cases/public/containers/use_create_attachments.test.tsx
index 428b28e02dcc5..7a4b1c7f6523a 100644
--- a/x-pack/plugins/cases/public/containers/use_create_attachments.test.tsx
+++ b/x-pack/plugins/cases/public/containers/use_create_attachments.test.tsx
@@ -26,13 +26,18 @@ describe('useCreateAttachments', () => {
});
const abortCtrl = new AbortController();
- const samplePost = [
+ const attachmentsWithoutOwner = [
{
comment: 'a comment',
type: CommentType.user as const,
- owner: SECURITY_SOLUTION_OWNER,
},
];
+
+ const attachmentsWithOwner = attachmentsWithoutOwner.map((attachment) => ({
+ ...attachment,
+ owner: SECURITY_SOLUTION_OWNER,
+ }));
+
const updateCaseCallback = jest.fn();
beforeEach(() => {
jest.clearAllMocks();
@@ -64,11 +69,17 @@ describe('useCreateAttachments', () => {
result.current.createAttachments({
caseId: basicCaseId,
- data: samplePost,
+ caseOwner: SECURITY_SOLUTION_OWNER,
+ data: attachmentsWithoutOwner,
updateCase: updateCaseCallback,
});
+
await waitForNextUpdate();
- expect(spyOnBulkCreateAttachments).toBeCalledWith(samplePost, basicCaseId, abortCtrl.signal);
+ expect(spyOnBulkCreateAttachments).toBeCalledWith(
+ attachmentsWithOwner,
+ basicCaseId,
+ abortCtrl.signal
+ );
expect(toastErrorMock).not.toHaveBeenCalled();
});
});
@@ -84,11 +95,17 @@ describe('useCreateAttachments', () => {
result.current.createAttachments({
caseId: basicCaseId,
- data: samplePost,
+ caseOwner: SECURITY_SOLUTION_OWNER,
+ data: attachmentsWithoutOwner,
updateCase: updateCaseCallback,
});
+
await waitForNextUpdate();
- expect(spyOnBulkCreateAttachments).toBeCalledWith(samplePost, basicCaseId, abortCtrl.signal);
+ expect(spyOnBulkCreateAttachments).toBeCalledWith(
+ attachmentsWithOwner,
+ basicCaseId,
+ abortCtrl.signal
+ );
expect(toastErrorMock).not.toHaveBeenCalled();
});
});
@@ -98,12 +115,15 @@ describe('useCreateAttachments', () => {
const { result, waitForNextUpdate } = renderHook(() =>
useCreateAttachments()
);
+
await waitForNextUpdate();
result.current.createAttachments({
caseId: basicCaseId,
- data: samplePost,
+ caseOwner: SECURITY_SOLUTION_OWNER,
+ data: attachmentsWithoutOwner,
updateCase: updateCaseCallback,
});
+
await waitForNextUpdate();
expect(result.current).toEqual({
isLoading: false,
@@ -118,10 +138,12 @@ describe('useCreateAttachments', () => {
const { result, waitForNextUpdate } = renderHook(() =>
useCreateAttachments()
);
+
await waitForNextUpdate();
result.current.createAttachments({
caseId: basicCaseId,
- data: samplePost,
+ caseOwner: SECURITY_SOLUTION_OWNER,
+ data: attachmentsWithoutOwner,
updateCase: updateCaseCallback,
});
@@ -139,10 +161,12 @@ describe('useCreateAttachments', () => {
const { result, waitForNextUpdate } = renderHook(() =>
useCreateAttachments()
);
+
await waitForNextUpdate();
result.current.createAttachments({
caseId: basicCaseId,
- data: samplePost,
+ caseOwner: SECURITY_SOLUTION_OWNER,
+ data: attachmentsWithoutOwner,
updateCase: updateCaseCallback,
});
@@ -168,11 +192,14 @@ describe('useCreateAttachments', () => {
const { result, waitForNextUpdate } = renderHook(() =>
useCreateAttachments()
);
+
await waitForNextUpdate();
+
async function test() {
await result.current.createAttachments({
caseId: basicCaseId,
- data: samplePost,
+ caseOwner: SECURITY_SOLUTION_OWNER,
+ data: attachmentsWithoutOwner,
updateCase: updateCaseCallback,
throwOnError: true,
});
diff --git a/x-pack/plugins/cases/public/containers/use_create_attachments.tsx b/x-pack/plugins/cases/public/containers/use_create_attachments.tsx
index e6de525f36e6a..779677cd89cc6 100644
--- a/x-pack/plugins/cases/public/containers/use_create_attachments.tsx
+++ b/x-pack/plugins/cases/public/containers/use_create_attachments.tsx
@@ -6,12 +6,12 @@
*/
import { useReducer, useCallback, useRef, useEffect } from 'react';
-import { BulkCreateCommentRequest } from '../../common/api';
import { createAttachments } from './api';
import * as i18n from './translations';
import { Case } from './types';
import { useToasts } from '../common/lib/kibana';
+import { CaseAttachmentsWithoutOwner } from '../types';
interface NewCommentState {
isLoading: boolean;
@@ -43,7 +43,8 @@ const dataFetchReducer = (state: NewCommentState, action: Action): NewCommentSta
export interface PostComment {
caseId: string;
- data: BulkCreateCommentRequest;
+ caseOwner: string;
+ data: CaseAttachmentsWithoutOwner;
updateCase?: (newCase: Case) => void;
throwOnError?: boolean;
}
@@ -61,14 +62,15 @@ export const useCreateAttachments = (): UseCreateAttachments => {
const abortCtrlRef = useRef(new AbortController());
const fetch = useCallback(
- async ({ caseId, data, updateCase, throwOnError }: PostComment) => {
+ async ({ caseId, caseOwner, data, updateCase, throwOnError }: PostComment) => {
try {
isCancelledRef.current = false;
abortCtrlRef.current.abort();
abortCtrlRef.current = new AbortController();
dispatch({ type: 'FETCH_INIT' });
- const response = await createAttachments(data, caseId, abortCtrlRef.current.signal);
+ const attachments = data.map((attachment) => ({ ...attachment, owner: caseOwner }));
+ const response = await createAttachments(attachments, caseId, abortCtrlRef.current.signal);
if (!isCancelledRef.current) {
dispatch({ type: 'FETCH_SUCCESS' });
diff --git a/x-pack/plugins/cases/public/containers/user_profiles/__mocks__/api.ts b/x-pack/plugins/cases/public/containers/user_profiles/__mocks__/api.ts
new file mode 100644
index 0000000000000..36c88451124ca
--- /dev/null
+++ b/x-pack/plugins/cases/public/containers/user_profiles/__mocks__/api.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; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { UserProfile } from '@kbn/security-plugin/common';
+import { userProfiles } from '../api.mock';
+
+export const suggestUserProfiles = async (): Promise =>
+ Promise.resolve(userProfiles);
+
+export const bulkGetUserProfiles = async (): Promise =>
+ Promise.resolve(userProfiles);
diff --git a/x-pack/plugins/cases/public/containers/user_profiles/api.mock.ts b/x-pack/plugins/cases/public/containers/user_profiles/api.mock.ts
new file mode 100644
index 0000000000000..57578086ceddf
--- /dev/null
+++ b/x-pack/plugins/cases/public/containers/user_profiles/api.mock.ts
@@ -0,0 +1,40 @@
+/*
+ * Copyright 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 { UserProfile } from '@kbn/security-plugin/common';
+
+export const userProfiles: UserProfile[] = [
+ {
+ uid: 'u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0',
+ data: {},
+ user: {
+ username: 'damaged_raccoon',
+ email: 'damaged_raccoon@elastic.co',
+ full_name: 'Damaged Raccoon',
+ },
+ },
+ {
+ uid: 'u_A_tM4n0wPkdiQ9smmd8o0Hr_h61XQfu8aRPh9GMoRoc_0',
+ data: {},
+ user: {
+ username: 'physical_dinosaur',
+ email: 'physical_dinosaur@elastic.co',
+ full_name: 'Physical Dinosaur',
+ },
+ },
+ {
+ uid: 'u_9xDEQqUqoYCnFnPPLq5mIRHKL8gBTo_NiKgOnd5gGk0_0',
+ data: {},
+ user: {
+ username: 'wet_dingo',
+ email: 'wet_dingo@elastic.co',
+ full_name: 'Wet Dingo',
+ },
+ },
+];
+
+export const userProfilesIds = userProfiles.map((profile) => profile.uid);
diff --git a/x-pack/plugins/cases/public/containers/user_profiles/api.test.ts b/x-pack/plugins/cases/public/containers/user_profiles/api.test.ts
new file mode 100644
index 0000000000000..7234cc9fb54fe
--- /dev/null
+++ b/x-pack/plugins/cases/public/containers/user_profiles/api.test.ts
@@ -0,0 +1,82 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { GENERAL_CASES_OWNER } from '../../../common/constants';
+import { createStartServicesMock } from '../../common/lib/kibana/kibana_react.mock';
+import { bulkGetUserProfiles, suggestUserProfiles } from './api';
+import { userProfiles, userProfilesIds } from './api.mock';
+
+describe('User profiles API', () => {
+ describe('suggestUserProfiles', () => {
+ const abortCtrl = new AbortController();
+ const { http } = createStartServicesMock();
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ http.post = jest.fn().mockResolvedValue(userProfiles);
+ });
+
+ it('returns the user profiles correctly', async () => {
+ const res = await suggestUserProfiles({
+ http,
+ name: 'elastic',
+ owner: [GENERAL_CASES_OWNER],
+ signal: abortCtrl.signal,
+ });
+
+ expect(res).toEqual(userProfiles);
+ });
+
+ it('calls http.post correctly', async () => {
+ await suggestUserProfiles({
+ http,
+ name: 'elastic',
+ owner: [GENERAL_CASES_OWNER],
+ signal: abortCtrl.signal,
+ });
+
+ expect(http.post).toHaveBeenCalledWith('/internal/cases/_suggest_user_profiles', {
+ body: '{"name":"elastic","size":10,"owner":["cases"]}',
+ signal: abortCtrl.signal,
+ });
+ });
+ });
+
+ describe('bulkGetUserProfiles', () => {
+ const { security } = createStartServicesMock();
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ security.userProfiles.bulkGet = jest.fn().mockResolvedValue(userProfiles);
+ });
+
+ it('returns the user profiles correctly', async () => {
+ const res = await bulkGetUserProfiles({
+ security,
+ uids: userProfilesIds,
+ });
+
+ expect(res).toEqual(userProfiles);
+ });
+
+ it('calls http.post correctly', async () => {
+ await bulkGetUserProfiles({
+ security,
+ uids: userProfilesIds,
+ });
+
+ expect(security.userProfiles.bulkGet).toHaveBeenCalledWith({
+ dataPath: 'avatar',
+ uids: new Set([
+ 'u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0',
+ 'u_A_tM4n0wPkdiQ9smmd8o0Hr_h61XQfu8aRPh9GMoRoc_0',
+ 'u_9xDEQqUqoYCnFnPPLq5mIRHKL8gBTo_NiKgOnd5gGk0_0',
+ ]),
+ });
+ });
+ });
+});
diff --git a/x-pack/plugins/cases/public/containers/user_profiles/api.ts b/x-pack/plugins/cases/public/containers/user_profiles/api.ts
new file mode 100644
index 0000000000000..6da84d1991423
--- /dev/null
+++ b/x-pack/plugins/cases/public/containers/user_profiles/api.ts
@@ -0,0 +1,46 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { HttpStart } from '@kbn/core/public';
+import { UserProfile } from '@kbn/security-plugin/common';
+import { SecurityPluginStart } from '@kbn/security-plugin/public';
+import { INTERNAL_SUGGEST_USER_PROFILES_URL, DEFAULT_USER_SIZE } from '../../../common/constants';
+
+export interface SuggestUserProfilesArgs {
+ http: HttpStart;
+ name: string;
+ owner: string[];
+ signal: AbortSignal;
+ size?: number;
+}
+
+export const suggestUserProfiles = async ({
+ http,
+ name,
+ size = DEFAULT_USER_SIZE,
+ owner,
+ signal,
+}: SuggestUserProfilesArgs): Promise => {
+ const response = await http.post(INTERNAL_SUGGEST_USER_PROFILES_URL, {
+ body: JSON.stringify({ name, size, owner }),
+ signal,
+ });
+
+ return response;
+};
+
+export interface BulkGetUserProfilesArgs {
+ security: SecurityPluginStart;
+ uids: string[];
+}
+
+export const bulkGetUserProfiles = async ({
+ security,
+ uids,
+}: BulkGetUserProfilesArgs): Promise => {
+ return security.userProfiles.bulkGet({ uids: new Set(uids), dataPath: 'avatar' });
+};
diff --git a/x-pack/plugins/cases/public/containers/user_profiles/use_bulk_get_user_profiles.test.ts b/x-pack/plugins/cases/public/containers/user_profiles/use_bulk_get_user_profiles.test.ts
new file mode 100644
index 0000000000000..7591bf394d5c1
--- /dev/null
+++ b/x-pack/plugins/cases/public/containers/user_profiles/use_bulk_get_user_profiles.test.ts
@@ -0,0 +1,66 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { renderHook } from '@testing-library/react-hooks';
+import { useToasts } from '../../common/lib/kibana';
+import { AppMockRenderer, createAppMockRenderer } from '../../common/mock';
+import * as api from './api';
+import { useBulkGetUserProfiles } from './use_bulk_get_user_profiles';
+import { userProfilesIds } from './api.mock';
+
+jest.mock('../../common/lib/kibana');
+jest.mock('./api');
+
+describe('useBulkGetUserProfiles', () => {
+ const props = {
+ uids: userProfilesIds,
+ };
+
+ const addSuccess = jest.fn();
+ (useToasts as jest.Mock).mockReturnValue({ addSuccess, addError: jest.fn() });
+
+ let appMockRender: AppMockRenderer;
+
+ beforeEach(() => {
+ appMockRender = createAppMockRenderer();
+ jest.clearAllMocks();
+ });
+
+ it('calls bulkGetUserProfiles with correct arguments', async () => {
+ const spyOnSuggestUserProfiles = jest.spyOn(api, 'bulkGetUserProfiles');
+
+ const { result, waitFor } = renderHook(() => useBulkGetUserProfiles(props), {
+ wrapper: appMockRender.AppWrapper,
+ });
+
+ await waitFor(() => result.current.isSuccess);
+
+ expect(spyOnSuggestUserProfiles).toBeCalledWith({
+ ...props,
+ security: expect.anything(),
+ });
+ });
+
+ it('shows a toast error message when an error occurs in the response', async () => {
+ const spyOnSuggestUserProfiles = jest.spyOn(api, 'bulkGetUserProfiles');
+
+ spyOnSuggestUserProfiles.mockImplementation(() => {
+ throw new Error('Something went wrong');
+ });
+
+ const addError = jest.fn();
+ (useToasts as jest.Mock).mockReturnValue({ addSuccess, addError });
+
+ const { result, waitFor } = renderHook(() => useBulkGetUserProfiles(props), {
+ wrapper: appMockRender.AppWrapper,
+ });
+
+ await waitFor(() => result.current.isError);
+
+ expect(addError).toHaveBeenCalled();
+ });
+});
diff --git a/x-pack/plugins/cases/public/containers/user_profiles/use_bulk_get_user_profiles.ts b/x-pack/plugins/cases/public/containers/user_profiles/use_bulk_get_user_profiles.ts
new file mode 100644
index 0000000000000..cdaee1848613c
--- /dev/null
+++ b/x-pack/plugins/cases/public/containers/user_profiles/use_bulk_get_user_profiles.ts
@@ -0,0 +1,41 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { useQuery, UseQueryResult } from 'react-query';
+import { UserProfile } from '@kbn/security-plugin/common';
+import * as i18n from '../translations';
+import { useKibana, useToasts } from '../../common/lib/kibana';
+import { ServerError } from '../../types';
+import { USER_PROFILES_CACHE_KEY, USER_PROFILES_BULK_GET_CACHE_KEY } from '../constants';
+import { bulkGetUserProfiles } from './api';
+
+export const useBulkGetUserProfiles = ({ uids }: { uids: string[] }) => {
+ const { security } = useKibana().services;
+
+ const toasts = useToasts();
+
+ return useQuery(
+ [USER_PROFILES_CACHE_KEY, USER_PROFILES_BULK_GET_CACHE_KEY, uids],
+ () => {
+ return bulkGetUserProfiles({ security, uids });
+ },
+ {
+ onError: (error: ServerError) => {
+ if (error.name !== 'AbortError') {
+ toasts.addError(
+ error.body && error.body.message ? new Error(error.body.message) : error,
+ {
+ title: i18n.ERROR_TITLE,
+ }
+ );
+ }
+ },
+ }
+ );
+};
+
+export type UseSuggestUserProfiles = UseQueryResult;
diff --git a/x-pack/plugins/cases/public/containers/user_profiles/use_suggest_user_profiles.test.ts b/x-pack/plugins/cases/public/containers/user_profiles/use_suggest_user_profiles.test.ts
new file mode 100644
index 0000000000000..5ae16c8fa6e00
--- /dev/null
+++ b/x-pack/plugins/cases/public/containers/user_profiles/use_suggest_user_profiles.test.ts
@@ -0,0 +1,83 @@
+/*
+ * Copyright 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 { GENERAL_CASES_OWNER } from '../../../common/constants';
+import { renderHook } from '@testing-library/react-hooks';
+import { useToasts } from '../../common/lib/kibana';
+import { AppMockRenderer, createAppMockRenderer } from '../../common/mock';
+import * as api from './api';
+import { useSuggestUserProfiles } from './use_suggest_user_profiles';
+
+jest.mock('../../common/lib/kibana');
+jest.mock('./api');
+
+describe('useSuggestUserProfiles', () => {
+ const props = {
+ name: 'elastic',
+ owner: [GENERAL_CASES_OWNER],
+ };
+
+ const addSuccess = jest.fn();
+ (useToasts as jest.Mock).mockReturnValue({ addSuccess, addError: jest.fn() });
+
+ let appMockRender: AppMockRenderer;
+
+ beforeAll(() => {
+ jest.useFakeTimers();
+ });
+
+ beforeEach(() => {
+ appMockRender = createAppMockRenderer();
+ jest.clearAllMocks();
+ });
+
+ afterEach(() => {
+ jest.clearAllTimers();
+ });
+
+ afterAll(() => {
+ jest.useRealTimers();
+ });
+
+ it('calls suggestUserProfiles with correct arguments', async () => {
+ const spyOnSuggestUserProfiles = jest.spyOn(api, 'suggestUserProfiles');
+
+ const { result, waitFor } = renderHook(() => useSuggestUserProfiles(props), {
+ wrapper: appMockRender.AppWrapper,
+ });
+
+ jest.advanceTimersByTime(500);
+ await waitFor(() => result.current.isSuccess);
+
+ expect(spyOnSuggestUserProfiles).toBeCalledWith({
+ ...props,
+ size: 10,
+ http: expect.anything(),
+ signal: expect.anything(),
+ });
+ });
+
+ it('shows a toast error message when an error occurs in the response', async () => {
+ const spyOnSuggestUserProfiles = jest.spyOn(api, 'suggestUserProfiles');
+
+ spyOnSuggestUserProfiles.mockImplementation(() => {
+ throw new Error('Something went wrong');
+ });
+
+ const addError = jest.fn();
+ (useToasts as jest.Mock).mockReturnValue({ addSuccess, addError });
+
+ const { result, waitFor } = renderHook(() => useSuggestUserProfiles(props), {
+ wrapper: appMockRender.AppWrapper,
+ });
+
+ jest.advanceTimersByTime(500);
+ await waitFor(() => result.current.isError);
+
+ expect(addError).toHaveBeenCalled();
+ });
+});
diff --git a/x-pack/plugins/cases/public/containers/user_profiles/use_suggest_user_profiles.ts b/x-pack/plugins/cases/public/containers/user_profiles/use_suggest_user_profiles.ts
new file mode 100644
index 0000000000000..3705224e1d0c8
--- /dev/null
+++ b/x-pack/plugins/cases/public/containers/user_profiles/use_suggest_user_profiles.ts
@@ -0,0 +1,65 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { useState } from 'react';
+import { useQuery, UseQueryResult } from 'react-query';
+import useDebounce from 'react-use/lib/useDebounce';
+import { UserProfile } from '@kbn/security-plugin/common';
+import { DEFAULT_USER_SIZE } from '../../../common/constants';
+import * as i18n from '../translations';
+import { useKibana, useToasts } from '../../common/lib/kibana';
+import { ServerError } from '../../types';
+import { USER_PROFILES_CACHE_KEY, USER_PROFILES_SUGGEST_CACHE_KEY } from '../constants';
+import { suggestUserProfiles, SuggestUserProfilesArgs } from './api';
+
+const DEBOUNCE_MS = 500;
+
+export const useSuggestUserProfiles = ({
+ name,
+ owner,
+ size = DEFAULT_USER_SIZE,
+}: Omit) => {
+ const { http } = useKibana().services;
+ const [debouncedName, setDebouncedName] = useState(name);
+
+ useDebounce(() => setDebouncedName(name), DEBOUNCE_MS, [name]);
+
+ const toasts = useToasts();
+
+ return useQuery(
+ [
+ USER_PROFILES_CACHE_KEY,
+ USER_PROFILES_SUGGEST_CACHE_KEY,
+ { name: debouncedName, owner, size },
+ ],
+ () => {
+ const abortCtrlRef = new AbortController();
+ return suggestUserProfiles({
+ http,
+ name: debouncedName,
+ owner,
+ size,
+ signal: abortCtrlRef.signal,
+ });
+ },
+ {
+ retry: false,
+ onError: (error: ServerError) => {
+ if (error.name !== 'AbortError') {
+ toasts.addError(
+ error.body && error.body.message ? new Error(error.body.message) : error,
+ {
+ title: i18n.ERROR_TITLE,
+ }
+ );
+ }
+ },
+ }
+ );
+};
+
+export type UseSuggestUserProfiles = UseQueryResult;
diff --git a/x-pack/plugins/cases/public/index.tsx b/x-pack/plugins/cases/public/index.tsx
index e267960d91a80..554fa8bad2688 100644
--- a/x-pack/plugins/cases/public/index.tsx
+++ b/x-pack/plugins/cases/public/index.tsx
@@ -21,7 +21,11 @@ export type { GetCreateCaseFlyoutProps } from './client/ui/get_create_case_flyou
export type { GetAllCasesSelectorModalProps } from './client/ui/get_all_cases_selector_modal';
export type { GetRecentCasesProps } from './client/ui/get_recent_cases';
-export type { CaseAttachments, SupportedCaseAttachment } from './types';
+export type {
+ CaseAttachments,
+ SupportedCaseAttachment,
+ CaseAttachmentsWithoutOwner,
+} from './types';
export type { ICasesDeepLinkId } from './common/navigation';
export {
diff --git a/x-pack/plugins/cases/public/types.ts b/x-pack/plugins/cases/public/types.ts
index f07dd8cd9fb04..00ffa538c2f90 100644
--- a/x-pack/plugins/cases/public/types.ts
+++ b/x-pack/plugins/cases/public/types.ts
@@ -15,9 +15,10 @@ import type { HomePublicPluginSetup } from '@kbn/home-plugin/public';
import type { ManagementSetup, ManagementAppMountParams } from '@kbn/management-plugin/public';
import type { FeaturesPluginStart } from '@kbn/features-plugin/public';
import type { LensPublicStart } from '@kbn/lens-plugin/public';
-import type { SecurityPluginSetup } from '@kbn/security-plugin/public';
+import type { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/public';
import type { SpacesPluginStart } from '@kbn/spaces-plugin/public';
import type { TriggersAndActionsUIPublicPluginStart as TriggersActionsStart } from '@kbn/triggers-actions-ui-plugin/public';
+import type { DistributiveOmit } from '@elastic/eui';
import type {
CasesByAlertId,
CasesByAlertIDRequest,
@@ -56,6 +57,7 @@ export interface CasesPluginStart {
storage: Storage;
triggersActionsUi: TriggersActionsStart;
features: FeaturesPluginStart;
+ security: SecurityPluginStart;
spaces?: SpacesPluginStart;
}
@@ -65,10 +67,7 @@ export interface CasesPluginStart {
* Leaving it out currently in lieu of RBAC changes
*/
-export type StartServices = CoreStart &
- CasesPluginStart & {
- security: SecurityPluginSetup;
- };
+export type StartServices = CoreStart & CasesPluginStart;
export interface RenderAppProps {
mountParams: ManagementAppMountParams;
@@ -147,5 +146,7 @@ export interface CasesUiStart {
export type SupportedCaseAttachment = CommentRequestAlertType | CommentRequestUserType;
export type CaseAttachments = SupportedCaseAttachment[];
+export type CaseAttachmentWithoutOwner = DistributiveOmit;
+export type CaseAttachmentsWithoutOwner = CaseAttachmentWithoutOwner[];
export type ServerError = IHttpFetchError;
diff --git a/x-pack/plugins/cases/server/client/cases/create.ts b/x-pack/plugins/cases/server/client/cases/create.ts
index 0a2c785faef4c..dad55f528569a 100644
--- a/x-pack/plugins/cases/server/client/cases/create.ts
+++ b/x-pack/plugins/cases/server/client/cases/create.ts
@@ -86,7 +86,11 @@ export const create = async (
unsecuredSavedObjectsClient,
caseId: newCase.id,
user,
- payload: { ...query, severity: query.severity ?? CaseSeverity.LOW },
+ payload: {
+ ...query,
+ severity: query.severity ?? CaseSeverity.LOW,
+ assignees: query.assignees ?? [],
+ },
owner: newCase.attributes.owner,
});
diff --git a/x-pack/plugins/cases/server/client/cases/find.ts b/x-pack/plugins/cases/server/client/cases/find.ts
index 3bf9d0fd30ea7..eeb1cf6757268 100644
--- a/x-pack/plugins/cases/server/client/cases/find.ts
+++ b/x-pack/plugins/cases/server/client/cases/find.ts
@@ -62,6 +62,7 @@ export const find = async (
owner: queryParams.owner,
from: queryParams.from,
to: queryParams.to,
+ assignees: queryParams.assignees,
};
const statusStatsOptions = constructQueryOptions({
diff --git a/x-pack/plugins/cases/server/client/cases/mock.ts b/x-pack/plugins/cases/server/client/cases/mock.ts
index 4c0698b209bef..3f912cda3eb3c 100644
--- a/x-pack/plugins/cases/server/client/cases/mock.ts
+++ b/x-pack/plugins/cases/server/client/cases/mock.ts
@@ -242,6 +242,7 @@ export const userActions: CaseUserActionsResponse = [
status: 'open',
severity: 'low',
owner: SECURITY_SOLUTION_OWNER,
+ assignees: [],
},
action_id: 'fd830c60-6646-11eb-a291-51bf6b175a53',
case_id: 'fcdedd20-6646-11eb-a291-51bf6b175a53',
diff --git a/x-pack/plugins/cases/server/client/types.ts b/x-pack/plugins/cases/server/client/types.ts
index 962b3bc85e1db..8ffd3aa5299f9 100644
--- a/x-pack/plugins/cases/server/client/types.ts
+++ b/x-pack/plugins/cases/server/client/types.ts
@@ -57,4 +57,5 @@ export interface ConstructQueryParams {
authorizationFilter?: KueryNode;
from?: string;
to?: string;
+ assignees?: string | string[];
}
diff --git a/x-pack/plugins/cases/server/client/utils.test.ts b/x-pack/plugins/cases/server/client/utils.test.ts
index 9c7d3e77cbd38..30464f21b564c 100644
--- a/x-pack/plugins/cases/server/client/utils.test.ts
+++ b/x-pack/plugins/cases/server/client/utils.test.ts
@@ -5,7 +5,13 @@
* 2.0.
*/
-import { arraysDifference, buildRangeFilter, constructQueryOptions, sortToSnake } from './utils';
+import {
+ arraysDifference,
+ buildNestedFilter,
+ buildRangeFilter,
+ constructQueryOptions,
+ sortToSnake,
+} from './utils';
import { toElasticsearchQuery } from '@kbn/es-query';
import { CaseStatuses } from '../../common';
import { CaseSeverity } from '../../common/api';
@@ -490,6 +496,163 @@ describe('utils', () => {
});
});
+ describe('buildNestedFilter', () => {
+ it('returns undefined if filters is undefined', () => {
+ expect(buildNestedFilter({ field: '', nestedField: '', operator: 'or' })).toBeUndefined();
+ });
+
+ it('returns undefined when the filters array is empty', () => {
+ expect(
+ buildNestedFilter({ filters: [], field: '', nestedField: '', operator: 'or' })
+ ).toBeUndefined();
+ });
+
+ it('returns a KueryNode for a single filter', () => {
+ expect(
+ toElasticsearchQuery(
+ buildNestedFilter({
+ filters: ['hello'],
+ field: 'uid',
+ nestedField: 'nestedField',
+ operator: 'or',
+ })!
+ )
+ ).toMatchInlineSnapshot(`
+ Object {
+ "nested": Object {
+ "path": "cases.attributes.nestedField",
+ "query": Object {
+ "bool": Object {
+ "minimum_should_match": 1,
+ "should": Array [
+ Object {
+ "match": Object {
+ "cases.attributes.nestedField.uid": "hello",
+ },
+ },
+ ],
+ },
+ },
+ "score_mode": "none",
+ },
+ }
+ `);
+ });
+
+ it("returns a KueryNode for multiple filters or'd together", () => {
+ expect(
+ toElasticsearchQuery(
+ buildNestedFilter({
+ filters: ['uid1', 'uid2'],
+ field: 'uid',
+ nestedField: 'nestedField',
+ operator: 'or',
+ })!
+ )
+ ).toMatchInlineSnapshot(`
+ Object {
+ "bool": Object {
+ "minimum_should_match": 1,
+ "should": Array [
+ Object {
+ "nested": Object {
+ "path": "cases.attributes.nestedField",
+ "query": Object {
+ "bool": Object {
+ "minimum_should_match": 1,
+ "should": Array [
+ Object {
+ "match": Object {
+ "cases.attributes.nestedField.uid": "uid1",
+ },
+ },
+ ],
+ },
+ },
+ "score_mode": "none",
+ },
+ },
+ Object {
+ "nested": Object {
+ "path": "cases.attributes.nestedField",
+ "query": Object {
+ "bool": Object {
+ "minimum_should_match": 1,
+ "should": Array [
+ Object {
+ "match": Object {
+ "cases.attributes.nestedField.uid": "uid2",
+ },
+ },
+ ],
+ },
+ },
+ "score_mode": "none",
+ },
+ },
+ ],
+ },
+ }
+ `);
+ });
+
+ it("returns a KueryNode for multiple filters and'ed together", () => {
+ expect(
+ toElasticsearchQuery(
+ buildNestedFilter({
+ filters: ['uid1', 'uid2'],
+ field: 'uid',
+ nestedField: 'nestedField',
+ operator: 'and',
+ })!
+ )
+ ).toMatchInlineSnapshot(`
+ Object {
+ "bool": Object {
+ "filter": Array [
+ Object {
+ "nested": Object {
+ "path": "cases.attributes.nestedField",
+ "query": Object {
+ "bool": Object {
+ "minimum_should_match": 1,
+ "should": Array [
+ Object {
+ "match": Object {
+ "cases.attributes.nestedField.uid": "uid1",
+ },
+ },
+ ],
+ },
+ },
+ "score_mode": "none",
+ },
+ },
+ Object {
+ "nested": Object {
+ "path": "cases.attributes.nestedField",
+ "query": Object {
+ "bool": Object {
+ "minimum_should_match": 1,
+ "should": Array [
+ Object {
+ "match": Object {
+ "cases.attributes.nestedField.uid": "uid2",
+ },
+ },
+ ],
+ },
+ },
+ "score_mode": "none",
+ },
+ },
+ ],
+ },
+ }
+ `);
+ });
+ });
+
describe('arraysDifference', () => {
it('returns null if originalValue is null', () => {
expect(arraysDifference(null, [])).toBeNull();
diff --git a/x-pack/plugins/cases/server/client/utils.ts b/x-pack/plugins/cases/server/client/utils.ts
index 786c0ad582980..009a097d1f095 100644
--- a/x-pack/plugins/cases/server/client/utils.ts
+++ b/x-pack/plugins/cases/server/client/utils.ts
@@ -177,6 +177,10 @@ interface FilterField {
type?: string;
}
+interface NestedFilterField extends FilterField {
+ nestedField: string;
+}
+
export const buildFilter = ({
filters,
field,
@@ -194,7 +198,48 @@ export const buildFilter = ({
}
return nodeBuilder[operator](
- filtersAsArray.map((filter) => nodeBuilder.is(`${type}.attributes.${field}`, filter))
+ filtersAsArray.map((filter) =>
+ nodeBuilder.is(`${escapeKuery(type)}.attributes.${escapeKuery(field)}`, escapeKuery(filter))
+ )
+ );
+};
+
+/**
+ * Creates a KueryNode filter for the Saved Object find API's filter field. This handles constructing a filter for
+ * a nested field.
+ *
+ * @param filters is a string or array of strings that defines the values to search for
+ * @param field is the location to search for
+ * @param nestedField is the field in the saved object that has a type of 'nested'
+ * @param operator whether to 'or'/'and' the created filters together
+ * @type the type of saved object being searched
+ * @returns a constructed KueryNode representing the filter or undefined if one could not be built
+ */
+export const buildNestedFilter = ({
+ filters,
+ field,
+ nestedField,
+ operator,
+ type = CASE_SAVED_OBJECT,
+}: NestedFilterField): KueryNode | undefined => {
+ if (filters === undefined) {
+ return;
+ }
+
+ const filtersAsArray = Array.isArray(filters) ? filters : [filters];
+
+ if (filtersAsArray.length === 0) {
+ return;
+ }
+
+ return nodeBuilder[operator](
+ filtersAsArray.map((filter) =>
+ fromKueryExpression(
+ `${escapeKuery(type)}.attributes.${escapeKuery(nestedField)}:{ ${escapeKuery(
+ field
+ )}: ${escapeKuery(filter)} }`
+ )
+ )
);
};
@@ -284,6 +329,7 @@ export const constructQueryOptions = ({
authorizationFilter,
from,
to,
+ assignees,
}: ConstructQueryParams): SavedObjectFindOptionsKueryNode => {
const tagsFilter = buildFilter({ filters: tags, field: 'tags', operator: 'or' });
const reportersFilter = buildFilter({
@@ -297,6 +343,11 @@ export const constructQueryOptions = ({
const statusFilter = status != null ? addStatusFilter({ status }) : undefined;
const severityFilter = severity != null ? addSeverityFilter({ severity }) : undefined;
const rangeFilter = buildRangeFilter({ from, to });
+ const assigneesFilter = buildFilter({
+ filters: assignees,
+ field: 'assignees.uid',
+ operator: 'or',
+ });
const filters = combineFilters([
statusFilter,
@@ -305,6 +356,7 @@ export const constructQueryOptions = ({
reportersFilter,
rangeFilter,
ownerFilter,
+ assigneesFilter,
]);
return {
diff --git a/x-pack/plugins/cases/server/common/utils.test.ts b/x-pack/plugins/cases/server/common/utils.test.ts
index 918a48863cac0..1587a751b7c08 100644
--- a/x-pack/plugins/cases/server/common/utils.test.ts
+++ b/x-pack/plugins/cases/server/common/utils.test.ts
@@ -103,6 +103,7 @@ describe('common utils', () => {
expect(res).toMatchInlineSnapshot(`
Object {
+ "assignees": Array [],
"closed_at": null,
"closed_by": null,
"connector": Object {
@@ -155,6 +156,7 @@ describe('common utils', () => {
expect(res).toMatchInlineSnapshot(`
Object {
+ "assignees": Array [],
"closed_at": null,
"closed_by": null,
"connector": Object {
@@ -192,6 +194,63 @@ describe('common utils', () => {
}
`);
});
+
+ it('transform correctly with assignees provided', () => {
+ const myCase = {
+ newCase: { ...newCase, connector, assignees: [{ uid: '1' }] },
+ user: {
+ email: 'elastic@elastic.co',
+ full_name: 'Elastic',
+ username: 'elastic',
+ },
+ };
+
+ const res = transformNewCase(myCase);
+
+ expect(res).toMatchInlineSnapshot(`
+ Object {
+ "assignees": Array [
+ Object {
+ "uid": "1",
+ },
+ ],
+ "closed_at": null,
+ "closed_by": null,
+ "connector": Object {
+ "fields": Object {
+ "issueType": "Task",
+ "parent": null,
+ "priority": "High",
+ },
+ "id": "123",
+ "name": "My connector",
+ "type": ".jira",
+ },
+ "created_at": "2020-04-09T09:43:51.778Z",
+ "created_by": Object {
+ "email": "elastic@elastic.co",
+ "full_name": "Elastic",
+ "username": "elastic",
+ },
+ "description": "A description",
+ "duration": null,
+ "external_service": null,
+ "owner": "securitySolution",
+ "settings": Object {
+ "syncAlerts": true,
+ },
+ "severity": "low",
+ "status": "open",
+ "tags": Array [
+ "new",
+ "case",
+ ],
+ "title": "My new case",
+ "updated_at": null,
+ "updated_by": null,
+ }
+ `);
+ });
});
describe('transformCases', () => {
@@ -214,6 +273,7 @@ describe('common utils', () => {
Object {
"cases": Array [
Object {
+ "assignees": Array [],
"closed_at": null,
"closed_by": null,
"comments": Array [],
@@ -254,6 +314,7 @@ describe('common utils', () => {
"version": "WzAsMV0=",
},
Object {
+ "assignees": Array [],
"closed_at": null,
"closed_by": null,
"comments": Array [],
@@ -294,6 +355,7 @@ describe('common utils', () => {
"version": "WzQsMV0=",
},
Object {
+ "assignees": Array [],
"closed_at": null,
"closed_by": null,
"comments": Array [],
@@ -338,6 +400,7 @@ describe('common utils', () => {
"version": "WzUsMV0=",
},
Object {
+ "assignees": Array [],
"closed_at": "2019-11-25T22:32:17.947Z",
"closed_by": Object {
"email": "testemail@elastic.co",
@@ -407,6 +470,7 @@ describe('common utils', () => {
expect(res).toMatchInlineSnapshot(`
Object {
+ "assignees": Array [],
"closed_at": null,
"closed_by": null,
"comments": Array [],
@@ -463,6 +527,7 @@ describe('common utils', () => {
expect(res).toMatchInlineSnapshot(`
Object {
+ "assignees": Array [],
"closed_at": null,
"closed_by": null,
"comments": Array [],
@@ -520,6 +585,7 @@ describe('common utils', () => {
expect(res).toMatchInlineSnapshot(`
Object {
+ "assignees": Array [],
"closed_at": null,
"closed_by": null,
"comments": Array [
@@ -600,6 +666,7 @@ describe('common utils', () => {
expect(res).toMatchInlineSnapshot(`
Object {
+ "assignees": Array [],
"closed_at": null,
"closed_by": null,
"comments": Array [],
diff --git a/x-pack/plugins/cases/server/common/utils.ts b/x-pack/plugins/cases/server/common/utils.ts
index 19c840a25d048..669472023d62a 100644
--- a/x-pack/plugins/cases/server/common/utils.ts
+++ b/x-pack/plugins/cases/server/common/utils.ts
@@ -69,6 +69,7 @@ export const transformNewCase = ({
status: CaseStatuses.open,
updated_at: null,
updated_by: null,
+ assignees: newCase.assignees ?? [],
});
export const transformCases = ({
diff --git a/x-pack/plugins/cases/server/routes/api/__fixtures__/mock_saved_objects.ts b/x-pack/plugins/cases/server/routes/api/__fixtures__/mock_saved_objects.ts
index 77e1a64012c6d..1eb180edb09e4 100644
--- a/x-pack/plugins/cases/server/routes/api/__fixtures__/mock_saved_objects.ts
+++ b/x-pack/plugins/cases/server/routes/api/__fixtures__/mock_saved_objects.ts
@@ -52,6 +52,7 @@ export const mockCases: Array> = [
syncAlerts: true,
},
owner: SECURITY_SOLUTION_OWNER,
+ assignees: [],
},
references: [],
updated_at: '2019-11-25T21:54:48.952Z',
@@ -92,6 +93,7 @@ export const mockCases: Array> = [
syncAlerts: true,
},
owner: SECURITY_SOLUTION_OWNER,
+ assignees: [],
},
references: [],
updated_at: '2019-11-25T22:32:00.900Z',
@@ -132,6 +134,7 @@ export const mockCases: Array> = [
syncAlerts: true,
},
owner: SECURITY_SOLUTION_OWNER,
+ assignees: [],
},
references: [],
updated_at: '2019-11-25T22:32:17.947Z',
@@ -176,6 +179,7 @@ export const mockCases: Array> = [
syncAlerts: true,
},
owner: SECURITY_SOLUTION_OWNER,
+ assignees: [],
},
references: [],
updated_at: '2019-11-25T22:32:17.947Z',
diff --git a/x-pack/plugins/cases/server/saved_object_types/cases.ts b/x-pack/plugins/cases/server/saved_object_types/cases.ts
index 9b2ea975c4dcd..b1e3f9a76e2e7 100644
--- a/x-pack/plugins/cases/server/saved_object_types/cases.ts
+++ b/x-pack/plugins/cases/server/saved_object_types/cases.ts
@@ -27,6 +27,13 @@ export const createCaseSavedObjectType = (
convertToMultiNamespaceTypeVersion: '8.0.0',
mappings: {
properties: {
+ assignees: {
+ properties: {
+ uid: {
+ type: 'keyword',
+ },
+ },
+ },
closed_at: {
type: 'date',
},
diff --git a/x-pack/plugins/cases/server/saved_object_types/migrations/cases.test.ts b/x-pack/plugins/cases/server/saved_object_types/migrations/cases.test.ts
index b4d3421643a41..11eb477be73a5 100644
--- a/x-pack/plugins/cases/server/saved_object_types/migrations/cases.test.ts
+++ b/x-pack/plugins/cases/server/saved_object_types/migrations/cases.test.ts
@@ -16,7 +16,13 @@ import {
import { CASE_SAVED_OBJECT } from '../../../common/constants';
import { getNoneCaseConnector } from '../../common/utils';
import { createExternalService, ESCaseConnectorWithId } from '../../services/test_utils';
-import { addDuration, addSeverity, caseConnectorIdMigration, removeCaseType } from './cases';
+import {
+ addAssignees,
+ addDuration,
+ addSeverity,
+ caseConnectorIdMigration,
+ removeCaseType,
+} from './cases';
// eslint-disable-next-line @typescript-eslint/naming-convention
const create_7_14_0_case = ({
@@ -538,4 +544,41 @@ describe('case migrations', () => {
});
});
});
+
+ describe('addAssignees', () => {
+ it('adds the assignees field correctly when none is present', () => {
+ const doc = {
+ id: '123',
+ attributes: {},
+ type: 'abc',
+ references: [],
+ } as unknown as SavedObjectSanitizedDoc;
+ expect(addAssignees(doc)).toEqual({
+ ...doc,
+ attributes: {
+ ...doc.attributes,
+ assignees: [],
+ },
+ });
+ });
+
+ it('keeps the existing assignees value if the field already exists', () => {
+ const assignees = [{ uid: '1' }];
+ const doc = {
+ id: '123',
+ attributes: {
+ assignees,
+ },
+ type: 'abc',
+ references: [],
+ } as unknown as SavedObjectSanitizedDoc;
+ expect(addAssignees(doc)).toEqual({
+ ...doc,
+ attributes: {
+ ...doc.attributes,
+ assignees,
+ },
+ });
+ });
+ });
});
diff --git a/x-pack/plugins/cases/server/saved_object_types/migrations/cases.ts b/x-pack/plugins/cases/server/saved_object_types/migrations/cases.ts
index c4961f742abc7..2e3672c6f72c2 100644
--- a/x-pack/plugins/cases/server/saved_object_types/migrations/cases.ts
+++ b/x-pack/plugins/cases/server/saved_object_types/migrations/cases.ts
@@ -122,6 +122,13 @@ export const addSeverity = (
return { ...doc, attributes: { ...doc.attributes, severity }, references: doc.references ?? [] };
};
+export const addAssignees = (
+ doc: SavedObjectUnsanitizedDoc
+): SavedObjectSanitizedDoc => {
+ const assignees = doc.attributes.assignees ?? [];
+ return { ...doc, attributes: { ...doc.attributes, assignees }, references: doc.references ?? [] };
+};
+
export const caseMigrations = {
'7.10.0': (
doc: SavedObjectUnsanitizedDoc
@@ -184,4 +191,5 @@ export const caseMigrations = {
'7.15.0': caseConnectorIdMigration,
'8.1.0': removeCaseType,
'8.3.0': pipeMigrations(addDuration, addSeverity),
+ '8.5.0': addAssignees,
};
diff --git a/x-pack/plugins/cases/server/saved_object_types/migrations/user_actions/assignees.test.ts b/x-pack/plugins/cases/server/saved_object_types/migrations/user_actions/assignees.test.ts
new file mode 100644
index 0000000000000..d918cbb5f9076
--- /dev/null
+++ b/x-pack/plugins/cases/server/saved_object_types/migrations/user_actions/assignees.test.ts
@@ -0,0 +1,77 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { ActionTypes } from '../../../../common/api';
+import { CASE_USER_ACTION_SAVED_OBJECT } from '../../../../common/constants';
+import { addAssigneesToCreateUserAction } from './assignees';
+
+describe('assignees migration', () => {
+ const userAction = {
+ type: CASE_USER_ACTION_SAVED_OBJECT,
+ id: '1',
+ attributes: {
+ action_at: '2022-01-09T22:00:00.000Z',
+ action_by: {
+ email: 'elastic@elastic.co',
+ full_name: 'Elastic User',
+ username: 'elastic',
+ },
+ payload: {},
+ type: ActionTypes.create_case,
+ },
+ };
+
+ it('adds the assignees field to the create_case user action', () => {
+ // @ts-expect-error payload does not include the required fields
+ const migratedUserAction = addAssigneesToCreateUserAction(userAction);
+ expect(migratedUserAction).toEqual({
+ attributes: {
+ action_at: '2022-01-09T22:00:00.000Z',
+ action_by: {
+ email: 'elastic@elastic.co',
+ full_name: 'Elastic User',
+ username: 'elastic',
+ },
+ payload: {
+ assignees: [],
+ },
+ type: 'create_case',
+ },
+ id: '1',
+ references: [],
+ type: 'cases-user-actions',
+ });
+ });
+
+ it('does NOT add the assignees field non-create_case user actions', () => {
+ Object.keys(ActionTypes)
+ .filter((type) => type !== ActionTypes.create_case)
+ .forEach((type) => {
+ const migratedUserAction = addAssigneesToCreateUserAction({
+ ...userAction,
+ // @ts-expect-error override the type, it is only expecting create_case
+ attributes: { ...userAction.attributes, type },
+ });
+
+ expect(migratedUserAction).toEqual({
+ attributes: {
+ action_at: '2022-01-09T22:00:00.000Z',
+ action_by: {
+ email: 'elastic@elastic.co',
+ full_name: 'Elastic User',
+ username: 'elastic',
+ },
+ payload: {},
+ type,
+ },
+ id: '1',
+ references: [],
+ type: 'cases-user-actions',
+ });
+ });
+ });
+});
diff --git a/x-pack/plugins/cases/server/saved_object_types/migrations/user_actions/assignees.ts b/x-pack/plugins/cases/server/saved_object_types/migrations/user_actions/assignees.ts
new file mode 100644
index 0000000000000..d7b1110bbd5e1
--- /dev/null
+++ b/x-pack/plugins/cases/server/saved_object_types/migrations/user_actions/assignees.ts
@@ -0,0 +1,23 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { SavedObjectUnsanitizedDoc, SavedObjectSanitizedDoc } from '@kbn/core/server';
+import { ActionTypes, CreateCaseUserAction } from '../../../../common/api';
+
+export const addAssigneesToCreateUserAction = (
+ doc: SavedObjectUnsanitizedDoc
+): SavedObjectSanitizedDoc => {
+ if (doc.attributes.type !== ActionTypes.create_case) {
+ return { ...doc, references: doc.references ?? [] };
+ }
+
+ const payload = {
+ ...doc.attributes.payload,
+ assignees: doc?.attributes?.payload?.assignees ?? [],
+ };
+ return { ...doc, attributes: { ...doc.attributes, payload }, references: doc.references ?? [] };
+};
diff --git a/x-pack/plugins/cases/server/saved_object_types/migrations/user_actions/index.ts b/x-pack/plugins/cases/server/saved_object_types/migrations/user_actions/index.ts
index 8b59716b222e1..98a1e2454ffc4 100644
--- a/x-pack/plugins/cases/server/saved_object_types/migrations/user_actions/index.ts
+++ b/x-pack/plugins/cases/server/saved_object_types/migrations/user_actions/index.ts
@@ -32,6 +32,7 @@ import { payloadMigration } from './payload';
import { addSeverityToCreateUserAction } from './severity';
import { UserActions } from './types';
import { getAllPersistableAttachmentMigrations } from '../get_all_persistable_attachment_migrations';
+import { addAssigneesToCreateUserAction } from './assignees';
export interface UserActionsMigrationsDeps {
persistableStateAttachmentTypeRegistry: PersistableStateAttachmentTypeRegistry;
@@ -98,6 +99,7 @@ export const createUserActionsMigrations = (
'8.0.0': removeRuleInformation,
'8.1.0': payloadMigration,
'8.3.0': addSeverityToCreateUserAction,
+ '8.5.0': addAssigneesToCreateUserAction,
};
return mergeSavedObjectMigrationMaps(persistableStateAttachmentMigrations, userActionsMigrations);
diff --git a/x-pack/plugins/cases/server/services/cases/index.test.ts b/x-pack/plugins/cases/server/services/cases/index.test.ts
index 1088187c7b46b..b5902778ae73d 100644
--- a/x-pack/plugins/cases/server/services/cases/index.test.ts
+++ b/x-pack/plugins/cases/server/services/cases/index.test.ts
@@ -157,6 +157,7 @@ describe('CasesService', () => {
} = unsecuredSavedObjectsClient.update.mock.calls[0][2] as Partial;
expect(restUpdateAttributes).toMatchInlineSnapshot(`
Object {
+ "assignees": Array [],
"closed_at": null,
"closed_by": null,
"created_at": "2019-11-25T21:54:48.952Z",
@@ -481,6 +482,7 @@ describe('CasesService', () => {
expect(creationAttributes.external_service).not.toHaveProperty('connector_id');
expect(creationAttributes).toMatchInlineSnapshot(`
Object {
+ "assignees": Array [],
"closed_at": null,
"closed_by": null,
"connector": Object {
diff --git a/x-pack/plugins/cases/server/services/test_utils.ts b/x-pack/plugins/cases/server/services/test_utils.ts
index ff86783ae8e9c..8206eee3515e3 100644
--- a/x-pack/plugins/cases/server/services/test_utils.ts
+++ b/x-pack/plugins/cases/server/services/test_utils.ts
@@ -126,14 +126,17 @@ export const basicCaseFields: CaseAttributes = {
syncAlerts: true,
},
owner: SECURITY_SOLUTION_OWNER,
+ assignees: [],
};
export const createCaseSavedObjectResponse = ({
connector,
externalService,
+ overrides,
}: {
connector?: ESCaseConnectorWithId;
externalService?: CaseFullExternalService;
+ overrides?: Partial;
} = {}): SavedObject => {
const references: SavedObjectReference[] = createSavedObjectReferences({
connector,
@@ -168,6 +171,7 @@ export const createCaseSavedObjectResponse = ({
id: '1',
attributes: {
...basicCaseFields,
+ ...overrides,
// if connector is null we'll default this to an incomplete jira value because the service
// should switch it to a none connector when the id can't be found in the references array
connector: formattedConnector,
diff --git a/x-pack/plugins/cases/server/services/user_actions/builder_factory.test.ts b/x-pack/plugins/cases/server/services/user_actions/builder_factory.test.ts
index 818bc69120e7f..1815b5abe7491 100644
--- a/x-pack/plugins/cases/server/services/user_actions/builder_factory.test.ts
+++ b/x-pack/plugins/cases/server/services/user_actions/builder_factory.test.ts
@@ -546,6 +546,47 @@ describe('UserActionBuilder', () => {
`);
});
+ it('builds an assign user action correctly', () => {
+ const builder = builderFactory.getBuilder(ActionTypes.assignees)!;
+ const userAction = builder.build({
+ payload: { assignees: [{ uid: '1' }, { uid: '2' }] },
+ ...commonArgs,
+ });
+
+ expect(userAction).toMatchInlineSnapshot(`
+ Object {
+ "attributes": Object {
+ "action": "add",
+ "created_at": "2022-01-09T22:00:00.000Z",
+ "created_by": Object {
+ "email": "elastic@elastic.co",
+ "full_name": "Elastic User",
+ "username": "elastic",
+ },
+ "owner": "securitySolution",
+ "payload": Object {
+ "assignees": Array [
+ Object {
+ "uid": "1",
+ },
+ Object {
+ "uid": "2",
+ },
+ ],
+ },
+ "type": "assignees",
+ },
+ "references": Array [
+ Object {
+ "id": "123",
+ "name": "associated-cases",
+ "type": "cases",
+ },
+ ],
+ }
+ `);
+ });
+
it('builds a settings user action correctly', () => {
const builder = builderFactory.getBuilder(ActionTypes.settings)!;
const userAction = builder.build({
@@ -601,6 +642,11 @@ describe('UserActionBuilder', () => {
},
"owner": "securitySolution",
"payload": Object {
+ "assignees": Array [
+ Object {
+ "uid": "1",
+ },
+ ],
"connector": Object {
"fields": Object {
"category": "Denial of Service",
diff --git a/x-pack/plugins/cases/server/services/user_actions/builder_factory.ts b/x-pack/plugins/cases/server/services/user_actions/builder_factory.ts
index 14b3afe2e8750..fd3af0b0670cb 100644
--- a/x-pack/plugins/cases/server/services/user_actions/builder_factory.ts
+++ b/x-pack/plugins/cases/server/services/user_actions/builder_factory.ts
@@ -20,8 +20,10 @@ import { UserActionBuilder } from './abstract_builder';
import { SeverityUserActionBuilder } from './builders/severity';
import { PersistableStateAttachmentTypeRegistry } from '../../attachment_framework/persistable_state_registry';
import { BuilderDeps } from './types';
+import { AssigneesUserActionBuilder } from './builders/assignees';
const builderMap = {
+ assignees: AssigneesUserActionBuilder,
title: TitleUserActionBuilder,
create_case: CreateCaseUserActionBuilder,
connector: ConnectorUserActionBuilder,
diff --git a/x-pack/plugins/cases/server/services/user_actions/builders/assignees.ts b/x-pack/plugins/cases/server/services/user_actions/builders/assignees.ts
new file mode 100644
index 0000000000000..87e4a6ab19c76
--- /dev/null
+++ b/x-pack/plugins/cases/server/services/user_actions/builders/assignees.ts
@@ -0,0 +1,22 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { ActionTypes, Actions } from '../../../../common/api';
+import { UserActionBuilder } from '../abstract_builder';
+import { UserActionParameters, BuilderReturnValue } from '../types';
+
+export class AssigneesUserActionBuilder extends UserActionBuilder {
+ build(args: UserActionParameters<'assignees'>): BuilderReturnValue {
+ return this.buildCommonUserAction({
+ ...args,
+ action: args.action ?? Actions.add,
+ valueKey: 'assignees',
+ value: args.payload.assignees,
+ type: ActionTypes.assignees,
+ });
+ }
+}
diff --git a/x-pack/plugins/cases/server/services/user_actions/index.test.ts b/x-pack/plugins/cases/server/services/user_actions/index.test.ts
index cda0fe8237d82..151c8a6d40ed0 100644
--- a/x-pack/plugins/cases/server/services/user_actions/index.test.ts
+++ b/x-pack/plugins/cases/server/services/user_actions/index.test.ts
@@ -13,11 +13,13 @@ import {
SavedObjectReference,
SavedObjectsFindResponse,
SavedObjectsFindResult,
+ SavedObjectsUpdateResponse,
} from '@kbn/core/server';
import { ACTION_SAVED_OBJECT_TYPE } from '@kbn/actions-plugin/server';
import {
Actions,
ActionTypes,
+ CaseAttributes,
CaseSeverity,
CaseStatuses,
CaseUserActionAttributes,
@@ -39,6 +41,7 @@ import {
} from '../../common/constants';
import {
+ createCaseSavedObjectResponse,
createConnectorObject,
createExternalService,
createJiraConnector,
@@ -51,6 +54,9 @@ import {
updatedCases,
comment,
attachments,
+ updatedAssigneesCases,
+ originalCasesWithAssignee,
+ updatedTagsCases,
} from './mocks';
import { CaseUserActionService, transformFindResponseToExternalModel } from '.';
import { PersistableStateAttachmentTypeRegistry } from '../../attachment_framework/persistable_state_registry';
@@ -667,6 +673,7 @@ describe('CaseUserActionService', () => {
type: 'create_case',
owner: 'securitySolution',
payload: {
+ assignees: [{ uid: '1' }],
connector: {
fields: {
category: 'Denial of Service',
@@ -1068,6 +1075,267 @@ describe('CaseUserActionService', () => {
{ refresh: undefined }
);
});
+
+ it('creates the correct user actions when an assignee is added', async () => {
+ await service.bulkCreateUpdateCase({
+ ...commonArgs,
+ originalCases,
+ updatedCases: updatedAssigneesCases,
+ user: commonArgs.user,
+ });
+
+ expect(unsecuredSavedObjectsClient.bulkCreate.mock.calls[0]).toMatchInlineSnapshot(`
+ Array [
+ Array [
+ Object {
+ "attributes": Object {
+ "action": "add",
+ "created_at": "2022-01-09T22:00:00.000Z",
+ "created_by": Object {
+ "email": "elastic@elastic.co",
+ "full_name": "Elastic User",
+ "username": "elastic",
+ },
+ "owner": "securitySolution",
+ "payload": Object {
+ "assignees": Array [
+ Object {
+ "uid": "1",
+ },
+ ],
+ },
+ "type": "assignees",
+ },
+ "references": Array [
+ Object {
+ "id": "1",
+ "name": "associated-cases",
+ "type": "cases",
+ },
+ ],
+ "type": "cases-user-actions",
+ },
+ ],
+ Object {
+ "refresh": undefined,
+ },
+ ]
+ `);
+ });
+
+ it('creates the correct user actions when an assignee is removed', async () => {
+ const casesWithAssigneeRemoved: Array> = [
+ {
+ ...createCaseSavedObjectResponse(),
+ id: '1',
+ attributes: {
+ assignees: [],
+ },
+ },
+ ];
+
+ await service.bulkCreateUpdateCase({
+ ...commonArgs,
+ originalCases: originalCasesWithAssignee,
+ updatedCases: casesWithAssigneeRemoved,
+ user: commonArgs.user,
+ });
+
+ expect(unsecuredSavedObjectsClient.bulkCreate.mock.calls[0]).toMatchInlineSnapshot(`
+ Array [
+ Array [
+ Object {
+ "attributes": Object {
+ "action": "delete",
+ "created_at": "2022-01-09T22:00:00.000Z",
+ "created_by": Object {
+ "email": "elastic@elastic.co",
+ "full_name": "Elastic User",
+ "username": "elastic",
+ },
+ "owner": "securitySolution",
+ "payload": Object {
+ "assignees": Array [
+ Object {
+ "uid": "1",
+ },
+ ],
+ },
+ "type": "assignees",
+ },
+ "references": Array [
+ Object {
+ "id": "1",
+ "name": "associated-cases",
+ "type": "cases",
+ },
+ ],
+ "type": "cases-user-actions",
+ },
+ ],
+ Object {
+ "refresh": undefined,
+ },
+ ]
+ `);
+ });
+
+ it('creates the correct user actions when assignees are added and removed', async () => {
+ const caseAssignees: Array> = [
+ {
+ ...createCaseSavedObjectResponse(),
+ id: '1',
+ attributes: {
+ assignees: [{ uid: '2' }],
+ },
+ },
+ ];
+
+ await service.bulkCreateUpdateCase({
+ ...commonArgs,
+ originalCases: originalCasesWithAssignee,
+ updatedCases: caseAssignees,
+ user: commonArgs.user,
+ });
+
+ expect(unsecuredSavedObjectsClient.bulkCreate.mock.calls[0]).toMatchInlineSnapshot(`
+ Array [
+ Array [
+ Object {
+ "attributes": Object {
+ "action": "add",
+ "created_at": "2022-01-09T22:00:00.000Z",
+ "created_by": Object {
+ "email": "elastic@elastic.co",
+ "full_name": "Elastic User",
+ "username": "elastic",
+ },
+ "owner": "securitySolution",
+ "payload": Object {
+ "assignees": Array [
+ Object {
+ "uid": "2",
+ },
+ ],
+ },
+ "type": "assignees",
+ },
+ "references": Array [
+ Object {
+ "id": "1",
+ "name": "associated-cases",
+ "type": "cases",
+ },
+ ],
+ "type": "cases-user-actions",
+ },
+ Object {
+ "attributes": Object {
+ "action": "delete",
+ "created_at": "2022-01-09T22:00:00.000Z",
+ "created_by": Object {
+ "email": "elastic@elastic.co",
+ "full_name": "Elastic User",
+ "username": "elastic",
+ },
+ "owner": "securitySolution",
+ "payload": Object {
+ "assignees": Array [
+ Object {
+ "uid": "1",
+ },
+ ],
+ },
+ "type": "assignees",
+ },
+ "references": Array [
+ Object {
+ "id": "1",
+ "name": "associated-cases",
+ "type": "cases",
+ },
+ ],
+ "type": "cases-user-actions",
+ },
+ ],
+ Object {
+ "refresh": undefined,
+ },
+ ]
+ `);
+ });
+
+ it('creates the correct user actions when tags are added and removed', async () => {
+ await service.bulkCreateUpdateCase({
+ ...commonArgs,
+ originalCases,
+ updatedCases: updatedTagsCases,
+ user: commonArgs.user,
+ });
+
+ expect(unsecuredSavedObjectsClient.bulkCreate.mock.calls[0]).toMatchInlineSnapshot(`
+ Array [
+ Array [
+ Object {
+ "attributes": Object {
+ "action": "add",
+ "created_at": "2022-01-09T22:00:00.000Z",
+ "created_by": Object {
+ "email": "elastic@elastic.co",
+ "full_name": "Elastic User",
+ "username": "elastic",
+ },
+ "owner": "securitySolution",
+ "payload": Object {
+ "tags": Array [
+ "a",
+ "b",
+ ],
+ },
+ "type": "tags",
+ },
+ "references": Array [
+ Object {
+ "id": "1",
+ "name": "associated-cases",
+ "type": "cases",
+ },
+ ],
+ "type": "cases-user-actions",
+ },
+ Object {
+ "attributes": Object {
+ "action": "delete",
+ "created_at": "2022-01-09T22:00:00.000Z",
+ "created_by": Object {
+ "email": "elastic@elastic.co",
+ "full_name": "Elastic User",
+ "username": "elastic",
+ },
+ "owner": "securitySolution",
+ "payload": Object {
+ "tags": Array [
+ "defacement",
+ ],
+ },
+ "type": "tags",
+ },
+ "references": Array [
+ Object {
+ "id": "1",
+ "name": "associated-cases",
+ "type": "cases",
+ },
+ ],
+ "type": "cases-user-actions",
+ },
+ ],
+ Object {
+ "refresh": undefined,
+ },
+ ]
+ `);
+ });
});
describe('bulkCreateAttachmentDeletion', () => {
diff --git a/x-pack/plugins/cases/server/services/user_actions/index.ts b/x-pack/plugins/cases/server/services/user_actions/index.ts
index 4135352bbc641..27ff69240e0ca 100644
--- a/x-pack/plugins/cases/server/services/user_actions/index.ts
+++ b/x-pack/plugins/cases/server/services/user_actions/index.ts
@@ -27,12 +27,16 @@ import {
isCommentUserAction,
} from '../../../common/utils/user_actions';
import {
+ ActionOperationValues,
Actions,
ActionTypes,
+ ActionTypeValues,
CaseAttributes,
CaseUserActionAttributes,
CaseUserActionAttributesWithoutConnectorId,
CaseUserActionResponse,
+ CaseUserProfile,
+ CaseAssignees,
CommentRequest,
NONE_CONNECTOR_ID,
User,
@@ -53,13 +57,19 @@ import {
} from '../../common/constants';
import { findConnectorIdReference } from '../transform';
import { buildFilter, combineFilters, arraysDifference } from '../../client/utils';
-import { BuilderParameters, BuilderReturnValue, CommonArguments, CreateUserAction } from './types';
+import {
+ BuilderParameters,
+ BuilderReturnValue,
+ CommonArguments,
+ CreateUserAction,
+ UserActionParameters,
+} from './types';
import { BuilderFactory } from './builder_factory';
import { defaultSortField, isCommentRequestTypeExternalReferenceSO } from '../../common/utils';
import { PersistableStateAttachmentTypeRegistry } from '../../attachment_framework/persistable_state_registry';
import { injectPersistableReferencesToSO } from '../../attachment_framework/so_references';
import { IndexRefresh } from '../types';
-import { isStringArray } from './type_guards';
+import { isAssigneesArray, isStringArray } from './type_guards';
interface GetCaseUserActionArgs extends ClientArgs {
caseId: string;
@@ -92,6 +102,11 @@ interface GetUserActionItemByDifference extends CommonUserActionArgs {
newValue: unknown;
}
+interface TypedUserActionDiffedItems extends GetUserActionItemByDifference {
+ originalValue: T[];
+ newValue: T[];
+}
+
interface BulkCreateBulkUpdateCaseUserActions extends ClientArgs, IndexRefresh {
originalCases: Array>;
updatedCases: Array>;
@@ -106,6 +121,10 @@ type CreateUserActionClient = CreateUserActio
CommonUserActionArgs &
IndexRefresh;
+type CreatePayloadFunction- = (
+ items: Item[]
+) => UserActionParameters
['payload'];
+
export class CaseUserActionService {
private static readonly userActionFieldsAllowed: Set = new Set(Object.keys(ActionTypes));
@@ -120,55 +139,26 @@ export class CaseUserActionService {
});
}
- private getUserActionItemByDifference({
- field,
- originalValue,
- newValue,
- caseId,
- owner,
- user,
- }: GetUserActionItemByDifference): BuilderReturnValue[] {
+ private getUserActionItemByDifference(
+ params: GetUserActionItemByDifference
+ ): BuilderReturnValue[] {
+ const { field, originalValue, newValue, caseId, owner, user } = params;
+
if (!CaseUserActionService.userActionFieldsAllowed.has(field)) {
return [];
- }
-
- if (field === ActionTypes.tags && isStringArray(originalValue) && isStringArray(newValue)) {
- const tagsUserActionBuilder = this.builderFactory.getBuilder(ActionTypes.tags);
- const compareValues = arraysDifference(originalValue, newValue);
- const userActions = [];
-
- if (compareValues && compareValues.addedItems.length > 0) {
- const tagAddUserAction = tagsUserActionBuilder?.build({
- action: Actions.add,
- caseId,
- user,
- owner,
- payload: { tags: compareValues.addedItems },
- });
-
- if (tagAddUserAction) {
- userActions.push(tagAddUserAction);
- }
- }
-
- if (compareValues && compareValues.deletedItems.length > 0) {
- const tagsDeleteUserAction = tagsUserActionBuilder?.build({
- action: Actions.delete,
- caseId,
- user,
- owner,
- payload: { tags: compareValues.deletedItems },
- });
-
- if (tagsDeleteUserAction) {
- userActions.push(tagsDeleteUserAction);
- }
- }
-
- return userActions;
- }
-
- if (isUserActionType(field) && newValue != null) {
+ } else if (
+ field === ActionTypes.assignees &&
+ isAssigneesArray(originalValue) &&
+ isAssigneesArray(newValue)
+ ) {
+ return this.buildAssigneesUserActions({ ...params, originalValue, newValue });
+ } else if (
+ field === ActionTypes.tags &&
+ isStringArray(originalValue) &&
+ isStringArray(newValue)
+ ) {
+ return this.buildTagsUserActions({ ...params, originalValue, newValue });
+ } else if (isUserActionType(field) && newValue != null) {
const userActionBuilder = this.builderFactory.getBuilder(ActionTypes[field]);
const fieldUserAction = userActionBuilder?.build({
caseId,
@@ -183,6 +173,85 @@ export class CaseUserActionService {
return [];
}
+ private buildAssigneesUserActions(params: TypedUserActionDiffedItems) {
+ const createPayload: CreatePayloadFunction = (
+ items: CaseAssignees
+ ) => ({ assignees: items });
+
+ return this.buildAddDeleteUserActions(params, createPayload, ActionTypes.assignees);
+ }
+
+ private buildTagsUserActions(params: TypedUserActionDiffedItems) {
+ const createPayload: CreatePayloadFunction = (
+ items: string[]
+ ) => ({
+ tags: items,
+ });
+
+ return this.buildAddDeleteUserActions(params, createPayload, ActionTypes.tags);
+ }
+
+ private buildAddDeleteUserActions- (
+ params: TypedUserActionDiffedItems
- ,
+ createPayload: CreatePayloadFunction
- ,
+ actionType: ActionType
+ ) {
+ const { originalValue, newValue } = params;
+ const compareValues = arraysDifference(originalValue, newValue);
+
+ const addUserAction = this.buildUserAction({
+ commonArgs: params,
+ actionType,
+ action: Actions.add,
+ createPayload,
+ modifiedItems: compareValues?.addedItems,
+ });
+ const deleteUserAction = this.buildUserAction({
+ commonArgs: params,
+ actionType,
+ action: Actions.delete,
+ createPayload,
+ modifiedItems: compareValues?.deletedItems,
+ });
+
+ return [
+ ...(addUserAction ? [addUserAction] : []),
+ ...(deleteUserAction ? [deleteUserAction] : []),
+ ];
+ }
+
+ private buildUserAction
- ({
+ commonArgs,
+ actionType,
+ action,
+ createPayload,
+ modifiedItems,
+ }: {
+ commonArgs: CommonUserActionArgs;
+ actionType: ActionType;
+ action: ActionOperationValues;
+ createPayload: CreatePayloadFunction
- ;
+ modifiedItems?: Item[] | null;
+ }) {
+ const userActionBuilder = this.builderFactory.getBuilder(actionType);
+
+ if (!userActionBuilder || !modifiedItems || modifiedItems.length <= 0) {
+ return;
+ }
+
+ const { caseId, owner, user } = commonArgs;
+
+ const userAction = userActionBuilder.build({
+ action,
+ caseId,
+ user,
+ owner,
+ payload: createPayload(modifiedItems),
+ });
+
+ return userAction;
+ }
+
public async bulkCreateCaseDeletion({
unsecuredSavedObjectsClient,
cases,
diff --git a/x-pack/plugins/cases/server/services/user_actions/mocks.ts b/x-pack/plugins/cases/server/services/user_actions/mocks.ts
index bc35f98bf926e..80f2979716ca2 100644
--- a/x-pack/plugins/cases/server/services/user_actions/mocks.ts
+++ b/x-pack/plugins/cases/server/services/user_actions/mocks.ts
@@ -7,11 +7,17 @@
import { CASE_SAVED_OBJECT } from '../../../common/constants';
import { SECURITY_SOLUTION_OWNER } from '../../../common';
-import { CaseSeverity, CaseStatuses, CommentType, ConnectorTypes } from '../../../common/api';
+import {
+ CasePostRequest,
+ CaseSeverity,
+ CaseStatuses,
+ CommentType,
+ ConnectorTypes,
+} from '../../../common/api';
import { createCaseSavedObjectResponse } from '../test_utils';
import { transformSavedObjectToExternalModel } from '../cases/transform';
-export const casePayload = {
+export const casePayload: CasePostRequest = {
title: 'Case SIR',
tags: ['sir'],
description: 'testing sir',
@@ -32,6 +38,7 @@ export const casePayload = {
settings: { syncAlerts: true },
severity: CaseSeverity.LOW,
owner: SECURITY_SOLUTION_OWNER,
+ assignees: [{ uid: '1' }],
};
export const externalService = {
@@ -76,6 +83,30 @@ export const updatedCases = [
},
];
+export const originalCasesWithAssignee = [
+ { ...createCaseSavedObjectResponse({ overrides: { assignees: [{ uid: '1' }] } }), id: '1' },
+].map((so) => transformSavedObjectToExternalModel(so));
+
+export const updatedAssigneesCases = [
+ {
+ ...createCaseSavedObjectResponse(),
+ id: '1',
+ attributes: {
+ assignees: [{ uid: '1' }],
+ },
+ },
+];
+
+export const updatedTagsCases = [
+ {
+ ...createCaseSavedObjectResponse(),
+ id: '1',
+ attributes: {
+ tags: ['a', 'b'],
+ },
+ },
+];
+
export const comment = {
comment: 'a comment',
type: CommentType.user as const,
diff --git a/x-pack/plugins/cases/server/services/user_actions/type_guards.test.ts b/x-pack/plugins/cases/server/services/user_actions/type_guards.test.ts
index 566693ec11299..209116e3d4fd4 100644
--- a/x-pack/plugins/cases/server/services/user_actions/type_guards.test.ts
+++ b/x-pack/plugins/cases/server/services/user_actions/type_guards.test.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { isObjectArray, isStringArray } from './type_guards';
+import { isAssigneesArray, isStringArray } from './type_guards';
describe('type_guards', () => {
describe('isStringArray', () => {
@@ -30,25 +30,33 @@ describe('type_guards', () => {
});
});
- describe('isObjectArray', () => {
+ describe('isAssigneesArray', () => {
it('returns true when the value is an empty array', () => {
- expect(isObjectArray([])).toBeTruthy();
+ expect(isAssigneesArray([])).toBeTruthy();
});
- it('returns true when the value is an array of a single string', () => {
- expect(isObjectArray([{ a: '1' }])).toBeTruthy();
+ it('returns false when the value is not an array of assignees', () => {
+ expect(isAssigneesArray([{ a: '1' }])).toBeFalsy();
});
- it('returns true when the value is an array of multiple strings', () => {
- expect(isObjectArray([{ a: 'a' }, { b: 'b' }])).toBeTruthy();
+ it('returns false when the value is an array of assignees and non assignee objects', () => {
+ expect(isAssigneesArray([{ uid: '1' }, { hi: '2' }])).toBeFalsy();
});
- it('returns false when the value is an array of strings and numbers', () => {
- expect(isObjectArray([{ a: 'a' }, 1])).toBeFalsy();
+ it('returns true when the value is an array of a single assignee', () => {
+ expect(isAssigneesArray([{ uid: '1' }])).toBeTruthy();
+ });
+
+ it('returns true when the value is an array of multiple assignees', () => {
+ expect(isAssigneesArray([{ uid: 'a' }, { uid: 'b' }])).toBeTruthy();
+ });
+
+ it('returns false when the value is an array of assignees and numbers', () => {
+ expect(isAssigneesArray([{ uid: 'a' }, 1])).toBeFalsy();
});
it('returns false when the value is an array of strings and objects', () => {
- expect(isObjectArray(['a', {}])).toBeFalsy();
+ expect(isAssigneesArray(['a', {}])).toBeFalsy();
});
});
});
diff --git a/x-pack/plugins/cases/server/services/user_actions/type_guards.ts b/x-pack/plugins/cases/server/services/user_actions/type_guards.ts
index 25c9341b47363..d1afd1b91c072 100644
--- a/x-pack/plugins/cases/server/services/user_actions/type_guards.ts
+++ b/x-pack/plugins/cases/server/services/user_actions/type_guards.ts
@@ -5,12 +5,13 @@
* 2.0.
*/
-import { isPlainObject, isString } from 'lodash';
+import { isString } from 'lodash';
+import { CaseAssignees, CaseAssigneesRt } from '../../../common/api/cases/assignee';
export const isStringArray = (value: unknown): value is string[] => {
return Array.isArray(value) && value.every((val) => isString(val));
};
-export const isObjectArray = (value: unknown): value is Array
> => {
- return Array.isArray(value) && value.every((val) => isPlainObject(val));
+export const isAssigneesArray = (value: unknown): value is CaseAssignees => {
+ return CaseAssigneesRt.is(value);
};
diff --git a/x-pack/plugins/cases/server/services/user_actions/types.ts b/x-pack/plugins/cases/server/services/user_actions/types.ts
index f1b03dc8a8c56..667811b2b5317 100644
--- a/x-pack/plugins/cases/server/services/user_actions/types.ts
+++ b/x-pack/plugins/cases/server/services/user_actions/types.ts
@@ -6,6 +6,7 @@
*/
import { SavedObjectReference } from '@kbn/core/server';
+import { CaseAssignees } from '../../../common/api/cases/assignee';
import {
CasePostRequest,
CaseSettings,
@@ -36,6 +37,9 @@ export interface BuilderParameters {
tags: {
parameters: { payload: { tags: string[] } };
};
+ assignees: {
+ parameters: { payload: { assignees: CaseAssignees } };
+ };
pushed: {
parameters: {
payload: {
diff --git a/x-pack/plugins/cloud_security_posture/common/types.ts b/x-pack/plugins/cloud_security_posture/common/types.ts
index 3fe552fef322a..f79b651f826ca 100644
--- a/x-pack/plugins/cloud_security_posture/common/types.ts
+++ b/x-pack/plugins/cloud_security_posture/common/types.ts
@@ -34,6 +34,7 @@ export interface Cluster {
meta: {
clusterId: string;
benchmarkName: string;
+ benchmarkId: BenchmarkId;
lastUpdate: number; // unix epoch time
};
stats: Stats;
diff --git a/x-pack/plugins/cloud_security_posture/public/assets/icons/cis_eks_logo.svg b/x-pack/plugins/cloud_security_posture/public/assets/icons/cis_eks_logo.svg
new file mode 100644
index 0000000000000..e31c56edc8f08
--- /dev/null
+++ b/x-pack/plugins/cloud_security_posture/public/assets/icons/cis_eks_logo.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/x-pack/plugins/cloud_security_posture/public/components/cis_benchmark_icon.tsx b/x-pack/plugins/cloud_security_posture/public/components/cis_benchmark_icon.tsx
new file mode 100644
index 0000000000000..95be9d3cf42ff
--- /dev/null
+++ b/x-pack/plugins/cloud_security_posture/public/components/cis_benchmark_icon.tsx
@@ -0,0 +1,30 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import React from 'react';
+import { EuiIcon } from '@elastic/eui';
+import type { BenchmarkId } from '../../common/types';
+import cisK8sVanillaIcon from '../assets/icons/k8s_logo.svg';
+import cisEksIcon from '../assets/icons/cis_eks_logo.svg';
+
+interface Props {
+ type: BenchmarkId;
+}
+
+const getBenchmarkIdIconType = (props: Props): string => {
+ switch (props.type) {
+ case 'cis_eks':
+ return cisEksIcon;
+ case 'cis_k8s':
+ default:
+ return cisK8sVanillaIcon;
+ }
+};
+
+export const CISBenchmarkIcon = (props: Props) => (
+
+);
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.tsx b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.tsx
index c5085d48ef6a8..64ab75c1a210c 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.tsx
@@ -20,6 +20,7 @@ import moment from 'moment';
import { PartitionElementEvent } from '@elastic/charts';
import { EuiThemeComputed } from '@elastic/eui/src/services/theme/types';
import { i18n } from '@kbn/i18n';
+import { CISBenchmarkIcon } from '../../../components/cis_benchmark_icon';
import { CloudPostureScoreChart } from '../compliance_charts/cloud_posture_score_chart';
import { ChartPanel } from '../../../components/chart_panel';
import type { ComplianceDashboardData, Evaluation } from '../../../../common/types';
@@ -61,7 +62,6 @@ export const BenchmarksSection = ({
<>
{complianceData.clusters.map((cluster) => {
const shortId = cluster.meta.clusterId.slice(0, 6);
-
return (
@@ -82,8 +82,7 @@ export const BenchmarksSection = ({
- {/* TODO: change default k8s logo to use a getBenchmarkLogo function */}
-
+
{INTERNAL_FEATURE_FLAGS.showManageRulesMock && (
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/findings_flyout.tsx b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/findings_flyout.tsx
index a13def04f5802..b1b35e3333d0f 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/findings_flyout.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/findings_flyout.tsx
@@ -30,7 +30,8 @@ import { ResourceTab } from './resource_tab';
import { JsonTab } from './json_tab';
import { OverviewTab } from './overview_tab';
import { RuleTab } from './rule_tab';
-import k8sLogoIcon from '../../../assets/icons/k8s_logo.svg';
+import type { BenchmarkId } from '../../../../common/types';
+import { CISBenchmarkIcon } from '../../../components/cis_benchmark_icon';
const tabs = [
{
@@ -74,13 +75,13 @@ export const Markdown: React.FC> = (props) =>
);
-export const CisKubernetesIcons = () => (
+export const CisKubernetesIcons = ({ benchmarkId }: { benchmarkId: BenchmarkId }) => (
-
+
);
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/overview_tab.tsx b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/overview_tab.tsx
index 94d221ddf9af7..1e3aa90d5169c 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/overview_tab.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/overview_tab.tsx
@@ -49,7 +49,7 @@ const getDetailsList = (data: CspFinding, discoverIndexLink: string | undefined)
title: i18n.translate('xpack.csp.findings.findingsFlyout.overviewTab.frameworkSourcesTitle', {
defaultMessage: 'Framework Sources',
}),
- description: ,
+ description: ,
},
{
title: i18n.translate('xpack.csp.findings.findingsFlyout.overviewTab.cisSectionTitle', {
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/rule_tab.tsx b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/rule_tab.tsx
index 3d2f867fbdc81..9b5c6d65d7d49 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/rule_tab.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/rule_tab.tsx
@@ -28,7 +28,7 @@ export const getRuleList = (rule: CspFinding['rule']) => [
title: i18n.translate('xpack.csp.findings.findingsFlyout.ruleTab.frameworkSourcesTitle', {
defaultMessage: 'Framework Sources',
}),
- description: ,
+ description: ,
},
{
title: i18n.translate('xpack.csp.findings.findingsFlyout.ruleTab.cisSectionTitle', {
diff --git a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_clusters.test.ts b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_clusters.test.ts
index a24e60dd7be8f..2b3ec5fc00182 100644
--- a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_clusters.test.ts
+++ b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_clusters.test.ts
@@ -11,9 +11,12 @@ const mockClusterBuckets: ClusterBucket[] = [
{
key: 'cluster_id',
doc_count: 10,
- benchmarks: {
+ benchmarkName: {
buckets: [{ key: 'CIS Kubernetes', doc_count: 10 }],
},
+ benchmarkId: {
+ buckets: [{ key: 'cis_k8s', doc_count: 10 }],
+ },
timestamps: {
buckets: [{ key: 123, doc_count: 1 }],
},
@@ -59,6 +62,7 @@ describe('getClustersFromAggs', () => {
lastUpdate: 123,
clusterId: 'cluster_id',
benchmarkName: 'CIS Kubernetes',
+ benchmarkId: 'cis_k8s',
},
stats: {
totalFindings: 12,
diff --git a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_clusters.ts b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_clusters.ts
index 38c3edcd9c096..c930dba9fb641 100644
--- a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_clusters.ts
+++ b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_clusters.ts
@@ -11,7 +11,7 @@ import type {
QueryDslQueryContainer,
SearchRequest,
} from '@elastic/elasticsearch/lib/api/types';
-import { Cluster } from '../../../common/types';
+import type { BenchmarkId, Cluster } from '../../../common/types';
import {
getFailedFindingsFromAggs,
failedFindingsAggQuery,
@@ -29,7 +29,8 @@ export interface ClusterBucket extends FailedFindingsQueryResult, KeyDocCount {
passed_findings: {
doc_count: number;
};
- benchmarks: Aggregation;
+ benchmarkName: Aggregation;
+ benchmarkId: Aggregation>;
timestamps: Aggregation>;
}
@@ -48,11 +49,16 @@ export const getClustersQuery = (query: QueryDslQueryContainer, pitId: string):
field: 'cluster_id',
},
aggs: {
- benchmarks: {
+ benchmarkName: {
terms: {
field: 'rule.benchmark.name',
},
},
+ benchmarkId: {
+ terms: {
+ field: 'rule.benchmark.id',
+ },
+ },
timestamps: {
terms: {
field: '@timestamp',
@@ -75,14 +81,21 @@ export const getClustersQuery = (query: QueryDslQueryContainer, pitId: string):
export const getClustersFromAggs = (clusters: ClusterBucket[]): ClusterWithoutTrend[] =>
clusters.map((cluster) => {
// get cluster's meta data
- const benchmarks = cluster.benchmarks.buckets;
- if (!Array.isArray(benchmarks)) throw new Error('missing aggs by benchmarks per cluster');
+ const benchmarkNames = cluster.benchmarkName.buckets;
+ const benchmarkIds = cluster.benchmarkId.buckets;
+
+ if (!Array.isArray(benchmarkIds) || benchmarkIds.length === 0)
+ throw new Error('missing aggs by benchmarkIds per cluster');
+
+ if (!Array.isArray(benchmarkNames)) throw new Error('missing aggs by benchmarks per cluster');
+
const timestamps = cluster.timestamps.buckets;
if (!Array.isArray(timestamps)) throw new Error('missing aggs by timestamps per cluster');
const meta = {
clusterId: cluster.key,
- benchmarkName: benchmarks[0].key,
+ benchmarkName: benchmarkNames[0].key,
+ benchmarkId: benchmarkIds[0].key,
lastUpdate: timestamps[0].key,
};
diff --git a/x-pack/plugins/enterprise_search/common/constants.ts b/x-pack/plugins/enterprise_search/common/constants.ts
index 98f34d57c364a..d762fa4960a61 100644
--- a/x-pack/plugins/enterprise_search/common/constants.ts
+++ b/x-pack/plugins/enterprise_search/common/constants.ts
@@ -96,3 +96,5 @@ export const ENTERPRISE_SEARCH_AUDIT_LOGS_SOURCE_ID = 'ent-search-audit-logs';
export const APP_SEARCH_URL = '/app/enterprise_search/app_search';
export const ENTERPRISE_SEARCH_ELASTICSEARCH_URL = '/app/enterprise_search/elasticsearch';
export const WORKPLACE_SEARCH_URL = '/app/enterprise_search/workplace_search';
+
+export const ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT = 25;
diff --git a/x-pack/plugins/enterprise_search/common/types/indices.ts b/x-pack/plugins/enterprise_search/common/types/indices.ts
index bf19d8789519e..38f4b9873eba2 100644
--- a/x-pack/plugins/enterprise_search/common/types/indices.ts
+++ b/x-pack/plugins/enterprise_search/common/types/indices.ts
@@ -16,12 +16,13 @@ import { Connector } from './connectors';
import { Crawler } from './crawler';
export interface ElasticsearchIndex {
+ count: number; // Elasticsearch _count
health?: HealthStatus;
name: IndexName;
status?: IndicesStatsIndexMetadataState;
total: {
docs: {
- count: number;
+ count: number; // Lucene count (includes nested documents)
deleted: number;
};
store: {
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/__mocks__/engine_creation_logic.mock.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/__mocks__/engine_creation_logic.mock.ts
index e256933cacccd..6cfba782698b5 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/__mocks__/engine_creation_logic.mock.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/__mocks__/engine_creation_logic.mock.ts
@@ -7,6 +7,8 @@
import dedent from 'dedent';
+import { ElasticsearchIndexWithPrivileges } from '../../../../common/types/indices';
+
import { EngineCreationSteps } from '../components/engine_creation/engine_creation_logic';
import { SearchIndexSelectableOption } from '../components/engine_creation/search_index_selectable';
@@ -32,8 +34,9 @@ export const DEFAULT_VALUES = {
selectedIndexFormatted: undefined,
};
-export const mockElasticsearchIndices = [
+export const mockElasticsearchIndices: ElasticsearchIndexWithPrivileges[] = [
{
+ count: 0,
health: 'yellow',
status: 'open',
name: 'search-my-index-1',
@@ -51,6 +54,7 @@ export const mockElasticsearchIndices = [
},
},
{
+ count: 100,
health: 'green',
status: 'open',
name: 'my-index-2',
@@ -68,6 +72,7 @@ export const mockElasticsearchIndices = [
},
},
{
+ count: 100,
health: 'green',
status: 'open',
name: 'search-my-index-2',
@@ -85,6 +90,7 @@ export const mockElasticsearchIndices = [
},
},
{
+ count: 100,
health: 'green',
status: 'open',
name: 'alias-my-index-2',
@@ -102,6 +108,7 @@ export const mockElasticsearchIndices = [
},
},
{
+ count: 100,
health: 'green',
status: 'open',
name: 'index-without-read-privilege',
@@ -119,6 +126,7 @@ export const mockElasticsearchIndices = [
},
},
{
+ count: 100,
health: 'green',
status: 'open',
name: 'index-without-manage-privilege',
@@ -136,6 +144,7 @@ export const mockElasticsearchIndices = [
},
},
{
+ count: 100,
health: 'green',
status: 'open',
name: 'alias-without-manage-privilege',
@@ -156,6 +165,7 @@ export const mockElasticsearchIndices = [
export const mockSearchIndexOptions: SearchIndexSelectableOption[] = [
{
+ count: 0,
label: 'search-my-index-1',
health: 'yellow',
status: 'open',
@@ -181,6 +191,7 @@ export const mockSearchIndexOptions: SearchIndexSelectableOption[] = [
},
},
{
+ count: 100,
label: 'my-index-2',
health: 'green',
status: 'open',
@@ -207,6 +218,7 @@ export const mockSearchIndexOptions: SearchIndexSelectableOption[] = [
},
},
{
+ count: 100,
label: 'search-my-index-2',
health: 'green',
status: 'open',
@@ -229,6 +241,7 @@ export const mockSearchIndexOptions: SearchIndexSelectableOption[] = [
},
},
{
+ count: 100,
label: 'alias-my-index-2',
health: 'green',
status: 'open',
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/search_index_selectable.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/search_index_selectable.test.tsx
index c3c1bb012b755..b798b71e305e5 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/search_index_selectable.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/search_index_selectable.test.tsx
@@ -15,6 +15,7 @@ import { shallow } from 'enzyme';
import { IndexStatusDetails, SearchIndexSelectableOption } from './search_index_selectable';
const mockOption: SearchIndexSelectableOption = {
+ count: 123,
label: 'string',
alias: true,
badge: {
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/search_index_selectable.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/search_index_selectable.tsx
index 848e0d230c90a..93e045d2ecb26 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/search_index_selectable.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/search_index_selectable.tsx
@@ -45,6 +45,7 @@ export interface SearchIndexSelectableOption {
};
};
checked?: 'on';
+ count: number;
}
const healthColorsMap = {
@@ -89,7 +90,7 @@ export const IndexStatusDetails: React.FC = ({ option }
{ defaultMessage: 'Docs count' }
)}
- : {option.total?.docs?.count ?? '-'}
+ : {option.count ?? '-'}
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/utils.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/utils.ts
index f823f5f54d652..41b34e746f9e9 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/utils.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/utils.ts
@@ -91,6 +91,7 @@ export const formatIndicesToSelectable = (
label: index.alias ? 'Alias' : 'Index',
...(icon ? { icon } : {}),
},
+ count: index.count,
disabled: index.alias && !index.name.startsWith('search-'),
label: index.name,
health: index.health,
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.test.ts
index 2624df01c5c09..522f79ccca7f1 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.test.ts
@@ -227,6 +227,17 @@ describe('EnginesLogic', () => {
expect(EnginesLogic.actions.loadEngines).toHaveBeenCalled();
});
+ it('should call loadEngines if engine.type === elasticsearch', () => {
+ jest.spyOn(EnginesLogic.actions, 'loadEngines');
+
+ EnginesLogic.actions.onDeleteEngineSuccess({
+ ...MOCK_ENGINE,
+ type: 'elasticsearch' as EngineTypes.elasticsearch,
+ });
+
+ expect(EnginesLogic.actions.loadEngines).toHaveBeenCalled();
+ });
+
it('should call loadMetaEngines if engine.type === meta', () => {
jest.spyOn(EnginesLogic.actions, 'loadMetaEngines');
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.ts
index c6fb1a401c591..827ee23d0a267 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.ts
@@ -150,7 +150,9 @@ export const EnginesLogic = kea>({
},
onDeleteEngineSuccess: async ({ engine }) => {
flashSuccessToast(DELETE_ENGINE_MESSAGE(engine.name));
- if ([EngineTypes.default, EngineTypes.indexed].includes(engine.type)) {
+ if (
+ [EngineTypes.default, EngineTypes.indexed, EngineTypes.elasticsearch].includes(engine.type)
+ ) {
actions.loadEngines();
} else if (engine.type === EngineTypes.meta) {
actions.loadMetaEngines();
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/search_indices.mock.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/search_indices.mock.ts
index 9ff72636d3466..ba72c8ada0dd1 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/search_indices.mock.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/search_indices.mock.ts
@@ -10,6 +10,7 @@ import { ElasticsearchIndexWithIngestion } from '../../../../common/types/indice
export const indices: ElasticsearchIndexWithIngestion[] = [
{
+ count: 1,
name: 'api',
total: {
docs: {
@@ -39,6 +40,7 @@ export const indices: ElasticsearchIndexWithIngestion[] = [
status: ConnectorStatus.CONFIGURED,
sync_now: false,
},
+ count: 1,
name: 'connector',
total: {
docs: {
@@ -49,6 +51,7 @@ export const indices: ElasticsearchIndexWithIngestion[] = [
},
},
{
+ count: 1,
crawler: {
id: '3',
index_name: 'crawler',
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/view_index.mock.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/view_index.mock.ts
index 1e31815b73ca8..9ade186d55380 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/view_index.mock.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/view_index.mock.ts
@@ -16,6 +16,7 @@ import {
} from '../types';
export const apiIndex: ApiViewIndex = {
+ count: 1,
ingestionMethod: IngestionMethod.API,
ingestionStatus: IngestionStatus.CONNECTED,
lastUpdated: null,
@@ -48,6 +49,7 @@ export const connectorIndex: ConnectorViewIndex = {
status: ConnectorStatus.CONFIGURED,
sync_now: false,
},
+ count: 1,
ingestionMethod: IngestionMethod.CONNECTOR,
ingestionStatus: IngestionStatus.INCOMPLETE,
lastUpdated: 'never',
@@ -61,6 +63,7 @@ export const connectorIndex: ConnectorViewIndex = {
},
};
export const crawlerIndex: CrawlerViewIndex = {
+ count: 1,
crawler: {
id: '3',
index_name: 'crawler',
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/search_documents/search_documents_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/search_documents/search_documents_logic.ts
index c4acf606efca3..b423b00c97ed1 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/search_documents/search_documents_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/search_documents/search_documents_logic.ts
@@ -7,19 +7,31 @@
import { SearchResponseBody } from '@elastic/elasticsearch/lib/api/types';
+import { Meta } from '../../../../../common/types';
+
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
import { HttpLogic } from '../../../shared/http';
export const searchDocuments = async ({
+ docsPerPage,
indexName,
- query,
+ pagination,
+ query: q,
}: {
+ docsPerPage?: number;
indexName: string;
+ pagination: { pageIndex: number; pageSize: number; totalItemCount: number };
query: string;
}) => {
- const route = `/internal/enterprise_search/indices/${indexName}/search/${query}`;
+ const route = `/internal/enterprise_search/indices/${indexName}/search/${q}`;
+ const query = {
+ page: pagination.pageIndex,
+ size: docsPerPage || pagination.pageSize,
+ };
- return await HttpLogic.values.http.get(route);
+ return await HttpLogic.values.http.get<{ meta: Meta; results: SearchResponseBody }>(route, {
+ query,
+ });
};
export const SearchDocumentsApiLogic = createApiLogic(
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api/method_api.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api/method_api.tsx
index f83dfa3eb4379..c505428449f8a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api/method_api.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api/method_api.tsx
@@ -13,6 +13,7 @@ import { EuiSteps, EuiText } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
+import { CREATE_ELASTICSEARCH_INDEX_STEP, BUILD_SEARCH_EXPERIENCE_STEP } from '../method_steps';
import { NewSearchIndexTemplate } from '../new_search_index_template';
import { MethodApiLogic } from './method_api_logic';
@@ -32,30 +33,7 @@ export const MethodApi: React.FC = () => {
>
-
- {i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.content',
- {
- defaultMessage:
- 'Provide a unique name for your index and select an optional index language.',
- }
- )}
-
-
- ),
- status: 'incomplete',
- title: i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.title',
- {
- defaultMessage: 'Create an Elasticsearch index',
- }
- ),
-
- titleSize: 'xs',
- },
+ CREATE_ELASTICSEARCH_INDEX_STEP,
{
children: (
@@ -79,29 +57,7 @@ export const MethodApi: React.FC = () => {
),
titleSize: 'xs',
},
- {
- children: (
-
-
- {i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.api.steps.buildSearchExperience.content',
- {
- defaultMessage:
- 'Connect your newly created Elasticsearch index to an App Search engine to build a cusomtizable search experience.',
- }
- )}
-
-
- ),
- status: 'incomplete',
- title: i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title',
- {
- defaultMessage: 'Build a search experience',
- }
- ),
- titleSize: 'xs',
- },
+ BUILD_SEARCH_EXPERIENCE_STEP,
]}
/>
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/method_connector.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/method_connector.tsx
index acc89074343ee..a3d3456e21f40 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/method_connector.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/method_connector.tsx
@@ -15,17 +15,12 @@ import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
-import {
- APP_SEARCH_URL,
- ENTERPRISE_SEARCH_ELASTICSEARCH_URL,
-} from '../../../../../../common/constants';
-
import { HttpError, Status } from '../../../../../../common/types/api';
import { ErrorCode } from '../../../../../../common/types/error_codes';
import { docLinks } from '../../../../shared/doc_links';
-import { EuiLinkTo } from '../../../../shared/react_router_helpers';
import { AddConnectorPackageApiLogic } from '../../../api/connector_package/add_connector_package_api_logic';
+import { CREATE_ELASTICSEARCH_INDEX_STEP, BUILD_SEARCH_EXPERIENCE_STEP } from '../method_steps';
import { NewSearchIndexLogic } from '../new_search_index_logic';
import { NewSearchIndexTemplate } from '../new_search_index_template';
@@ -133,37 +128,7 @@ export const MethodConnector: React.FC = () => {
>
-
-
- {i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.methodConnector.steps.createConnectorIndex.languageAnalyzerLink',
- { defaultMessage: 'language analyzer' }
- )}
-
- ),
- }}
- />
-
-
- ),
- status: 'incomplete',
- title: i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.title',
- {
- defaultMessage: 'Create an Elasticsearch index',
- }
- ),
-
- titleSize: 'xs',
- },
+ CREATE_ELASTICSEARCH_INDEX_STEP,
{
children: (
@@ -194,52 +159,7 @@ export const MethodConnector: React.FC = () => {
),
titleSize: 'xs',
},
- {
- children: (
-
-
-
- {i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.methodConnector.steps.buildConnector.appSearchLink',
- { defaultMessage: 'App Search' }
- )}
-
- ),
- elasticsearchLink: (
-
- {i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.methodConnector.steps.buildConnector.elasticsearchLink',
- { defaultMessage: 'Elasticsearch' }
- )}
-
- ),
- searchEngineLink: (
-
- {i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.methodConnector.steps.buildConnector.searchEngineLink',
- { defaultMessage: 'search engine' }
- )}
-
- ),
- }}
- />
-
-
- ),
- status: 'incomplete',
- title: i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title',
- {
- defaultMessage: 'Build a search experience',
- }
- ),
- titleSize: 'xs',
- },
+ BUILD_SEARCH_EXPERIENCE_STEP,
]}
/>
{confirmModal}
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx
index 1634efd5420c5..4c947ddb0bb3a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx
@@ -16,6 +16,7 @@ import { i18n } from '@kbn/i18n';
import { Status } from '../../../../../../common/types/api';
import { docLinks } from '../../../../shared/doc_links';
import { CreateCrawlerIndexApiLogic } from '../../../api/crawler/create_crawler_index_api_logic';
+import { CREATE_ELASTICSEARCH_INDEX_STEP, BUILD_SEARCH_EXPERIENCE_STEP } from '../method_steps';
import { NewSearchIndexTemplate } from '../new_search_index_template';
import { MethodCrawlerLogic } from './method_crawler_logic';
@@ -41,30 +42,7 @@ export const MethodCrawler: React.FC = () => {
>
-
- {i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.content',
- {
- defaultMessage:
- 'Provide a unique name for your index and select an optional index language.',
- }
- )}
-
-
- ),
- status: 'incomplete',
- title: i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.title',
- {
- defaultMessage: 'Create an Elasticsearch index',
- }
- ),
-
- titleSize: 'xs',
- },
+ CREATE_ELASTICSEARCH_INDEX_STEP,
{
children: (
@@ -88,29 +66,7 @@ export const MethodCrawler: React.FC = () => {
),
titleSize: 'xs',
},
- {
- children: (
-
-
- {i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.crawler.steps.buildSearchExperience.content',
- {
- defaultMessage:
- 'Connect your newly created Elasticsearch index to an App Search engine to build a cusomtizable search experience.',
- }
- )}
-
-
- ),
- status: 'incomplete',
- title: i18n.translate(
- 'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title',
- {
- defaultMessage: 'Build a search experience',
- }
- ),
- titleSize: 'xs',
- },
+ BUILD_SEARCH_EXPERIENCE_STEP,
]}
/>
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_steps.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_steps.tsx
new file mode 100644
index 0000000000000..20ca643be580d
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_steps.tsx
@@ -0,0 +1,98 @@
+/*
+ * Copyright 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 { EuiLink, EuiText } from '@elastic/eui';
+
+import { EuiContainedStepProps } from '@elastic/eui/src/components/steps/steps';
+import { i18n } from '@kbn/i18n';
+
+import { FormattedMessage } from '@kbn/i18n-react';
+
+import {
+ APP_SEARCH_URL,
+ ENTERPRISE_SEARCH_ELASTICSEARCH_URL,
+} from '../../../../../common/constants';
+import { docLinks } from '../../../shared/doc_links';
+import { EuiLinkTo } from '../../../shared/react_router_helpers';
+
+export const CREATE_ELASTICSEARCH_INDEX_STEP: EuiContainedStepProps = {
+ children: (
+
+
+
+ {i18n.translate(
+ 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.languageAnalyzerLink',
+ { defaultMessage: 'language analyzer' }
+ )}
+
+ ),
+ }}
+ />
+
+
+ ),
+ status: 'incomplete',
+ title: i18n.translate('xpack.enterpriseSearch.content.newIndex.steps.createIndex.title', {
+ defaultMessage: 'Create an Elasticsearch index',
+ }),
+
+ titleSize: 'xs',
+};
+
+export const BUILD_SEARCH_EXPERIENCE_STEP: EuiContainedStepProps = {
+ children: (
+
+
+
+ {i18n.translate(
+ 'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.appSearchLink',
+ { defaultMessage: 'App Search' }
+ )}
+
+ ),
+ elasticsearchLink: (
+
+ {i18n.translate(
+ 'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.elasticsearchLink',
+ { defaultMessage: 'Elasticsearch' }
+ )}
+
+ ),
+ searchEngineLink: (
+
+ {i18n.translate(
+ 'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.searchEngineLink',
+ { defaultMessage: 'search engine' }
+ )}
+
+ ),
+ }}
+ />
+
+
+ ),
+ status: 'incomplete',
+ title: i18n.translate(
+ 'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title',
+ {
+ defaultMessage: 'Build a search experience',
+ }
+ ),
+ titleSize: 'xs',
+};
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.test.tsx
new file mode 100644
index 0000000000000..f59f6f4e54a58
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.test.tsx
@@ -0,0 +1,97 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { setMockValues, setMockActions } from '../../../../../__mocks__/kea_logic';
+
+import React from 'react';
+
+import { shallow } from 'enzyme';
+
+import { EuiCallOut, EuiPagination } from '@elastic/eui';
+
+import { Status } from '../../../../../../../common/types/api';
+
+import { Result } from '../../../../../shared/result/result';
+
+import { INDEX_DOCUMENTS_META_DEFAULT } from '../../documents_logic';
+
+import { DocumentList } from './document_list';
+
+const mockActions = {};
+
+export const DEFAULT_VALUES = {
+ data: undefined,
+ indexName: 'indexName',
+ isLoading: true,
+ mappingData: undefined,
+ mappingStatus: 0,
+ meta: INDEX_DOCUMENTS_META_DEFAULT,
+ query: '',
+ results: [],
+ status: Status.IDLE,
+};
+
+const mockValues = { ...DEFAULT_VALUES };
+
+describe('DocumentList', () => {
+ beforeEach(() => {
+ jest.clearAllMocks();
+ setMockValues(mockValues);
+ setMockActions(mockActions);
+ });
+ it('renders empty', () => {
+ const wrapper = shallow( );
+ expect(wrapper.find(Result)).toHaveLength(0);
+ expect(wrapper.find(EuiPagination)).toHaveLength(2);
+ });
+
+ it('renders documents when results when there is data and mappings', () => {
+ setMockValues({
+ ...mockValues,
+ results: [
+ {
+ _id: 'M9ntXoIBTq5dF-1Xnc8A',
+ _index: 'kibana_sample_data_flights',
+ _score: 1,
+ _source: {
+ AvgTicketPrice: 268.24159591388866,
+ },
+ },
+ {
+ _id: 'NNntXoIBTq5dF-1Xnc8A',
+ _index: 'kibana_sample_data_flights',
+ _score: 1,
+ _source: {
+ AvgTicketPrice: 68.91388866,
+ },
+ },
+ ],
+ simplifiedMapping: {
+ AvgTicketPrice: {
+ type: 'float',
+ },
+ },
+ });
+
+ const wrapper = shallow( );
+ expect(wrapper.find(Result)).toHaveLength(2);
+ });
+
+ it('renders callout when total results are 10.000', () => {
+ setMockValues({
+ ...mockValues,
+ meta: {
+ page: {
+ ...INDEX_DOCUMENTS_META_DEFAULT.page,
+ total_results: 10000,
+ },
+ },
+ });
+ const wrapper = shallow( );
+ expect(wrapper.find(EuiCallOut)).toHaveLength(1);
+ });
+});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.tsx
new file mode 100644
index 0000000000000..779c636968435
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.tsx
@@ -0,0 +1,207 @@
+/*
+ * Copyright 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, { useState } from 'react';
+
+import { useActions, useValues } from 'kea';
+
+import { SearchHit } from '@elastic/elasticsearch/lib/api/types';
+
+import {
+ EuiButtonEmpty,
+ EuiCallOut,
+ EuiContextMenuItem,
+ EuiContextMenuPanel,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiPagination,
+ EuiProgress,
+ EuiPopover,
+ EuiText,
+ EuiSpacer,
+} from '@elastic/eui';
+
+import { i18n } from '@kbn/i18n';
+
+import { Result } from '../../../../../shared/result/result';
+
+import { DocumentsLogic } from '../../documents_logic';
+
+export const DocumentList: React.FC = () => {
+ const {
+ docsPerPage,
+ isLoading,
+ meta,
+ results,
+ simplifiedMapping: mappings,
+ } = useValues(DocumentsLogic);
+ const { onPaginate, setDocsPerPage } = useActions(DocumentsLogic);
+
+ const [isPopoverOpen, setIsPopoverOpen] = useState(false);
+ const resultToField = (result: SearchHit) => {
+ if (mappings && result._source && !Array.isArray(result._source)) {
+ if (typeof result._source === 'object') {
+ return Object.entries(result._source).map(([key, value]) => {
+ return {
+ fieldName: key,
+ fieldType: mappings[key]?.type ?? 'object',
+ fieldValue: JSON.stringify(value, null, 2),
+ };
+ });
+ }
+ }
+ return [];
+ };
+
+ const docsPerPageButton = (
+ {
+ setIsPopoverOpen(true);
+ }}
+ >
+ {i18n.translate(
+ 'xpack.enterpriseSearch.content.searchIndex.documents.documentList.pagination.itemsPerPage',
+ {
+ defaultMessage: 'Documents per page: {docPerPage}',
+ values: { docPerPage: docsPerPage },
+ }
+ )}
+
+ );
+
+ const getIconType = (size: number) => {
+ return size === docsPerPage ? 'check' : 'empty';
+ };
+
+ const docsPerPageOptions = [
+ {
+ setIsPopoverOpen(false);
+ setDocsPerPage(10);
+ }}
+ >
+ {i18n.translate(
+ 'xpack.enterpriseSearch.content.searchIndex.documents.documentList.paginationOptions.option',
+ { defaultMessage: '{docCount} documents', values: { docCount: 10 } }
+ )}
+ ,
+
+ {
+ setIsPopoverOpen(false);
+ setDocsPerPage(25);
+ }}
+ >
+ {i18n.translate(
+ 'xpack.enterpriseSearch.content.searchIndex.documents.documentList.paginationOptions.option',
+ { defaultMessage: '{docCount} documents', values: { docCount: 25 } }
+ )}
+ ,
+ {
+ setIsPopoverOpen(false);
+ setDocsPerPage(50);
+ }}
+ >
+ {i18n.translate(
+ 'xpack.enterpriseSearch.content.searchIndex.documents.documentList.paginationOptions.option',
+ { defaultMessage: '{docCount} documents', values: { docCount: 50 } }
+ )}
+ ,
+ ];
+
+ return (
+ <>
+
+
+
+
+ Showing {results.length} of {meta.page.total_results} .
+ Search results maxed at 10.000 documents.
+
+
+ {isLoading && }
+
+ {results.map((result) => {
+ return (
+
+
+
+
+ );
+ })}
+
+
+
+
+
+
+ {
+ setIsPopoverOpen(false);
+ }}
+ panelPaddingSize="none"
+ anchorPosition="downLeft"
+ >
+
+
+
+
+
+
+ {meta.page.total_results === 10000 && (
+
+
+ {i18n.translate(
+ 'xpack.enterpriseSearch.content.searchIndex.documents.documentList.resultLimit',
+ {
+ defaultMessage:
+ 'Only the first 10,000 results are available for paging. Please use the search bar to filter down your results.',
+ }
+ )}
+
+
+ )}
+ >
+ );
+};
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling.tsx
index a0b9d08e457c3..c4709b1f48c6d 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling.tsx
@@ -94,7 +94,7 @@ export const ConnectorSchedulingComponent: React.FC = () => {
{
selectedDomainUrls: ['https://www.elastic.co', 'https://swiftype.com'],
});
CrawlerLogic.mount();
- jest.spyOn(CrawlerLogic.actions, 'startCrawl');
+ jest.spyOn(CrawlCustomSettingsFlyoutLogic.actions, 'startCrawl');
CrawlCustomSettingsFlyoutLogic.actions.startCustomCrawl();
await nextTick();
- expect(CrawlerLogic.actions.startCrawl).toHaveBeenCalledWith({
+ expect(CrawlCustomSettingsFlyoutLogic.actions.startCrawl).toHaveBeenCalledWith({
domain_allowlist: ['https://www.elastic.co', 'https://swiftype.com'],
max_crawl_depth: 5,
sitemap_discovery_disabled: false,
@@ -382,12 +382,12 @@ describe('CrawlCustomSettingsFlyoutLogic', () => {
],
});
CrawlerLogic.mount();
- jest.spyOn(CrawlerLogic.actions, 'startCrawl');
+ jest.spyOn(CrawlCustomSettingsFlyoutLogic.actions, 'startCrawl');
CrawlCustomSettingsFlyoutLogic.actions.startCustomCrawl();
await nextTick();
- expect(CrawlerLogic.actions.startCrawl).toHaveBeenCalledWith({
+ expect(CrawlCustomSettingsFlyoutLogic.actions.startCrawl).toHaveBeenCalledWith({
domain_allowlist: ['https://www.elastic.co', 'https://swiftype.com'],
max_crawl_depth: 5,
seed_urls: ['https://www.elastic.co/guide', 'https://swiftype.com/documentation'],
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_logic.ts
index ae2f0fef68567..5d4ed848c8569 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_logic.ts
@@ -10,11 +10,10 @@ import { kea, MakeLogicType } from 'kea';
import { Meta } from '../../../../../../../common/types';
import { flashAPIErrors } from '../../../../../shared/flash_messages';
import { HttpLogic } from '../../../../../shared/http';
-import { GetCrawlerApiLogic } from '../../../../api/crawler/get_crawler_api_logic';
import { DomainConfig, DomainConfigFromServer } from '../../../../api/crawler/types';
import { domainConfigServerToClient } from '../../../../api/crawler/utils';
import { IndexNameLogic } from '../../index_name_logic';
-import { CrawlerLogic, CrawlRequestOverrides } from '../crawler_logic';
+import { CrawlerActions, CrawlerLogic, CrawlRequestOverrides } from '../crawler_logic';
import { extractDomainAndEntryPointFromUrl } from '../domain_management/add_domain/utils';
export interface CrawlCustomSettingsFlyoutLogicValues {
@@ -49,6 +48,7 @@ export interface CrawlCustomSettingsFlyoutLogicActions {
onSelectSitemapUrls(sitemapUrls: string[]): { sitemapUrls: string[] };
showFlyout(): void;
startCustomCrawl(): void;
+ startCrawl: CrawlerActions['startCrawl'];
toggleIncludeSitemapsInRobotsTxt(): void;
}
@@ -69,7 +69,7 @@ export const CrawlCustomSettingsFlyoutLogic = kea<
>({
path: ['enterprise_search', 'crawler', 'crawl_custom_settings_flyout_logic'],
connect: {
- actions: [GetCrawlerApiLogic, ['apiSuccess', 'apiError', 'makeRequest']],
+ actions: [CrawlerLogic, ['startCrawl']],
},
actions: () => ({
fetchDomainConfigData: true,
@@ -124,9 +124,8 @@ export const CrawlCustomSettingsFlyoutLogic = kea<
isFormSubmitting: [
false,
{
- makeRequest: () => true,
- apiSuccess: () => false,
- apiError: () => false,
+ startCustomCrawl: () => true,
+ startCrawl: () => false,
},
],
isFlyoutVisible: [
@@ -134,8 +133,7 @@ export const CrawlCustomSettingsFlyoutLogic = kea<
{
showFlyout: () => true,
hideFlyout: () => false,
- apiSuccess: () => false,
- apiError: () => false,
+ startCrawl: () => false,
},
],
maxCrawlDepth: [
@@ -253,7 +251,7 @@ export const CrawlCustomSettingsFlyoutLogic = kea<
overrides.sitemap_urls = sitemapUrls;
}
- CrawlerLogic.actions.startCrawl(overrides);
+ actions.startCrawl(overrides);
},
}),
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx
index 836490a925218..b67e866151ff0 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx
@@ -9,53 +9,40 @@ import React, { useEffect, ChangeEvent } from 'react';
import { useActions, useValues } from 'kea';
-import { SearchHit } from '@elastic/elasticsearch/lib/api/types';
-
import {
EuiFieldSearch,
- EuiTitle,
- EuiSpacer,
- EuiPanel,
EuiFlexGroup,
EuiFlexItem,
+ EuiPanel,
+ EuiSpacer,
+ EuiTitle,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
-import { Result } from '../../../shared/result/result';
+import { DocumentList } from './components/document_list/document_list';
+import { DocumentsLogic, DEFAULT_PAGINATION } from './documents_logic';
-import { DocumentsLogic } from './documents_logic';
import { IndexNameLogic } from './index_name_logic';
import './documents.scss';
export const SearchIndexDocuments: React.FC = () => {
const { indexName } = useValues(IndexNameLogic);
- const { simplifiedMapping, results } = useValues(DocumentsLogic);
+ const { simplifiedMapping } = useValues(DocumentsLogic);
const { makeRequest, makeMappingRequest, setSearchQuery } = useActions(DocumentsLogic);
useEffect(() => {
- makeRequest({ indexName, query: '' });
+ makeRequest({
+ indexName,
+ pagination: DEFAULT_PAGINATION,
+ query: '',
+ });
makeMappingRequest({ indexName });
}, [indexName]);
- const resultToField = (result: SearchHit) => {
- if (simplifiedMapping && result._source && !Array.isArray(result._source)) {
- if (typeof result._source === 'object') {
- return Object.entries(result._source).map(([key, value]) => {
- return {
- fieldName: key,
- fieldType: simplifiedMapping[key]?.type ?? 'object',
- fieldValue: JSON.stringify(value, null, 2),
- };
- });
- }
- }
- return [];
- };
-
return (
-
+
@@ -91,21 +78,7 @@ export const SearchIndexDocuments: React.FC = () => {
i18n.translate('xpack.enterpriseSearch.content.searchIndex.documents.noMappings', {
defaultMessage: 'No mappings found for index',
})}
-
- {simplifiedMapping &&
- results.map((result) => {
- return (
- <>
-
-
- >
- );
- })}
+ {simplifiedMapping && }
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.test.ts
index dafc0294e8c3e..ad80a0655b33b 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.test.ts
@@ -10,19 +10,24 @@ import { LogicMounter, mockFlashMessageHelpers } from '../../../__mocks__/kea_lo
import { nextTick } from '@kbn/test-jest-helpers';
import { HttpError, Status } from '../../../../../common/types/api';
-
import { MappingsApiLogic } from '../../api/mappings/mappings_logic';
import { SearchDocumentsApiLogic } from '../../api/search_documents/search_documents_logic';
-import { DocumentsLogic } from './documents_logic';
+import {
+ DocumentsLogic,
+ INDEX_DOCUMENTS_META_DEFAULT,
+ convertMetaToPagination,
+} from './documents_logic';
import { IndexNameLogic } from './index_name_logic';
-const DEFAULT_VALUES = {
+export const DEFAULT_VALUES = {
data: undefined,
+ docsPerPage: 25,
indexName: 'indexName',
isLoading: true,
mappingData: undefined,
mappingStatus: 0,
+ meta: INDEX_DOCUMENTS_META_DEFAULT,
query: '',
results: [],
status: Status.IDLE,
@@ -57,6 +62,25 @@ describe('DocumentsLogic', () => {
expect(DocumentsLogic.values).toEqual({ ...DEFAULT_VALUES, query: newQueryString });
});
});
+ describe('setDocsPerPage', () => {
+ it('sets documents to show per page', () => {
+ const docsToShow = 50;
+ expect(DocumentsLogic.values).toEqual({ ...DEFAULT_VALUES });
+ DocumentsLogic.actions.setDocsPerPage(docsToShow);
+ expect(DocumentsLogic.values).toEqual({
+ ...DEFAULT_VALUES,
+ docsPerPage: docsToShow,
+ meta: {
+ page: {
+ ...INDEX_DOCUMENTS_META_DEFAULT.page,
+ size: docsToShow,
+ },
+ },
+ simplifiedMapping: undefined,
+ status: Status.LOADING,
+ });
+ });
+ });
});
describe('listeners', () => {
describe('setSearchQuery', () => {
@@ -69,7 +93,9 @@ describe('DocumentsLogic', () => {
jest.advanceTimersByTime(250);
await nextTick();
expect(DocumentsLogic.actions.makeRequest).toHaveBeenCalledWith({
+ docsPerPage: 25,
indexName: 'indexName',
+ pagination: convertMetaToPagination(INDEX_DOCUMENTS_META_DEFAULT),
query: 'test',
});
jest.useRealTimers();
@@ -84,7 +110,11 @@ describe('DocumentsLogic', () => {
expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1);
});
it('clears flash messages on new makeRequest', () => {
- DocumentsLogic.actions.makeRequest({ indexName: 'index', query: '' });
+ DocumentsLogic.actions.makeRequest({
+ indexName: 'index',
+ pagination: convertMetaToPagination(INDEX_DOCUMENTS_META_DEFAULT),
+ query: '',
+ });
expect(mockFlashMessageHelpers.clearFlashMessages).toHaveBeenCalledTimes(1);
});
});
@@ -99,11 +129,17 @@ describe('DocumentsLogic', () => {
};
expect(DocumentsLogic.values).toEqual({ ...DEFAULT_VALUES });
MappingsApiLogic.actions.apiSuccess({ mappings: {} });
- SearchDocumentsApiLogic.actions.apiSuccess(mockSuccessData);
+ SearchDocumentsApiLogic.actions.apiSuccess({
+ meta: INDEX_DOCUMENTS_META_DEFAULT,
+ results: mockSuccessData,
+ });
expect(DocumentsLogic.values).toEqual({
...DEFAULT_VALUES,
- data: mockSuccessData,
+ data: {
+ meta: INDEX_DOCUMENTS_META_DEFAULT,
+ results: mockSuccessData,
+ },
isLoading: false,
mappingData: {
mappings: {},
@@ -135,17 +171,43 @@ describe('DocumentsLogic', () => {
};
MappingsApiLogic.actions.apiSuccess({ mappings: {} });
- SearchDocumentsApiLogic.actions.apiSuccess(mockSuccessData);
+ SearchDocumentsApiLogic.actions.apiSuccess({
+ meta: {
+ page: {
+ ...INDEX_DOCUMENTS_META_DEFAULT.page,
+ total_pages: 1,
+ total_results: 1,
+ },
+ },
+ results: mockSuccessData,
+ });
expect(DocumentsLogic.values).toEqual({
...DEFAULT_VALUES,
- data: mockSuccessData,
+ data: {
+ meta: {
+ page: {
+ ...INDEX_DOCUMENTS_META_DEFAULT.page,
+ total_pages: 1,
+ total_results: 1,
+ },
+ },
+ results: mockSuccessData,
+ },
isLoading: false,
mappingData: {
mappings: {},
},
mappingStatus: Status.SUCCESS,
+ meta: {
+ page: {
+ ...INDEX_DOCUMENTS_META_DEFAULT.page,
+ total_pages: 1,
+ total_results: 1,
+ },
+ },
results: [{ _id: '123', _index: 'indexName', searchHit: true }],
+ simplifiedMapping: undefined,
status: Status.SUCCESS,
});
});
@@ -158,11 +220,14 @@ describe('DocumentsLogic', () => {
};
MappingsApiLogic.actions.apiSuccess({ mappings: {} });
- SearchDocumentsApiLogic.actions.apiSuccess(mockSuccessData);
+ SearchDocumentsApiLogic.actions.apiSuccess({
+ meta: INDEX_DOCUMENTS_META_DEFAULT,
+ results: mockSuccessData,
+ });
expect(DocumentsLogic.values).toEqual({
...DEFAULT_VALUES,
- data: mockSuccessData,
+ data: { meta: INDEX_DOCUMENTS_META_DEFAULT, results: mockSuccessData },
isLoading: false,
mappingData: {
mappings: {},
@@ -182,7 +247,7 @@ describe('DocumentsLogic', () => {
expect(DocumentsLogic.values).toEqual({
...DEFAULT_VALUES,
- isLoading: false,
+ isLoading: true,
mappingData: {
mappings: { properties: { some: { type: 'text' } } },
},
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.ts
index 23983f2858d8d..aaa3c44541f2a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.ts
@@ -14,44 +14,74 @@ import {
SearchHit,
} from '@elastic/elasticsearch/lib/api/types';
+import { ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT } from '../../../../../common/constants';
+import { Meta } from '../../../../../common/types';
import { HttpError, Status } from '../../../../../common/types/api';
import { flashAPIErrors, clearFlashMessages } from '../../../shared/flash_messages';
+import { updateMetaPageIndex } from '../../../shared/table_pagination';
import { MappingsApiLogic } from '../../api/mappings/mappings_logic';
import { SearchDocumentsApiLogic } from '../../api/search_documents/search_documents_logic';
import { IndexNameLogic } from './index_name_logic';
+export const INDEX_DOCUMENTS_META_DEFAULT = {
+ page: {
+ current: 0,
+ size: ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT,
+ total_pages: 0,
+ total_results: 0,
+ },
+};
+
+export const DEFAULT_PAGINATION = {
+ pageIndex: INDEX_DOCUMENTS_META_DEFAULT.page.current,
+ pageSize: INDEX_DOCUMENTS_META_DEFAULT.page.size,
+ totalItemCount: INDEX_DOCUMENTS_META_DEFAULT.page.total_results,
+};
+
interface DocumentsLogicActions {
apiError(error: HttpError): HttpError;
apiReset: typeof SearchDocumentsApiLogic.actions.apiReset;
makeMappingRequest: typeof MappingsApiLogic.actions.makeRequest;
makeRequest: typeof SearchDocumentsApiLogic.actions.makeRequest;
mappingsApiError(error: HttpError): HttpError;
+ onPaginate(newPageIndex: number): { newPageIndex: number };
+ setDocsPerPage(docsPerPage: number): { docsPerPage: number };
setSearchQuery(query: string): { query: string };
}
-interface DocumentsLogicValues {
+export interface DocumentsLogicValues {
data: typeof SearchDocumentsApiLogic.values.data;
+ docsPerPage: number;
indexName: typeof IndexNameLogic.values.indexName;
isLoading: boolean;
mappingData: IndicesGetMappingIndexMappingRecord;
mappingStatus: Status;
+ meta: Meta;
query: string;
results: SearchHit[];
simplifiedMapping: Record | undefined;
status: Status;
}
+export const convertMetaToPagination = (meta: Meta) => ({
+ pageIndex: meta.page.current,
+ pageSize: meta.page.size,
+ totalItemCount: meta.page.total_results,
+});
+
export const DocumentsLogic = kea>({
actions: {
+ onPaginate: (newPageIndex) => ({ newPageIndex }),
+ setDocsPerPage: (docsPerPage) => ({ docsPerPage }),
setSearchQuery: (query) => ({ query }),
},
connect: {
actions: [
SearchDocumentsApiLogic,
- ['apiReset', 'makeRequest', 'apiError'],
+ ['apiReset', 'makeRequest', 'apiError', 'apiSuccess'],
MappingsApiLogic,
['makeRequest as makeMappingRequest', 'apiError as mappingsApiError'],
],
@@ -68,13 +98,50 @@ export const DocumentsLogic = kea flashAPIErrors(e),
makeRequest: () => clearFlashMessages(),
mappingsApiError: (e) => flashAPIErrors(e),
+ onPaginate: () => {
+ actions.makeRequest({
+ docsPerPage: values.docsPerPage,
+ indexName: values.indexName,
+ pagination: convertMetaToPagination(values.meta),
+ query: values.query,
+ });
+ },
+ setDocsPerPage: () => {
+ actions.makeRequest({
+ docsPerPage: values.docsPerPage,
+ indexName: values.indexName,
+ pagination: convertMetaToPagination(values.meta),
+ query: values.query,
+ });
+ },
setSearchQuery: async (_, breakpoint) => {
await breakpoint(250);
- actions.makeRequest({ indexName: values.indexName, query: values.query });
+ actions.makeRequest({
+ docsPerPage: values.docsPerPage,
+ indexName: values.indexName,
+ pagination: convertMetaToPagination(values.meta),
+ query: values.query,
+ });
},
}),
path: ['enterprise_search', 'search_index', 'documents'],
reducers: () => ({
+ docsPerPage: [
+ ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT,
+ {
+ setDocsPerPage: (_, { docsPerPage }) => docsPerPage,
+ },
+ ],
+ meta: [
+ INDEX_DOCUMENTS_META_DEFAULT,
+ {
+ apiSuccess: (_, { meta }) => meta,
+ onPaginate: (state, { newPageIndex }) => updateMetaPageIndex(state, newPageIndex),
+ setDocsPerPage: (_, { docsPerPage }) => ({
+ page: { ...INDEX_DOCUMENTS_META_DEFAULT.page, size: docsPerPage },
+ }),
+ },
+ ],
query: [
'',
{
@@ -85,14 +152,12 @@ export const DocumentsLogic = kea ({
isLoading: [
() => [selectors.status, selectors.mappingStatus],
- (status, mappingStatus) => status !== Status.SUCCESS && mappingStatus !== Status.SUCCESS,
+ (status, mappingStatus) => status !== Status.SUCCESS || mappingStatus !== Status.SUCCESS,
],
results: [
- () => [selectors.data, selectors.isLoading],
- (data: SearchResponseBody, isLoading) => {
- if (isLoading) return [];
-
- return data?.hits?.hits || [];
+ () => [selectors.data],
+ (data: { results: SearchResponseBody }) => {
+ return data?.results?.hits?.hits || [];
},
],
simplifiedMapping: [
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/total_stats.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/total_stats.tsx
index dfc4ccae2385c..dd55dd399392c 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/total_stats.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/total_stats.tsx
@@ -23,7 +23,7 @@ interface TotalStatsProps {
export const TotalStats: React.FC = ({ ingestionType, additionalItems = [] }) => {
const { indexData, isError, isLoading } = useValues(OverviewLogic);
- const documentCount = indexData?.total.docs.count ?? 0;
+ const documentCount = indexData?.count ?? 0;
const hideStats = isLoading || isError;
const stats: EuiStatProps[] = [
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_table.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_table.tsx
index 6189ffdc879e0..2627f89ab3b88 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_table.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_table.tsx
@@ -17,7 +17,6 @@ import {
EuiText,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
-import { FormattedRelative } from '@kbn/i18n-react';
import { Meta } from '../../../../../common/types';
import { EuiLinkTo, EuiButtonIconTo } from '../../../shared/react_router_helpers';
@@ -55,6 +54,7 @@ const columns: Array> = [
),
sortable: true,
truncateText: true,
+ width: '40%',
},
{
field: 'health',
@@ -69,14 +69,16 @@ const columns: Array> = [
),
sortable: true,
truncateText: true,
+ width: '10%',
},
{
- field: 'total.docs.count',
+ field: 'count',
name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.docsCount.columnTitle', {
defaultMessage: 'Docs count',
}),
sortable: true,
truncateText: true,
+ width: '10%',
},
{
field: 'ingestionMethod',
@@ -90,34 +92,7 @@ const columns: Array> = [
{ingestionMethodToText(ingestionMethod)}
),
truncateText: true,
- },
- {
- field: 'lastUpdated',
- name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.lastUpdated.columnTitle', {
- defaultMessage: 'Last updated',
- }),
- render: (dateString: string) => {
- if (dateString === 'never') {
- return (
-
- {i18n.translate('xpack.enterpriseSearch.content.searchIndices.lastUpdated.never', {
- defaultMessage: 'Never',
- })}
-
- );
- }
- return dateString ? (
-
- ) : (
-
- {i18n.translate('xpack.enterpriseSearch.content.searchIndices.lastUpdated.none', {
- defaultMessage: 'Unknown',
- })}
-
- );
- },
- sortable: true,
- truncateText: true,
+ width: '10%',
},
{
name: i18n.translate(
@@ -150,6 +125,7 @@ const columns: Array> = [
}
},
truncateText: true,
+ width: '10%',
},
{
actions: [
@@ -169,6 +145,7 @@ const columns: Array> = [
name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.actions.columnTitle', {
defaultMessage: 'Actions',
}),
+ width: '5%',
},
];
@@ -190,7 +167,7 @@ export const IndicesTable: React.FC = ({
columns={columns}
onChange={onChange}
pagination={{ ...convertMetaToPagination(meta), showPerPageOptions: false }}
- tableLayout="auto"
+ tableLayout="fixed"
loading={isLoading}
/>
);
diff --git a/x-pack/plugins/enterprise_search/server/integrations.ts b/x-pack/plugins/enterprise_search/server/integrations.ts
index f8c73a4ac27b5..659d9695703b7 100644
--- a/x-pack/plugins/enterprise_search/server/integrations.ts
+++ b/x-pack/plugins/enterprise_search/server/integrations.ts
@@ -363,7 +363,7 @@ export const registerEnterpriseSearchIntegrations = (
defaultMessage: 'API',
}),
description: i18n.translate('xpack.enterpriseSearch.integrations.apiDescription', {
- defaultMessage: "Add search to your application with App Search's robust APIs.",
+ defaultMessage: "Add search to your application with Elasticsearch's robust APIs.",
}),
categories: ['enterprise_search', 'custom', 'elastic_stack'],
uiInternalPath: '/app/enterprise_search/content/search_indices/new_index?method=api',
diff --git a/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.test.ts b/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.test.ts
index c60d6bf185190..9c3bb302ca45e 100644
--- a/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.test.ts
+++ b/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.test.ts
@@ -8,8 +8,11 @@
import { SearchResponseBody } from '@elastic/elasticsearch/lib/api/types';
import { IScopedClusterClient } from '@kbn/core/server';
+import { ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT } from '../../common/constants';
+
import { fetchSearchResults } from './fetch_search_results';
+const DEFAULT_FROM_VALUE = 0;
describe('fetchSearchResults lib function', () => {
const mockClient = {
asCurrentUser: {
@@ -82,8 +85,26 @@ describe('fetchSearchResults lib function', () => {
).resolves.toEqual(regularSearchResultsResponse);
expect(mockClient.asCurrentUser.search).toHaveBeenCalledWith({
+ from: DEFAULT_FROM_VALUE,
index: indexName,
q: query,
+ size: ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT,
+ });
+ });
+
+ it('should return search results with hits when no query is passed', async () => {
+ mockClient.asCurrentUser.search.mockImplementation(
+ () => regularSearchResultsResponse as SearchResponseBody
+ );
+
+ await expect(
+ fetchSearchResults(mockClient as unknown as IScopedClusterClient, indexName)
+ ).resolves.toEqual(regularSearchResultsResponse);
+
+ expect(mockClient.asCurrentUser.search).toHaveBeenCalledWith({
+ from: DEFAULT_FROM_VALUE,
+ index: indexName,
+ size: ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT,
});
});
@@ -97,8 +118,10 @@ describe('fetchSearchResults lib function', () => {
).resolves.toEqual(emptySearchResultsResponse);
expect(mockClient.asCurrentUser.search).toHaveBeenCalledWith({
+ from: DEFAULT_FROM_VALUE,
index: indexName,
q: query,
+ size: ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT,
});
});
});
diff --git a/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.ts b/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.ts
index 6e1c8362c2dc3..d44ef938af98d 100644
--- a/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.ts
+++ b/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.ts
@@ -8,13 +8,19 @@
import { SearchResponseBody } from '@elastic/elasticsearch/lib/api/types';
import { IScopedClusterClient } from '@kbn/core/server';
+import { ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT } from '../../common/constants';
+
export const fetchSearchResults = async (
client: IScopedClusterClient,
indexName: string,
- query?: string
+ query?: string,
+ from: number = 0,
+ size: number = ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT
): Promise => {
const results = await client.asCurrentUser.search({
+ from,
index: indexName,
+ size,
...(!!query ? { q: query } : {}),
});
return results;
diff --git a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.test.ts b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.test.ts
index 1de3b0372a47a..9bf9f2b2d2f1d 100644
--- a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.test.ts
+++ b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.test.ts
@@ -24,6 +24,7 @@ jest.mock('../crawler/fetch_crawlers', () => ({
describe('fetchIndex lib function', () => {
const mockClient = {
asCurrentUser: {
+ count: jest.fn().mockReturnValue({ count: 100 }),
index: jest.fn(),
indices: {
get: jest.fn(),
@@ -60,6 +61,7 @@ describe('fetchIndex lib function', () => {
const result = {
aliases: [],
+ count: 100,
health: 'green',
name: 'index_name',
status: 'open',
diff --git a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.ts b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.ts
index b4845cb72391a..1505d4501ac12 100644
--- a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.ts
+++ b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.ts
@@ -20,11 +20,17 @@ export const fetchIndex = async (
const indexDataResult = await client.asCurrentUser.indices.get({ index });
const indexData = indexDataResult[index];
const { indices } = await client.asCurrentUser.indices.stats({ index });
+
+ const { count } = await client.asCurrentUser.count({ index });
+
if (!indices || !indices[index] || !indexData) {
throw new Error('404');
}
const indexStats = indices[index];
- const indexResult = mapIndexStats(indexData, indexStats, index);
+ const indexResult = {
+ count,
+ ...mapIndexStats(indexData, indexStats, index),
+ };
const connector = await fetchConnectorByIndexName(client, index);
if (connector) {
diff --git a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.test.ts b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.test.ts
index ce4666c589a15..d7f7b6185eaa6 100644
--- a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.test.ts
+++ b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.test.ts
@@ -20,6 +20,7 @@ describe('fetchIndices lib function', () => {
security: {
hasPrivileges: jest.fn(),
},
+ count: jest.fn().mockReturnValue({ count: 100 }),
},
asInternalUser: {},
};
@@ -75,6 +76,7 @@ describe('fetchIndices lib function', () => {
fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', false, true)
).resolves.toEqual([
{
+ count: 100,
health: 'green',
name: 'search-regular-index',
status: 'open',
@@ -123,6 +125,7 @@ describe('fetchIndices lib function', () => {
fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', true, true)
).resolves.toEqual([
{
+ count: 100,
health: 'green',
name: 'search-regular-index',
status: 'open',
@@ -183,6 +186,7 @@ describe('fetchIndices lib function', () => {
fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', false, true)
).resolves.toEqual([
{
+ count: 100,
health: 'green',
name: 'index-without-prefix',
status: 'open',
@@ -200,6 +204,7 @@ describe('fetchIndices lib function', () => {
uuid: '83a81e7e-5955-4255-b008-5d6961203f57',
},
{
+ count: 100,
health: 'green',
name: 'search-aliased',
status: 'open',
@@ -217,6 +222,7 @@ describe('fetchIndices lib function', () => {
uuid: '83a81e7e-5955-4255-b008-5d6961203f57',
},
{
+ count: 100,
health: 'green',
name: 'search-double-aliased',
status: 'open',
@@ -234,6 +240,7 @@ describe('fetchIndices lib function', () => {
uuid: '83a81e7e-5955-4255-b008-5d6961203f57',
},
{
+ count: 100,
health: 'green',
name: 'second-index',
status: 'open',
@@ -282,6 +289,7 @@ describe('fetchIndices lib function', () => {
fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', false, false)
).resolves.toEqual([
{
+ count: 100,
health: 'green',
name: 'index-without-prefix',
status: 'open',
@@ -299,6 +307,7 @@ describe('fetchIndices lib function', () => {
uuid: '83a81e7e-5955-4255-b008-5d6961203f57',
},
{
+ count: 100,
health: 'green',
name: 'second-index',
status: 'open',
@@ -332,6 +341,7 @@ describe('fetchIndices lib function', () => {
fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', false, true)
).resolves.toEqual([
{
+ count: 100,
health: undefined,
name: 'search-regular-index',
status: undefined,
diff --git a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.ts b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.ts
index 69df076a7ccbf..aa2ac7853dc10 100644
--- a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.ts
+++ b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.ts
@@ -34,6 +34,7 @@ export const mapIndexStats = (
size_in_bytes: sizeInBytes,
},
};
+
return {
aliases,
health: indexStats?.health,
@@ -44,6 +45,16 @@ export const mapIndexStats = (
};
};
+export const fetchIndexCounts = async (client: IScopedClusterClient, indicesNames: string[]) => {
+ // TODO: is there way to batch this? Passing multiple index names or a pattern still returns a singular count
+ const countPromises = indicesNames.map(async (indexName) => {
+ const { count } = await client.asCurrentUser.count({ index: indexName });
+ return { [indexName]: count };
+ });
+ const indexCountArray = await Promise.all(countPromises);
+ return indexCountArray.reduce((acc, current) => ({ ...acc, ...current }), {});
+};
+
export const fetchIndices = async (
client: IScopedClusterClient,
indexPattern: string,
@@ -97,6 +108,8 @@ export const fetchIndices = async (
],
});
+ const indexCounts = await fetchIndexCounts(client, indexAndAliasNames);
+
return indicesNames
.map((indexName: string) => {
const indexData = totalIndices[indexName];
@@ -108,6 +121,7 @@ export const fetchIndices = async (
const indicesAndAliases = [] as ElasticsearchIndexWithPrivileges[];
indicesAndAliases.push({
name,
+ count: indexCounts[name] ?? 0,
alias: false,
privileges: { read: false, manage: false, ...indexPrivileges[name] },
...indexData,
@@ -117,6 +131,7 @@ export const fetchIndices = async (
aliases.forEach((alias) => {
indicesAndAliases.push({
name: alias,
+ count: indexCounts[alias] ?? 0,
alias: true,
privileges: { read: false, manage: false, ...indexPrivileges[name] },
...indexData,
diff --git a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.test.ts b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.test.ts
index beff8408b9486..ac6d8b70fde07 100644
--- a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.test.ts
+++ b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.test.ts
@@ -16,7 +16,7 @@ import { fetchSearchResults } from '../../lib/fetch_search_results';
import { registerSearchRoute } from './search';
-describe('Elasticsearch Index Mapping', () => {
+describe('Elasticsearch Search', () => {
let mockRouter: MockRouter;
const mockClient = {};
@@ -76,10 +76,104 @@ describe('Elasticsearch Index Mapping', () => {
params: { index_name: 'search-index-name', query: 'banana' },
});
- expect(fetchSearchResults).toHaveBeenCalledWith(mockClient, 'search-index-name', 'banana');
+ expect(fetchSearchResults).toHaveBeenCalledWith(
+ mockClient,
+ 'search-index-name',
+ 'banana',
+ 0,
+ 25
+ );
expect(mockRouter.response.ok).toHaveBeenCalledWith({
- body: mockData,
+ body: {
+ meta: {
+ page: {
+ current: 0,
+ size: 1,
+ total_pages: 1,
+ total_results: 1,
+ },
+ },
+ results: mockData,
+ },
+
+ headers: { 'content-type': 'application/json' },
+ });
+ });
+ });
+
+ describe('GET /internal/enterprise_search/indices/{index_name}/search', () => {
+ let mockRouterNoQuery: MockRouter;
+ beforeEach(() => {
+ const context = {
+ core: Promise.resolve({ elasticsearch: { client: mockClient } }),
+ } as jest.Mocked;
+
+ mockRouterNoQuery = new MockRouter({
+ context,
+ method: 'get',
+ path: '/internal/enterprise_search/indices/{index_name}/search',
+ });
+
+ registerSearchRoute({
+ ...mockDependencies,
+ router: mockRouterNoQuery.router,
+ });
+ });
+ it('fails validation without index_name', () => {
+ const request = { params: {} };
+ mockRouterNoQuery.shouldThrow(request);
+ });
+
+ it('searches returns first 25 search results by default', async () => {
+ const mockData = {
+ _shards: { failed: 0, skipped: 0, successful: 2, total: 2 },
+ hits: {
+ hits: [
+ {
+ _id: '5a12292a0f5ae10021650d7e',
+ _index: 'search-regular-index',
+ _score: 4.437291,
+ _source: { id: '5a12292a0f5ae10021650d7e', name: 'banana' },
+ },
+ ],
+
+ max_score: null,
+ total: { relation: 'eq', value: 1 },
+ },
+ timed_out: false,
+ took: 4,
+ };
+
+ (fetchSearchResults as jest.Mock).mockImplementationOnce(() => {
+ return Promise.resolve(mockData);
+ });
+
+ await mockRouterNoQuery.callRoute({
+ params: { index_name: 'search-index-name' },
+ });
+
+ expect(fetchSearchResults).toHaveBeenCalledWith(
+ mockClient,
+ 'search-index-name',
+ 'banana',
+ 0,
+ 25
+ );
+
+ expect(mockRouterNoQuery.response.ok).toHaveBeenCalledWith({
+ body: {
+ meta: {
+ page: {
+ current: 0,
+ size: 1,
+ total_pages: 1,
+ total_results: 1,
+ },
+ },
+ results: mockData,
+ },
+
headers: { 'content-type': 'application/json' },
});
});
diff --git a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.ts b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.ts
index af9c578d07494..68391bf8b4f4b 100644
--- a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.ts
+++ b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.ts
@@ -5,11 +5,36 @@
* 2.0.
*/
+import { SearchResponseBody } from '@elastic/elasticsearch/lib/api/types';
+
import { schema } from '@kbn/config-schema';
+import { ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT } from '../../../common/constants';
+
import { fetchSearchResults } from '../../lib/fetch_search_results';
import { RouteDependencies } from '../../plugin';
+const calculateMeta = (searchResults: SearchResponseBody, page: number, size: number) => {
+ let totalResults = 0;
+ if (searchResults.hits.total === null || searchResults.hits.total === undefined) {
+ totalResults = 0;
+ } else if (typeof searchResults.hits.total === 'number') {
+ totalResults = searchResults.hits.total;
+ } else {
+ totalResults = searchResults.hits.total.value;
+ }
+ const totalPages = Math.ceil(totalResults / size) || 1;
+
+ return {
+ page: {
+ current: page,
+ size: searchResults.hits.hits.length,
+ total_pages: (Number.isFinite(totalPages) && totalPages) || 1,
+ total_results: totalResults,
+ },
+ };
+};
+
export function registerSearchRoute({ router }: RouteDependencies) {
router.get(
{
@@ -18,14 +43,33 @@ export function registerSearchRoute({ router }: RouteDependencies) {
params: schema.object({
index_name: schema.string(),
}),
+ query: schema.object({
+ page: schema.number({ defaultValue: 0, min: 0 }),
+ size: schema.number({
+ defaultValue: ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT,
+ min: 0,
+ }),
+ }),
},
},
async (context, request, response) => {
const { client } = (await context.core).elasticsearch;
+ const { page = 0, size = ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT } = request.query;
+ const from = page * size;
try {
- const searchResults = await fetchSearchResults(client, request.params.index_name, '');
+ const searchResults: SearchResponseBody = await fetchSearchResults(
+ client,
+ request.params.index_name,
+ '',
+ from,
+ size
+ );
+
return response.ok({
- body: searchResults,
+ body: {
+ meta: calculateMeta(searchResults, page, size),
+ results: searchResults,
+ },
headers: { 'content-type': 'application/json' },
});
} catch (error) {
@@ -44,18 +88,33 @@ export function registerSearchRoute({ router }: RouteDependencies) {
index_name: schema.string(),
query: schema.string(),
}),
+ query: schema.object({
+ page: schema.number({ defaultValue: 0, min: 0 }),
+ size: schema.number({
+ defaultValue: ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT,
+ min: 0,
+ }),
+ }),
},
},
async (context, request, response) => {
const { client } = (await context.core).elasticsearch;
+ const { page = 0, size = ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT } = request.query;
+ const from = page * size;
try {
const searchResults = await fetchSearchResults(
client,
request.params.index_name,
- request.params.query
+ request.params.query,
+ from,
+ size
);
+
return response.ok({
- body: searchResults,
+ body: {
+ meta: calculateMeta(searchResults, page, size),
+ results: searchResults,
+ },
headers: { 'content-type': 'application/json' },
});
} catch (error) {
diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/bulk_upgrade_agents.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/bulk_upgrade_agents.yaml
index 0fcd93da6f61a..5e4378b9631f7 100644
--- a/x-pack/plugins/fleet/common/openapi/components/schemas/bulk_upgrade_agents.yaml
+++ b/x-pack/plugins/fleet/common/openapi/components/schemas/bulk_upgrade_agents.yaml
@@ -21,6 +21,9 @@ properties:
items:
type: string
description: list of agent IDs
+ force:
+ type: boolean
+ description: Force upgrade, skipping validation (should be used with caution)
required:
- agents
- version
diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/upgrade_agent.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/upgrade_agent.yaml
index 19c796f8f8404..4d7da58a4ae4c 100644
--- a/x-pack/plugins/fleet/common/openapi/components/schemas/upgrade_agent.yaml
+++ b/x-pack/plugins/fleet/common/openapi/components/schemas/upgrade_agent.yaml
@@ -1,16 +1,12 @@
title: Upgrade agent
-oneOf:
- - type: object
- properties:
- version:
- type: string
- required:
- - version
- - type: object
- properties:
- version:
- type: string
- source_uri:
- type: string
- required:
- - version
+type: object
+properties:
+ version:
+ type: string
+ source_uri:
+ type: string
+ force:
+ type: boolean
+ description: Force upgrade, skipping validation (should be used with caution)
+required:
+ - version
diff --git a/x-pack/plugins/fleet/cypress/integration/agent.spec.ts b/x-pack/plugins/fleet/cypress/integration/agent.spec.ts
index 6dc7ba2c88104..084ba548ff6c6 100644
--- a/x-pack/plugins/fleet/cypress/integration/agent.spec.ts
+++ b/x-pack/plugins/fleet/cypress/integration/agent.spec.ts
@@ -14,7 +14,9 @@ const createAgentDocs = (kibanaVersion: string) => [
];
let docs: any[] = [];
-describe('View agents', () => {
+// TODO: create fleet server, fix version of agent to upgrade to an allowed version (>= fleet server's, < kibana)
+// https://github.com/elastic/kibana/issues/138121
+describe.skip('View agents', () => {
before(() => {
cy.task('deleteDocsByQuery', {
index: '.fleet-agents',
diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/advanced_tab.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/advanced_tab.tsx
index 02cc458295677..e13d9b5394dc9 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/advanced_tab.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/advanced_tab.tsx
@@ -4,8 +4,8 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
-import { EuiSteps } from '@elastic/eui';
import React from 'react';
+import { EuiLoadingContent, EuiSteps } from '@elastic/eui';
import { useAdvancedForm } from './hooks';
@@ -24,6 +24,7 @@ interface AdvancedTabProps {
export const AdvancedTab: React.FunctionComponent = ({ selectedPolicyId }) => {
const {
+ isSelectFleetServerPolicyLoading,
eligibleFleetServerPolicies,
refreshEligibleFleetServerPolicies,
fleetServerPolicyId,
@@ -70,5 +71,9 @@ export const AdvancedTab: React.FunctionComponent = ({ selecte
getConfirmFleetServerConnectionStep({ isFleetServerReady, disabled: !Boolean(serviceToken) }),
];
- return ;
+ return isSelectFleetServerPolicyLoading ? (
+
+ ) : (
+
+ );
};
diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/hooks/use_advanced_form.ts b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/hooks/use_advanced_form.ts
index 5ed9f9faa0372..122f7045ac84c 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/hooks/use_advanced_form.ts
+++ b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/hooks/use_advanced_form.ts
@@ -19,6 +19,7 @@ import { useWaitForFleetServer } from './use_wait_for_fleet_server';
*/
export const useAdvancedForm = (defaultAgentPolicyId?: string) => {
const {
+ isSelectFleetServerPolicyLoading,
eligibleFleetServerPolicies,
refreshEligibleFleetServerPolicies,
fleetServerPolicyId,
@@ -31,6 +32,7 @@ export const useAdvancedForm = (defaultAgentPolicyId?: string) => {
const [deploymentMode, setDeploymentMode] = useState('quickstart');
return {
+ isSelectFleetServerPolicyLoading,
eligibleFleetServerPolicies,
refreshEligibleFleetServerPolicies,
fleetServerPolicyId,
diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/hooks/use_select_fleet_server_policy.ts b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/hooks/use_select_fleet_server_policy.ts
index b15fbc0c396a7..c22559d07509f 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/hooks/use_select_fleet_server_policy.ts
+++ b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/hooks/use_select_fleet_server_policy.ts
@@ -14,7 +14,12 @@ export const useSelectFleetServerPolicy = (defaultAgentPolicyId?: string) => {
const [fleetServerPolicyId, setFleetServerPolicyId] = useState(
defaultAgentPolicyId
);
- const { data: agentPoliciesData, resendRequest } = useGetAgentPolicies({
+ const {
+ isLoading,
+ isInitialRequest,
+ data: agentPoliciesData,
+ resendRequest,
+ } = useGetAgentPolicies({
full: true,
});
@@ -34,6 +39,7 @@ export const useSelectFleetServerPolicy = (defaultAgentPolicyId?: string) => {
}, [eligibleFleetServerPolicies, fleetServerPolicyId]);
return {
+ isSelectFleetServerPolicyLoading: isLoading && isInitialRequest,
fleetServerPolicyId,
setFleetServerPolicyId,
eligibleFleetServerPolicies,
diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/add_fleet_server_host.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/add_fleet_server_host.tsx
index 70753e37f8e8a..62b11e3295ecf 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/add_fleet_server_host.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/add_fleet_server_host.tsx
@@ -106,7 +106,6 @@ export const AddFleetServerHostStepContent = ({
}
buttonColor="danger"
+ data-test-subj="confirmForceInstallModal"
>
{
let esServer: kbnTestServer.TestElasticsearchUtils;
let kbnServer: kbnTestServer.TestKibanaUtils;
@@ -183,6 +185,10 @@ describe('Uprade package install version', () => {
res.saved_objects.forEach((so) => {
expect(so.attributes.install_format_schema_version).toBe(FLEET_INSTALL_FORMAT_VERSION);
+ if (!PACKAGES.includes(so.attributes.name)) {
+ return;
+ }
+
if (!OUTDATED_PACKAGES.includes(so.attributes.name)) {
expect(new Date(so.updated_at as string).getTime()).toBeLessThan(now);
} else {
diff --git a/x-pack/plugins/fleet/server/services/epm/fields/field.test.ts b/x-pack/plugins/fleet/server/services/epm/fields/field.test.ts
index 8be5f4655b480..ad1787c97aa19 100644
--- a/x-pack/plugins/fleet/server/services/epm/fields/field.test.ts
+++ b/x-pack/plugins/fleet/server/services/epm/fields/field.test.ts
@@ -624,4 +624,50 @@ describe('processFields', () => {
];
expect(processFields(fields)).toEqual(fieldsExpected);
});
+
+ test('handle wildcard field', () => {
+ const wildcardFields = [
+ {
+ name: 'a.*.b',
+ type: 'keyword',
+ },
+ {
+ name: 'a.b.*',
+ type: 'scaled_float',
+ },
+ ];
+
+ expect(processFields(wildcardFields)).toMatchInlineSnapshot(`
+ [
+ {
+ "name": "a",
+ "type": "group",
+ "fields": [
+ {
+ "name": "*",
+ "type": "group",
+ "fields": [
+ {
+ "name": "b",
+ "type": "object",
+ "object_type": "keyword"
+ }
+ ]
+ },
+ {
+ "name": "b",
+ "type": "group",
+ "fields": [
+ {
+ "name": "*",
+ "type": "object",
+ "object_type": "scaled_float"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ `);
+ });
});
diff --git a/x-pack/plugins/fleet/server/services/epm/fields/field.ts b/x-pack/plugins/fleet/server/services/epm/fields/field.ts
index 8d784e0cffc22..1759946f4f524 100644
--- a/x-pack/plugins/fleet/server/services/epm/fields/field.ts
+++ b/x-pack/plugins/fleet/server/services/epm/fields/field.ts
@@ -246,8 +246,23 @@ export const getField = (fields: Fields, pathNames: string[]): Field | undefined
return undefined;
};
+export function processFieldsWithWildcard(fields: Fields): Fields {
+ const newFields: Fields = [];
+ for (const field of fields) {
+ const hasWildcard = field.name.includes('*');
+ const hasObjectType = field.object_type;
+ if (hasWildcard && !hasObjectType) {
+ newFields.push({ ...field, type: 'object', object_type: field.type });
+ } else {
+ newFields.push({ ...field });
+ }
+ }
+ return newFields;
+}
+
export function processFields(fields: Fields): Fields {
- const expandedFields = expandFields(fields);
+ const processedFields = processFieldsWithWildcard(fields);
+ const expandedFields = expandFields(processedFields);
const dedupedFields = dedupFields(expandedFields);
return validateFields(dedupedFields, dedupedFields);
}
diff --git a/x-pack/plugins/fleet/server/services/preconfiguration.ts b/x-pack/plugins/fleet/server/services/preconfiguration.ts
index ff7d618527cac..4b1dde82b3b41 100644
--- a/x-pack/plugins/fleet/server/services/preconfiguration.ts
+++ b/x-pack/plugins/fleet/server/services/preconfiguration.ts
@@ -157,8 +157,8 @@ export async function ensurePreconfiguredPackagesAndPolicies(
policy
);
- const newFields = {
- defaultDownloadSourceId: defaultDownloadSource.id,
+ const newFields: Partial = {
+ download_source_id: defaultDownloadSource.id,
...fields,
};
if (hasChanged) {
diff --git a/x-pack/plugins/fleet/server/telemetry/sender.ts b/x-pack/plugins/fleet/server/telemetry/sender.ts
index 90013ff98324a..7684284165ee1 100644
--- a/x-pack/plugins/fleet/server/telemetry/sender.ts
+++ b/x-pack/plugins/fleet/server/telemetry/sender.ts
@@ -105,12 +105,15 @@ export class TelemetryEventsSender {
this.isSending = false;
}
- private async fetchClusterInfo(): Promise {
- if (this.esClient === undefined || this.esClient === null) {
- throw Error('elasticsearch client is unavailable: cannot retrieve cluster infomation');
+ private async fetchClusterInfo(): Promise {
+ try {
+ if (this.esClient === undefined || this.esClient === null) {
+ throw Error('elasticsearch client is unavailable: cannot retrieve cluster infomation');
+ }
+ return await this.esClient.info();
+ } catch (e) {
+ this.logger.debug(`Error fetching cluster information: ${e}`);
}
-
- return await this.esClient.info();
}
public async sendEvents(
diff --git a/x-pack/plugins/infra/kibana.json b/x-pack/plugins/infra/kibana.json
index d9d432fc702e4..2226c89ab90f6 100644
--- a/x-pack/plugins/infra/kibana.json
+++ b/x-pack/plugins/infra/kibana.json
@@ -14,7 +14,8 @@
"alerting",
"triggersActionsUi",
"observability",
- "ruleRegistry"
+ "ruleRegistry",
+ "unifiedSearch"
],
"optionalPlugins": ["ml", "home", "embeddable", "osquery"],
"server": true,
diff --git a/x-pack/plugins/infra/public/components/autocomplete_field/autocomplete_field.tsx b/x-pack/plugins/infra/public/components/autocomplete_field/autocomplete_field.tsx
index d54b12511a05c..e264da646949c 100644
--- a/x-pack/plugins/infra/public/components/autocomplete_field/autocomplete_field.tsx
+++ b/x-pack/plugins/infra/public/components/autocomplete_field/autocomplete_field.tsx
@@ -76,7 +76,7 @@ export class AutocompleteField extends React.Component<
data-test-subj="infraSearchField"
/>
{areSuggestionsVisible && !isLoadingSuggestions && suggestions.length > 0 ? (
-
+
{suggestions.map((suggestion, suggestionIndex) => (
;
+ kibana: KibanaReactContextValue;
children: RendererFunction<{
isLoadingSuggestions: boolean;
loadSuggestions: (expression: string, cursorPosition: number, maxSuggestions?: number) => void;
@@ -66,7 +65,7 @@ class WithKueryAutocompletionComponent extends React.Component<
const { indexPattern } = this.props;
const language = 'kuery';
const hasQuerySuggestions =
- this.props.kibana.services.unifiedSearch?.autocomplete.hasQuerySuggestions(language);
+ this.props.kibana.services.unifiedSearch.autocomplete.hasQuerySuggestions(language);
if (!hasQuerySuggestions) {
return;
diff --git a/x-pack/plugins/infra/public/types.ts b/x-pack/plugins/infra/public/types.ts
index 10b2aa25873d6..fcd806eb34ff9 100644
--- a/x-pack/plugins/infra/public/types.ts
+++ b/x-pack/plugins/infra/public/types.ts
@@ -6,6 +6,7 @@
*/
import type { CoreSetup, CoreStart, Plugin as PluginClass } from '@kbn/core/public';
+import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public';
import type { IHttpFetchError } from '@kbn/core-http-browser';
import type { DataPublicPluginStart } from '@kbn/data-plugin/public';
import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
@@ -62,6 +63,7 @@ export interface InfraClientSetupDeps {
export interface InfraClientStartDeps {
data: DataPublicPluginStart;
+ unifiedSearch: UnifiedSearchPublicPluginStart;
dataViews: DataViewsPublicPluginStart;
observability: ObservabilityPublicStart;
spaces: SpacesPluginStart;
diff --git a/x-pack/plugins/kubernetes_security/common/constants.ts b/x-pack/plugins/kubernetes_security/common/constants.ts
index 002e669c6839f..04c273290eca7 100644
--- a/x-pack/plugins/kubernetes_security/common/constants.ts
+++ b/x-pack/plugins/kubernetes_security/common/constants.ts
@@ -11,6 +11,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 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.
@@ -28,11 +29,12 @@ export const ENTRY_LEADER_INTERACTIVE = 'process.entry_leader.interactive';
export const ENTRY_LEADER_USER_ID = 'process.entry_leader.user.id';
export const ENTRY_LEADER_ENTITY_ID = 'process.entry_leader.entity_id';
-export const ORCHESTRATOR_CLUSTER_ID = 'orchestrator.cluster.name';
+export const ORCHESTRATOR_CLUSTER_ID = 'orchestrator.cluster.id';
+export const ORCHESTRATOR_CLUSTER_NAME = 'orchestrator.cluster.name';
export const ORCHESTRATOR_NAMESPACE = 'orchestrator.namespace';
+export const CLOUD_INSTANCE_NAME = 'cloud.instance.name';
export const ORCHESTRATOR_RESOURCE_ID = 'orchestrator.resource.name';
export const CONTAINER_IMAGE_NAME = 'container.image.name';
-export const CLOUD_INSTANCE_NAME = 'cloud.instance.name';
export const COUNT_WIDGET_KEY_CLUSTERS = 'CountClustersWidget';
export const COUNT_WIDGET_KEY_NAMESPACE = 'CountNamespaceWidgets';
diff --git a/x-pack/plugins/kubernetes_security/common/types/aggregate/index.ts b/x-pack/plugins/kubernetes_security/common/types/aggregate/index.ts
index 57a1df44292e9..a00a3996eaa8d 100644
--- a/x-pack/plugins/kubernetes_security/common/types/aggregate/index.ts
+++ b/x-pack/plugins/kubernetes_security/common/types/aggregate/index.ts
@@ -10,18 +10,19 @@ interface Aggregate {
doc_count: number;
}
-interface Buckets extends Aggregate {
+interface Bucket extends Aggregate {
key_as_string?: string;
- count_by_aggs: {
+ count_by_aggs?: {
value: number;
};
}
+
export interface AggregateResult {
- buckets: Buckets[];
+ buckets: Bucket[];
hasNextPage: boolean;
}
export interface AggregateBucketPaginationResult {
- buckets: Aggregate[];
+ buckets: Bucket[];
hasNextPage: boolean;
}
diff --git a/x-pack/plugins/kubernetes_security/common/types/multi_terms_aggregate/index.ts b/x-pack/plugins/kubernetes_security/common/types/multi_terms_aggregate/index.ts
new file mode 100644
index 0000000000000..0da95a0c2e74c
--- /dev/null
+++ b/x-pack/plugins/kubernetes_security/common/types/multi_terms_aggregate/index.ts
@@ -0,0 +1,33 @@
+/*
+ * Copyright 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 interface MultiTermsAggregateGroupBy {
+ field: string;
+ maybe?: string;
+}
+
+interface MultiTermsAggregate {
+ key: Array;
+ doc_count: number;
+}
+
+export interface Bucket extends MultiTermsAggregate {
+ key_as_string?: string;
+ count_by_aggs?: {
+ value: number;
+ };
+}
+
+export interface MultiTermsAggregateResult {
+ buckets: Bucket[];
+ hasNextPage: boolean;
+}
+
+export interface MultiTermsAggregateBucketPaginationResult {
+ buckets: Bucket[];
+ hasNextPage: boolean;
+}
diff --git a/x-pack/plugins/kubernetes_security/public/components/container_name_widget/index.tsx b/x-pack/plugins/kubernetes_security/public/components/container_name_widget/index.tsx
index 7617072207524..6c43088b662e2 100644
--- a/x-pack/plugins/kubernetes_security/public/components/container_name_widget/index.tsx
+++ b/x-pack/plugins/kubernetes_security/public/components/container_name_widget/index.tsx
@@ -171,7 +171,7 @@ export const ContainerNameWidget = ({
return aggsData?.buckets.map((aggData) => {
return {
name: aggData.key as string,
- count: addCommasToNumber(aggData.count_by_aggs.value),
+ count: addCommasToNumber(aggData.count_by_aggs?.value ?? 0),
};
});
})
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 e5e7798d7bfe3..85fe011bef998 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
@@ -71,7 +71,7 @@ const KubernetesSecurityRoutesComponent = ({
(result: AggregateResult): Record =>
result.buckets.reduce((groupedByKeyValue, aggregate) => {
groupedByKeyValue[aggregate.key_as_string || (aggregate.key.toString() as string)] =
- aggregate.count_by_aggs.value;
+ aggregate.count_by_aggs?.value ?? 0;
return groupedByKeyValue;
}, {} as Record),
[]
@@ -81,10 +81,10 @@ const KubernetesSecurityRoutesComponent = ({
(result: AggregateResult): Record =>
result.buckets.reduce((groupedByKeyValue, aggregate) => {
if (aggregate.key.toString() === '0') {
- groupedByKeyValue[aggregate.key] = aggregate.count_by_aggs.value;
+ groupedByKeyValue[aggregate.key] = aggregate.count_by_aggs?.value ?? 0;
} else {
groupedByKeyValue.nonRoot =
- (groupedByKeyValue.nonRoot || 0) + aggregate.count_by_aggs.value;
+ (groupedByKeyValue.nonRoot || 0) + (aggregate.count_by_aggs?.value ?? 0);
}
return groupedByKeyValue;
}, {} as Record),
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 97a7fdd38f611..3e24ec861a76f 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
@@ -9,89 +9,105 @@ Object {
css="[object Object]"
>
-
-
- selected cluster
+
+ selected cluster name
+
-
-
+
+
-
-
- selected namespace
+
+ selected namespace
+
-
-
+
+
-
-
- selected pod
+
+ selected pod
+
-
-
+
+
-
-
- selected image
+
+ selected image
+
-
-
+
+
+
+
+
+
+
+
+
+ selected cluster id
+
+
+
+
+
+
+
+
+
+
+ selected namespace
+
+
+
+
+
+
+
+
+
+
+ selected pod
+
+
+
+
+
+
+
+
+
+
+ selected image
+
+
+
+